smbmount fixes from Urban.
[tprouty/samba.git] / source / 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   --with-readline[=DIR]   Look for readline include/libs in DIR (default=auto) "
19 ac_help="$ac_help
20   --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) "
21 ac_help="$ac_help
22   --with-smbwrapper       Include SMB wrapper support (default=no) "
23 ac_help="$ac_help
24   --with-afs              Include AFS support (default=no) "
25 ac_help="$ac_help
26   --with-dce-dfs          Include DCE/DFS support (default=no)"
27 ac_help="$ac_help
28   --with-krb4=base-dir    Include Kerberos IV support (default=no)"
29 ac_help="$ac_help
30   --with-krb5=base-dir    Include Kerberos 5 support (default=no)"
31 ac_help="$ac_help
32   --with-automount        Include AUTOMOUNT support (default=no)"
33 ac_help="$ac_help
34   --with-smbmount         Include SMBMOUNT (Linux only) support (default=no)"
35 ac_help="$ac_help
36   --with-pam              Include PAM password database support (default=no)"
37 ac_help="$ac_help
38   --with-pam_smbpass      Build a PAM module to allow other applications to use our smbpasswd file (default=no)"
39 ac_help="$ac_help
40   --with-tdbsam           Include experimental TDB password database (default=no)"
41 ac_help="$ac_help
42   --with-ldapsam          Include Experimental LDAP-Sam support (default=no)"
43 ac_help="$ac_help
44   --with-nisplus-home     Include NISPLUS_HOME support (default=no)"
45 ac_help="$ac_help
46   --with-ssl              Include SSL support (default=no)
47   --with-sslinc=DIR       Where the SSL includes are (defaults to /usr/local/ssl)"
48 ac_help="$ac_help
49   --with-syslog           Include experimental SYSLOG support (default=no)"
50 ac_help="$ac_help
51   --with-profiling-data   Include gathering source code profile information (default=no)"
52 ac_help="$ac_help
53   --with-quotas           Include experimental disk-quota support (default=no)"
54 ac_help="$ac_help
55   --with-utmp             Include experimental utmp accounting (default=no)"
56 ac_help="$ac_help
57   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
58 ac_help="$ac_help
59   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
60 ac_help="$ac_help
61   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
62 ac_help="$ac_help
63   --with-spinlocks        Use spin locks instead of fcntl locks (default=no) "
64 ac_help="$ac_help
65   --with-acl-support      Include ACL support (default=no)"
66 ac_help="$ac_help
67   --with-winbind          Build winbind (default, if supported by OS)"
68
69 # Initialize some variables set by options.
70 # The variables have the same names as the options, with
71 # dashes changed to underlines.
72 build=NONE
73 cache_file=./config.cache
74 exec_prefix=NONE
75 host=NONE
76 no_create=
77 nonopt=NONE
78 no_recursion=
79 prefix=NONE
80 program_prefix=NONE
81 program_suffix=NONE
82 program_transform_name=s,x,x,
83 silent=
84 site=
85 srcdir=
86 target=NONE
87 verbose=
88 x_includes=NONE
89 x_libraries=NONE
90 bindir='${exec_prefix}/bin'
91 sbindir='${exec_prefix}/sbin'
92 libexecdir='${exec_prefix}/libexec'
93 datadir='${prefix}/share'
94 sysconfdir='${prefix}/etc'
95 sharedstatedir='${prefix}/com'
96 localstatedir='${prefix}/var'
97 libdir='${exec_prefix}/lib'
98 includedir='${prefix}/include'
99 oldincludedir='/usr/include'
100 infodir='${prefix}/info'
101 mandir='${prefix}/man'
102
103 # Initialize some other variables.
104 subdirs=
105 MFLAGS= MAKEFLAGS=
106 SHELL=${CONFIG_SHELL-/bin/sh}
107 # Maximum number of lines to put in a shell here document.
108 ac_max_here_lines=12
109
110 ac_prev=
111 for ac_option
112 do
113
114   # If the previous option needs an argument, assign it.
115   if test -n "$ac_prev"; then
116     eval "$ac_prev=\$ac_option"
117     ac_prev=
118     continue
119   fi
120
121   case "$ac_option" in
122   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
123   *) ac_optarg= ;;
124   esac
125
126   # Accept the important Cygnus configure options, so we can diagnose typos.
127
128   case "$ac_option" in
129
130   -bindir | --bindir | --bindi | --bind | --bin | --bi)
131     ac_prev=bindir ;;
132   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
133     bindir="$ac_optarg" ;;
134
135   -build | --build | --buil | --bui | --bu)
136     ac_prev=build ;;
137   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
138     build="$ac_optarg" ;;
139
140   -cache-file | --cache-file | --cache-fil | --cache-fi \
141   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
142     ac_prev=cache_file ;;
143   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
144   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
145     cache_file="$ac_optarg" ;;
146
147   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
148     ac_prev=datadir ;;
149   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
150   | --da=*)
151     datadir="$ac_optarg" ;;
152
153   -disable-* | --disable-*)
154     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
155     # Reject names that are not valid shell variable names.
156     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
157       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
158     fi
159     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
160     eval "enable_${ac_feature}=no" ;;
161
162   -enable-* | --enable-*)
163     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
164     # Reject names that are not valid shell variable names.
165     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
166       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
167     fi
168     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
169     case "$ac_option" in
170       *=*) ;;
171       *) ac_optarg=yes ;;
172     esac
173     eval "enable_${ac_feature}='$ac_optarg'" ;;
174
175   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
176   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
177   | --exec | --exe | --ex)
178     ac_prev=exec_prefix ;;
179   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
180   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
181   | --exec=* | --exe=* | --ex=*)
182     exec_prefix="$ac_optarg" ;;
183
184   -gas | --gas | --ga | --g)
185     # Obsolete; use --with-gas.
186     with_gas=yes ;;
187
188   -help | --help | --hel | --he)
189     # Omit some internal or obsolete options to make the list less imposing.
190     # This message is too long to be a string in the A/UX 3.1 sh.
191     cat << EOF
192 Usage: configure [options] [host]
193 Options: [defaults in brackets after descriptions]
194 Configuration:
195   --cache-file=FILE       cache test results in FILE
196   --help                  print this message
197   --no-create             do not create output files
198   --quiet, --silent       do not print \`checking...' messages
199   --version               print the version of autoconf that created configure
200 Directory and file names:
201   --prefix=PREFIX         install architecture-independent files in PREFIX
202                           [$ac_default_prefix]
203   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
204                           [same as prefix]
205   --bindir=DIR            user executables in DIR [EPREFIX/bin]
206   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
207   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
208   --datadir=DIR           read-only architecture-independent data in DIR
209                           [PREFIX/share]
210   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
211   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
212                           [PREFIX/com]
213   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
214   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
215   --includedir=DIR        C header files in DIR [PREFIX/include]
216   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
217   --infodir=DIR           info documentation in DIR [PREFIX/info]
218   --mandir=DIR            man documentation in DIR [PREFIX/man]
219   --srcdir=DIR            find the sources in DIR [configure dir or ..]
220   --program-prefix=PREFIX prepend PREFIX to installed program names
221   --program-suffix=SUFFIX append SUFFIX to installed program names
222   --program-transform-name=PROGRAM
223                           run sed PROGRAM on installed program names
224 EOF
225     cat << EOF
226 Host type:
227   --build=BUILD           configure for building on BUILD [BUILD=HOST]
228   --host=HOST             configure for HOST [guessed]
229   --target=TARGET         configure for TARGET [TARGET=HOST]
230 Features and packages:
231   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
232   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
233   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
234   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
235   --x-includes=DIR        X include files are in DIR
236   --x-libraries=DIR       X library files are in DIR
237 EOF
238     if test -n "$ac_help"; then
239       echo "--enable and --with options recognized:$ac_help"
240     fi
241     exit 0 ;;
242
243   -host | --host | --hos | --ho)
244     ac_prev=host ;;
245   -host=* | --host=* | --hos=* | --ho=*)
246     host="$ac_optarg" ;;
247
248   -includedir | --includedir | --includedi | --included | --include \
249   | --includ | --inclu | --incl | --inc)
250     ac_prev=includedir ;;
251   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
252   | --includ=* | --inclu=* | --incl=* | --inc=*)
253     includedir="$ac_optarg" ;;
254
255   -infodir | --infodir | --infodi | --infod | --info | --inf)
256     ac_prev=infodir ;;
257   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
258     infodir="$ac_optarg" ;;
259
260   -libdir | --libdir | --libdi | --libd)
261     ac_prev=libdir ;;
262   -libdir=* | --libdir=* | --libdi=* | --libd=*)
263     libdir="$ac_optarg" ;;
264
265   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
266   | --libexe | --libex | --libe)
267     ac_prev=libexecdir ;;
268   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
269   | --libexe=* | --libex=* | --libe=*)
270     libexecdir="$ac_optarg" ;;
271
272   -localstatedir | --localstatedir | --localstatedi | --localstated \
273   | --localstate | --localstat | --localsta | --localst \
274   | --locals | --local | --loca | --loc | --lo)
275     ac_prev=localstatedir ;;
276   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
277   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
278   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
279     localstatedir="$ac_optarg" ;;
280
281   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
282     ac_prev=mandir ;;
283   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
284     mandir="$ac_optarg" ;;
285
286   -nfp | --nfp | --nf)
287     # Obsolete; use --without-fp.
288     with_fp=no ;;
289
290   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
291   | --no-cr | --no-c)
292     no_create=yes ;;
293
294   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
295   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
296     no_recursion=yes ;;
297
298   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
299   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
300   | --oldin | --oldi | --old | --ol | --o)
301     ac_prev=oldincludedir ;;
302   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
303   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
304   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
305     oldincludedir="$ac_optarg" ;;
306
307   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
308     ac_prev=prefix ;;
309   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
310     prefix="$ac_optarg" ;;
311
312   -program-prefix | --program-prefix | --program-prefi | --program-pref \
313   | --program-pre | --program-pr | --program-p)
314     ac_prev=program_prefix ;;
315   -program-prefix=* | --program-prefix=* | --program-prefi=* \
316   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
317     program_prefix="$ac_optarg" ;;
318
319   -program-suffix | --program-suffix | --program-suffi | --program-suff \
320   | --program-suf | --program-su | --program-s)
321     ac_prev=program_suffix ;;
322   -program-suffix=* | --program-suffix=* | --program-suffi=* \
323   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
324     program_suffix="$ac_optarg" ;;
325
326   -program-transform-name | --program-transform-name \
327   | --program-transform-nam | --program-transform-na \
328   | --program-transform-n | --program-transform- \
329   | --program-transform | --program-transfor \
330   | --program-transfo | --program-transf \
331   | --program-trans | --program-tran \
332   | --progr-tra | --program-tr | --program-t)
333     ac_prev=program_transform_name ;;
334   -program-transform-name=* | --program-transform-name=* \
335   | --program-transform-nam=* | --program-transform-na=* \
336   | --program-transform-n=* | --program-transform-=* \
337   | --program-transform=* | --program-transfor=* \
338   | --program-transfo=* | --program-transf=* \
339   | --program-trans=* | --program-tran=* \
340   | --progr-tra=* | --program-tr=* | --program-t=*)
341     program_transform_name="$ac_optarg" ;;
342
343   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
344   | -silent | --silent | --silen | --sile | --sil)
345     silent=yes ;;
346
347   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
348     ac_prev=sbindir ;;
349   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
350   | --sbi=* | --sb=*)
351     sbindir="$ac_optarg" ;;
352
353   -sharedstatedir | --sharedstatedir | --sharedstatedi \
354   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
355   | --sharedst | --shareds | --shared | --share | --shar \
356   | --sha | --sh)
357     ac_prev=sharedstatedir ;;
358   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
359   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
360   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
361   | --sha=* | --sh=*)
362     sharedstatedir="$ac_optarg" ;;
363
364   -site | --site | --sit)
365     ac_prev=site ;;
366   -site=* | --site=* | --sit=*)
367     site="$ac_optarg" ;;
368
369   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
370     ac_prev=srcdir ;;
371   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
372     srcdir="$ac_optarg" ;;
373
374   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
375   | --syscon | --sysco | --sysc | --sys | --sy)
376     ac_prev=sysconfdir ;;
377   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
378   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
379     sysconfdir="$ac_optarg" ;;
380
381   -target | --target | --targe | --targ | --tar | --ta | --t)
382     ac_prev=target ;;
383   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
384     target="$ac_optarg" ;;
385
386   -v | -verbose | --verbose | --verbos | --verbo | --verb)
387     verbose=yes ;;
388
389   -version | --version | --versio | --versi | --vers)
390     echo "configure generated by autoconf version 2.13"
391     exit 0 ;;
392
393   -with-* | --with-*)
394     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
395     # Reject names that are not valid shell variable names.
396     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
397       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
398     fi
399     ac_package=`echo $ac_package| sed 's/-/_/g'`
400     case "$ac_option" in
401       *=*) ;;
402       *) ac_optarg=yes ;;
403     esac
404     eval "with_${ac_package}='$ac_optarg'" ;;
405
406   -without-* | --without-*)
407     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
408     # Reject names that are not valid shell variable names.
409     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
410       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
411     fi
412     ac_package=`echo $ac_package| sed 's/-/_/g'`
413     eval "with_${ac_package}=no" ;;
414
415   --x)
416     # Obsolete; use --with-x.
417     with_x=yes ;;
418
419   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
420   | --x-incl | --x-inc | --x-in | --x-i)
421     ac_prev=x_includes ;;
422   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
423   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
424     x_includes="$ac_optarg" ;;
425
426   -x-libraries | --x-libraries | --x-librarie | --x-librari \
427   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
428     ac_prev=x_libraries ;;
429   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
430   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
431     x_libraries="$ac_optarg" ;;
432
433   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
434     ;;
435
436   *)
437     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
438       echo "configure: warning: $ac_option: invalid host type" 1>&2
439     fi
440     if test "x$nonopt" != xNONE; then
441       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
442     fi
443     nonopt="$ac_option"
444     ;;
445
446   esac
447 done
448
449 if test -n "$ac_prev"; then
450   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
451 fi
452
453 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
454
455 # File descriptor usage:
456 # 0 standard input
457 # 1 file creation
458 # 2 errors and warnings
459 # 3 some systems may open it to /dev/tty
460 # 4 used on the Kubota Titan
461 # 6 checking for... messages and results
462 # 5 compiler messages saved in config.log
463 if test "$silent" = yes; then
464   exec 6>/dev/null
465 else
466   exec 6>&1
467 fi
468 exec 5>./config.log
469
470 echo "\
471 This file contains any messages produced by compilers while
472 running configure, to aid debugging if configure makes a mistake.
473 " 1>&5
474
475 # Strip out --no-create and --no-recursion so they do not pile up.
476 # Also quote any args containing shell metacharacters.
477 ac_configure_args=
478 for ac_arg
479 do
480   case "$ac_arg" in
481   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
482   | --no-cr | --no-c) ;;
483   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
484   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
485   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
486   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
487   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
488   esac
489 done
490
491 # NLS nuisances.
492 # Only set these to C if already set.  These must not be set unconditionally
493 # because not all systems understand e.g. LANG=C (notably SCO).
494 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
495 # Non-C LC_CTYPE values break the ctype check.
496 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
497 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
498 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
499 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
500
501 # confdefs.h avoids OS command line length limits that DEFS can exceed.
502 rm -rf conftest* confdefs.h
503 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
504 echo > confdefs.h
505
506 # A filename unique to this package, relative to the directory that
507 # configure is in, which we can look for to find out if srcdir is correct.
508 ac_unique_file=include/includes.h
509
510 # Find the source files, if location was not specified.
511 if test -z "$srcdir"; then
512   ac_srcdir_defaulted=yes
513   # Try the directory containing this script, then its parent.
514   ac_prog=$0
515   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
516   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
517   srcdir=$ac_confdir
518   if test ! -r $srcdir/$ac_unique_file; then
519     srcdir=..
520   fi
521 else
522   ac_srcdir_defaulted=no
523 fi
524 if test ! -r $srcdir/$ac_unique_file; then
525   if test "$ac_srcdir_defaulted" = yes; then
526     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
527   else
528     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
529   fi
530 fi
531 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
532
533 # Prefer explicitly selected file to automatically selected ones.
534 if test -z "$CONFIG_SITE"; then
535   if test "x$prefix" != xNONE; then
536     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
537   else
538     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
539   fi
540 fi
541 for ac_site_file in $CONFIG_SITE; do
542   if test -r "$ac_site_file"; then
543     echo "loading site script $ac_site_file"
544     . "$ac_site_file"
545   fi
546 done
547
548 if test -r "$cache_file"; then
549   echo "loading cache $cache_file"
550   . $cache_file
551 else
552   echo "creating cache $cache_file"
553   > $cache_file
554 fi
555
556 ac_ext=c
557 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
558 ac_cpp='$CPP $CPPFLAGS'
559 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
560 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
561 cross_compiling=$ac_cv_prog_cc_cross
562
563 ac_exeext=
564 ac_objext=o
565 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
566   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
567   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
568     ac_n= ac_c='
569 ' ac_t='        '
570   else
571     ac_n=-n ac_c= ac_t=
572   fi
573 else
574   ac_n= ac_c='\c' ac_t=
575 fi
576
577
578
579 # we want to be compatibe with older versions of Samba
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597 # compile with optimisation and without debugging by default
598 CFLAGS="-O ${CFLAGS}"
599
600 # Check whether --enable-debug or --disable-debug was given.
601 if test "${enable_debug+set}" = set; then
602   enableval="$enable_debug"
603   if eval "test x$enable_debug = xyes"; then
604         CFLAGS="${CFLAGS} -g"
605     fi
606 fi
607
608
609
610 # Extract the first word of "gcc", so it can be a program name with args.
611 set dummy gcc; ac_word=$2
612 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
613 echo "configure:614: checking for $ac_word" >&5
614 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
615   echo $ac_n "(cached) $ac_c" 1>&6
616 else
617   if test -n "$CC"; then
618   ac_cv_prog_CC="$CC" # Let the user override the test.
619 else
620   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
621   ac_dummy="$PATH"
622   for ac_dir in $ac_dummy; do
623     test -z "$ac_dir" && ac_dir=.
624     if test -f $ac_dir/$ac_word; then
625       ac_cv_prog_CC="gcc"
626       break
627     fi
628   done
629   IFS="$ac_save_ifs"
630 fi
631 fi
632 CC="$ac_cv_prog_CC"
633 if test -n "$CC"; then
634   echo "$ac_t""$CC" 1>&6
635 else
636   echo "$ac_t""no" 1>&6
637 fi
638
639 if test -z "$CC"; then
640   # Extract the first word of "cc", so it can be a program name with args.
641 set dummy cc; ac_word=$2
642 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
643 echo "configure:644: checking for $ac_word" >&5
644 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
645   echo $ac_n "(cached) $ac_c" 1>&6
646 else
647   if test -n "$CC"; then
648   ac_cv_prog_CC="$CC" # Let the user override the test.
649 else
650   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
651   ac_prog_rejected=no
652   ac_dummy="$PATH"
653   for ac_dir in $ac_dummy; do
654     test -z "$ac_dir" && ac_dir=.
655     if test -f $ac_dir/$ac_word; then
656       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
657         ac_prog_rejected=yes
658         continue
659       fi
660       ac_cv_prog_CC="cc"
661       break
662     fi
663   done
664   IFS="$ac_save_ifs"
665 if test $ac_prog_rejected = yes; then
666   # We found a bogon in the path, so make sure we never use it.
667   set dummy $ac_cv_prog_CC
668   shift
669   if test $# -gt 0; then
670     # We chose a different compiler from the bogus one.
671     # However, it has the same basename, so the bogon will be chosen
672     # first if we set CC to just the basename; use the full file name.
673     shift
674     set dummy "$ac_dir/$ac_word" "$@"
675     shift
676     ac_cv_prog_CC="$@"
677   fi
678 fi
679 fi
680 fi
681 CC="$ac_cv_prog_CC"
682 if test -n "$CC"; then
683   echo "$ac_t""$CC" 1>&6
684 else
685   echo "$ac_t""no" 1>&6
686 fi
687
688   if test -z "$CC"; then
689     case "`uname -s`" in
690     *win32* | *WIN32*)
691       # Extract the first word of "cl", so it can be a program name with args.
692 set dummy cl; ac_word=$2
693 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
694 echo "configure:695: checking for $ac_word" >&5
695 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
696   echo $ac_n "(cached) $ac_c" 1>&6
697 else
698   if test -n "$CC"; then
699   ac_cv_prog_CC="$CC" # Let the user override the test.
700 else
701   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
702   ac_dummy="$PATH"
703   for ac_dir in $ac_dummy; do
704     test -z "$ac_dir" && ac_dir=.
705     if test -f $ac_dir/$ac_word; then
706       ac_cv_prog_CC="cl"
707       break
708     fi
709   done
710   IFS="$ac_save_ifs"
711 fi
712 fi
713 CC="$ac_cv_prog_CC"
714 if test -n "$CC"; then
715   echo "$ac_t""$CC" 1>&6
716 else
717   echo "$ac_t""no" 1>&6
718 fi
719  ;;
720     esac
721   fi
722   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
723 fi
724
725 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
726 echo "configure:727: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
727
728 ac_ext=c
729 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
730 ac_cpp='$CPP $CPPFLAGS'
731 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
732 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
733 cross_compiling=$ac_cv_prog_cc_cross
734
735 cat > conftest.$ac_ext << EOF
736
737 #line 738 "configure"
738 #include "confdefs.h"
739
740 main(){return(0);}
741 EOF
742 if { (eval echo configure:743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
743   ac_cv_prog_cc_works=yes
744   # If we can't run a trivial program, we are probably using a cross compiler.
745   if (./conftest; exit) 2>/dev/null; then
746     ac_cv_prog_cc_cross=no
747   else
748     ac_cv_prog_cc_cross=yes
749   fi
750 else
751   echo "configure: failed program was:" >&5
752   cat conftest.$ac_ext >&5
753   ac_cv_prog_cc_works=no
754 fi
755 rm -fr conftest*
756 ac_ext=c
757 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
758 ac_cpp='$CPP $CPPFLAGS'
759 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
760 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
761 cross_compiling=$ac_cv_prog_cc_cross
762
763 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
764 if test $ac_cv_prog_cc_works = no; then
765   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
766 fi
767 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
768 echo "configure:769: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
769 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
770 cross_compiling=$ac_cv_prog_cc_cross
771
772 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
773 echo "configure:774: checking whether we are using GNU C" >&5
774 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
775   echo $ac_n "(cached) $ac_c" 1>&6
776 else
777   cat > conftest.c <<EOF
778 #ifdef __GNUC__
779   yes;
780 #endif
781 EOF
782 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
783   ac_cv_prog_gcc=yes
784 else
785   ac_cv_prog_gcc=no
786 fi
787 fi
788
789 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
790
791 if test $ac_cv_prog_gcc = yes; then
792   GCC=yes
793 else
794   GCC=
795 fi
796
797 ac_test_CFLAGS="${CFLAGS+set}"
798 ac_save_CFLAGS="$CFLAGS"
799 CFLAGS=
800 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
801 echo "configure:802: checking whether ${CC-cc} accepts -g" >&5
802 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
803   echo $ac_n "(cached) $ac_c" 1>&6
804 else
805   echo 'void f(){}' > conftest.c
806 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
807   ac_cv_prog_cc_g=yes
808 else
809   ac_cv_prog_cc_g=no
810 fi
811 rm -f conftest*
812
813 fi
814
815 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
816 if test "$ac_test_CFLAGS" = set; then
817   CFLAGS="$ac_save_CFLAGS"
818 elif test $ac_cv_prog_cc_g = yes; then
819   if test "$GCC" = yes; then
820     CFLAGS="-g -O2"
821   else
822     CFLAGS="-g"
823   fi
824 else
825   if test "$GCC" = yes; then
826     CFLAGS="-O2"
827   else
828     CFLAGS=
829   fi
830 fi
831
832 ac_aux_dir=
833 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
834   if test -f $ac_dir/install-sh; then
835     ac_aux_dir=$ac_dir
836     ac_install_sh="$ac_aux_dir/install-sh -c"
837     break
838   elif test -f $ac_dir/install.sh; then
839     ac_aux_dir=$ac_dir
840     ac_install_sh="$ac_aux_dir/install.sh -c"
841     break
842   fi
843 done
844 if test -z "$ac_aux_dir"; then
845   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
846 fi
847 ac_config_guess=$ac_aux_dir/config.guess
848 ac_config_sub=$ac_aux_dir/config.sub
849 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
850
851 # Find a good install program.  We prefer a C program (faster),
852 # so one script is as good as another.  But avoid the broken or
853 # incompatible versions:
854 # SysV /etc/install, /usr/sbin/install
855 # SunOS /usr/etc/install
856 # IRIX /sbin/install
857 # AIX /bin/install
858 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
859 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
860 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
861 # ./install, which can be erroneously created by make from ./install.sh.
862 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
863 echo "configure:864: checking for a BSD compatible install" >&5
864 if test -z "$INSTALL"; then
865 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
866   echo $ac_n "(cached) $ac_c" 1>&6
867 else
868     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
869   for ac_dir in $PATH; do
870     # Account for people who put trailing slashes in PATH elements.
871     case "$ac_dir/" in
872     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
873     *)
874       # OSF1 and SCO ODT 3.0 have their own names for install.
875       # Don't use installbsd from OSF since it installs stuff as root
876       # by default.
877       for ac_prog in ginstall scoinst install; do
878         if test -f $ac_dir/$ac_prog; then
879           if test $ac_prog = install &&
880             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
881             # AIX install.  It has an incompatible calling convention.
882             :
883           else
884             ac_cv_path_install="$ac_dir/$ac_prog -c"
885             break 2
886           fi
887         fi
888       done
889       ;;
890     esac
891   done
892   IFS="$ac_save_IFS"
893
894 fi
895   if test "${ac_cv_path_install+set}" = set; then
896     INSTALL="$ac_cv_path_install"
897   else
898     # As a last resort, use the slow shell script.  We don't cache a
899     # path for INSTALL within a source directory, because that will
900     # break other packages using the cache if that directory is
901     # removed, or if the path is relative.
902     INSTALL="$ac_install_sh"
903   fi
904 fi
905 echo "$ac_t""$INSTALL" 1>&6
906
907 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
908 # It thinks the first close brace ends the variable substitution.
909 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
910
911 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
912
913 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
914
915 for ac_prog in gawk mawk nawk awk
916 do
917 # Extract the first word of "$ac_prog", so it can be a program name with args.
918 set dummy $ac_prog; ac_word=$2
919 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
920 echo "configure:921: checking for $ac_word" >&5
921 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
922   echo $ac_n "(cached) $ac_c" 1>&6
923 else
924   if test -n "$AWK"; then
925   ac_cv_prog_AWK="$AWK" # Let the user override the test.
926 else
927   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
928   ac_dummy="$PATH"
929   for ac_dir in $ac_dummy; do
930     test -z "$ac_dir" && ac_dir=.
931     if test -f $ac_dir/$ac_word; then
932       ac_cv_prog_AWK="$ac_prog"
933       break
934     fi
935   done
936   IFS="$ac_save_ifs"
937 fi
938 fi
939 AWK="$ac_cv_prog_AWK"
940 if test -n "$AWK"; then
941   echo "$ac_t""$AWK" 1>&6
942 else
943   echo "$ac_t""no" 1>&6
944 fi
945
946 test -n "$AWK" && break
947 done
948
949
950 if test "x$CC" != xcc; then
951   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
952 echo "configure:953: checking whether $CC and cc understand -c and -o together" >&5
953 else
954   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
955 echo "configure:956: checking whether cc understands -c and -o together" >&5
956 fi
957 set dummy $CC; ac_cc="`echo $2 |
958                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
959 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
960   echo $ac_n "(cached) $ac_c" 1>&6
961 else
962   echo 'foo(){}' > conftest.c
963 # Make sure it works both with $CC and with simple cc.
964 # We do the test twice because some compilers refuse to overwrite an
965 # existing .o file with -o, though they will create one.
966 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
967 if { (eval echo configure:968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
968    test -f conftest.o && { (eval echo configure:969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
969 then
970   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
971   if test "x$CC" != xcc; then
972     # Test first that cc exists at all.
973     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
974       ac_try='cc -c conftest.c -o conftest.o 1>&5'
975       if { (eval echo configure:976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
976          test -f conftest.o && { (eval echo configure:977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
977       then
978         # cc works too.
979         :
980       else
981         # cc exists but doesn't like -o.
982         eval ac_cv_prog_cc_${ac_cc}_c_o=no
983       fi
984     fi
985   fi
986 else
987   eval ac_cv_prog_cc_${ac_cc}_c_o=no
988 fi
989 rm -f conftest*
990
991 fi
992 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
993   echo "$ac_t""yes" 1>&6
994 else
995   echo "$ac_t""no" 1>&6
996   cat >> confdefs.h <<\EOF
997 #define NO_MINUS_C_MINUS_O 1
998 EOF
999
1000 fi
1001
1002 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1003       BROKEN_CC=
1004 else
1005       BROKEN_CC=#
1006 fi
1007
1008
1009 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1010 echo "configure:1011: checking that the C compiler understands volatile" >&5
1011 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1012   echo $ac_n "(cached) $ac_c" 1>&6
1013 else
1014   
1015     cat > conftest.$ac_ext <<EOF
1016 #line 1017 "configure"
1017 #include "confdefs.h"
1018 #include <sys/types.h>
1019 int main() {
1020 volatile int i = 0
1021 ; return 0; }
1022 EOF
1023 if { (eval echo configure:1024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1024   rm -rf conftest*
1025   samba_cv_volatile=yes
1026 else
1027   echo "configure: failed program was:" >&5
1028   cat conftest.$ac_ext >&5
1029   rm -rf conftest*
1030   samba_cv_volatile=no
1031 fi
1032 rm -f conftest*
1033 fi
1034
1035 echo "$ac_t""$samba_cv_volatile" 1>&6
1036 if test x"$samba_cv_volatile" = x"yes"; then
1037    cat >> confdefs.h <<\EOF
1038 #define HAVE_VOLATILE 1
1039 EOF
1040
1041 fi
1042
1043
1044
1045 # Do some error checking and defaulting for the host and target type.
1046 # The inputs are:
1047 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1048 #
1049 # The rules are:
1050 # 1. You are not allowed to specify --host, --target, and nonopt at the
1051 #    same time.
1052 # 2. Host defaults to nonopt.
1053 # 3. If nonopt is not specified, then host defaults to the current host,
1054 #    as determined by config.guess.
1055 # 4. Target and build default to nonopt.
1056 # 5. If nonopt is not specified, then target and build default to host.
1057
1058 # The aliases save the names the user supplied, while $host etc.
1059 # will get canonicalized.
1060 case $host---$target---$nonopt in
1061 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1062 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1063 esac
1064
1065
1066 # Make sure we can run config.sub.
1067 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1068 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1069 fi
1070
1071 echo $ac_n "checking host system type""... $ac_c" 1>&6
1072 echo "configure:1073: checking host system type" >&5
1073
1074 host_alias=$host
1075 case "$host_alias" in
1076 NONE)
1077   case $nonopt in
1078   NONE)
1079     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1080     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1081     fi ;;
1082   *) host_alias=$nonopt ;;
1083   esac ;;
1084 esac
1085
1086 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1087 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1088 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1089 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1090 echo "$ac_t""$host" 1>&6
1091
1092 echo $ac_n "checking target system type""... $ac_c" 1>&6
1093 echo "configure:1094: checking target system type" >&5
1094
1095 target_alias=$target
1096 case "$target_alias" in
1097 NONE)
1098   case $nonopt in
1099   NONE) target_alias=$host_alias ;;
1100   *) target_alias=$nonopt ;;
1101   esac ;;
1102 esac
1103
1104 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1105 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1106 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1107 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1108 echo "$ac_t""$target" 1>&6
1109
1110 echo $ac_n "checking build system type""... $ac_c" 1>&6
1111 echo "configure:1112: checking build system type" >&5
1112
1113 build_alias=$build
1114 case "$build_alias" in
1115 NONE)
1116   case $nonopt in
1117   NONE) build_alias=$host_alias ;;
1118   *) build_alias=$nonopt ;;
1119   esac ;;
1120 esac
1121
1122 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1123 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1124 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1125 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1126 echo "$ac_t""$build" 1>&6
1127
1128 test "$host_alias" != "$target_alias" &&
1129   test "$program_prefix$program_suffix$program_transform_name" = \
1130     NONENONEs,x,x, &&
1131   program_prefix=${target_alias}-
1132
1133
1134   case "$host_os" in
1135         *irix6*) cat >> confdefs.h <<\EOF
1136 #include <standards.h>
1137 EOF
1138
1139         ;;
1140 esac
1141
1142
1143     
1144     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1145 echo "configure:1146: checking config.cache system type" >&5
1146     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1147          test x"$ac_cv_host_system_type" != x"$host"; } ||
1148        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1149          test x"$ac_cv_build_system_type" != x"$build"; } ||
1150        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1151          test x"$ac_cv_target_system_type" != x"$target"; }; then
1152         echo "$ac_t""different" 1>&6
1153         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1154     else
1155         echo "$ac_t""same" 1>&6
1156     fi
1157     ac_cv_host_system_type="$host"
1158     ac_cv_build_system_type="$build"
1159     ac_cv_target_system_type="$target"
1160
1161
1162 #
1163 # Config CPPFLAG settings for strange OS's that must be set
1164 # before other tests.
1165 #
1166 case "$host_os" in
1167 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1168     *hpux*)
1169       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1170 echo "configure:1171: checking whether ${CC-cc} accepts -Ae" >&5
1171 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1172   echo $ac_n "(cached) $ac_c" 1>&6
1173 else
1174   echo 'void f(){}' > conftest.c
1175 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1176   ac_cv_prog_cc_Ae=yes
1177 else
1178   ac_cv_prog_cc_Ae=no
1179 fi
1180 rm -f conftest*
1181
1182 fi
1183
1184 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1185       # mmap on HPUX is completely broken...
1186       cat >> confdefs.h <<\EOF
1187 #define MMAP_BLACKLIST 1
1188 EOF
1189
1190       if test $ac_cv_prog_cc_Ae = yes; then
1191         CPPFLAGS="$CPPFLAGS -Ae"
1192       fi
1193 #
1194 # Defines needed for HPUX support.
1195 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1196 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1197 #
1198       case `uname -r` in
1199                         *9*|*10*)
1200                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
1201                                 cat >> confdefs.h <<\EOF
1202 #define USE_BOTH_CRYPT_CALLS 1
1203 EOF
1204
1205                                 ;;
1206                         *11*)
1207                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
1208                                 cat >> confdefs.h <<\EOF
1209 #define USE_BOTH_CRYPT_CALLS 1
1210 EOF
1211
1212                                 ;;
1213       esac
1214       ;;
1215 #
1216 # AIX4.x doesn't even admit to having large
1217 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1218 #
1219     *aix4*)
1220           echo "$ac_t""enabling large file support" 1>&6
1221       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1222       ;;    
1223 #
1224 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1225 # to the existance of large files..
1226 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1227 # recommendations on large file support, however it makes the
1228 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1229 # recommendation makes the compile fail on gcc2.7. JRA.
1230 #
1231         *solaris*)
1232                 case `uname -r` in
1233                         5.0*|5.1*|5.2*|5.3*|5.5*)
1234                                 echo "$ac_t""no large file support" 1>&6
1235                                 ;;
1236                         5.*)
1237                         echo "$ac_t""enabling large file support" 1>&6
1238                         if test "$ac_cv_prog_gcc" = yes; then
1239                                 ${CC-cc} -v >conftest.c 2>&1
1240                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1241                                 rm -fr conftest.c
1242                                 case "$ac_cv_gcc_compiler_version_number" in
1243                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1244                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1245                                                 ;;
1246                                         *)
1247                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1248                                                 ;;
1249                                 esac
1250                         else
1251                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1252                         fi
1253                         ;;
1254                 esac
1255                 ;;
1256 #
1257 # Tests needed for SINIX large file support.
1258 #
1259     *sysv4*)
1260       if test $host = mips-sni-sysv4 ; then
1261         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1262 echo "configure:1263: checking for LFS support" >&5
1263         old_CPPFLAGS="$CPPFLAGS"
1264         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1265         if test "$cross_compiling" = yes; then
1266   SINIX_LFS_SUPPORT=cross
1267 else
1268   cat > conftest.$ac_ext <<EOF
1269 #line 1270 "configure"
1270 #include "confdefs.h"
1271
1272 #include <unistd.h>
1273 main () {
1274 #if _LFS64_LARGEFILE == 1
1275 exit(0);
1276 #else
1277 exit(1);
1278 #endif
1279 }
1280 EOF
1281 if { (eval echo configure:1282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1282 then
1283   SINIX_LFS_SUPPORT=yes
1284 else
1285   echo "configure: failed program was:" >&5
1286   cat conftest.$ac_ext >&5
1287   rm -fr conftest*
1288   SINIX_LFS_SUPPORT=no
1289 fi
1290 rm -fr conftest*
1291 fi
1292
1293         CPPFLAGS="$old_CPPFLAGS"
1294         if test x$SINIX_LFS_SUPPORT = xyes ; then
1295           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1296           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1297           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1298           LIBS="`getconf LFS64_LIBS` $LIBS"
1299         fi
1300       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1301       fi
1302     ;;
1303
1304 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1305 #
1306     *linux*)
1307         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1308 echo "configure:1309: checking for LFS support" >&5
1309         old_CPPFLAGS="$CPPFLAGS"
1310         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1311        if test "$cross_compiling" = yes; then
1312   LINUX_LFS_SUPPORT=cross
1313 else
1314   cat > conftest.$ac_ext <<EOF
1315 #line 1316 "configure"
1316 #include "confdefs.h"
1317
1318 #include <unistd.h>
1319 #include <sys/utsname.h>
1320 main() {
1321 #if _LFS64_LARGEFILE == 1
1322        struct utsname uts;
1323        char *release;
1324        int major, minor;
1325
1326        /* Ensure this is glibc 2.2 or higher */
1327 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1328        int libc_major = __GLIBC__;
1329        int libc_minor = __GLIBC_MINOR__;
1330
1331        if (libc_major < 2)
1332               exit(1);
1333        if (libc_minor < 2)
1334               exit(1);
1335 #endif
1336
1337        /* Ensure this is kernel 2.4 or higher */
1338
1339        uname(&uts);
1340        release = uts.release;
1341        major = atoi(strsep(&release, "."));
1342        minor = atoi(strsep(&release, "."));
1343
1344        if (major > 2 || (major == 2 && minor > 3))
1345                exit(0);
1346        exit(1);
1347 #else
1348        exit(1);
1349 #endif
1350 }
1351
1352 EOF
1353 if { (eval echo configure:1354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1354 then
1355   LINUX_LFS_SUPPORT=yes
1356 else
1357   echo "configure: failed program was:" >&5
1358   cat conftest.$ac_ext >&5
1359   rm -fr conftest*
1360   LINUX_LFS_SUPPORT=no
1361 fi
1362 rm -fr conftest*
1363 fi
1364
1365         CPPFLAGS="$old_CPPFLAGS"
1366         if test x$LINUX_LFS_SUPPORT = xyes ; then
1367           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1368         fi
1369        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1370                 ;;
1371
1372     *hurd*)
1373         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1374 echo "configure:1375: checking for LFS support" >&5
1375         old_CPPFLAGS="$CPPFLAGS"
1376         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1377         if test "$cross_compiling" = yes; then
1378   GLIBC_LFS_SUPPORT=cross
1379 else
1380   cat > conftest.$ac_ext <<EOF
1381 #line 1382 "configure"
1382 #include "confdefs.h"
1383
1384 #include <unistd.h>
1385 main () {
1386 #if _LFS64_LARGEFILE == 1
1387 exit(0);
1388 #else
1389 exit(1);
1390 #endif
1391 }
1392 EOF
1393 if { (eval echo configure:1394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1394 then
1395   GLIBC_LFS_SUPPORT=yes
1396 else
1397   echo "configure: failed program was:" >&5
1398   cat conftest.$ac_ext >&5
1399   rm -fr conftest*
1400   GLIBC_LFS_SUPPORT=no
1401 fi
1402 rm -fr conftest*
1403 fi
1404
1405         CPPFLAGS="$old_CPPFLAGS"
1406         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1407           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1408         fi
1409       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1410     ;;
1411
1412 esac
1413
1414 echo $ac_n "checking for inline""... $ac_c" 1>&6
1415 echo "configure:1416: checking for inline" >&5
1416 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1417   echo $ac_n "(cached) $ac_c" 1>&6
1418 else
1419   ac_cv_c_inline=no
1420 for ac_kw in inline __inline__ __inline; do
1421   cat > conftest.$ac_ext <<EOF
1422 #line 1423 "configure"
1423 #include "confdefs.h"
1424
1425 int main() {
1426 } $ac_kw foo() {
1427 ; return 0; }
1428 EOF
1429 if { (eval echo configure:1430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1430   rm -rf conftest*
1431   ac_cv_c_inline=$ac_kw; break
1432 else
1433   echo "configure: failed program was:" >&5
1434   cat conftest.$ac_ext >&5
1435 fi
1436 rm -f conftest*
1437 done
1438
1439 fi
1440
1441 echo "$ac_t""$ac_cv_c_inline" 1>&6
1442 case "$ac_cv_c_inline" in
1443   inline | yes) ;;
1444   no) cat >> confdefs.h <<\EOF
1445 #define inline 
1446 EOF
1447  ;;
1448   *)  cat >> confdefs.h <<EOF
1449 #define inline $ac_cv_c_inline
1450 EOF
1451  ;;
1452 esac
1453
1454 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1455 echo "configure:1456: checking how to run the C preprocessor" >&5
1456 # On Suns, sometimes $CPP names a directory.
1457 if test -n "$CPP" && test -d "$CPP"; then
1458   CPP=
1459 fi
1460 if test -z "$CPP"; then
1461 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1462   echo $ac_n "(cached) $ac_c" 1>&6
1463 else
1464     # This must be in double quotes, not single quotes, because CPP may get
1465   # substituted into the Makefile and "${CC-cc}" will confuse make.
1466   CPP="${CC-cc} -E"
1467   # On the NeXT, cc -E runs the code through the compiler's parser,
1468   # not just through cpp.
1469   cat > conftest.$ac_ext <<EOF
1470 #line 1471 "configure"
1471 #include "confdefs.h"
1472 #include <assert.h>
1473 Syntax Error
1474 EOF
1475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1476 { (eval echo configure:1477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1478 if test -z "$ac_err"; then
1479   :
1480 else
1481   echo "$ac_err" >&5
1482   echo "configure: failed program was:" >&5
1483   cat conftest.$ac_ext >&5
1484   rm -rf conftest*
1485   CPP="${CC-cc} -E -traditional-cpp"
1486   cat > conftest.$ac_ext <<EOF
1487 #line 1488 "configure"
1488 #include "confdefs.h"
1489 #include <assert.h>
1490 Syntax Error
1491 EOF
1492 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1493 { (eval echo configure:1494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1494 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1495 if test -z "$ac_err"; then
1496   :
1497 else
1498   echo "$ac_err" >&5
1499   echo "configure: failed program was:" >&5
1500   cat conftest.$ac_ext >&5
1501   rm -rf conftest*
1502   CPP="${CC-cc} -nologo -E"
1503   cat > conftest.$ac_ext <<EOF
1504 #line 1505 "configure"
1505 #include "confdefs.h"
1506 #include <assert.h>
1507 Syntax Error
1508 EOF
1509 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1510 { (eval echo configure:1511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1511 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1512 if test -z "$ac_err"; then
1513   :
1514 else
1515   echo "$ac_err" >&5
1516   echo "configure: failed program was:" >&5
1517   cat conftest.$ac_ext >&5
1518   rm -rf conftest*
1519   CPP=/lib/cpp
1520 fi
1521 rm -f conftest*
1522 fi
1523 rm -f conftest*
1524 fi
1525 rm -f conftest*
1526   ac_cv_prog_CPP="$CPP"
1527 fi
1528   CPP="$ac_cv_prog_CPP"
1529 else
1530   ac_cv_prog_CPP="$CPP"
1531 fi
1532 echo "$ac_t""$CPP" 1>&6
1533
1534 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1535 echo "configure:1536: checking for ANSI C header files" >&5
1536 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1537   echo $ac_n "(cached) $ac_c" 1>&6
1538 else
1539   cat > conftest.$ac_ext <<EOF
1540 #line 1541 "configure"
1541 #include "confdefs.h"
1542 #include <stdlib.h>
1543 #include <stdarg.h>
1544 #include <string.h>
1545 #include <float.h>
1546 EOF
1547 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1548 { (eval echo configure:1549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1549 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1550 if test -z "$ac_err"; then
1551   rm -rf conftest*
1552   ac_cv_header_stdc=yes
1553 else
1554   echo "$ac_err" >&5
1555   echo "configure: failed program was:" >&5
1556   cat conftest.$ac_ext >&5
1557   rm -rf conftest*
1558   ac_cv_header_stdc=no
1559 fi
1560 rm -f conftest*
1561
1562 if test $ac_cv_header_stdc = yes; then
1563   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1564 cat > conftest.$ac_ext <<EOF
1565 #line 1566 "configure"
1566 #include "confdefs.h"
1567 #include <string.h>
1568 EOF
1569 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1570   egrep "memchr" >/dev/null 2>&1; then
1571   :
1572 else
1573   rm -rf conftest*
1574   ac_cv_header_stdc=no
1575 fi
1576 rm -f conftest*
1577
1578 fi
1579
1580 if test $ac_cv_header_stdc = yes; then
1581   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1582 cat > conftest.$ac_ext <<EOF
1583 #line 1584 "configure"
1584 #include "confdefs.h"
1585 #include <stdlib.h>
1586 EOF
1587 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1588   egrep "free" >/dev/null 2>&1; then
1589   :
1590 else
1591   rm -rf conftest*
1592   ac_cv_header_stdc=no
1593 fi
1594 rm -f conftest*
1595
1596 fi
1597
1598 if test $ac_cv_header_stdc = yes; then
1599   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1600 if test "$cross_compiling" = yes; then
1601   :
1602 else
1603   cat > conftest.$ac_ext <<EOF
1604 #line 1605 "configure"
1605 #include "confdefs.h"
1606 #include <ctype.h>
1607 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1608 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1609 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1610 int main () { int i; for (i = 0; i < 256; i++)
1611 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1612 exit (0); }
1613
1614 EOF
1615 if { (eval echo configure:1616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1616 then
1617   :
1618 else
1619   echo "configure: failed program was:" >&5
1620   cat conftest.$ac_ext >&5
1621   rm -fr conftest*
1622   ac_cv_header_stdc=no
1623 fi
1624 rm -fr conftest*
1625 fi
1626
1627 fi
1628 fi
1629
1630 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1631 if test $ac_cv_header_stdc = yes; then
1632   cat >> confdefs.h <<\EOF
1633 #define STDC_HEADERS 1
1634 EOF
1635
1636 fi
1637
1638 ac_header_dirent=no
1639 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1640 do
1641 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1642 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1643 echo "configure:1644: checking for $ac_hdr that defines DIR" >&5
1644 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1645   echo $ac_n "(cached) $ac_c" 1>&6
1646 else
1647   cat > conftest.$ac_ext <<EOF
1648 #line 1649 "configure"
1649 #include "confdefs.h"
1650 #include <sys/types.h>
1651 #include <$ac_hdr>
1652 int main() {
1653 DIR *dirp = 0;
1654 ; return 0; }
1655 EOF
1656 if { (eval echo configure:1657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1657   rm -rf conftest*
1658   eval "ac_cv_header_dirent_$ac_safe=yes"
1659 else
1660   echo "configure: failed program was:" >&5
1661   cat conftest.$ac_ext >&5
1662   rm -rf conftest*
1663   eval "ac_cv_header_dirent_$ac_safe=no"
1664 fi
1665 rm -f conftest*
1666 fi
1667 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1668   echo "$ac_t""yes" 1>&6
1669     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1670   cat >> confdefs.h <<EOF
1671 #define $ac_tr_hdr 1
1672 EOF
1673  ac_header_dirent=$ac_hdr; break
1674 else
1675   echo "$ac_t""no" 1>&6
1676 fi
1677 done
1678 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1679 if test $ac_header_dirent = dirent.h; then
1680 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1681 echo "configure:1682: checking for opendir in -ldir" >&5
1682 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1683 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1684   echo $ac_n "(cached) $ac_c" 1>&6
1685 else
1686   ac_save_LIBS="$LIBS"
1687 LIBS="-ldir  $LIBS"
1688 cat > conftest.$ac_ext <<EOF
1689 #line 1690 "configure"
1690 #include "confdefs.h"
1691 /* Override any gcc2 internal prototype to avoid an error.  */
1692 /* We use char because int might match the return type of a gcc2
1693     builtin and then its argument prototype would still apply.  */
1694 char opendir();
1695
1696 int main() {
1697 opendir()
1698 ; return 0; }
1699 EOF
1700 if { (eval echo configure:1701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1701   rm -rf conftest*
1702   eval "ac_cv_lib_$ac_lib_var=yes"
1703 else
1704   echo "configure: failed program was:" >&5
1705   cat conftest.$ac_ext >&5
1706   rm -rf conftest*
1707   eval "ac_cv_lib_$ac_lib_var=no"
1708 fi
1709 rm -f conftest*
1710 LIBS="$ac_save_LIBS"
1711
1712 fi
1713 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1714   echo "$ac_t""yes" 1>&6
1715   LIBS="$LIBS -ldir"
1716 else
1717   echo "$ac_t""no" 1>&6
1718 fi
1719
1720 else
1721 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1722 echo "configure:1723: checking for opendir in -lx" >&5
1723 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1724 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1725   echo $ac_n "(cached) $ac_c" 1>&6
1726 else
1727   ac_save_LIBS="$LIBS"
1728 LIBS="-lx  $LIBS"
1729 cat > conftest.$ac_ext <<EOF
1730 #line 1731 "configure"
1731 #include "confdefs.h"
1732 /* Override any gcc2 internal prototype to avoid an error.  */
1733 /* We use char because int might match the return type of a gcc2
1734     builtin and then its argument prototype would still apply.  */
1735 char opendir();
1736
1737 int main() {
1738 opendir()
1739 ; return 0; }
1740 EOF
1741 if { (eval echo configure:1742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1742   rm -rf conftest*
1743   eval "ac_cv_lib_$ac_lib_var=yes"
1744 else
1745   echo "configure: failed program was:" >&5
1746   cat conftest.$ac_ext >&5
1747   rm -rf conftest*
1748   eval "ac_cv_lib_$ac_lib_var=no"
1749 fi
1750 rm -f conftest*
1751 LIBS="$ac_save_LIBS"
1752
1753 fi
1754 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1755   echo "$ac_t""yes" 1>&6
1756   LIBS="$LIBS -lx"
1757 else
1758   echo "$ac_t""no" 1>&6
1759 fi
1760
1761 fi
1762
1763 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1764 echo "configure:1765: checking whether time.h and sys/time.h may both be included" >&5
1765 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1766   echo $ac_n "(cached) $ac_c" 1>&6
1767 else
1768   cat > conftest.$ac_ext <<EOF
1769 #line 1770 "configure"
1770 #include "confdefs.h"
1771 #include <sys/types.h>
1772 #include <sys/time.h>
1773 #include <time.h>
1774 int main() {
1775 struct tm *tp;
1776 ; return 0; }
1777 EOF
1778 if { (eval echo configure:1779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1779   rm -rf conftest*
1780   ac_cv_header_time=yes
1781 else
1782   echo "configure: failed program was:" >&5
1783   cat conftest.$ac_ext >&5
1784   rm -rf conftest*
1785   ac_cv_header_time=no
1786 fi
1787 rm -f conftest*
1788 fi
1789
1790 echo "$ac_t""$ac_cv_header_time" 1>&6
1791 if test $ac_cv_header_time = yes; then
1792   cat >> confdefs.h <<\EOF
1793 #define TIME_WITH_SYS_TIME 1
1794 EOF
1795
1796 fi
1797
1798 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1799 echo "configure:1800: checking for sys/wait.h that is POSIX.1 compatible" >&5
1800 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1801   echo $ac_n "(cached) $ac_c" 1>&6
1802 else
1803   cat > conftest.$ac_ext <<EOF
1804 #line 1805 "configure"
1805 #include "confdefs.h"
1806 #include <sys/types.h>
1807 #include <sys/wait.h>
1808 #ifndef WEXITSTATUS
1809 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1810 #endif
1811 #ifndef WIFEXITED
1812 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1813 #endif
1814 int main() {
1815 int s;
1816 wait (&s);
1817 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1818 ; return 0; }
1819 EOF
1820 if { (eval echo configure:1821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1821   rm -rf conftest*
1822   ac_cv_header_sys_wait_h=yes
1823 else
1824   echo "configure: failed program was:" >&5
1825   cat conftest.$ac_ext >&5
1826   rm -rf conftest*
1827   ac_cv_header_sys_wait_h=no
1828 fi
1829 rm -f conftest*
1830 fi
1831
1832 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1833 if test $ac_cv_header_sys_wait_h = yes; then
1834   cat >> confdefs.h <<\EOF
1835 #define HAVE_SYS_WAIT_H 1
1836 EOF
1837
1838 fi
1839
1840 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1841 do
1842 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1843 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1844 echo "configure:1845: checking for $ac_hdr" >&5
1845 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1846   echo $ac_n "(cached) $ac_c" 1>&6
1847 else
1848   cat > conftest.$ac_ext <<EOF
1849 #line 1850 "configure"
1850 #include "confdefs.h"
1851 #include <$ac_hdr>
1852 EOF
1853 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1854 { (eval echo configure:1855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1855 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1856 if test -z "$ac_err"; then
1857   rm -rf conftest*
1858   eval "ac_cv_header_$ac_safe=yes"
1859 else
1860   echo "$ac_err" >&5
1861   echo "configure: failed program was:" >&5
1862   cat conftest.$ac_ext >&5
1863   rm -rf conftest*
1864   eval "ac_cv_header_$ac_safe=no"
1865 fi
1866 rm -f conftest*
1867 fi
1868 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1869   echo "$ac_t""yes" 1>&6
1870     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1871   cat >> confdefs.h <<EOF
1872 #define $ac_tr_hdr 1
1873 EOF
1874  
1875 else
1876   echo "$ac_t""no" 1>&6
1877 fi
1878 done
1879
1880 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
1881 do
1882 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1883 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1884 echo "configure:1885: checking for $ac_hdr" >&5
1885 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1886   echo $ac_n "(cached) $ac_c" 1>&6
1887 else
1888   cat > conftest.$ac_ext <<EOF
1889 #line 1890 "configure"
1890 #include "confdefs.h"
1891 #include <$ac_hdr>
1892 EOF
1893 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1894 { (eval echo configure:1895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1895 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1896 if test -z "$ac_err"; then
1897   rm -rf conftest*
1898   eval "ac_cv_header_$ac_safe=yes"
1899 else
1900   echo "$ac_err" >&5
1901   echo "configure: failed program was:" >&5
1902   cat conftest.$ac_ext >&5
1903   rm -rf conftest*
1904   eval "ac_cv_header_$ac_safe=no"
1905 fi
1906 rm -f conftest*
1907 fi
1908 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1909   echo "$ac_t""yes" 1>&6
1910     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1911   cat >> confdefs.h <<EOF
1912 #define $ac_tr_hdr 1
1913 EOF
1914  
1915 else
1916   echo "$ac_t""no" 1>&6
1917 fi
1918 done
1919
1920 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
1921 do
1922 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1923 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1924 echo "configure:1925: checking for $ac_hdr" >&5
1925 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1926   echo $ac_n "(cached) $ac_c" 1>&6
1927 else
1928   cat > conftest.$ac_ext <<EOF
1929 #line 1930 "configure"
1930 #include "confdefs.h"
1931 #include <$ac_hdr>
1932 EOF
1933 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1934 { (eval echo configure:1935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1935 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1936 if test -z "$ac_err"; then
1937   rm -rf conftest*
1938   eval "ac_cv_header_$ac_safe=yes"
1939 else
1940   echo "$ac_err" >&5
1941   echo "configure: failed program was:" >&5
1942   cat conftest.$ac_ext >&5
1943   rm -rf conftest*
1944   eval "ac_cv_header_$ac_safe=no"
1945 fi
1946 rm -f conftest*
1947 fi
1948 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1949   echo "$ac_t""yes" 1>&6
1950     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1951   cat >> confdefs.h <<EOF
1952 #define $ac_tr_hdr 1
1953 EOF
1954  
1955 else
1956   echo "$ac_t""no" 1>&6
1957 fi
1958 done
1959
1960 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
1961 do
1962 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1963 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1964 echo "configure:1965: checking for $ac_hdr" >&5
1965 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1966   echo $ac_n "(cached) $ac_c" 1>&6
1967 else
1968   cat > conftest.$ac_ext <<EOF
1969 #line 1970 "configure"
1970 #include "confdefs.h"
1971 #include <$ac_hdr>
1972 EOF
1973 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1974 { (eval echo configure:1975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1975 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1976 if test -z "$ac_err"; then
1977   rm -rf conftest*
1978   eval "ac_cv_header_$ac_safe=yes"
1979 else
1980   echo "$ac_err" >&5
1981   echo "configure: failed program was:" >&5
1982   cat conftest.$ac_ext >&5
1983   rm -rf conftest*
1984   eval "ac_cv_header_$ac_safe=no"
1985 fi
1986 rm -f conftest*
1987 fi
1988 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1989   echo "$ac_t""yes" 1>&6
1990     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1991   cat >> confdefs.h <<EOF
1992 #define $ac_tr_hdr 1
1993 EOF
1994  
1995 else
1996   echo "$ac_t""no" 1>&6
1997 fi
1998 done
1999
2000 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
2001 do
2002 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2003 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2004 echo "configure:2005: checking for $ac_hdr" >&5
2005 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2006   echo $ac_n "(cached) $ac_c" 1>&6
2007 else
2008   cat > conftest.$ac_ext <<EOF
2009 #line 2010 "configure"
2010 #include "confdefs.h"
2011 #include <$ac_hdr>
2012 EOF
2013 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2014 { (eval echo configure:2015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2015 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2016 if test -z "$ac_err"; then
2017   rm -rf conftest*
2018   eval "ac_cv_header_$ac_safe=yes"
2019 else
2020   echo "$ac_err" >&5
2021   echo "configure: failed program was:" >&5
2022   cat conftest.$ac_ext >&5
2023   rm -rf conftest*
2024   eval "ac_cv_header_$ac_safe=no"
2025 fi
2026 rm -f conftest*
2027 fi
2028 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2029   echo "$ac_t""yes" 1>&6
2030     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2031   cat >> confdefs.h <<EOF
2032 #define $ac_tr_hdr 1
2033 EOF
2034  
2035 else
2036   echo "$ac_t""no" 1>&6
2037 fi
2038 done
2039
2040 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2041 do
2042 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2043 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2044 echo "configure:2045: checking for $ac_hdr" >&5
2045 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2046   echo $ac_n "(cached) $ac_c" 1>&6
2047 else
2048   cat > conftest.$ac_ext <<EOF
2049 #line 2050 "configure"
2050 #include "confdefs.h"
2051 #include <$ac_hdr>
2052 EOF
2053 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2054 { (eval echo configure:2055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2055 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2056 if test -z "$ac_err"; then
2057   rm -rf conftest*
2058   eval "ac_cv_header_$ac_safe=yes"
2059 else
2060   echo "$ac_err" >&5
2061   echo "configure: failed program was:" >&5
2062   cat conftest.$ac_ext >&5
2063   rm -rf conftest*
2064   eval "ac_cv_header_$ac_safe=no"
2065 fi
2066 rm -f conftest*
2067 fi
2068 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2069   echo "$ac_t""yes" 1>&6
2070     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2071   cat >> confdefs.h <<EOF
2072 #define $ac_tr_hdr 1
2073 EOF
2074  
2075 else
2076   echo "$ac_t""no" 1>&6
2077 fi
2078 done
2079
2080 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2081 do
2082 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2083 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2084 echo "configure:2085: checking for $ac_hdr" >&5
2085 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2086   echo $ac_n "(cached) $ac_c" 1>&6
2087 else
2088   cat > conftest.$ac_ext <<EOF
2089 #line 2090 "configure"
2090 #include "confdefs.h"
2091 #include <$ac_hdr>
2092 EOF
2093 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2094 { (eval echo configure:2095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2095 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2096 if test -z "$ac_err"; then
2097   rm -rf conftest*
2098   eval "ac_cv_header_$ac_safe=yes"
2099 else
2100   echo "$ac_err" >&5
2101   echo "configure: failed program was:" >&5
2102   cat conftest.$ac_ext >&5
2103   rm -rf conftest*
2104   eval "ac_cv_header_$ac_safe=no"
2105 fi
2106 rm -f conftest*
2107 fi
2108 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2109   echo "$ac_t""yes" 1>&6
2110     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2111   cat >> confdefs.h <<EOF
2112 #define $ac_tr_hdr 1
2113 EOF
2114  
2115 else
2116   echo "$ac_t""no" 1>&6
2117 fi
2118 done
2119
2120 for ac_hdr in security/pam_modules.h security/_pam_macros.h
2121 do
2122 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2123 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2124 echo "configure:2125: checking for $ac_hdr" >&5
2125 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2126   echo $ac_n "(cached) $ac_c" 1>&6
2127 else
2128   cat > conftest.$ac_ext <<EOF
2129 #line 2130 "configure"
2130 #include "confdefs.h"
2131 #include <$ac_hdr>
2132 EOF
2133 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2134 { (eval echo configure:2135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2135 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2136 if test -z "$ac_err"; then
2137   rm -rf conftest*
2138   eval "ac_cv_header_$ac_safe=yes"
2139 else
2140   echo "$ac_err" >&5
2141   echo "configure: failed program was:" >&5
2142   cat conftest.$ac_ext >&5
2143   rm -rf conftest*
2144   eval "ac_cv_header_$ac_safe=no"
2145 fi
2146 rm -f conftest*
2147 fi
2148 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2149   echo "$ac_t""yes" 1>&6
2150     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2151   cat >> confdefs.h <<EOF
2152 #define $ac_tr_hdr 1
2153 EOF
2154  
2155 else
2156   echo "$ac_t""no" 1>&6
2157 fi
2158 done
2159
2160
2161 #
2162 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2163 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2164 #
2165 case "$host_os" in
2166     *hpux*)
2167                 cat > conftest.$ac_ext <<EOF
2168 #line 2169 "configure"
2169 #include "confdefs.h"
2170 #include <shadow.h>
2171 int main() {
2172 struct spwd testme
2173 ; return 0; }
2174 EOF
2175 if { (eval echo configure:2176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2176   rm -rf conftest*
2177   ac_cv_header_shadow_h=yes
2178 else
2179   echo "configure: failed program was:" >&5
2180   cat conftest.$ac_ext >&5
2181   rm -rf conftest*
2182   ac_cv_header_shadow_h=no
2183 fi
2184 rm -f conftest*
2185                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2186                    cat >> confdefs.h <<\EOF
2187 #define HAVE_SHADOW_H 1
2188 EOF
2189
2190                 fi
2191         ;;
2192 esac
2193 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2194 do
2195 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2196 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2197 echo "configure:2198: checking for $ac_hdr" >&5
2198 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2199   echo $ac_n "(cached) $ac_c" 1>&6
2200 else
2201   cat > conftest.$ac_ext <<EOF
2202 #line 2203 "configure"
2203 #include "confdefs.h"
2204 #include <$ac_hdr>
2205 EOF
2206 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2207 { (eval echo configure:2208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2208 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2209 if test -z "$ac_err"; then
2210   rm -rf conftest*
2211   eval "ac_cv_header_$ac_safe=yes"
2212 else
2213   echo "$ac_err" >&5
2214   echo "configure: failed program was:" >&5
2215   cat conftest.$ac_ext >&5
2216   rm -rf conftest*
2217   eval "ac_cv_header_$ac_safe=no"
2218 fi
2219 rm -f conftest*
2220 fi
2221 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2222   echo "$ac_t""yes" 1>&6
2223     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2224   cat >> confdefs.h <<EOF
2225 #define $ac_tr_hdr 1
2226 EOF
2227  
2228 else
2229   echo "$ac_t""no" 1>&6
2230 fi
2231 done
2232
2233 for ac_hdr in nss.h nss_common.h sys/security.h security/pam_appl.h security/pam_modules.h
2234 do
2235 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2236 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2237 echo "configure:2238: checking for $ac_hdr" >&5
2238 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2239   echo $ac_n "(cached) $ac_c" 1>&6
2240 else
2241   cat > conftest.$ac_ext <<EOF
2242 #line 2243 "configure"
2243 #include "confdefs.h"
2244 #include <$ac_hdr>
2245 EOF
2246 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2247 { (eval echo configure:2248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2248 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2249 if test -z "$ac_err"; then
2250   rm -rf conftest*
2251   eval "ac_cv_header_$ac_safe=yes"
2252 else
2253   echo "$ac_err" >&5
2254   echo "configure: failed program was:" >&5
2255   cat conftest.$ac_ext >&5
2256   rm -rf conftest*
2257   eval "ac_cv_header_$ac_safe=no"
2258 fi
2259 rm -f conftest*
2260 fi
2261 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2262   echo "$ac_t""yes" 1>&6
2263     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2264   cat >> confdefs.h <<EOF
2265 #define $ac_tr_hdr 1
2266 EOF
2267  
2268 else
2269   echo "$ac_t""no" 1>&6
2270 fi
2271 done
2272
2273 for ac_hdr in stropts.h poll.h
2274 do
2275 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2276 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2277 echo "configure:2278: checking for $ac_hdr" >&5
2278 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2279   echo $ac_n "(cached) $ac_c" 1>&6
2280 else
2281   cat > conftest.$ac_ext <<EOF
2282 #line 2283 "configure"
2283 #include "confdefs.h"
2284 #include <$ac_hdr>
2285 EOF
2286 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2287 { (eval echo configure:2288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2288 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2289 if test -z "$ac_err"; then
2290   rm -rf conftest*
2291   eval "ac_cv_header_$ac_safe=yes"
2292 else
2293   echo "$ac_err" >&5
2294   echo "configure: failed program was:" >&5
2295   cat conftest.$ac_ext >&5
2296   rm -rf conftest*
2297   eval "ac_cv_header_$ac_safe=no"
2298 fi
2299 rm -f conftest*
2300 fi
2301 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2302   echo "$ac_t""yes" 1>&6
2303     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2304   cat >> confdefs.h <<EOF
2305 #define $ac_tr_hdr 1
2306 EOF
2307  
2308 else
2309   echo "$ac_t""no" 1>&6
2310 fi
2311 done
2312
2313 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2314 do
2315 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2316 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2317 echo "configure:2318: checking for $ac_hdr" >&5
2318 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2319   echo $ac_n "(cached) $ac_c" 1>&6
2320 else
2321   cat > conftest.$ac_ext <<EOF
2322 #line 2323 "configure"
2323 #include "confdefs.h"
2324 #include <$ac_hdr>
2325 EOF
2326 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2327 { (eval echo configure:2328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2328 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2329 if test -z "$ac_err"; then
2330   rm -rf conftest*
2331   eval "ac_cv_header_$ac_safe=yes"
2332 else
2333   echo "$ac_err" >&5
2334   echo "configure: failed program was:" >&5
2335   cat conftest.$ac_ext >&5
2336   rm -rf conftest*
2337   eval "ac_cv_header_$ac_safe=no"
2338 fi
2339 rm -f conftest*
2340 fi
2341 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2342   echo "$ac_t""yes" 1>&6
2343     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2344   cat >> confdefs.h <<EOF
2345 #define $ac_tr_hdr 1
2346 EOF
2347  
2348 else
2349   echo "$ac_t""no" 1>&6
2350 fi
2351 done
2352
2353 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2354 do
2355 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2356 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2357 echo "configure:2358: checking for $ac_hdr" >&5
2358 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2359   echo $ac_n "(cached) $ac_c" 1>&6
2360 else
2361   cat > conftest.$ac_ext <<EOF
2362 #line 2363 "configure"
2363 #include "confdefs.h"
2364 #include <$ac_hdr>
2365 EOF
2366 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2367 { (eval echo configure:2368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2368 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2369 if test -z "$ac_err"; then
2370   rm -rf conftest*
2371   eval "ac_cv_header_$ac_safe=yes"
2372 else
2373   echo "$ac_err" >&5
2374   echo "configure: failed program was:" >&5
2375   cat conftest.$ac_ext >&5
2376   rm -rf conftest*
2377   eval "ac_cv_header_$ac_safe=no"
2378 fi
2379 rm -f conftest*
2380 fi
2381 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2382   echo "$ac_t""yes" 1>&6
2383     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2384   cat >> confdefs.h <<EOF
2385 #define $ac_tr_hdr 1
2386 EOF
2387  
2388 else
2389   echo "$ac_t""no" 1>&6
2390 fi
2391 done
2392
2393
2394 # For experimental utmp support (lastlog on some BSD-like systems)
2395 for ac_hdr in utmp.h utmpx.h lastlog.h
2396 do
2397 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2398 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2399 echo "configure:2400: checking for $ac_hdr" >&5
2400 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2401   echo $ac_n "(cached) $ac_c" 1>&6
2402 else
2403   cat > conftest.$ac_ext <<EOF
2404 #line 2405 "configure"
2405 #include "confdefs.h"
2406 #include <$ac_hdr>
2407 EOF
2408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2409 { (eval echo configure:2410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2410 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2411 if test -z "$ac_err"; then
2412   rm -rf conftest*
2413   eval "ac_cv_header_$ac_safe=yes"
2414 else
2415   echo "$ac_err" >&5
2416   echo "configure: failed program was:" >&5
2417   cat conftest.$ac_ext >&5
2418   rm -rf conftest*
2419   eval "ac_cv_header_$ac_safe=no"
2420 fi
2421 rm -f conftest*
2422 fi
2423 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2424   echo "$ac_t""yes" 1>&6
2425     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2426   cat >> confdefs.h <<EOF
2427 #define $ac_tr_hdr 1
2428 EOF
2429  
2430 else
2431   echo "$ac_t""no" 1>&6
2432 fi
2433 done
2434
2435  
2436 # For quotas on Veritas VxFS filesystems
2437 for ac_hdr in sys/fs/vx_quota.h
2438 do
2439 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2440 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2441 echo "configure:2442: checking for $ac_hdr" >&5
2442 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2443   echo $ac_n "(cached) $ac_c" 1>&6
2444 else
2445   cat > conftest.$ac_ext <<EOF
2446 #line 2447 "configure"
2447 #include "confdefs.h"
2448 #include <$ac_hdr>
2449 EOF
2450 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2451 { (eval echo configure:2452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2452 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2453 if test -z "$ac_err"; then
2454   rm -rf conftest*
2455   eval "ac_cv_header_$ac_safe=yes"
2456 else
2457   echo "$ac_err" >&5
2458   echo "configure: failed program was:" >&5
2459   cat conftest.$ac_ext >&5
2460   rm -rf conftest*
2461   eval "ac_cv_header_$ac_safe=no"
2462 fi
2463 rm -f conftest*
2464 fi
2465 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2466   echo "$ac_t""yes" 1>&6
2467     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2468   cat >> confdefs.h <<EOF
2469 #define $ac_tr_hdr 1
2470 EOF
2471  
2472 else
2473   echo "$ac_t""no" 1>&6
2474 fi
2475 done
2476
2477
2478 echo $ac_n "checking size of int""... $ac_c" 1>&6
2479 echo "configure:2480: checking size of int" >&5
2480 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2481   echo $ac_n "(cached) $ac_c" 1>&6
2482 else
2483   if test "$cross_compiling" = yes; then
2484   ac_cv_sizeof_int=cross
2485 else
2486   cat > conftest.$ac_ext <<EOF
2487 #line 2488 "configure"
2488 #include "confdefs.h"
2489 #include <stdio.h>
2490 main()
2491 {
2492   FILE *f=fopen("conftestval", "w");
2493   if (!f) exit(1);
2494   fprintf(f, "%d\n", sizeof(int));
2495   exit(0);
2496 }
2497 EOF
2498 if { (eval echo configure:2499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2499 then
2500   ac_cv_sizeof_int=`cat conftestval`
2501 else
2502   echo "configure: failed program was:" >&5
2503   cat conftest.$ac_ext >&5
2504   rm -fr conftest*
2505   ac_cv_sizeof_int=0
2506 fi
2507 rm -fr conftest*
2508 fi
2509
2510 fi
2511 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2512 cat >> confdefs.h <<EOF
2513 #define SIZEOF_INT $ac_cv_sizeof_int
2514 EOF
2515
2516
2517 echo $ac_n "checking size of long""... $ac_c" 1>&6
2518 echo "configure:2519: checking size of long" >&5
2519 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2520   echo $ac_n "(cached) $ac_c" 1>&6
2521 else
2522   if test "$cross_compiling" = yes; then
2523   ac_cv_sizeof_long=cross
2524 else
2525   cat > conftest.$ac_ext <<EOF
2526 #line 2527 "configure"
2527 #include "confdefs.h"
2528 #include <stdio.h>
2529 main()
2530 {
2531   FILE *f=fopen("conftestval", "w");
2532   if (!f) exit(1);
2533   fprintf(f, "%d\n", sizeof(long));
2534   exit(0);
2535 }
2536 EOF
2537 if { (eval echo configure:2538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2538 then
2539   ac_cv_sizeof_long=`cat conftestval`
2540 else
2541   echo "configure: failed program was:" >&5
2542   cat conftest.$ac_ext >&5
2543   rm -fr conftest*
2544   ac_cv_sizeof_long=0
2545 fi
2546 rm -fr conftest*
2547 fi
2548
2549 fi
2550 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2551 cat >> confdefs.h <<EOF
2552 #define SIZEOF_LONG $ac_cv_sizeof_long
2553 EOF
2554
2555
2556 echo $ac_n "checking size of short""... $ac_c" 1>&6
2557 echo "configure:2558: checking size of short" >&5
2558 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2559   echo $ac_n "(cached) $ac_c" 1>&6
2560 else
2561   if test "$cross_compiling" = yes; then
2562   ac_cv_sizeof_short=cross
2563 else
2564   cat > conftest.$ac_ext <<EOF
2565 #line 2566 "configure"
2566 #include "confdefs.h"
2567 #include <stdio.h>
2568 main()
2569 {
2570   FILE *f=fopen("conftestval", "w");
2571   if (!f) exit(1);
2572   fprintf(f, "%d\n", sizeof(short));
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_short=`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_short=0
2584 fi
2585 rm -fr conftest*
2586 fi
2587
2588 fi
2589 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2590 cat >> confdefs.h <<EOF
2591 #define SIZEOF_SHORT $ac_cv_sizeof_short
2592 EOF
2593
2594
2595
2596 echo $ac_n "checking for working const""... $ac_c" 1>&6
2597 echo "configure:2598: checking for working const" >&5
2598 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2599   echo $ac_n "(cached) $ac_c" 1>&6
2600 else
2601   cat > conftest.$ac_ext <<EOF
2602 #line 2603 "configure"
2603 #include "confdefs.h"
2604
2605 int main() {
2606
2607 /* Ultrix mips cc rejects this.  */
2608 typedef int charset[2]; const charset x;
2609 /* SunOS 4.1.1 cc rejects this.  */
2610 char const *const *ccp;
2611 char **p;
2612 /* NEC SVR4.0.2 mips cc rejects this.  */
2613 struct point {int x, y;};
2614 static struct point const zero = {0,0};
2615 /* AIX XL C 1.02.0.0 rejects this.
2616    It does not let you subtract one const X* pointer from another in an arm
2617    of an if-expression whose if-part is not a constant expression */
2618 const char *g = "string";
2619 ccp = &g + (g ? g-g : 0);
2620 /* HPUX 7.0 cc rejects these. */
2621 ++ccp;
2622 p = (char**) ccp;
2623 ccp = (char const *const *) p;
2624 { /* SCO 3.2v4 cc rejects this.  */
2625   char *t;
2626   char const *s = 0 ? (char *) 0 : (char const *) 0;
2627
2628   *t++ = 0;
2629 }
2630 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2631   int x[] = {25, 17};
2632   const int *foo = &x[0];
2633   ++foo;
2634 }
2635 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2636   typedef const int *iptr;
2637   iptr p = 0;
2638   ++p;
2639 }
2640 { /* AIX XL C 1.02.0.0 rejects this saying
2641      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2642   struct s { int j; const int *ap[3]; };
2643   struct s *b; b->j = 5;
2644 }
2645 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2646   const int foo = 10;
2647 }
2648
2649 ; return 0; }
2650 EOF
2651 if { (eval echo configure:2652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2652   rm -rf conftest*
2653   ac_cv_c_const=yes
2654 else
2655   echo "configure: failed program was:" >&5
2656   cat conftest.$ac_ext >&5
2657   rm -rf conftest*
2658   ac_cv_c_const=no
2659 fi
2660 rm -f conftest*
2661 fi
2662
2663 echo "$ac_t""$ac_cv_c_const" 1>&6
2664 if test $ac_cv_c_const = no; then
2665   cat >> confdefs.h <<\EOF
2666 #define const 
2667 EOF
2668
2669 fi
2670
2671 echo $ac_n "checking for inline""... $ac_c" 1>&6
2672 echo "configure:2673: checking for inline" >&5
2673 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2674   echo $ac_n "(cached) $ac_c" 1>&6
2675 else
2676   ac_cv_c_inline=no
2677 for ac_kw in inline __inline__ __inline; do
2678   cat > conftest.$ac_ext <<EOF
2679 #line 2680 "configure"
2680 #include "confdefs.h"
2681
2682 int main() {
2683 } $ac_kw foo() {
2684 ; return 0; }
2685 EOF
2686 if { (eval echo configure:2687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2687   rm -rf conftest*
2688   ac_cv_c_inline=$ac_kw; break
2689 else
2690   echo "configure: failed program was:" >&5
2691   cat conftest.$ac_ext >&5
2692 fi
2693 rm -f conftest*
2694 done
2695
2696 fi
2697
2698 echo "$ac_t""$ac_cv_c_inline" 1>&6
2699 case "$ac_cv_c_inline" in
2700   inline | yes) ;;
2701   no) cat >> confdefs.h <<\EOF
2702 #define inline 
2703 EOF
2704  ;;
2705   *)  cat >> confdefs.h <<EOF
2706 #define inline $ac_cv_c_inline
2707 EOF
2708  ;;
2709 esac
2710
2711 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2712 echo "configure:2713: checking whether byte ordering is bigendian" >&5
2713 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2714   echo $ac_n "(cached) $ac_c" 1>&6
2715 else
2716   ac_cv_c_bigendian=unknown
2717 # See if sys/param.h defines the BYTE_ORDER macro.
2718 cat > conftest.$ac_ext <<EOF
2719 #line 2720 "configure"
2720 #include "confdefs.h"
2721 #include <sys/types.h>
2722 #include <sys/param.h>
2723 int main() {
2724
2725 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2726  bogus endian macros
2727 #endif
2728 ; return 0; }
2729 EOF
2730 if { (eval echo configure:2731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2731   rm -rf conftest*
2732   # It does; now see whether it defined to BIG_ENDIAN or not.
2733 cat > conftest.$ac_ext <<EOF
2734 #line 2735 "configure"
2735 #include "confdefs.h"
2736 #include <sys/types.h>
2737 #include <sys/param.h>
2738 int main() {
2739
2740 #if BYTE_ORDER != BIG_ENDIAN
2741  not big endian
2742 #endif
2743 ; return 0; }
2744 EOF
2745 if { (eval echo configure:2746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2746   rm -rf conftest*
2747   ac_cv_c_bigendian=yes
2748 else
2749   echo "configure: failed program was:" >&5
2750   cat conftest.$ac_ext >&5
2751   rm -rf conftest*
2752   ac_cv_c_bigendian=no
2753 fi
2754 rm -f conftest*
2755 else
2756   echo "configure: failed program was:" >&5
2757   cat conftest.$ac_ext >&5
2758 fi
2759 rm -f conftest*
2760 if test $ac_cv_c_bigendian = unknown; then
2761 if test "$cross_compiling" = yes; then
2762     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2763 else
2764   cat > conftest.$ac_ext <<EOF
2765 #line 2766 "configure"
2766 #include "confdefs.h"
2767 main () {
2768   /* Are we little or big endian?  From Harbison&Steele.  */
2769   union
2770   {
2771     long l;
2772     char c[sizeof (long)];
2773   } u;
2774   u.l = 1;
2775   exit (u.c[sizeof (long) - 1] == 1);
2776 }
2777 EOF
2778 if { (eval echo configure:2779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2779 then
2780   ac_cv_c_bigendian=no
2781 else
2782   echo "configure: failed program was:" >&5
2783   cat conftest.$ac_ext >&5
2784   rm -fr conftest*
2785   ac_cv_c_bigendian=yes
2786 fi
2787 rm -fr conftest*
2788 fi
2789
2790 fi
2791 fi
2792
2793 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2794 if test $ac_cv_c_bigendian = yes; then
2795   cat >> confdefs.h <<\EOF
2796 #define WORDS_BIGENDIAN 1
2797 EOF
2798
2799 fi
2800
2801 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2802 echo "configure:2803: checking whether char is unsigned" >&5
2803 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2804   echo $ac_n "(cached) $ac_c" 1>&6
2805 else
2806   if test "$GCC" = yes; then
2807   # GCC predefines this symbol on systems where it applies.
2808 cat > conftest.$ac_ext <<EOF
2809 #line 2810 "configure"
2810 #include "confdefs.h"
2811 #ifdef __CHAR_UNSIGNED__
2812   yes
2813 #endif
2814
2815 EOF
2816 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2817   egrep "yes" >/dev/null 2>&1; then
2818   rm -rf conftest*
2819   ac_cv_c_char_unsigned=yes
2820 else
2821   rm -rf conftest*
2822   ac_cv_c_char_unsigned=no
2823 fi
2824 rm -f conftest*
2825
2826 else
2827 if test "$cross_compiling" = yes; then
2828     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2829 else
2830   cat > conftest.$ac_ext <<EOF
2831 #line 2832 "configure"
2832 #include "confdefs.h"
2833 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2834 #if !defined(__STDC__) || __STDC__ != 1
2835 #define volatile
2836 #endif
2837 main() {
2838   volatile char c = 255; exit(c < 0);
2839 }
2840 EOF
2841 if { (eval echo configure:2842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2842 then
2843   ac_cv_c_char_unsigned=yes
2844 else
2845   echo "configure: failed program was:" >&5
2846   cat conftest.$ac_ext >&5
2847   rm -fr conftest*
2848   ac_cv_c_char_unsigned=no
2849 fi
2850 rm -fr conftest*
2851 fi
2852
2853 fi
2854 fi
2855
2856 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2857 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2858   cat >> confdefs.h <<\EOF
2859 #define __CHAR_UNSIGNED__ 1
2860 EOF
2861
2862 fi
2863
2864
2865 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2866 echo "configure:2867: checking return type of signal handlers" >&5
2867 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2868   echo $ac_n "(cached) $ac_c" 1>&6
2869 else
2870   cat > conftest.$ac_ext <<EOF
2871 #line 2872 "configure"
2872 #include "confdefs.h"
2873 #include <sys/types.h>
2874 #include <signal.h>
2875 #ifdef signal
2876 #undef signal
2877 #endif
2878 #ifdef __cplusplus
2879 extern "C" void (*signal (int, void (*)(int)))(int);
2880 #else
2881 void (*signal ()) ();
2882 #endif
2883
2884 int main() {
2885 int i;
2886 ; return 0; }
2887 EOF
2888 if { (eval echo configure:2889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2889   rm -rf conftest*
2890   ac_cv_type_signal=void
2891 else
2892   echo "configure: failed program was:" >&5
2893   cat conftest.$ac_ext >&5
2894   rm -rf conftest*
2895   ac_cv_type_signal=int
2896 fi
2897 rm -f conftest*
2898 fi
2899
2900 echo "$ac_t""$ac_cv_type_signal" 1>&6
2901 cat >> confdefs.h <<EOF
2902 #define RETSIGTYPE $ac_cv_type_signal
2903 EOF
2904
2905
2906 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2907 echo "configure:2908: checking for uid_t in sys/types.h" >&5
2908 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2909   echo $ac_n "(cached) $ac_c" 1>&6
2910 else
2911   cat > conftest.$ac_ext <<EOF
2912 #line 2913 "configure"
2913 #include "confdefs.h"
2914 #include <sys/types.h>
2915 EOF
2916 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2917   egrep "uid_t" >/dev/null 2>&1; then
2918   rm -rf conftest*
2919   ac_cv_type_uid_t=yes
2920 else
2921   rm -rf conftest*
2922   ac_cv_type_uid_t=no
2923 fi
2924 rm -f conftest*
2925
2926 fi
2927
2928 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2929 if test $ac_cv_type_uid_t = no; then
2930   cat >> confdefs.h <<\EOF
2931 #define uid_t int
2932 EOF
2933
2934   cat >> confdefs.h <<\EOF
2935 #define gid_t int
2936 EOF
2937
2938 fi
2939
2940 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2941 echo "configure:2942: checking for mode_t" >&5
2942 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2943   echo $ac_n "(cached) $ac_c" 1>&6
2944 else
2945   cat > conftest.$ac_ext <<EOF
2946 #line 2947 "configure"
2947 #include "confdefs.h"
2948 #include <sys/types.h>
2949 #if STDC_HEADERS
2950 #include <stdlib.h>
2951 #include <stddef.h>
2952 #endif
2953 EOF
2954 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2955   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2956   rm -rf conftest*
2957   ac_cv_type_mode_t=yes
2958 else
2959   rm -rf conftest*
2960   ac_cv_type_mode_t=no
2961 fi
2962 rm -f conftest*
2963
2964 fi
2965 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2966 if test $ac_cv_type_mode_t = no; then
2967   cat >> confdefs.h <<\EOF
2968 #define mode_t int
2969 EOF
2970
2971 fi
2972
2973 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2974 echo "configure:2975: checking for off_t" >&5
2975 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2976   echo $ac_n "(cached) $ac_c" 1>&6
2977 else
2978   cat > conftest.$ac_ext <<EOF
2979 #line 2980 "configure"
2980 #include "confdefs.h"
2981 #include <sys/types.h>
2982 #if STDC_HEADERS
2983 #include <stdlib.h>
2984 #include <stddef.h>
2985 #endif
2986 EOF
2987 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2988   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2989   rm -rf conftest*
2990   ac_cv_type_off_t=yes
2991 else
2992   rm -rf conftest*
2993   ac_cv_type_off_t=no
2994 fi
2995 rm -f conftest*
2996
2997 fi
2998 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2999 if test $ac_cv_type_off_t = no; then
3000   cat >> confdefs.h <<\EOF
3001 #define off_t long
3002 EOF
3003
3004 fi
3005
3006 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3007 echo "configure:3008: checking for size_t" >&5
3008 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3009   echo $ac_n "(cached) $ac_c" 1>&6
3010 else
3011   cat > conftest.$ac_ext <<EOF
3012 #line 3013 "configure"
3013 #include "confdefs.h"
3014 #include <sys/types.h>
3015 #if STDC_HEADERS
3016 #include <stdlib.h>
3017 #include <stddef.h>
3018 #endif
3019 EOF
3020 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3021   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3022   rm -rf conftest*
3023   ac_cv_type_size_t=yes
3024 else
3025   rm -rf conftest*
3026   ac_cv_type_size_t=no
3027 fi
3028 rm -f conftest*
3029
3030 fi
3031 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3032 if test $ac_cv_type_size_t = no; then
3033   cat >> confdefs.h <<\EOF
3034 #define size_t unsigned
3035 EOF
3036
3037 fi
3038
3039 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3040 echo "configure:3041: checking for pid_t" >&5
3041 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3042   echo $ac_n "(cached) $ac_c" 1>&6
3043 else
3044   cat > conftest.$ac_ext <<EOF
3045 #line 3046 "configure"
3046 #include "confdefs.h"
3047 #include <sys/types.h>
3048 #if STDC_HEADERS
3049 #include <stdlib.h>
3050 #include <stddef.h>
3051 #endif
3052 EOF
3053 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3054   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3055   rm -rf conftest*
3056   ac_cv_type_pid_t=yes
3057 else
3058   rm -rf conftest*
3059   ac_cv_type_pid_t=no
3060 fi
3061 rm -f conftest*
3062
3063 fi
3064 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3065 if test $ac_cv_type_pid_t = no; then
3066   cat >> confdefs.h <<\EOF
3067 #define pid_t int
3068 EOF
3069
3070 fi
3071
3072 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3073 echo "configure:3074: checking for st_rdev in struct stat" >&5
3074 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3075   echo $ac_n "(cached) $ac_c" 1>&6
3076 else
3077   cat > conftest.$ac_ext <<EOF
3078 #line 3079 "configure"
3079 #include "confdefs.h"
3080 #include <sys/types.h>
3081 #include <sys/stat.h>
3082 int main() {
3083 struct stat s; s.st_rdev;
3084 ; return 0; }
3085 EOF
3086 if { (eval echo configure:3087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3087   rm -rf conftest*
3088   ac_cv_struct_st_rdev=yes
3089 else
3090   echo "configure: failed program was:" >&5
3091   cat conftest.$ac_ext >&5
3092   rm -rf conftest*
3093   ac_cv_struct_st_rdev=no
3094 fi
3095 rm -f conftest*
3096 fi
3097
3098 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3099 if test $ac_cv_struct_st_rdev = yes; then
3100   cat >> confdefs.h <<\EOF
3101 #define HAVE_ST_RDEV 1
3102 EOF
3103
3104 fi
3105
3106 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3107 echo "configure:3108: checking for d_off in dirent" >&5
3108 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3109   echo $ac_n "(cached) $ac_c" 1>&6
3110 else
3111   cat > conftest.$ac_ext <<EOF
3112 #line 3113 "configure"
3113 #include "confdefs.h"
3114
3115 #include <unistd.h>
3116 #include <sys/types.h>
3117 #include <dirent.h>
3118 int main() {
3119 struct dirent d; d.d_off;
3120 ; return 0; }
3121 EOF
3122 if { (eval echo configure:3123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3123   rm -rf conftest*
3124   ac_cv_dirent_d_off=yes
3125 else
3126   echo "configure: failed program was:" >&5
3127   cat conftest.$ac_ext >&5
3128   rm -rf conftest*
3129   ac_cv_dirent_d_off=no
3130 fi
3131 rm -f conftest*
3132 fi
3133
3134 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3135 if test $ac_cv_dirent_d_off = yes; then
3136   cat >> confdefs.h <<\EOF
3137 #define HAVE_DIRENT_D_OFF 1
3138 EOF
3139
3140 fi
3141
3142 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3143 echo "configure:3144: checking for ino_t" >&5
3144 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3145   echo $ac_n "(cached) $ac_c" 1>&6
3146 else
3147   cat > conftest.$ac_ext <<EOF
3148 #line 3149 "configure"
3149 #include "confdefs.h"
3150 #include <sys/types.h>
3151 #if STDC_HEADERS
3152 #include <stdlib.h>
3153 #include <stddef.h>
3154 #endif
3155 EOF
3156 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3157   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3158   rm -rf conftest*
3159   ac_cv_type_ino_t=yes
3160 else
3161   rm -rf conftest*
3162   ac_cv_type_ino_t=no
3163 fi
3164 rm -f conftest*
3165
3166 fi
3167 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3168 if test $ac_cv_type_ino_t = no; then
3169   cat >> confdefs.h <<\EOF
3170 #define ino_t unsigned
3171 EOF
3172
3173 fi
3174
3175 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3176 echo "configure:3177: checking for loff_t" >&5
3177 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3178   echo $ac_n "(cached) $ac_c" 1>&6
3179 else
3180   cat > conftest.$ac_ext <<EOF
3181 #line 3182 "configure"
3182 #include "confdefs.h"
3183 #include <sys/types.h>
3184 #if STDC_HEADERS
3185 #include <stdlib.h>
3186 #include <stddef.h>
3187 #endif
3188 EOF
3189 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3190   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3191   rm -rf conftest*
3192   ac_cv_type_loff_t=yes
3193 else
3194   rm -rf conftest*
3195   ac_cv_type_loff_t=no
3196 fi
3197 rm -f conftest*
3198
3199 fi
3200 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3201 if test $ac_cv_type_loff_t = no; then
3202   cat >> confdefs.h <<\EOF
3203 #define loff_t off_t
3204 EOF
3205
3206 fi
3207
3208 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3209 echo "configure:3210: checking for offset_t" >&5
3210 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3211   echo $ac_n "(cached) $ac_c" 1>&6
3212 else
3213   cat > conftest.$ac_ext <<EOF
3214 #line 3215 "configure"
3215 #include "confdefs.h"
3216 #include <sys/types.h>
3217 #if STDC_HEADERS
3218 #include <stdlib.h>
3219 #include <stddef.h>
3220 #endif
3221 EOF
3222 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3223   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3224   rm -rf conftest*
3225   ac_cv_type_offset_t=yes
3226 else
3227   rm -rf conftest*
3228   ac_cv_type_offset_t=no
3229 fi
3230 rm -f conftest*
3231
3232 fi
3233 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3234 if test $ac_cv_type_offset_t = no; then
3235   cat >> confdefs.h <<\EOF
3236 #define offset_t loff_t
3237 EOF
3238
3239 fi
3240
3241 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3242 echo "configure:3243: checking for ssize_t" >&5
3243 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3244   echo $ac_n "(cached) $ac_c" 1>&6
3245 else
3246   cat > conftest.$ac_ext <<EOF
3247 #line 3248 "configure"
3248 #include "confdefs.h"
3249 #include <sys/types.h>
3250 #if STDC_HEADERS
3251 #include <stdlib.h>
3252 #include <stddef.h>
3253 #endif
3254 EOF
3255 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3256   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3257   rm -rf conftest*
3258   ac_cv_type_ssize_t=yes
3259 else
3260   rm -rf conftest*
3261   ac_cv_type_ssize_t=no
3262 fi
3263 rm -f conftest*
3264
3265 fi
3266 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3267 if test $ac_cv_type_ssize_t = no; then
3268   cat >> confdefs.h <<\EOF
3269 #define ssize_t int
3270 EOF
3271
3272 fi
3273
3274 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3275 echo "configure:3276: checking for wchar_t" >&5
3276 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3277   echo $ac_n "(cached) $ac_c" 1>&6
3278 else
3279   cat > conftest.$ac_ext <<EOF
3280 #line 3281 "configure"
3281 #include "confdefs.h"
3282 #include <sys/types.h>
3283 #if STDC_HEADERS
3284 #include <stdlib.h>
3285 #include <stddef.h>
3286 #endif
3287 EOF
3288 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3289   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3290   rm -rf conftest*
3291   ac_cv_type_wchar_t=yes
3292 else
3293   rm -rf conftest*
3294   ac_cv_type_wchar_t=no
3295 fi
3296 rm -f conftest*
3297
3298 fi
3299 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3300 if test $ac_cv_type_wchar_t = no; then
3301   cat >> confdefs.h <<\EOF
3302 #define wchar_t unsigned short
3303 EOF
3304
3305 fi
3306
3307
3308 ############################################
3309 # for cups support we need libcups, and a handful of header files
3310
3311 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3312 echo "configure:3313: checking for httpConnect in -lcups" >&5
3313 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3314 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3315   echo $ac_n "(cached) $ac_c" 1>&6
3316 else
3317   ac_save_LIBS="$LIBS"
3318 LIBS="-lcups  $LIBS"
3319 cat > conftest.$ac_ext <<EOF
3320 #line 3321 "configure"
3321 #include "confdefs.h"
3322 /* Override any gcc2 internal prototype to avoid an error.  */
3323 /* We use char because int might match the return type of a gcc2
3324     builtin and then its argument prototype would still apply.  */
3325 char httpConnect();
3326
3327 int main() {
3328 httpConnect()
3329 ; return 0; }
3330 EOF
3331 if { (eval echo configure:3332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3332   rm -rf conftest*
3333   eval "ac_cv_lib_$ac_lib_var=yes"
3334 else
3335   echo "configure: failed program was:" >&5
3336   cat conftest.$ac_ext >&5
3337   rm -rf conftest*
3338   eval "ac_cv_lib_$ac_lib_var=no"
3339 fi
3340 rm -f conftest*
3341 LIBS="$ac_save_LIBS"
3342
3343 fi
3344 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3345   echo "$ac_t""yes" 1>&6
3346     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3347     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3348   cat >> confdefs.h <<EOF
3349 #define $ac_tr_lib 1
3350 EOF
3351
3352   LIBS="-lcups $LIBS"
3353
3354 else
3355   echo "$ac_t""no" 1>&6
3356 fi
3357
3358
3359 # I wonder if there is a nicer way of doing this?
3360
3361 if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
3362         for ac_hdr in cups/cups.h cups/language.h
3363 do
3364 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3365 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3366 echo "configure:3367: checking for $ac_hdr" >&5
3367 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3368   echo $ac_n "(cached) $ac_c" 1>&6
3369 else
3370   cat > conftest.$ac_ext <<EOF
3371 #line 3372 "configure"
3372 #include "confdefs.h"
3373 #include <$ac_hdr>
3374 EOF
3375 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3376 { (eval echo configure:3377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3377 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3378 if test -z "$ac_err"; then
3379   rm -rf conftest*
3380   eval "ac_cv_header_$ac_safe=yes"
3381 else
3382   echo "$ac_err" >&5
3383   echo "configure: failed program was:" >&5
3384   cat conftest.$ac_ext >&5
3385   rm -rf conftest*
3386   eval "ac_cv_header_$ac_safe=no"
3387 fi
3388 rm -f conftest*
3389 fi
3390 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3391   echo "$ac_t""yes" 1>&6
3392     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3393   cat >> confdefs.h <<EOF
3394 #define $ac_tr_hdr 1
3395 EOF
3396  
3397 else
3398   echo "$ac_t""no" 1>&6
3399 fi
3400 done
3401
3402         if x"$ac_cv_header_cups_cups_h" = x"yes"; then
3403                 if x"$ac_cv_header_cups_language_h" = x"yes"; then
3404                         cat >> confdefs.h <<\EOF
3405 #define HAVE_CUPS 1
3406 EOF
3407
3408                 fi
3409         fi
3410 fi
3411
3412 ############################################
3413 # we need libdl for PAM and the new VFS code
3414 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3415 echo "configure:3416: checking for dlopen in -ldl" >&5
3416 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3417 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3418   echo $ac_n "(cached) $ac_c" 1>&6
3419 else
3420   ac_save_LIBS="$LIBS"
3421 LIBS="-ldl  $LIBS"
3422 cat > conftest.$ac_ext <<EOF
3423 #line 3424 "configure"
3424 #include "confdefs.h"
3425 /* Override any gcc2 internal prototype to avoid an error.  */
3426 /* We use char because int might match the return type of a gcc2
3427     builtin and then its argument prototype would still apply.  */
3428 char dlopen();
3429
3430 int main() {
3431 dlopen()
3432 ; return 0; }
3433 EOF
3434 if { (eval echo configure:3435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3435   rm -rf conftest*
3436   eval "ac_cv_lib_$ac_lib_var=yes"
3437 else
3438   echo "configure: failed program was:" >&5
3439   cat conftest.$ac_ext >&5
3440   rm -rf conftest*
3441   eval "ac_cv_lib_$ac_lib_var=no"
3442 fi
3443 rm -f conftest*
3444 LIBS="$ac_save_LIBS"
3445
3446 fi
3447 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3448   echo "$ac_t""yes" 1>&6
3449   LIBS="$LIBS -ldl";
3450         cat >> confdefs.h <<\EOF
3451 #define HAVE_LIBDL 1
3452 EOF
3453
3454 else
3455   echo "$ac_t""no" 1>&6
3456 fi
3457
3458
3459
3460 ############################################
3461 # check if the compiler can do immediate structures
3462 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3463 echo "configure:3464: checking for immediate structures" >&5
3464 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3465   echo $ac_n "(cached) $ac_c" 1>&6
3466 else
3467   
3468     cat > conftest.$ac_ext <<EOF
3469 #line 3470 "configure"
3470 #include "confdefs.h"
3471
3472 #include <stdio.h>
3473 int main() {
3474
3475    #define X_FOOBAR(x) ((FOOBAR) { x })
3476    typedef struct {unsigned x;} FOOBAR;
3477    FOOBAR f = X_FOOBAR(1);   
3478
3479 ; return 0; }
3480 EOF
3481 if { (eval echo configure:3482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3482   rm -rf conftest*
3483   samba_cv_immediate_structures=yes
3484 else
3485   echo "configure: failed program was:" >&5
3486   cat conftest.$ac_ext >&5
3487   rm -rf conftest*
3488   samba_cv_immediate_structures=no
3489 fi
3490 rm -f conftest*
3491 fi
3492
3493 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3494 if test x"$samba_cv_immediate_structures" = x"yes"; then
3495    cat >> confdefs.h <<\EOF
3496 #define HAVE_IMMEDIATE_STRUCTURES 1
3497 EOF
3498
3499 fi
3500
3501 ############################################
3502 # check for unix domain sockets
3503 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3504 echo "configure:3505: checking for unix domain sockets" >&5
3505 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3506   echo $ac_n "(cached) $ac_c" 1>&6
3507 else
3508   
3509     cat > conftest.$ac_ext <<EOF
3510 #line 3511 "configure"
3511 #include "confdefs.h"
3512
3513 #include <sys/types.h>
3514 #include <stdlib.h>
3515 #include <stddef.h>
3516 #include <sys/socket.h>
3517 #include <sys/un.h>
3518 int main() {
3519
3520   struct sockaddr_un sunaddr; 
3521   sunaddr.sun_family = AF_UNIX;
3522
3523 ; return 0; }
3524 EOF
3525 if { (eval echo configure:3526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3526   rm -rf conftest*
3527   samba_cv_unixsocket=yes
3528 else
3529   echo "configure: failed program was:" >&5
3530   cat conftest.$ac_ext >&5
3531   rm -rf conftest*
3532   samba_cv_unixsocket=no
3533 fi
3534 rm -f conftest*
3535 fi
3536
3537 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3538 if test x"$samba_cv_unixsocket" = x"yes"; then
3539    cat >> confdefs.h <<\EOF
3540 #define HAVE_UNIXSOCKET 1
3541 EOF
3542
3543 fi
3544
3545
3546 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3547 echo "configure:3548: checking for socklen_t type" >&5
3548 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3549   echo $ac_n "(cached) $ac_c" 1>&6
3550 else
3551   
3552     cat > conftest.$ac_ext <<EOF
3553 #line 3554 "configure"
3554 #include "confdefs.h"
3555
3556 #include <sys/types.h>
3557 #if STDC_HEADERS
3558 #include <stdlib.h>
3559 #include <stddef.h>
3560 #endif
3561 #include <sys/socket.h>
3562 int main() {
3563 socklen_t i = 0
3564 ; return 0; }
3565 EOF
3566 if { (eval echo configure:3567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3567   rm -rf conftest*
3568   samba_cv_socklen_t=yes
3569 else
3570   echo "configure: failed program was:" >&5
3571   cat conftest.$ac_ext >&5
3572   rm -rf conftest*
3573   samba_cv_socklen_t=no
3574 fi
3575 rm -f conftest*
3576 fi
3577
3578 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3579 if test x"$samba_cv_socklen_t" = x"yes"; then
3580    cat >> confdefs.h <<\EOF
3581 #define HAVE_SOCKLEN_T_TYPE 1
3582 EOF
3583
3584 fi
3585
3586 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3587 echo "configure:3588: checking for sig_atomic_t type" >&5
3588 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3589   echo $ac_n "(cached) $ac_c" 1>&6
3590 else
3591   
3592     cat > conftest.$ac_ext <<EOF
3593 #line 3594 "configure"
3594 #include "confdefs.h"
3595
3596 #include <sys/types.h>
3597 #if STDC_HEADERS
3598 #include <stdlib.h>
3599 #include <stddef.h>
3600 #endif
3601 #include <signal.h>
3602 int main() {
3603 sig_atomic_t i = 0
3604 ; return 0; }
3605 EOF
3606 if { (eval echo configure:3607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3607   rm -rf conftest*
3608   samba_cv_sig_atomic_t=yes
3609 else
3610   echo "configure: failed program was:" >&5
3611   cat conftest.$ac_ext >&5
3612   rm -rf conftest*
3613   samba_cv_sig_atomic_t=no
3614 fi
3615 rm -f conftest*
3616 fi
3617
3618 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3619 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3620    cat >> confdefs.h <<\EOF
3621 #define HAVE_SIG_ATOMIC_T_TYPE 1
3622 EOF
3623
3624 fi
3625
3626 # stupid headers have the functions but no declaration. grrrr.
3627
3628  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
3629 echo "configure:3630: checking for errno declaration" >&5
3630 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
3631   echo $ac_n "(cached) $ac_c" 1>&6
3632 else
3633   
3634     cat > conftest.$ac_ext <<EOF
3635 #line 3636 "configure"
3636 #include "confdefs.h"
3637 #include <errno.h>
3638 int main() {
3639 int i = (int)errno
3640 ; return 0; }
3641 EOF
3642 if { (eval echo configure:3643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3643   rm -rf conftest*
3644   ac_cv_have_errno_decl=yes
3645 else
3646   echo "configure: failed program was:" >&5
3647   cat conftest.$ac_ext >&5
3648   rm -rf conftest*
3649   ac_cv_have_errno_decl=no
3650 fi
3651 rm -f conftest*
3652 fi
3653
3654 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
3655  if test x"$ac_cv_have_errno_decl" = x"yes"; then
3656     cat >> confdefs.h <<\EOF
3657 #define HAVE_ERRNO_DECL 1
3658 EOF
3659
3660  fi
3661
3662
3663  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3664 echo "configure:3665: checking for setresuid declaration" >&5
3665 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
3666   echo $ac_n "(cached) $ac_c" 1>&6
3667 else
3668   
3669     cat > conftest.$ac_ext <<EOF
3670 #line 3671 "configure"
3671 #include "confdefs.h"
3672 #include <unistd.h>
3673 int main() {
3674 int i = (int)setresuid
3675 ; return 0; }
3676 EOF
3677 if { (eval echo configure:3678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3678   rm -rf conftest*
3679   ac_cv_have_setresuid_decl=yes
3680 else
3681   echo "configure: failed program was:" >&5
3682   cat conftest.$ac_ext >&5
3683   rm -rf conftest*
3684   ac_cv_have_setresuid_decl=no
3685 fi
3686 rm -f conftest*
3687 fi
3688
3689 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
3690  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
3691     cat >> confdefs.h <<\EOF
3692 #define HAVE_SETRESUID_DECL 1
3693 EOF
3694
3695  fi
3696
3697
3698  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
3699 echo "configure:3700: checking for setresgid declaration" >&5
3700 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
3701   echo $ac_n "(cached) $ac_c" 1>&6
3702 else
3703   
3704     cat > conftest.$ac_ext <<EOF
3705 #line 3706 "configure"
3706 #include "confdefs.h"
3707 #include <unistd.h>
3708 int main() {
3709 int i = (int)setresgid
3710 ; return 0; }
3711 EOF
3712 if { (eval echo configure:3713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3713   rm -rf conftest*
3714   ac_cv_have_setresgid_decl=yes
3715 else
3716   echo "configure: failed program was:" >&5
3717   cat conftest.$ac_ext >&5
3718   rm -rf conftest*
3719   ac_cv_have_setresgid_decl=no
3720 fi
3721 rm -f conftest*
3722 fi
3723
3724 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
3725  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
3726     cat >> confdefs.h <<\EOF
3727 #define HAVE_SETRESGID_DECL 1
3728 EOF
3729
3730  fi
3731
3732
3733  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
3734 echo "configure:3735: checking for asprintf declaration" >&5
3735 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
3736   echo $ac_n "(cached) $ac_c" 1>&6
3737 else
3738   
3739     cat > conftest.$ac_ext <<EOF
3740 #line 3741 "configure"
3741 #include "confdefs.h"
3742 #include <stdio.h>
3743 int main() {
3744 int i = (int)asprintf
3745 ; return 0; }
3746 EOF
3747 if { (eval echo configure:3748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3748   rm -rf conftest*
3749   ac_cv_have_asprintf_decl=yes
3750 else
3751   echo "configure: failed program was:" >&5
3752   cat conftest.$ac_ext >&5
3753   rm -rf conftest*
3754   ac_cv_have_asprintf_decl=no
3755 fi
3756 rm -f conftest*
3757 fi
3758
3759 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
3760  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
3761     cat >> confdefs.h <<\EOF
3762 #define HAVE_ASPRINTF_DECL 1
3763 EOF
3764
3765  fi
3766
3767
3768  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
3769 echo "configure:3770: checking for vasprintf declaration" >&5
3770 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
3771   echo $ac_n "(cached) $ac_c" 1>&6
3772 else
3773   
3774     cat > conftest.$ac_ext <<EOF
3775 #line 3776 "configure"
3776 #include "confdefs.h"
3777 #include <stdio.h>
3778 int main() {
3779 int i = (int)vasprintf
3780 ; return 0; }
3781 EOF
3782 if { (eval echo configure:3783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3783   rm -rf conftest*
3784   ac_cv_have_vasprintf_decl=yes
3785 else
3786   echo "configure: failed program was:" >&5
3787   cat conftest.$ac_ext >&5
3788   rm -rf conftest*
3789   ac_cv_have_vasprintf_decl=no
3790 fi
3791 rm -f conftest*
3792 fi
3793
3794 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
3795  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
3796     cat >> confdefs.h <<\EOF
3797 #define HAVE_VASPRINTF_DECL 1
3798 EOF
3799
3800  fi
3801
3802
3803  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
3804 echo "configure:3805: checking for vsnprintf declaration" >&5
3805 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
3806   echo $ac_n "(cached) $ac_c" 1>&6
3807 else
3808   
3809     cat > conftest.$ac_ext <<EOF
3810 #line 3811 "configure"
3811 #include "confdefs.h"
3812 #include <stdio.h>
3813 int main() {
3814 int i = (int)vsnprintf
3815 ; return 0; }
3816 EOF
3817 if { (eval echo configure:3818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3818   rm -rf conftest*
3819   ac_cv_have_vsnprintf_decl=yes
3820 else
3821   echo "configure: failed program was:" >&5
3822   cat conftest.$ac_ext >&5
3823   rm -rf conftest*
3824   ac_cv_have_vsnprintf_decl=no
3825 fi
3826 rm -f conftest*
3827 fi
3828
3829 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
3830  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
3831     cat >> confdefs.h <<\EOF
3832 #define HAVE_VSNPRINTF_DECL 1
3833 EOF
3834
3835  fi
3836
3837
3838  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
3839 echo "configure:3840: checking for snprintf declaration" >&5
3840 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
3841   echo $ac_n "(cached) $ac_c" 1>&6
3842 else
3843   
3844     cat > conftest.$ac_ext <<EOF
3845 #line 3846 "configure"
3846 #include "confdefs.h"
3847 #include <stdio.h>
3848 int main() {
3849 int i = (int)snprintf
3850 ; return 0; }
3851 EOF
3852 if { (eval echo configure:3853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3853   rm -rf conftest*
3854   ac_cv_have_snprintf_decl=yes
3855 else
3856   echo "configure: failed program was:" >&5
3857   cat conftest.$ac_ext >&5
3858   rm -rf conftest*
3859   ac_cv_have_snprintf_decl=no
3860 fi
3861 rm -f conftest*
3862 fi
3863
3864 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
3865  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
3866     cat >> confdefs.h <<\EOF
3867 #define HAVE_SNPRINTF_DECL 1
3868 EOF
3869
3870  fi
3871
3872
3873 # and glibc has setresuid under linux but the function does
3874 # nothing until kernel 2.1.44! very dumb.
3875 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
3876 echo "configure:3877: checking for real setresuid" >&5
3877 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
3878   echo $ac_n "(cached) $ac_c" 1>&6
3879 else
3880   
3881     if test "$cross_compiling" = yes; then
3882   samba_cv_have_setresuid=cross
3883 else
3884   cat > conftest.$ac_ext <<EOF
3885 #line 3886 "configure"
3886 #include "confdefs.h"
3887 #include <errno.h>
3888 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
3889 EOF
3890 if { (eval echo configure:3891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3891 then
3892   samba_cv_have_setresuid=yes
3893 else
3894   echo "configure: failed program was:" >&5
3895   cat conftest.$ac_ext >&5
3896   rm -fr conftest*
3897   samba_cv_have_setresuid=no
3898 fi
3899 rm -fr conftest*
3900 fi
3901
3902 fi
3903
3904 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
3905 if test x"$samba_cv_have_setresuid" = x"yes"; then
3906     cat >> confdefs.h <<\EOF
3907 #define HAVE_SETRESUID 1
3908 EOF
3909
3910 fi
3911
3912 # Do the same check for setresguid...
3913 #
3914 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
3915 echo "configure:3916: checking for real setresgid" >&5
3916 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+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_setresgid=cross
3922 else
3923   cat > conftest.$ac_ext <<EOF
3924 #line 3925 "configure"
3925 #include "confdefs.h"
3926 #include <unistd.h>
3927 #include <errno.h>
3928 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
3929 EOF
3930 if { (eval echo configure:3931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3931 then
3932   samba_cv_have_setresgid=yes
3933 else
3934   echo "configure: failed program was:" >&5
3935   cat conftest.$ac_ext >&5
3936   rm -fr conftest*
3937   samba_cv_have_setresgid=no
3938 fi
3939 rm -fr conftest*
3940 fi
3941
3942 fi
3943
3944 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
3945 if test x"$samba_cv_have_setresgid" = x"yes"; then
3946     cat >> confdefs.h <<\EOF
3947 #define HAVE_SETRESGID 1
3948 EOF
3949
3950 fi
3951
3952 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
3953 echo "configure:3954: checking for 8-bit clean memcmp" >&5
3954 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
3955   echo $ac_n "(cached) $ac_c" 1>&6
3956 else
3957   if test "$cross_compiling" = yes; then
3958   ac_cv_func_memcmp_clean=no
3959 else
3960   cat > conftest.$ac_ext <<EOF
3961 #line 3962 "configure"
3962 #include "confdefs.h"
3963
3964 main()
3965 {
3966   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
3967   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
3968 }
3969
3970 EOF
3971 if { (eval echo configure:3972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3972 then
3973   ac_cv_func_memcmp_clean=yes
3974 else
3975   echo "configure: failed program was:" >&5
3976   cat conftest.$ac_ext >&5
3977   rm -fr conftest*
3978   ac_cv_func_memcmp_clean=no
3979 fi
3980 rm -fr conftest*
3981 fi
3982
3983 fi
3984
3985 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
3986 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
3987
3988
3989 ###############################################
3990 # test for where we get crypt() from
3991 for ac_func in crypt
3992 do
3993 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3994 echo "configure:3995: checking for $ac_func" >&5
3995 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3996   echo $ac_n "(cached) $ac_c" 1>&6
3997 else
3998   cat > conftest.$ac_ext <<EOF
3999 #line 4000 "configure"
4000 #include "confdefs.h"
4001 /* System header to define __stub macros and hopefully few prototypes,
4002     which can conflict with char $ac_func(); below.  */
4003 #include <assert.h>
4004 /* Override any gcc2 internal prototype to avoid an error.  */
4005 /* We use char because int might match the return type of a gcc2
4006     builtin and then its argument prototype would still apply.  */
4007 char $ac_func();
4008
4009 int main() {
4010
4011 /* The GNU C library defines this for functions which it implements
4012     to always fail with ENOSYS.  Some functions are actually named
4013     something starting with __ and the normal name is an alias.  */
4014 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4015 choke me
4016 #else
4017 $ac_func();
4018 #endif
4019
4020 ; return 0; }
4021 EOF
4022 if { (eval echo configure:4023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4023   rm -rf conftest*
4024   eval "ac_cv_func_$ac_func=yes"
4025 else
4026   echo "configure: failed program was:" >&5
4027   cat conftest.$ac_ext >&5
4028   rm -rf conftest*
4029   eval "ac_cv_func_$ac_func=no"
4030 fi
4031 rm -f conftest*
4032 fi
4033
4034 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4035   echo "$ac_t""yes" 1>&6
4036     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4037   cat >> confdefs.h <<EOF
4038 #define $ac_tr_func 1
4039 EOF
4040  
4041 else
4042   echo "$ac_t""no" 1>&6
4043 fi
4044 done
4045
4046 if test x"$ac_cv_func_crypt" = x"no"; then
4047     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4048 echo "configure:4049: checking for crypt in -lcrypt" >&5
4049 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4050 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4051   echo $ac_n "(cached) $ac_c" 1>&6
4052 else
4053   ac_save_LIBS="$LIBS"
4054 LIBS="-lcrypt  $LIBS"
4055 cat > conftest.$ac_ext <<EOF
4056 #line 4057 "configure"
4057 #include "confdefs.h"
4058 /* Override any gcc2 internal prototype to avoid an error.  */
4059 /* We use char because int might match the return type of a gcc2
4060     builtin and then its argument prototype would still apply.  */
4061 char crypt();
4062
4063 int main() {
4064 crypt()
4065 ; return 0; }
4066 EOF
4067 if { (eval echo configure:4068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4068   rm -rf conftest*
4069   eval "ac_cv_lib_$ac_lib_var=yes"
4070 else
4071   echo "configure: failed program was:" >&5
4072   cat conftest.$ac_ext >&5
4073   rm -rf conftest*
4074   eval "ac_cv_lib_$ac_lib_var=no"
4075 fi
4076 rm -f conftest*
4077 LIBS="$ac_save_LIBS"
4078
4079 fi
4080 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4081   echo "$ac_t""yes" 1>&6
4082   LIBS="$LIBS -lcrypt";
4083         cat >> confdefs.h <<\EOF
4084 #define HAVE_CRYPT 1
4085 EOF
4086
4087 else
4088   echo "$ac_t""no" 1>&6
4089 fi
4090
4091 fi
4092
4093
4094 ###############################################
4095 # Readline included by default unless explicitly asked not to
4096 test "${with_readline+set}" != "set" && with_readline=yes
4097
4098 # test for where we get readline() from
4099 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4100 echo "configure:4101: checking whether to use readline" >&5
4101 # Check whether --with-readline or --without-readline was given.
4102 if test "${with_readline+set}" = set; then
4103   withval="$with_readline"
4104     case "$with_readline" in
4105   yes)
4106     echo "$ac_t""yes" 1>&6
4107
4108     for ac_hdr in readline.h history.h readline/readline.h
4109 do
4110 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4111 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4112 echo "configure:4113: checking for $ac_hdr" >&5
4113 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4114   echo $ac_n "(cached) $ac_c" 1>&6
4115 else
4116   cat > conftest.$ac_ext <<EOF
4117 #line 4118 "configure"
4118 #include "confdefs.h"
4119 #include <$ac_hdr>
4120 EOF
4121 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4122 { (eval echo configure:4123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4123 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4124 if test -z "$ac_err"; then
4125   rm -rf conftest*
4126   eval "ac_cv_header_$ac_safe=yes"
4127 else
4128   echo "$ac_err" >&5
4129   echo "configure: failed program was:" >&5
4130   cat conftest.$ac_ext >&5
4131   rm -rf conftest*
4132   eval "ac_cv_header_$ac_safe=no"
4133 fi
4134 rm -f conftest*
4135 fi
4136 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4137   echo "$ac_t""yes" 1>&6
4138     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4139   cat >> confdefs.h <<EOF
4140 #define $ac_tr_hdr 1
4141 EOF
4142  
4143 else
4144   echo "$ac_t""no" 1>&6
4145 fi
4146 done
4147
4148     for ac_hdr in readline/history.h
4149 do
4150 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4151 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4152 echo "configure:4153: checking for $ac_hdr" >&5
4153 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4154   echo $ac_n "(cached) $ac_c" 1>&6
4155 else
4156   cat > conftest.$ac_ext <<EOF
4157 #line 4158 "configure"
4158 #include "confdefs.h"
4159 #include <$ac_hdr>
4160 EOF
4161 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4162 { (eval echo configure:4163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4163 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4164 if test -z "$ac_err"; then
4165   rm -rf conftest*
4166   eval "ac_cv_header_$ac_safe=yes"
4167 else
4168   echo "$ac_err" >&5
4169   echo "configure: failed program was:" >&5
4170   cat conftest.$ac_ext >&5
4171   rm -rf conftest*
4172   eval "ac_cv_header_$ac_safe=no"
4173 fi
4174 rm -f conftest*
4175 fi
4176 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4177   echo "$ac_t""yes" 1>&6
4178     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4179   cat >> confdefs.h <<EOF
4180 #define $ac_tr_hdr 1
4181 EOF
4182  
4183 else
4184   echo "$ac_t""no" 1>&6
4185 fi
4186 done
4187
4188
4189     for ac_hdr in readline.h readline/readline.h
4190 do
4191 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4192 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4193 echo "configure:4194: checking for $ac_hdr" >&5
4194 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4195   echo $ac_n "(cached) $ac_c" 1>&6
4196 else
4197   cat > conftest.$ac_ext <<EOF
4198 #line 4199 "configure"
4199 #include "confdefs.h"
4200 #include <$ac_hdr>
4201 EOF
4202 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4203 { (eval echo configure:4204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4204 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4205 if test -z "$ac_err"; then
4206   rm -rf conftest*
4207   eval "ac_cv_header_$ac_safe=yes"
4208 else
4209   echo "$ac_err" >&5
4210   echo "configure: failed program was:" >&5
4211   cat conftest.$ac_ext >&5
4212   rm -rf conftest*
4213   eval "ac_cv_header_$ac_safe=no"
4214 fi
4215 rm -f conftest*
4216 fi
4217 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4218   echo "$ac_t""yes" 1>&6
4219     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4220   cat >> confdefs.h <<EOF
4221 #define $ac_tr_hdr 1
4222 EOF
4223  
4224       for termlib in ncurses curses termcap terminfo termlib; do
4225        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4226 echo "configure:4227: checking for tgetent in -l${termlib}" >&5
4227 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4228 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4229   echo $ac_n "(cached) $ac_c" 1>&6
4230 else
4231   ac_save_LIBS="$LIBS"
4232 LIBS="-l${termlib}  $LIBS"
4233 cat > conftest.$ac_ext <<EOF
4234 #line 4235 "configure"
4235 #include "confdefs.h"
4236 /* Override any gcc2 internal prototype to avoid an error.  */
4237 /* We use char because int might match the return type of a gcc2
4238     builtin and then its argument prototype would still apply.  */
4239 char tgetent();
4240
4241 int main() {
4242 tgetent()
4243 ; return 0; }
4244 EOF
4245 if { (eval echo configure:4246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4246   rm -rf conftest*
4247   eval "ac_cv_lib_$ac_lib_var=yes"
4248 else
4249   echo "configure: failed program was:" >&5
4250   cat conftest.$ac_ext >&5
4251   rm -rf conftest*
4252   eval "ac_cv_lib_$ac_lib_var=no"
4253 fi
4254 rm -f conftest*
4255 LIBS="$ac_save_LIBS"
4256
4257 fi
4258 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4259   echo "$ac_t""yes" 1>&6
4260   TERMLIBS="-l${termlib}"; break
4261 else
4262   echo "$ac_t""no" 1>&6
4263 fi
4264
4265       done
4266       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4267 echo "configure:4268: checking for rl_callback_handler_install in -lreadline" >&5
4268 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4269 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4270   echo $ac_n "(cached) $ac_c" 1>&6
4271 else
4272   ac_save_LIBS="$LIBS"
4273 LIBS="-lreadline $TERMLIBS $LIBS"
4274 cat > conftest.$ac_ext <<EOF
4275 #line 4276 "configure"
4276 #include "confdefs.h"
4277 /* Override any gcc2 internal prototype to avoid an error.  */
4278 /* We use char because int might match the return type of a gcc2
4279     builtin and then its argument prototype would still apply.  */
4280 char rl_callback_handler_install();
4281
4282 int main() {
4283 rl_callback_handler_install()
4284 ; return 0; }
4285 EOF
4286 if { (eval echo configure:4287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4287   rm -rf conftest*
4288   eval "ac_cv_lib_$ac_lib_var=yes"
4289 else
4290   echo "configure: failed program was:" >&5
4291   cat conftest.$ac_ext >&5
4292   rm -rf conftest*
4293   eval "ac_cv_lib_$ac_lib_var=no"
4294 fi
4295 rm -f conftest*
4296 LIBS="$ac_save_LIBS"
4297
4298 fi
4299 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4300   echo "$ac_t""yes" 1>&6
4301   TERMLIBS="-lreadline $TERMLIBS"
4302        cat >> confdefs.h <<\EOF
4303 #define HAVE_LIBREADLINE 1
4304 EOF
4305
4306        break
4307 else
4308   echo "$ac_t""no" 1>&6
4309 TERMLIBS=
4310 fi
4311
4312 else
4313   echo "$ac_t""no" 1>&6
4314 fi
4315 done
4316
4317     ;;
4318   no)
4319     echo "$ac_t""no" 1>&6
4320     ;;
4321   *)
4322     echo "$ac_t""yes" 1>&6
4323
4324     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4325     # alternate readline path
4326     _ldflags=${LDFLAGS}
4327     _cppflags=${CPPFLAGS}
4328
4329     # Add additional search path
4330     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4331     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4332
4333     for ac_hdr in readline.h history.h readline/readline.h
4334 do
4335 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4336 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4337 echo "configure:4338: checking for $ac_hdr" >&5
4338 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4339   echo $ac_n "(cached) $ac_c" 1>&6
4340 else
4341   cat > conftest.$ac_ext <<EOF
4342 #line 4343 "configure"
4343 #include "confdefs.h"
4344 #include <$ac_hdr>
4345 EOF
4346 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4347 { (eval echo configure:4348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4348 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4349 if test -z "$ac_err"; then
4350   rm -rf conftest*
4351   eval "ac_cv_header_$ac_safe=yes"
4352 else
4353   echo "$ac_err" >&5
4354   echo "configure: failed program was:" >&5
4355   cat conftest.$ac_ext >&5
4356   rm -rf conftest*
4357   eval "ac_cv_header_$ac_safe=no"
4358 fi
4359 rm -f conftest*
4360 fi
4361 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4362   echo "$ac_t""yes" 1>&6
4363     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4364   cat >> confdefs.h <<EOF
4365 #define $ac_tr_hdr 1
4366 EOF
4367  
4368 else
4369   echo "$ac_t""no" 1>&6
4370 fi
4371 done
4372
4373     for ac_hdr in readline/history.h
4374 do
4375 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4376 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4377 echo "configure:4378: checking for $ac_hdr" >&5
4378 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4379   echo $ac_n "(cached) $ac_c" 1>&6
4380 else
4381   cat > conftest.$ac_ext <<EOF
4382 #line 4383 "configure"
4383 #include "confdefs.h"
4384 #include <$ac_hdr>
4385 EOF
4386 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4387 { (eval echo configure:4388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4388 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4389 if test -z "$ac_err"; then
4390   rm -rf conftest*
4391   eval "ac_cv_header_$ac_safe=yes"
4392 else
4393   echo "$ac_err" >&5
4394   echo "configure: failed program was:" >&5
4395   cat conftest.$ac_ext >&5
4396   rm -rf conftest*
4397   eval "ac_cv_header_$ac_safe=no"
4398 fi
4399 rm -f conftest*
4400 fi
4401 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4402   echo "$ac_t""yes" 1>&6
4403     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4404   cat >> confdefs.h <<EOF
4405 #define $ac_tr_hdr 1
4406 EOF
4407  
4408 else
4409   echo "$ac_t""no" 1>&6
4410 fi
4411 done
4412
4413
4414     for ac_hdr in readline.h readline/readline.h
4415 do
4416 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4417 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4418 echo "configure:4419: checking for $ac_hdr" >&5
4419 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4420   echo $ac_n "(cached) $ac_c" 1>&6
4421 else
4422   cat > conftest.$ac_ext <<EOF
4423 #line 4424 "configure"
4424 #include "confdefs.h"
4425 #include <$ac_hdr>
4426 EOF
4427 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4428 { (eval echo configure:4429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4429 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4430 if test -z "$ac_err"; then
4431   rm -rf conftest*
4432   eval "ac_cv_header_$ac_safe=yes"
4433 else
4434   echo "$ac_err" >&5
4435   echo "configure: failed program was:" >&5
4436   cat conftest.$ac_ext >&5
4437   rm -rf conftest*
4438   eval "ac_cv_header_$ac_safe=no"
4439 fi
4440 rm -f conftest*
4441 fi
4442 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4443   echo "$ac_t""yes" 1>&6
4444     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4445   cat >> confdefs.h <<EOF
4446 #define $ac_tr_hdr 1
4447 EOF
4448  
4449       for termlib in ncurses curses termcap terminfo termlib; do
4450        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4451 echo "configure:4452: checking for tgetent in -l${termlib}" >&5
4452 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4453 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4454   echo $ac_n "(cached) $ac_c" 1>&6
4455 else
4456   ac_save_LIBS="$LIBS"
4457 LIBS="-l${termlib}  $LIBS"
4458 cat > conftest.$ac_ext <<EOF
4459 #line 4460 "configure"
4460 #include "confdefs.h"
4461 /* Override any gcc2 internal prototype to avoid an error.  */
4462 /* We use char because int might match the return type of a gcc2
4463     builtin and then its argument prototype would still apply.  */
4464 char tgetent();
4465
4466 int main() {
4467 tgetent()
4468 ; return 0; }
4469 EOF
4470 if { (eval echo configure:4471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4471   rm -rf conftest*
4472   eval "ac_cv_lib_$ac_lib_var=yes"
4473 else
4474   echo "configure: failed program was:" >&5
4475   cat conftest.$ac_ext >&5
4476   rm -rf conftest*
4477   eval "ac_cv_lib_$ac_lib_var=no"
4478 fi
4479 rm -f conftest*
4480 LIBS="$ac_save_LIBS"
4481
4482 fi
4483 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4484   echo "$ac_t""yes" 1>&6
4485   TERMLIBS="-l${termlib}"; break
4486 else
4487   echo "$ac_t""no" 1>&6
4488 fi
4489
4490       done
4491       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4492 echo "configure:4493: checking for rl_callback_handler_install in -lreadline" >&5
4493 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4494 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4495   echo $ac_n "(cached) $ac_c" 1>&6
4496 else
4497   ac_save_LIBS="$LIBS"
4498 LIBS="-lreadline $TERMLIBS $LIBS"
4499 cat > conftest.$ac_ext <<EOF
4500 #line 4501 "configure"
4501 #include "confdefs.h"
4502 /* Override any gcc2 internal prototype to avoid an error.  */
4503 /* We use char because int might match the return type of a gcc2
4504     builtin and then its argument prototype would still apply.  */
4505 char rl_callback_handler_install();
4506
4507 int main() {
4508 rl_callback_handler_install()
4509 ; return 0; }
4510 EOF
4511 if { (eval echo configure:4512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4512   rm -rf conftest*
4513   eval "ac_cv_lib_$ac_lib_var=yes"
4514 else
4515   echo "configure: failed program was:" >&5
4516   cat conftest.$ac_ext >&5
4517   rm -rf conftest*
4518   eval "ac_cv_lib_$ac_lib_var=no"
4519 fi
4520 rm -f conftest*
4521 LIBS="$ac_save_LIBS"
4522
4523 fi
4524 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4525   echo "$ac_t""yes" 1>&6
4526   TERMLDFLAGS="-L$with_readline/lib"
4527        TERMCPPFLAGS="-I$with_readline/include"
4528        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4529        TERMLIBS="-lreadline $TERMLIBS"
4530        cat >> confdefs.h <<\EOF
4531 #define HAVE_LIBREADLINE 1
4532 EOF
4533
4534        break
4535 else
4536   echo "$ac_t""no" 1>&6
4537 TERMLIBS= CPPFLAGS=$_cppflags
4538 fi
4539
4540 else
4541   echo "$ac_t""no" 1>&6
4542 fi
4543 done
4544
4545
4546     LDFLAGS=$_ldflags
4547     ;;
4548   esac
4549 else
4550   echo "$ac_t""no" 1>&6
4551
4552 fi
4553
4554
4555
4556
4557 # The following test taken from the cvs sources
4558 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4559 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4560 # libsocket.so which has a bad implementation of gethostbyname (it
4561 # only looks in /etc/hosts), so we only look for -lsocket if we need
4562 # it.
4563 for ac_func in connect
4564 do
4565 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4566 echo "configure:4567: checking for $ac_func" >&5
4567 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4568   echo $ac_n "(cached) $ac_c" 1>&6
4569 else
4570   cat > conftest.$ac_ext <<EOF
4571 #line 4572 "configure"
4572 #include "confdefs.h"
4573 /* System header to define __stub macros and hopefully few prototypes,
4574     which can conflict with char $ac_func(); below.  */
4575 #include <assert.h>
4576 /* Override any gcc2 internal prototype to avoid an error.  */
4577 /* We use char because int might match the return type of a gcc2
4578     builtin and then its argument prototype would still apply.  */
4579 char $ac_func();
4580
4581 int main() {
4582
4583 /* The GNU C library defines this for functions which it implements
4584     to always fail with ENOSYS.  Some functions are actually named
4585     something starting with __ and the normal name is an alias.  */
4586 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4587 choke me
4588 #else
4589 $ac_func();
4590 #endif
4591
4592 ; return 0; }
4593 EOF
4594 if { (eval echo configure:4595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4595   rm -rf conftest*
4596   eval "ac_cv_func_$ac_func=yes"
4597 else
4598   echo "configure: failed program was:" >&5
4599   cat conftest.$ac_ext >&5
4600   rm -rf conftest*
4601   eval "ac_cv_func_$ac_func=no"
4602 fi
4603 rm -f conftest*
4604 fi
4605
4606 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4607   echo "$ac_t""yes" 1>&6
4608     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4609   cat >> confdefs.h <<EOF
4610 #define $ac_tr_func 1
4611 EOF
4612  
4613 else
4614   echo "$ac_t""no" 1>&6
4615 fi
4616 done
4617
4618 if test x"$ac_cv_func_connect" = x"no"; then
4619     case "$LIBS" in
4620     *-lnsl*) ;;
4621     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4622 echo "configure:4623: checking for printf in -lnsl_s" >&5
4623 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4624 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4625   echo $ac_n "(cached) $ac_c" 1>&6
4626 else
4627   ac_save_LIBS="$LIBS"
4628 LIBS="-lnsl_s  $LIBS"
4629 cat > conftest.$ac_ext <<EOF
4630 #line 4631 "configure"
4631 #include "confdefs.h"
4632 /* Override any gcc2 internal prototype to avoid an error.  */
4633 /* We use char because int might match the return type of a gcc2
4634     builtin and then its argument prototype would still apply.  */
4635 char printf();
4636
4637 int main() {
4638 printf()
4639 ; return 0; }
4640 EOF
4641 if { (eval echo configure:4642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4642   rm -rf conftest*
4643   eval "ac_cv_lib_$ac_lib_var=yes"
4644 else
4645   echo "configure: failed program was:" >&5
4646   cat conftest.$ac_ext >&5
4647   rm -rf conftest*
4648   eval "ac_cv_lib_$ac_lib_var=no"
4649 fi
4650 rm -f conftest*
4651 LIBS="$ac_save_LIBS"
4652
4653 fi
4654 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4655   echo "$ac_t""yes" 1>&6
4656     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4657     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4658   cat >> confdefs.h <<EOF
4659 #define $ac_tr_lib 1
4660 EOF
4661
4662   LIBS="-lnsl_s $LIBS"
4663
4664 else
4665   echo "$ac_t""no" 1>&6
4666 fi
4667  ;;
4668     esac
4669     case "$LIBS" in
4670     *-lnsl*) ;;
4671     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
4672 echo "configure:4673: checking for printf in -lnsl" >&5
4673 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
4674 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4675   echo $ac_n "(cached) $ac_c" 1>&6
4676 else
4677   ac_save_LIBS="$LIBS"
4678 LIBS="-lnsl  $LIBS"
4679 cat > conftest.$ac_ext <<EOF
4680 #line 4681 "configure"
4681 #include "confdefs.h"
4682 /* Override any gcc2 internal prototype to avoid an error.  */
4683 /* We use char because int might match the return type of a gcc2
4684     builtin and then its argument prototype would still apply.  */
4685 char printf();
4686
4687 int main() {
4688 printf()
4689 ; return 0; }
4690 EOF
4691 if { (eval echo configure:4692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4692   rm -rf conftest*
4693   eval "ac_cv_lib_$ac_lib_var=yes"
4694 else
4695   echo "configure: failed program was:" >&5
4696   cat conftest.$ac_ext >&5
4697   rm -rf conftest*
4698   eval "ac_cv_lib_$ac_lib_var=no"
4699 fi
4700 rm -f conftest*
4701 LIBS="$ac_save_LIBS"
4702
4703 fi
4704 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4705   echo "$ac_t""yes" 1>&6
4706     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4707     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4708   cat >> confdefs.h <<EOF
4709 #define $ac_tr_lib 1
4710 EOF
4711
4712   LIBS="-lnsl $LIBS"
4713
4714 else
4715   echo "$ac_t""no" 1>&6
4716 fi
4717  ;;
4718     esac
4719     case "$LIBS" in
4720     *-lsocket*) ;;
4721     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4722 echo "configure:4723: checking for connect in -lsocket" >&5
4723 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4724 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4725   echo $ac_n "(cached) $ac_c" 1>&6
4726 else
4727   ac_save_LIBS="$LIBS"
4728 LIBS="-lsocket  $LIBS"
4729 cat > conftest.$ac_ext <<EOF
4730 #line 4731 "configure"
4731 #include "confdefs.h"
4732 /* Override any gcc2 internal prototype to avoid an error.  */
4733 /* We use char because int might match the return type of a gcc2
4734     builtin and then its argument prototype would still apply.  */
4735 char connect();
4736
4737 int main() {
4738 connect()
4739 ; return 0; }
4740 EOF
4741 if { (eval echo configure:4742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4742   rm -rf conftest*
4743   eval "ac_cv_lib_$ac_lib_var=yes"
4744 else
4745   echo "configure: failed program was:" >&5
4746   cat conftest.$ac_ext >&5
4747   rm -rf conftest*
4748   eval "ac_cv_lib_$ac_lib_var=no"
4749 fi
4750 rm -f conftest*
4751 LIBS="$ac_save_LIBS"
4752
4753 fi
4754 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4755   echo "$ac_t""yes" 1>&6
4756     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4757     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4758   cat >> confdefs.h <<EOF
4759 #define $ac_tr_lib 1
4760 EOF
4761
4762   LIBS="-lsocket $LIBS"
4763
4764 else
4765   echo "$ac_t""no" 1>&6
4766 fi
4767  ;;
4768     esac
4769     case "$LIBS" in
4770     *-linet*) ;;
4771     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
4772 echo "configure:4773: checking for connect in -linet" >&5
4773 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
4774 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4775   echo $ac_n "(cached) $ac_c" 1>&6
4776 else
4777   ac_save_LIBS="$LIBS"
4778 LIBS="-linet  $LIBS"
4779 cat > conftest.$ac_ext <<EOF
4780 #line 4781 "configure"
4781 #include "confdefs.h"
4782 /* Override any gcc2 internal prototype to avoid an error.  */
4783 /* We use char because int might match the return type of a gcc2
4784     builtin and then its argument prototype would still apply.  */
4785 char connect();
4786
4787 int main() {
4788 connect()
4789 ; return 0; }
4790 EOF
4791 if { (eval echo configure:4792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4792   rm -rf conftest*
4793   eval "ac_cv_lib_$ac_lib_var=yes"
4794 else
4795   echo "configure: failed program was:" >&5
4796   cat conftest.$ac_ext >&5
4797   rm -rf conftest*
4798   eval "ac_cv_lib_$ac_lib_var=no"
4799 fi
4800 rm -f conftest*
4801 LIBS="$ac_save_LIBS"
4802
4803 fi
4804 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4805   echo "$ac_t""yes" 1>&6
4806     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4807     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4808   cat >> confdefs.h <<EOF
4809 #define $ac_tr_lib 1
4810 EOF
4811
4812   LIBS="-linet $LIBS"
4813
4814 else
4815   echo "$ac_t""no" 1>&6
4816 fi
4817  ;;
4818     esac
4819             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
4820        test x"$ac_cv_lib_inet_connect" = x"yes"; then
4821         # ac_cv_func_connect=yes
4822         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
4823         cat >> confdefs.h <<\EOF
4824 #define HAVE_CONNECT 1
4825 EOF
4826
4827     fi
4828 fi
4829
4830 ###############################################
4831 # test for where we get get_yp_default_domain() from
4832 for ac_func in yp_get_default_domain
4833 do
4834 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4835 echo "configure:4836: checking for $ac_func" >&5
4836 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4837   echo $ac_n "(cached) $ac_c" 1>&6
4838 else
4839   cat > conftest.$ac_ext <<EOF
4840 #line 4841 "configure"
4841 #include "confdefs.h"
4842 /* System header to define __stub macros and hopefully few prototypes,
4843     which can conflict with char $ac_func(); below.  */
4844 #include <assert.h>
4845 /* Override any gcc2 internal prototype to avoid an error.  */
4846 /* We use char because int might match the return type of a gcc2
4847     builtin and then its argument prototype would still apply.  */
4848 char $ac_func();
4849
4850 int main() {
4851
4852 /* The GNU C library defines this for functions which it implements
4853     to always fail with ENOSYS.  Some functions are actually named
4854     something starting with __ and the normal name is an alias.  */
4855 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4856 choke me
4857 #else
4858 $ac_func();
4859 #endif
4860
4861 ; return 0; }
4862 EOF
4863 if { (eval echo configure:4864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4864   rm -rf conftest*
4865   eval "ac_cv_func_$ac_func=yes"
4866 else
4867   echo "configure: failed program was:" >&5
4868   cat conftest.$ac_ext >&5
4869   rm -rf conftest*
4870   eval "ac_cv_func_$ac_func=no"
4871 fi
4872 rm -f conftest*
4873 fi
4874
4875 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4876   echo "$ac_t""yes" 1>&6
4877     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4878   cat >> confdefs.h <<EOF
4879 #define $ac_tr_func 1
4880 EOF
4881  
4882 else
4883   echo "$ac_t""no" 1>&6
4884 fi
4885 done
4886
4887 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
4888         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
4889 echo "configure:4890: checking for yp_get_default_domain in -lnsl" >&5
4890 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
4891 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4892   echo $ac_n "(cached) $ac_c" 1>&6
4893 else
4894   ac_save_LIBS="$LIBS"
4895 LIBS="-lnsl  $LIBS"
4896 cat > conftest.$ac_ext <<EOF
4897 #line 4898 "configure"
4898 #include "confdefs.h"
4899 /* Override any gcc2 internal prototype to avoid an error.  */
4900 /* We use char because int might match the return type of a gcc2
4901     builtin and then its argument prototype would still apply.  */
4902 char yp_get_default_domain();
4903
4904 int main() {
4905 yp_get_default_domain()
4906 ; return 0; }
4907 EOF
4908 if { (eval echo configure:4909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4909   rm -rf conftest*
4910   eval "ac_cv_lib_$ac_lib_var=yes"
4911 else
4912   echo "configure: failed program was:" >&5
4913   cat conftest.$ac_ext >&5
4914   rm -rf conftest*
4915   eval "ac_cv_lib_$ac_lib_var=no"
4916 fi
4917 rm -f conftest*
4918 LIBS="$ac_save_LIBS"
4919
4920 fi
4921 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4922   echo "$ac_t""yes" 1>&6
4923   LIBS="$LIBS -lnsl";
4924         cat >> confdefs.h <<\EOF
4925 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
4926 EOF
4927
4928 else
4929   echo "$ac_t""no" 1>&6
4930 fi
4931  
4932 fi
4933
4934 # Check if we have execl, if not we need to compile smbrun.
4935 for ac_func in execl
4936 do
4937 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4938 echo "configure:4939: checking for $ac_func" >&5
4939 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4940   echo $ac_n "(cached) $ac_c" 1>&6
4941 else
4942   cat > conftest.$ac_ext <<EOF
4943 #line 4944 "configure"
4944 #include "confdefs.h"
4945 /* System header to define __stub macros and hopefully few prototypes,
4946     which can conflict with char $ac_func(); below.  */
4947 #include <assert.h>
4948 /* Override any gcc2 internal prototype to avoid an error.  */
4949 /* We use char because int might match the return type of a gcc2
4950     builtin and then its argument prototype would still apply.  */
4951 char $ac_func();
4952
4953 int main() {
4954
4955 /* The GNU C library defines this for functions which it implements
4956     to always fail with ENOSYS.  Some functions are actually named
4957     something starting with __ and the normal name is an alias.  */
4958 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4959 choke me
4960 #else
4961 $ac_func();
4962 #endif
4963
4964 ; return 0; }
4965 EOF
4966 if { (eval echo configure:4967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4967   rm -rf conftest*
4968   eval "ac_cv_func_$ac_func=yes"
4969 else
4970   echo "configure: failed program was:" >&5
4971   cat conftest.$ac_ext >&5
4972   rm -rf conftest*
4973   eval "ac_cv_func_$ac_func=no"
4974 fi
4975 rm -f conftest*
4976 fi
4977
4978 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4979   echo "$ac_t""yes" 1>&6
4980     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4981   cat >> confdefs.h <<EOF
4982 #define $ac_tr_func 1
4983 EOF
4984  
4985 else
4986   echo "$ac_t""no" 1>&6
4987 fi
4988 done
4989
4990 if test x"$ac_cv_func_execl" = x"no"; then
4991     RUNPROG="bin/smbrun"
4992 else
4993     RUNPROG=""
4994 fi
4995
4996 for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot
4997 do
4998 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4999 echo "configure:5000: checking for $ac_func" >&5
5000 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5001   echo $ac_n "(cached) $ac_c" 1>&6
5002 else
5003   cat > conftest.$ac_ext <<EOF
5004 #line 5005 "configure"
5005 #include "confdefs.h"
5006 /* System header to define __stub macros and hopefully few prototypes,
5007     which can conflict with char $ac_func(); below.  */
5008 #include <assert.h>
5009 /* Override any gcc2 internal prototype to avoid an error.  */
5010 /* We use char because int might match the return type of a gcc2
5011     builtin and then its argument prototype would still apply.  */
5012 char $ac_func();
5013
5014 int main() {
5015
5016 /* The GNU C library defines this for functions which it implements
5017     to always fail with ENOSYS.  Some functions are actually named
5018     something starting with __ and the normal name is an alias.  */
5019 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5020 choke me
5021 #else
5022 $ac_func();
5023 #endif
5024
5025 ; return 0; }
5026 EOF
5027 if { (eval echo configure:5028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5028   rm -rf conftest*
5029   eval "ac_cv_func_$ac_func=yes"
5030 else
5031   echo "configure: failed program was:" >&5
5032   cat conftest.$ac_ext >&5
5033   rm -rf conftest*
5034   eval "ac_cv_func_$ac_func=no"
5035 fi
5036 rm -f conftest*
5037 fi
5038
5039 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5040   echo "$ac_t""yes" 1>&6
5041     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5042   cat >> confdefs.h <<EOF
5043 #define $ac_tr_func 1
5044 EOF
5045  
5046 else
5047   echo "$ac_t""no" 1>&6
5048 fi
5049 done
5050
5051 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset
5052 do
5053 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5054 echo "configure:5055: checking for $ac_func" >&5
5055 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5056   echo $ac_n "(cached) $ac_c" 1>&6
5057 else
5058   cat > conftest.$ac_ext <<EOF
5059 #line 5060 "configure"
5060 #include "confdefs.h"
5061 /* System header to define __stub macros and hopefully few prototypes,
5062     which can conflict with char $ac_func(); below.  */
5063 #include <assert.h>
5064 /* Override any gcc2 internal prototype to avoid an error.  */
5065 /* We use char because int might match the return type of a gcc2
5066     builtin and then its argument prototype would still apply.  */
5067 char $ac_func();
5068
5069 int main() {
5070
5071 /* The GNU C library defines this for functions which it implements
5072     to always fail with ENOSYS.  Some functions are actually named
5073     something starting with __ and the normal name is an alias.  */
5074 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5075 choke me
5076 #else
5077 $ac_func();
5078 #endif
5079
5080 ; return 0; }
5081 EOF
5082 if { (eval echo configure:5083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5083   rm -rf conftest*
5084   eval "ac_cv_func_$ac_func=yes"
5085 else
5086   echo "configure: failed program was:" >&5
5087   cat conftest.$ac_ext >&5
5088   rm -rf conftest*
5089   eval "ac_cv_func_$ac_func=no"
5090 fi
5091 rm -f conftest*
5092 fi
5093
5094 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5095   echo "$ac_t""yes" 1>&6
5096     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5097   cat >> confdefs.h <<EOF
5098 #define $ac_tr_func 1
5099 EOF
5100  
5101 else
5102   echo "$ac_t""no" 1>&6
5103 fi
5104 done
5105
5106 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5107 do
5108 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5109 echo "configure:5110: checking for $ac_func" >&5
5110 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5111   echo $ac_n "(cached) $ac_c" 1>&6
5112 else
5113   cat > conftest.$ac_ext <<EOF
5114 #line 5115 "configure"
5115 #include "confdefs.h"
5116 /* System header to define __stub macros and hopefully few prototypes,
5117     which can conflict with char $ac_func(); below.  */
5118 #include <assert.h>
5119 /* Override any gcc2 internal prototype to avoid an error.  */
5120 /* We use char because int might match the return type of a gcc2
5121     builtin and then its argument prototype would still apply.  */
5122 char $ac_func();
5123
5124 int main() {
5125
5126 /* The GNU C library defines this for functions which it implements
5127     to always fail with ENOSYS.  Some functions are actually named
5128     something starting with __ and the normal name is an alias.  */
5129 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5130 choke me
5131 #else
5132 $ac_func();
5133 #endif
5134
5135 ; return 0; }
5136 EOF
5137 if { (eval echo configure:5138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5138   rm -rf conftest*
5139   eval "ac_cv_func_$ac_func=yes"
5140 else
5141   echo "configure: failed program was:" >&5
5142   cat conftest.$ac_ext >&5
5143   rm -rf conftest*
5144   eval "ac_cv_func_$ac_func=no"
5145 fi
5146 rm -f conftest*
5147 fi
5148
5149 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5150   echo "$ac_t""yes" 1>&6
5151     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5152   cat >> confdefs.h <<EOF
5153 #define $ac_tr_func 1
5154 EOF
5155  
5156 else
5157   echo "$ac_t""no" 1>&6
5158 fi
5159 done
5160
5161 for ac_func in strftime sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent
5162 do
5163 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5164 echo "configure:5165: checking for $ac_func" >&5
5165 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5166   echo $ac_n "(cached) $ac_c" 1>&6
5167 else
5168   cat > conftest.$ac_ext <<EOF
5169 #line 5170 "configure"
5170 #include "confdefs.h"
5171 /* System header to define __stub macros and hopefully few prototypes,
5172     which can conflict with char $ac_func(); below.  */
5173 #include <assert.h>
5174 /* Override any gcc2 internal prototype to avoid an error.  */
5175 /* We use char because int might match the return type of a gcc2
5176     builtin and then its argument prototype would still apply.  */
5177 char $ac_func();
5178
5179 int main() {
5180
5181 /* The GNU C library defines this for functions which it implements
5182     to always fail with ENOSYS.  Some functions are actually named
5183     something starting with __ and the normal name is an alias.  */
5184 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5185 choke me
5186 #else
5187 $ac_func();
5188 #endif
5189
5190 ; return 0; }
5191 EOF
5192 if { (eval echo configure:5193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5193   rm -rf conftest*
5194   eval "ac_cv_func_$ac_func=yes"
5195 else
5196   echo "configure: failed program was:" >&5
5197   cat conftest.$ac_ext >&5
5198   rm -rf conftest*
5199   eval "ac_cv_func_$ac_func=no"
5200 fi
5201 rm -f conftest*
5202 fi
5203
5204 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5205   echo "$ac_t""yes" 1>&6
5206     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5207   cat >> confdefs.h <<EOF
5208 #define $ac_tr_func 1
5209 EOF
5210  
5211 else
5212   echo "$ac_t""no" 1>&6
5213 fi
5214 done
5215
5216 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
5217 do
5218 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5219 echo "configure:5220: checking for $ac_func" >&5
5220 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5221   echo $ac_n "(cached) $ac_c" 1>&6
5222 else
5223   cat > conftest.$ac_ext <<EOF
5224 #line 5225 "configure"
5225 #include "confdefs.h"
5226 /* System header to define __stub macros and hopefully few prototypes,
5227     which can conflict with char $ac_func(); below.  */
5228 #include <assert.h>
5229 /* Override any gcc2 internal prototype to avoid an error.  */
5230 /* We use char because int might match the return type of a gcc2
5231     builtin and then its argument prototype would still apply.  */
5232 char $ac_func();
5233
5234 int main() {
5235
5236 /* The GNU C library defines this for functions which it implements
5237     to always fail with ENOSYS.  Some functions are actually named
5238     something starting with __ and the normal name is an alias.  */
5239 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5240 choke me
5241 #else
5242 $ac_func();
5243 #endif
5244
5245 ; return 0; }
5246 EOF
5247 if { (eval echo configure:5248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5248   rm -rf conftest*
5249   eval "ac_cv_func_$ac_func=yes"
5250 else
5251   echo "configure: failed program was:" >&5
5252   cat conftest.$ac_ext >&5
5253   rm -rf conftest*
5254   eval "ac_cv_func_$ac_func=no"
5255 fi
5256 rm -f conftest*
5257 fi
5258
5259 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5260   echo "$ac_t""yes" 1>&6
5261     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5262   cat >> confdefs.h <<EOF
5263 #define $ac_tr_func 1
5264 EOF
5265  
5266 else
5267   echo "$ac_t""no" 1>&6
5268 fi
5269 done
5270
5271 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5272 do
5273 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5274 echo "configure:5275: checking for $ac_func" >&5
5275 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5276   echo $ac_n "(cached) $ac_c" 1>&6
5277 else
5278   cat > conftest.$ac_ext <<EOF
5279 #line 5280 "configure"
5280 #include "confdefs.h"
5281 /* System header to define __stub macros and hopefully few prototypes,
5282     which can conflict with char $ac_func(); below.  */
5283 #include <assert.h>
5284 /* Override any gcc2 internal prototype to avoid an error.  */
5285 /* We use char because int might match the return type of a gcc2
5286     builtin and then its argument prototype would still apply.  */
5287 char $ac_func();
5288
5289 int main() {
5290
5291 /* The GNU C library defines this for functions which it implements
5292     to always fail with ENOSYS.  Some functions are actually named
5293     something starting with __ and the normal name is an alias.  */
5294 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5295 choke me
5296 #else
5297 $ac_func();
5298 #endif
5299
5300 ; return 0; }
5301 EOF
5302 if { (eval echo configure:5303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5303   rm -rf conftest*
5304   eval "ac_cv_func_$ac_func=yes"
5305 else
5306   echo "configure: failed program was:" >&5
5307   cat conftest.$ac_ext >&5
5308   rm -rf conftest*
5309   eval "ac_cv_func_$ac_func=no"
5310 fi
5311 rm -f conftest*
5312 fi
5313
5314 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5315   echo "$ac_t""yes" 1>&6
5316     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5317   cat >> confdefs.h <<EOF
5318 #define $ac_tr_func 1
5319 EOF
5320  
5321 else
5322   echo "$ac_t""no" 1>&6
5323 fi
5324 done
5325
5326 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5327 do
5328 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5329 echo "configure:5330: checking for $ac_func" >&5
5330 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5331   echo $ac_n "(cached) $ac_c" 1>&6
5332 else
5333   cat > conftest.$ac_ext <<EOF
5334 #line 5335 "configure"
5335 #include "confdefs.h"
5336 /* System header to define __stub macros and hopefully few prototypes,
5337     which can conflict with char $ac_func(); below.  */
5338 #include <assert.h>
5339 /* Override any gcc2 internal prototype to avoid an error.  */
5340 /* We use char because int might match the return type of a gcc2
5341     builtin and then its argument prototype would still apply.  */
5342 char $ac_func();
5343
5344 int main() {
5345
5346 /* The GNU C library defines this for functions which it implements
5347     to always fail with ENOSYS.  Some functions are actually named
5348     something starting with __ and the normal name is an alias.  */
5349 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5350 choke me
5351 #else
5352 $ac_func();
5353 #endif
5354
5355 ; return 0; }
5356 EOF
5357 if { (eval echo configure:5358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5358   rm -rf conftest*
5359   eval "ac_cv_func_$ac_func=yes"
5360 else
5361   echo "configure: failed program was:" >&5
5362   cat conftest.$ac_ext >&5
5363   rm -rf conftest*
5364   eval "ac_cv_func_$ac_func=no"
5365 fi
5366 rm -f conftest*
5367 fi
5368
5369 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5370   echo "$ac_t""yes" 1>&6
5371     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5372   cat >> confdefs.h <<EOF
5373 #define $ac_tr_func 1
5374 EOF
5375  
5376 else
5377   echo "$ac_t""no" 1>&6
5378 fi
5379 done
5380
5381 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5382 do
5383 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5384 echo "configure:5385: checking for $ac_func" >&5
5385 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5386   echo $ac_n "(cached) $ac_c" 1>&6
5387 else
5388   cat > conftest.$ac_ext <<EOF
5389 #line 5390 "configure"
5390 #include "confdefs.h"
5391 /* System header to define __stub macros and hopefully few prototypes,
5392     which can conflict with char $ac_func(); below.  */
5393 #include <assert.h>
5394 /* Override any gcc2 internal prototype to avoid an error.  */
5395 /* We use char because int might match the return type of a gcc2
5396     builtin and then its argument prototype would still apply.  */
5397 char $ac_func();
5398
5399 int main() {
5400
5401 /* The GNU C library defines this for functions which it implements
5402     to always fail with ENOSYS.  Some functions are actually named
5403     something starting with __ and the normal name is an alias.  */
5404 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5405 choke me
5406 #else
5407 $ac_func();
5408 #endif
5409
5410 ; return 0; }
5411 EOF
5412 if { (eval echo configure:5413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5413   rm -rf conftest*
5414   eval "ac_cv_func_$ac_func=yes"
5415 else
5416   echo "configure: failed program was:" >&5
5417   cat conftest.$ac_ext >&5
5418   rm -rf conftest*
5419   eval "ac_cv_func_$ac_func=no"
5420 fi
5421 rm -f conftest*
5422 fi
5423
5424 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5425   echo "$ac_t""yes" 1>&6
5426     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5427   cat >> confdefs.h <<EOF
5428 #define $ac_tr_func 1
5429 EOF
5430  
5431 else
5432   echo "$ac_t""no" 1>&6
5433 fi
5434 done
5435
5436 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5437 do
5438 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5439 echo "configure:5440: checking for $ac_func" >&5
5440 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5441   echo $ac_n "(cached) $ac_c" 1>&6
5442 else
5443   cat > conftest.$ac_ext <<EOF
5444 #line 5445 "configure"
5445 #include "confdefs.h"
5446 /* System header to define __stub macros and hopefully few prototypes,
5447     which can conflict with char $ac_func(); below.  */
5448 #include <assert.h>
5449 /* Override any gcc2 internal prototype to avoid an error.  */
5450 /* We use char because int might match the return type of a gcc2
5451     builtin and then its argument prototype would still apply.  */
5452 char $ac_func();
5453
5454 int main() {
5455
5456 /* The GNU C library defines this for functions which it implements
5457     to always fail with ENOSYS.  Some functions are actually named
5458     something starting with __ and the normal name is an alias.  */
5459 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5460 choke me
5461 #else
5462 $ac_func();
5463 #endif
5464
5465 ; return 0; }
5466 EOF
5467 if { (eval echo configure:5468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5468   rm -rf conftest*
5469   eval "ac_cv_func_$ac_func=yes"
5470 else
5471   echo "configure: failed program was:" >&5
5472   cat conftest.$ac_ext >&5
5473   rm -rf conftest*
5474   eval "ac_cv_func_$ac_func=no"
5475 fi
5476 rm -f conftest*
5477 fi
5478
5479 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5480   echo "$ac_t""yes" 1>&6
5481     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5482   cat >> confdefs.h <<EOF
5483 #define $ac_tr_func 1
5484 EOF
5485  
5486 else
5487   echo "$ac_t""no" 1>&6
5488 fi
5489 done
5490
5491 # setbuffer is needed for smbtorture
5492 for ac_func in setbuffer
5493 do
5494 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5495 echo "configure:5496: checking for $ac_func" >&5
5496 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5497   echo $ac_n "(cached) $ac_c" 1>&6
5498 else
5499   cat > conftest.$ac_ext <<EOF
5500 #line 5501 "configure"
5501 #include "confdefs.h"
5502 /* System header to define __stub macros and hopefully few prototypes,
5503     which can conflict with char $ac_func(); below.  */
5504 #include <assert.h>
5505 /* Override any gcc2 internal prototype to avoid an error.  */
5506 /* We use char because int might match the return type of a gcc2
5507     builtin and then its argument prototype would still apply.  */
5508 char $ac_func();
5509
5510 int main() {
5511
5512 /* The GNU C library defines this for functions which it implements
5513     to always fail with ENOSYS.  Some functions are actually named
5514     something starting with __ and the normal name is an alias.  */
5515 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5516 choke me
5517 #else
5518 $ac_func();
5519 #endif
5520
5521 ; return 0; }
5522 EOF
5523 if { (eval echo configure:5524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5524   rm -rf conftest*
5525   eval "ac_cv_func_$ac_func=yes"
5526 else
5527   echo "configure: failed program was:" >&5
5528   cat conftest.$ac_ext >&5
5529   rm -rf conftest*
5530   eval "ac_cv_func_$ac_func=no"
5531 fi
5532 rm -f conftest*
5533 fi
5534
5535 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5536   echo "$ac_t""yes" 1>&6
5537     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5538   cat >> confdefs.h <<EOF
5539 #define $ac_tr_func 1
5540 EOF
5541  
5542 else
5543   echo "$ac_t""no" 1>&6
5544 fi
5545 done
5546
5547
5548 # syscall() is needed for smbwrapper.
5549 for ac_func in syscall
5550 do
5551 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5552 echo "configure:5553: checking for $ac_func" >&5
5553 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5554   echo $ac_n "(cached) $ac_c" 1>&6
5555 else
5556   cat > conftest.$ac_ext <<EOF
5557 #line 5558 "configure"
5558 #include "confdefs.h"
5559 /* System header to define __stub macros and hopefully few prototypes,
5560     which can conflict with char $ac_func(); below.  */
5561 #include <assert.h>
5562 /* Override any gcc2 internal prototype to avoid an error.  */
5563 /* We use char because int might match the return type of a gcc2
5564     builtin and then its argument prototype would still apply.  */
5565 char $ac_func();
5566
5567 int main() {
5568
5569 /* The GNU C library defines this for functions which it implements
5570     to always fail with ENOSYS.  Some functions are actually named
5571     something starting with __ and the normal name is an alias.  */
5572 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5573 choke me
5574 #else
5575 $ac_func();
5576 #endif
5577
5578 ; return 0; }
5579 EOF
5580 if { (eval echo configure:5581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5581   rm -rf conftest*
5582   eval "ac_cv_func_$ac_func=yes"
5583 else
5584   echo "configure: failed program was:" >&5
5585   cat conftest.$ac_ext >&5
5586   rm -rf conftest*
5587   eval "ac_cv_func_$ac_func=no"
5588 fi
5589 rm -f conftest*
5590 fi
5591
5592 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5593   echo "$ac_t""yes" 1>&6
5594     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5595   cat >> confdefs.h <<EOF
5596 #define $ac_tr_func 1
5597 EOF
5598  
5599 else
5600   echo "$ac_t""no" 1>&6
5601 fi
5602 done
5603
5604
5605 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5606 do
5607 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5608 echo "configure:5609: checking for $ac_func" >&5
5609 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5610   echo $ac_n "(cached) $ac_c" 1>&6
5611 else
5612   cat > conftest.$ac_ext <<EOF
5613 #line 5614 "configure"
5614 #include "confdefs.h"
5615 /* System header to define __stub macros and hopefully few prototypes,
5616     which can conflict with char $ac_func(); below.  */
5617 #include <assert.h>
5618 /* Override any gcc2 internal prototype to avoid an error.  */
5619 /* We use char because int might match the return type of a gcc2
5620     builtin and then its argument prototype would still apply.  */
5621 char $ac_func();
5622
5623 int main() {
5624
5625 /* The GNU C library defines this for functions which it implements
5626     to always fail with ENOSYS.  Some functions are actually named
5627     something starting with __ and the normal name is an alias.  */
5628 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5629 choke me
5630 #else
5631 $ac_func();
5632 #endif
5633
5634 ; return 0; }
5635 EOF
5636 if { (eval echo configure:5637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5637   rm -rf conftest*
5638   eval "ac_cv_func_$ac_func=yes"
5639 else
5640   echo "configure: failed program was:" >&5
5641   cat conftest.$ac_ext >&5
5642   rm -rf conftest*
5643   eval "ac_cv_func_$ac_func=no"
5644 fi
5645 rm -f conftest*
5646 fi
5647
5648 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5649   echo "$ac_t""yes" 1>&6
5650     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5651   cat >> confdefs.h <<EOF
5652 #define $ac_tr_func 1
5653 EOF
5654  
5655 else
5656   echo "$ac_t""no" 1>&6
5657 fi
5658 done
5659
5660 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
5661 do
5662 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5663 echo "configure:5664: checking for $ac_func" >&5
5664 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5665   echo $ac_n "(cached) $ac_c" 1>&6
5666 else
5667   cat > conftest.$ac_ext <<EOF
5668 #line 5669 "configure"
5669 #include "confdefs.h"
5670 /* System header to define __stub macros and hopefully few prototypes,
5671     which can conflict with char $ac_func(); below.  */
5672 #include <assert.h>
5673 /* Override any gcc2 internal prototype to avoid an error.  */
5674 /* We use char because int might match the return type of a gcc2
5675     builtin and then its argument prototype would still apply.  */
5676 char $ac_func();
5677
5678 int main() {
5679
5680 /* The GNU C library defines this for functions which it implements
5681     to always fail with ENOSYS.  Some functions are actually named
5682     something starting with __ and the normal name is an alias.  */
5683 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5684 choke me
5685 #else
5686 $ac_func();
5687 #endif
5688
5689 ; return 0; }
5690 EOF
5691 if { (eval echo configure:5692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5692   rm -rf conftest*
5693   eval "ac_cv_func_$ac_func=yes"
5694 else
5695   echo "configure: failed program was:" >&5
5696   cat conftest.$ac_ext >&5
5697   rm -rf conftest*
5698   eval "ac_cv_func_$ac_func=no"
5699 fi
5700 rm -f conftest*
5701 fi
5702
5703 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5704   echo "$ac_t""yes" 1>&6
5705     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5706   cat >> confdefs.h <<EOF
5707 #define $ac_tr_func 1
5708 EOF
5709  
5710 else
5711   echo "$ac_t""no" 1>&6
5712 fi
5713 done
5714
5715 for ac_func in __getcwd _getcwd
5716 do
5717 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5718 echo "configure:5719: checking for $ac_func" >&5
5719 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5720   echo $ac_n "(cached) $ac_c" 1>&6
5721 else
5722   cat > conftest.$ac_ext <<EOF
5723 #line 5724 "configure"
5724 #include "confdefs.h"
5725 /* System header to define __stub macros and hopefully few prototypes,
5726     which can conflict with char $ac_func(); below.  */
5727 #include <assert.h>
5728 /* Override any gcc2 internal prototype to avoid an error.  */
5729 /* We use char because int might match the return type of a gcc2
5730     builtin and then its argument prototype would still apply.  */
5731 char $ac_func();
5732
5733 int main() {
5734
5735 /* The GNU C library defines this for functions which it implements
5736     to always fail with ENOSYS.  Some functions are actually named
5737     something starting with __ and the normal name is an alias.  */
5738 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5739 choke me
5740 #else
5741 $ac_func();
5742 #endif
5743
5744 ; return 0; }
5745 EOF
5746 if { (eval echo configure:5747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5747   rm -rf conftest*
5748   eval "ac_cv_func_$ac_func=yes"
5749 else
5750   echo "configure: failed program was:" >&5
5751   cat conftest.$ac_ext >&5
5752   rm -rf conftest*
5753   eval "ac_cv_func_$ac_func=no"
5754 fi
5755 rm -f conftest*
5756 fi
5757
5758 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5759   echo "$ac_t""yes" 1>&6
5760     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5761   cat >> confdefs.h <<EOF
5762 #define $ac_tr_func 1
5763 EOF
5764  
5765 else
5766   echo "$ac_t""no" 1>&6
5767 fi
5768 done
5769
5770 for ac_func in __xstat __fxstat __lxstat
5771 do
5772 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5773 echo "configure:5774: checking for $ac_func" >&5
5774 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5775   echo $ac_n "(cached) $ac_c" 1>&6
5776 else
5777   cat > conftest.$ac_ext <<EOF
5778 #line 5779 "configure"
5779 #include "confdefs.h"
5780 /* System header to define __stub macros and hopefully few prototypes,
5781     which can conflict with char $ac_func(); below.  */
5782 #include <assert.h>
5783 /* Override any gcc2 internal prototype to avoid an error.  */
5784 /* We use char because int might match the return type of a gcc2
5785     builtin and then its argument prototype would still apply.  */
5786 char $ac_func();
5787
5788 int main() {
5789
5790 /* The GNU C library defines this for functions which it implements
5791     to always fail with ENOSYS.  Some functions are actually named
5792     something starting with __ and the normal name is an alias.  */
5793 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5794 choke me
5795 #else
5796 $ac_func();
5797 #endif
5798
5799 ; return 0; }
5800 EOF
5801 if { (eval echo configure:5802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5802   rm -rf conftest*
5803   eval "ac_cv_func_$ac_func=yes"
5804 else
5805   echo "configure: failed program was:" >&5
5806   cat conftest.$ac_ext >&5
5807   rm -rf conftest*
5808   eval "ac_cv_func_$ac_func=no"
5809 fi
5810 rm -f conftest*
5811 fi
5812
5813 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5814   echo "$ac_t""yes" 1>&6
5815     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5816   cat >> confdefs.h <<EOF
5817 #define $ac_tr_func 1
5818 EOF
5819  
5820 else
5821   echo "$ac_t""no" 1>&6
5822 fi
5823 done
5824
5825 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
5826 do
5827 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5828 echo "configure:5829: checking for $ac_func" >&5
5829 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5830   echo $ac_n "(cached) $ac_c" 1>&6
5831 else
5832   cat > conftest.$ac_ext <<EOF
5833 #line 5834 "configure"
5834 #include "confdefs.h"
5835 /* System header to define __stub macros and hopefully few prototypes,
5836     which can conflict with char $ac_func(); below.  */
5837 #include <assert.h>
5838 /* Override any gcc2 internal prototype to avoid an error.  */
5839 /* We use char because int might match the return type of a gcc2
5840     builtin and then its argument prototype would still apply.  */
5841 char $ac_func();
5842
5843 int main() {
5844
5845 /* The GNU C library defines this for functions which it implements
5846     to always fail with ENOSYS.  Some functions are actually named
5847     something starting with __ and the normal name is an alias.  */
5848 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5849 choke me
5850 #else
5851 $ac_func();
5852 #endif
5853
5854 ; return 0; }
5855 EOF
5856 if { (eval echo configure:5857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5857   rm -rf conftest*
5858   eval "ac_cv_func_$ac_func=yes"
5859 else
5860   echo "configure: failed program was:" >&5
5861   cat conftest.$ac_ext >&5
5862   rm -rf conftest*
5863   eval "ac_cv_func_$ac_func=no"
5864 fi
5865 rm -f conftest*
5866 fi
5867
5868 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5869   echo "$ac_t""yes" 1>&6
5870     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5871   cat >> confdefs.h <<EOF
5872 #define $ac_tr_func 1
5873 EOF
5874  
5875 else
5876   echo "$ac_t""no" 1>&6
5877 fi
5878 done
5879
5880 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
5881 do
5882 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5883 echo "configure:5884: checking for $ac_func" >&5
5884 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5885   echo $ac_n "(cached) $ac_c" 1>&6
5886 else
5887   cat > conftest.$ac_ext <<EOF
5888 #line 5889 "configure"
5889 #include "confdefs.h"
5890 /* System header to define __stub macros and hopefully few prototypes,
5891     which can conflict with char $ac_func(); below.  */
5892 #include <assert.h>
5893 /* Override any gcc2 internal prototype to avoid an error.  */
5894 /* We use char because int might match the return type of a gcc2
5895     builtin and then its argument prototype would still apply.  */
5896 char $ac_func();
5897
5898 int main() {
5899
5900 /* The GNU C library defines this for functions which it implements
5901     to always fail with ENOSYS.  Some functions are actually named
5902     something starting with __ and the normal name is an alias.  */
5903 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5904 choke me
5905 #else
5906 $ac_func();
5907 #endif
5908
5909 ; return 0; }
5910 EOF
5911 if { (eval echo configure:5912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5912   rm -rf conftest*
5913   eval "ac_cv_func_$ac_func=yes"
5914 else
5915   echo "configure: failed program was:" >&5
5916   cat conftest.$ac_ext >&5
5917   rm -rf conftest*
5918   eval "ac_cv_func_$ac_func=no"
5919 fi
5920 rm -f conftest*
5921 fi
5922
5923 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5924   echo "$ac_t""yes" 1>&6
5925     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5926   cat >> confdefs.h <<EOF
5927 #define $ac_tr_func 1
5928 EOF
5929  
5930 else
5931   echo "$ac_t""no" 1>&6
5932 fi
5933 done
5934
5935 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
5936 do
5937 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5938 echo "configure:5939: checking for $ac_func" >&5
5939 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5940   echo $ac_n "(cached) $ac_c" 1>&6
5941 else
5942   cat > conftest.$ac_ext <<EOF
5943 #line 5944 "configure"
5944 #include "confdefs.h"
5945 /* System header to define __stub macros and hopefully few prototypes,
5946     which can conflict with char $ac_func(); below.  */
5947 #include <assert.h>
5948 /* Override any gcc2 internal prototype to avoid an error.  */
5949 /* We use char because int might match the return type of a gcc2
5950     builtin and then its argument prototype would still apply.  */
5951 char $ac_func();
5952
5953 int main() {
5954
5955 /* The GNU C library defines this for functions which it implements
5956     to always fail with ENOSYS.  Some functions are actually named
5957     something starting with __ and the normal name is an alias.  */
5958 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5959 choke me
5960 #else
5961 $ac_func();
5962 #endif
5963
5964 ; return 0; }
5965 EOF
5966 if { (eval echo configure:5967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5967   rm -rf conftest*
5968   eval "ac_cv_func_$ac_func=yes"
5969 else
5970   echo "configure: failed program was:" >&5
5971   cat conftest.$ac_ext >&5
5972   rm -rf conftest*
5973   eval "ac_cv_func_$ac_func=no"
5974 fi
5975 rm -f conftest*
5976 fi
5977
5978 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5979   echo "$ac_t""yes" 1>&6
5980     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5981   cat >> confdefs.h <<EOF
5982 #define $ac_tr_func 1
5983 EOF
5984  
5985 else
5986   echo "$ac_t""no" 1>&6
5987 fi
5988 done
5989
5990 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
5991 do
5992 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5993 echo "configure:5994: checking for $ac_func" >&5
5994 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5995   echo $ac_n "(cached) $ac_c" 1>&6
5996 else
5997   cat > conftest.$ac_ext <<EOF
5998 #line 5999 "configure"
5999 #include "confdefs.h"
6000 /* System header to define __stub macros and hopefully few prototypes,
6001     which can conflict with char $ac_func(); below.  */
6002 #include <assert.h>
6003 /* Override any gcc2 internal prototype to avoid an error.  */
6004 /* We use char because int might match the return type of a gcc2
6005     builtin and then its argument prototype would still apply.  */
6006 char $ac_func();
6007
6008 int main() {
6009
6010 /* The GNU C library defines this for functions which it implements
6011     to always fail with ENOSYS.  Some functions are actually named
6012     something starting with __ and the normal name is an alias.  */
6013 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6014 choke me
6015 #else
6016 $ac_func();
6017 #endif
6018
6019 ; return 0; }
6020 EOF
6021 if { (eval echo configure:6022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6022   rm -rf conftest*
6023   eval "ac_cv_func_$ac_func=yes"
6024 else
6025   echo "configure: failed program was:" >&5
6026   cat conftest.$ac_ext >&5
6027   rm -rf conftest*
6028   eval "ac_cv_func_$ac_func=no"
6029 fi
6030 rm -f conftest*
6031 fi
6032
6033 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6034   echo "$ac_t""yes" 1>&6
6035     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6036   cat >> confdefs.h <<EOF
6037 #define $ac_tr_func 1
6038 EOF
6039  
6040 else
6041   echo "$ac_t""no" 1>&6
6042 fi
6043 done
6044
6045 for ac_func in _write __write _fork __fork
6046 do
6047 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6048 echo "configure:6049: checking for $ac_func" >&5
6049 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6050   echo $ac_n "(cached) $ac_c" 1>&6
6051 else
6052   cat > conftest.$ac_ext <<EOF
6053 #line 6054 "configure"
6054 #include "confdefs.h"
6055 /* System header to define __stub macros and hopefully few prototypes,
6056     which can conflict with char $ac_func(); below.  */
6057 #include <assert.h>
6058 /* Override any gcc2 internal prototype to avoid an error.  */
6059 /* We use char because int might match the return type of a gcc2
6060     builtin and then its argument prototype would still apply.  */
6061 char $ac_func();
6062
6063 int main() {
6064
6065 /* The GNU C library defines this for functions which it implements
6066     to always fail with ENOSYS.  Some functions are actually named
6067     something starting with __ and the normal name is an alias.  */
6068 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6069 choke me
6070 #else
6071 $ac_func();
6072 #endif
6073
6074 ; return 0; }
6075 EOF
6076 if { (eval echo configure:6077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6077   rm -rf conftest*
6078   eval "ac_cv_func_$ac_func=yes"
6079 else
6080   echo "configure: failed program was:" >&5
6081   cat conftest.$ac_ext >&5
6082   rm -rf conftest*
6083   eval "ac_cv_func_$ac_func=no"
6084 fi
6085 rm -f conftest*
6086 fi
6087
6088 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6089   echo "$ac_t""yes" 1>&6
6090     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6091   cat >> confdefs.h <<EOF
6092 #define $ac_tr_func 1
6093 EOF
6094  
6095 else
6096   echo "$ac_t""no" 1>&6
6097 fi
6098 done
6099
6100 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6101 do
6102 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6103 echo "configure:6104: checking for $ac_func" >&5
6104 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6105   echo $ac_n "(cached) $ac_c" 1>&6
6106 else
6107   cat > conftest.$ac_ext <<EOF
6108 #line 6109 "configure"
6109 #include "confdefs.h"
6110 /* System header to define __stub macros and hopefully few prototypes,
6111     which can conflict with char $ac_func(); below.  */
6112 #include <assert.h>
6113 /* Override any gcc2 internal prototype to avoid an error.  */
6114 /* We use char because int might match the return type of a gcc2
6115     builtin and then its argument prototype would still apply.  */
6116 char $ac_func();
6117
6118 int main() {
6119
6120 /* The GNU C library defines this for functions which it implements
6121     to always fail with ENOSYS.  Some functions are actually named
6122     something starting with __ and the normal name is an alias.  */
6123 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6124 choke me
6125 #else
6126 $ac_func();
6127 #endif
6128
6129 ; return 0; }
6130 EOF
6131 if { (eval echo configure:6132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6132   rm -rf conftest*
6133   eval "ac_cv_func_$ac_func=yes"
6134 else
6135   echo "configure: failed program was:" >&5
6136   cat conftest.$ac_ext >&5
6137   rm -rf conftest*
6138   eval "ac_cv_func_$ac_func=no"
6139 fi
6140 rm -f conftest*
6141 fi
6142
6143 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6144   echo "$ac_t""yes" 1>&6
6145     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6146   cat >> confdefs.h <<EOF
6147 #define $ac_tr_func 1
6148 EOF
6149  
6150 else
6151   echo "$ac_t""no" 1>&6
6152 fi
6153 done
6154
6155 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6156 do
6157 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6158 echo "configure:6159: checking for $ac_func" >&5
6159 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6160   echo $ac_n "(cached) $ac_c" 1>&6
6161 else
6162   cat > conftest.$ac_ext <<EOF
6163 #line 6164 "configure"
6164 #include "confdefs.h"
6165 /* System header to define __stub macros and hopefully few prototypes,
6166     which can conflict with char $ac_func(); below.  */
6167 #include <assert.h>
6168 /* Override any gcc2 internal prototype to avoid an error.  */
6169 /* We use char because int might match the return type of a gcc2
6170     builtin and then its argument prototype would still apply.  */
6171 char $ac_func();
6172
6173 int main() {
6174
6175 /* The GNU C library defines this for functions which it implements
6176     to always fail with ENOSYS.  Some functions are actually named
6177     something starting with __ and the normal name is an alias.  */
6178 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6179 choke me
6180 #else
6181 $ac_func();
6182 #endif
6183
6184 ; return 0; }
6185 EOF
6186 if { (eval echo configure:6187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6187   rm -rf conftest*
6188   eval "ac_cv_func_$ac_func=yes"
6189 else
6190   echo "configure: failed program was:" >&5
6191   cat conftest.$ac_ext >&5
6192   rm -rf conftest*
6193   eval "ac_cv_func_$ac_func=no"
6194 fi
6195 rm -f conftest*
6196 fi
6197
6198 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6199   echo "$ac_t""yes" 1>&6
6200     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6201   cat >> confdefs.h <<EOF
6202 #define $ac_tr_func 1
6203 EOF
6204  
6205 else
6206   echo "$ac_t""no" 1>&6
6207 fi
6208 done
6209
6210 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6211 do
6212 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6213 echo "configure:6214: checking for $ac_func" >&5
6214 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6215   echo $ac_n "(cached) $ac_c" 1>&6
6216 else
6217   cat > conftest.$ac_ext <<EOF
6218 #line 6219 "configure"
6219 #include "confdefs.h"
6220 /* System header to define __stub macros and hopefully few prototypes,
6221     which can conflict with char $ac_func(); below.  */
6222 #include <assert.h>
6223 /* Override any gcc2 internal prototype to avoid an error.  */
6224 /* We use char because int might match the return type of a gcc2
6225     builtin and then its argument prototype would still apply.  */
6226 char $ac_func();
6227
6228 int main() {
6229
6230 /* The GNU C library defines this for functions which it implements
6231     to always fail with ENOSYS.  Some functions are actually named
6232     something starting with __ and the normal name is an alias.  */
6233 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6234 choke me
6235 #else
6236 $ac_func();
6237 #endif
6238
6239 ; return 0; }
6240 EOF
6241 if { (eval echo configure:6242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6242   rm -rf conftest*
6243   eval "ac_cv_func_$ac_func=yes"
6244 else
6245   echo "configure: failed program was:" >&5
6246   cat conftest.$ac_ext >&5
6247   rm -rf conftest*
6248   eval "ac_cv_func_$ac_func=no"
6249 fi
6250 rm -f conftest*
6251 fi
6252
6253 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6254   echo "$ac_t""yes" 1>&6
6255     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6256   cat >> confdefs.h <<EOF
6257 #define $ac_tr_func 1
6258 EOF
6259  
6260 else
6261   echo "$ac_t""no" 1>&6
6262 fi
6263 done
6264
6265 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6266 do
6267 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6268 echo "configure:6269: checking for $ac_func" >&5
6269 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6270   echo $ac_n "(cached) $ac_c" 1>&6
6271 else
6272   cat > conftest.$ac_ext <<EOF
6273 #line 6274 "configure"
6274 #include "confdefs.h"
6275 /* System header to define __stub macros and hopefully few prototypes,
6276     which can conflict with char $ac_func(); below.  */
6277 #include <assert.h>
6278 /* Override any gcc2 internal prototype to avoid an error.  */
6279 /* We use char because int might match the return type of a gcc2
6280     builtin and then its argument prototype would still apply.  */
6281 char $ac_func();
6282
6283 int main() {
6284
6285 /* The GNU C library defines this for functions which it implements
6286     to always fail with ENOSYS.  Some functions are actually named
6287     something starting with __ and the normal name is an alias.  */
6288 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6289 choke me
6290 #else
6291 $ac_func();
6292 #endif
6293
6294 ; return 0; }
6295 EOF
6296 if { (eval echo configure:6297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6297   rm -rf conftest*
6298   eval "ac_cv_func_$ac_func=yes"
6299 else
6300   echo "configure: failed program was:" >&5
6301   cat conftest.$ac_ext >&5
6302   rm -rf conftest*
6303   eval "ac_cv_func_$ac_func=no"
6304 fi
6305 rm -f conftest*
6306 fi
6307
6308 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6309   echo "$ac_t""yes" 1>&6
6310     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6311   cat >> confdefs.h <<EOF
6312 #define $ac_tr_func 1
6313 EOF
6314  
6315 else
6316   echo "$ac_t""no" 1>&6
6317 fi
6318 done
6319
6320 for ac_func in open64 _open64 __open64 creat64
6321 do
6322 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6323 echo "configure:6324: checking for $ac_func" >&5
6324 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6325   echo $ac_n "(cached) $ac_c" 1>&6
6326 else
6327   cat > conftest.$ac_ext <<EOF
6328 #line 6329 "configure"
6329 #include "confdefs.h"
6330 /* System header to define __stub macros and hopefully few prototypes,
6331     which can conflict with char $ac_func(); below.  */
6332 #include <assert.h>
6333 /* Override any gcc2 internal prototype to avoid an error.  */
6334 /* We use char because int might match the return type of a gcc2
6335     builtin and then its argument prototype would still apply.  */
6336 char $ac_func();
6337
6338 int main() {
6339
6340 /* The GNU C library defines this for functions which it implements
6341     to always fail with ENOSYS.  Some functions are actually named
6342     something starting with __ and the normal name is an alias.  */
6343 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6344 choke me
6345 #else
6346 $ac_func();
6347 #endif
6348
6349 ; return 0; }
6350 EOF
6351 if { (eval echo configure:6352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6352   rm -rf conftest*
6353   eval "ac_cv_func_$ac_func=yes"
6354 else
6355   echo "configure: failed program was:" >&5
6356   cat conftest.$ac_ext >&5
6357   rm -rf conftest*
6358   eval "ac_cv_func_$ac_func=no"
6359 fi
6360 rm -f conftest*
6361 fi
6362
6363 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6364   echo "$ac_t""yes" 1>&6
6365     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6366   cat >> confdefs.h <<EOF
6367 #define $ac_tr_func 1
6368 EOF
6369  
6370 else
6371   echo "$ac_t""no" 1>&6
6372 fi
6373 done
6374
6375
6376 #
6377 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6378 #
6379
6380 if test x$ac_cv_func_stat64 = xno ; then
6381   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6382 echo "configure:6383: checking for stat64 in <sys/stat.h>" >&5
6383   cat > conftest.$ac_ext <<EOF
6384 #line 6385 "configure"
6385 #include "confdefs.h"
6386
6387 #if defined(HAVE_UNISTD_H)
6388 #include <unistd.h>
6389 #endif
6390 #include <sys/stat.h>
6391
6392 int main() {
6393 struct stat64 st64; exit(stat64(".",&st64));
6394 ; return 0; }
6395 EOF
6396 if { (eval echo configure:6397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6397   rm -rf conftest*
6398   ac_cv_func_stat64=yes
6399 else
6400   echo "configure: failed program was:" >&5
6401   cat conftest.$ac_ext >&5
6402 fi
6403 rm -f conftest*
6404   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6405   if test x$ac_cv_func_stat64 = xyes ; then
6406     cat >> confdefs.h <<\EOF
6407 #define HAVE_STAT64 1
6408 EOF
6409
6410   fi
6411 fi
6412
6413 if test x$ac_cv_func_lstat64 = xno ; then
6414   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6415 echo "configure:6416: checking for lstat64 in <sys/stat.h>" >&5
6416   cat > conftest.$ac_ext <<EOF
6417 #line 6418 "configure"
6418 #include "confdefs.h"
6419
6420 #if defined(HAVE_UNISTD_H)
6421 #include <unistd.h>
6422 #endif
6423 #include <sys/stat.h>
6424
6425 int main() {
6426 struct stat64 st64; exit(lstat64(".",&st64));
6427 ; return 0; }
6428 EOF
6429 if { (eval echo configure:6430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6430   rm -rf conftest*
6431   ac_cv_func_lstat64=yes
6432 else
6433   echo "configure: failed program was:" >&5
6434   cat conftest.$ac_ext >&5
6435 fi
6436 rm -f conftest*
6437   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6438   if test x$ac_cv_func_lstat64 = xyes ; then
6439     cat >> confdefs.h <<\EOF
6440 #define HAVE_LSTAT64 1
6441 EOF
6442
6443   fi
6444 fi
6445
6446 if test x$ac_cv_func_fstat64 = xno ; then
6447   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6448 echo "configure:6449: checking for fstat64 in <sys/stat.h>" >&5
6449   cat > conftest.$ac_ext <<EOF
6450 #line 6451 "configure"
6451 #include "confdefs.h"
6452
6453 #if defined(HAVE_UNISTD_H)
6454 #include <unistd.h>
6455 #endif
6456 #include <sys/stat.h>
6457
6458 int main() {
6459 struct stat64 st64; exit(fstat64(0,&st64));
6460 ; return 0; }
6461 EOF
6462 if { (eval echo configure:6463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6463   rm -rf conftest*
6464   ac_cv_func_fstat64=yes
6465 else
6466   echo "configure: failed program was:" >&5
6467   cat conftest.$ac_ext >&5
6468 fi
6469 rm -f conftest*
6470   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6471   if test x$ac_cv_func_fstat64 = xyes ; then
6472     cat >> confdefs.h <<\EOF
6473 #define HAVE_FSTAT64 1
6474 EOF
6475
6476   fi
6477 fi
6478
6479 #
6480 # If no strcasecmp, check for it in some known places
6481 # It is in -lresolv on ReliantUNIX and UnixWare
6482 #   -lresolve *must* follow -lnsl for name resolution to work properly
6483 #
6484
6485 if test x$ac_cv_func_strcasecmp = xno ; then
6486         echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6
6487 echo "configure:6488: checking for strcasecmp in -lresolv" >&5
6488 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'`
6489 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6490   echo $ac_n "(cached) $ac_c" 1>&6
6491 else
6492   ac_save_LIBS="$LIBS"
6493 LIBS="-lresolv  $LIBS"
6494 cat > conftest.$ac_ext <<EOF
6495 #line 6496 "configure"
6496 #include "confdefs.h"
6497 /* Override any gcc2 internal prototype to avoid an error.  */
6498 /* We use char because int might match the return type of a gcc2
6499     builtin and then its argument prototype would still apply.  */
6500 char strcasecmp();
6501
6502 int main() {
6503 strcasecmp()
6504 ; return 0; }
6505 EOF
6506 if { (eval echo configure:6507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6507   rm -rf conftest*
6508   eval "ac_cv_lib_$ac_lib_var=yes"
6509 else
6510   echo "configure: failed program was:" >&5
6511   cat conftest.$ac_ext >&5
6512   rm -rf conftest*
6513   eval "ac_cv_lib_$ac_lib_var=no"
6514 fi
6515 rm -f conftest*
6516 LIBS="$ac_save_LIBS"
6517
6518 fi
6519 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6520   echo "$ac_t""yes" 1>&6
6521   LIBS="$LIBS -lresolv"
6522                 cat >> confdefs.h <<\EOF
6523 #define HAVE_STRCASECMP 1
6524 EOF
6525
6526 else
6527   echo "$ac_t""no" 1>&6
6528 fi
6529
6530 fi
6531
6532 #
6533 # Check for the functions putprpwnam, set_auth_parameters,
6534 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6535 # Needed for OSF1 and HPUX.
6536 #
6537
6538 case "$LIBS" in
6539   *-lsecurity*) for ac_func in putprpwnam
6540 do
6541 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6542 echo "configure:6543: checking for $ac_func" >&5
6543 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6544   echo $ac_n "(cached) $ac_c" 1>&6
6545 else
6546   cat > conftest.$ac_ext <<EOF
6547 #line 6548 "configure"
6548 #include "confdefs.h"
6549 /* System header to define __stub macros and hopefully few prototypes,
6550     which can conflict with char $ac_func(); below.  */
6551 #include <assert.h>
6552 /* Override any gcc2 internal prototype to avoid an error.  */
6553 /* We use char because int might match the return type of a gcc2
6554     builtin and then its argument prototype would still apply.  */
6555 char $ac_func();
6556
6557 int main() {
6558
6559 /* The GNU C library defines this for functions which it implements
6560     to always fail with ENOSYS.  Some functions are actually named
6561     something starting with __ and the normal name is an alias.  */
6562 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6563 choke me
6564 #else
6565 $ac_func();
6566 #endif
6567
6568 ; return 0; }
6569 EOF
6570 if { (eval echo configure:6571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6571   rm -rf conftest*
6572   eval "ac_cv_func_$ac_func=yes"
6573 else
6574   echo "configure: failed program was:" >&5
6575   cat conftest.$ac_ext >&5
6576   rm -rf conftest*
6577   eval "ac_cv_func_$ac_func=no"
6578 fi
6579 rm -f conftest*
6580 fi
6581
6582 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6583   echo "$ac_t""yes" 1>&6
6584     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6585   cat >> confdefs.h <<EOF
6586 #define $ac_tr_func 1
6587 EOF
6588  
6589 else
6590   echo "$ac_t""no" 1>&6
6591 fi
6592 done
6593  ;;
6594   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6595 echo "configure:6596: checking for putprpwnam in -lsecurity" >&5
6596 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6597 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6598   echo $ac_n "(cached) $ac_c" 1>&6
6599 else
6600   ac_save_LIBS="$LIBS"
6601 LIBS="-lsecurity  $LIBS"
6602 cat > conftest.$ac_ext <<EOF
6603 #line 6604 "configure"
6604 #include "confdefs.h"
6605 /* Override any gcc2 internal prototype to avoid an error.  */
6606 /* We use char because int might match the return type of a gcc2
6607     builtin and then its argument prototype would still apply.  */
6608 char putprpwnam();
6609
6610 int main() {
6611 putprpwnam()
6612 ; return 0; }
6613 EOF
6614 if { (eval echo configure:6615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6615   rm -rf conftest*
6616   eval "ac_cv_lib_$ac_lib_var=yes"
6617 else
6618   echo "configure: failed program was:" >&5
6619   cat conftest.$ac_ext >&5
6620   rm -rf conftest*
6621   eval "ac_cv_lib_$ac_lib_var=no"
6622 fi
6623 rm -f conftest*
6624 LIBS="$ac_save_LIBS"
6625
6626 fi
6627 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6628   echo "$ac_t""yes" 1>&6
6629     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6630     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6631   cat >> confdefs.h <<EOF
6632 #define $ac_tr_lib 1
6633 EOF
6634
6635   LIBS="-lsecurity $LIBS"
6636
6637 else
6638   echo "$ac_t""no" 1>&6
6639 fi
6640  
6641      for ac_func in putprpwnam
6642 do
6643 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6644 echo "configure:6645: checking for $ac_func" >&5
6645 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6646   echo $ac_n "(cached) $ac_c" 1>&6
6647 else
6648   cat > conftest.$ac_ext <<EOF
6649 #line 6650 "configure"
6650 #include "confdefs.h"
6651 /* System header to define __stub macros and hopefully few prototypes,
6652     which can conflict with char $ac_func(); below.  */
6653 #include <assert.h>
6654 /* Override any gcc2 internal prototype to avoid an error.  */
6655 /* We use char because int might match the return type of a gcc2
6656     builtin and then its argument prototype would still apply.  */
6657 char $ac_func();
6658
6659 int main() {
6660
6661 /* The GNU C library defines this for functions which it implements
6662     to always fail with ENOSYS.  Some functions are actually named
6663     something starting with __ and the normal name is an alias.  */
6664 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6665 choke me
6666 #else
6667 $ac_func();
6668 #endif
6669
6670 ; return 0; }
6671 EOF
6672 if { (eval echo configure:6673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6673   rm -rf conftest*
6674   eval "ac_cv_func_$ac_func=yes"
6675 else
6676   echo "configure: failed program was:" >&5
6677   cat conftest.$ac_ext >&5
6678   rm -rf conftest*
6679   eval "ac_cv_func_$ac_func=no"
6680 fi
6681 rm -f conftest*
6682 fi
6683
6684 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6685   echo "$ac_t""yes" 1>&6
6686     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6687   cat >> confdefs.h <<EOF
6688 #define $ac_tr_func 1
6689 EOF
6690  
6691 else
6692   echo "$ac_t""no" 1>&6
6693 fi
6694 done
6695
6696   ;;
6697   esac
6698
6699 case "$LIBS" in
6700   *-lsec*) for ac_func in putprpwnam
6701 do
6702 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6703 echo "configure:6704: checking for $ac_func" >&5
6704 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6705   echo $ac_n "(cached) $ac_c" 1>&6
6706 else
6707   cat > conftest.$ac_ext <<EOF
6708 #line 6709 "configure"
6709 #include "confdefs.h"
6710 /* System header to define __stub macros and hopefully few prototypes,
6711     which can conflict with char $ac_func(); below.  */
6712 #include <assert.h>
6713 /* Override any gcc2 internal prototype to avoid an error.  */
6714 /* We use char because int might match the return type of a gcc2
6715     builtin and then its argument prototype would still apply.  */
6716 char $ac_func();
6717
6718 int main() {
6719
6720 /* The GNU C library defines this for functions which it implements
6721     to always fail with ENOSYS.  Some functions are actually named
6722     something starting with __ and the normal name is an alias.  */
6723 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6724 choke me
6725 #else
6726 $ac_func();
6727 #endif
6728
6729 ; return 0; }
6730 EOF
6731 if { (eval echo configure:6732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6732   rm -rf conftest*
6733   eval "ac_cv_func_$ac_func=yes"
6734 else
6735   echo "configure: failed program was:" >&5
6736   cat conftest.$ac_ext >&5
6737   rm -rf conftest*
6738   eval "ac_cv_func_$ac_func=no"
6739 fi
6740 rm -f conftest*
6741 fi
6742
6743 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6744   echo "$ac_t""yes" 1>&6
6745     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6746   cat >> confdefs.h <<EOF
6747 #define $ac_tr_func 1
6748 EOF
6749  
6750 else
6751   echo "$ac_t""no" 1>&6
6752 fi
6753 done
6754  ;;
6755   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
6756 echo "configure:6757: checking for putprpwnam in -lsec" >&5
6757 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
6758 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6759   echo $ac_n "(cached) $ac_c" 1>&6
6760 else
6761   ac_save_LIBS="$LIBS"
6762 LIBS="-lsec  $LIBS"
6763 cat > conftest.$ac_ext <<EOF
6764 #line 6765 "configure"
6765 #include "confdefs.h"
6766 /* Override any gcc2 internal prototype to avoid an error.  */
6767 /* We use char because int might match the return type of a gcc2
6768     builtin and then its argument prototype would still apply.  */
6769 char putprpwnam();
6770
6771 int main() {
6772 putprpwnam()
6773 ; return 0; }
6774 EOF
6775 if { (eval echo configure:6776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6776   rm -rf conftest*
6777   eval "ac_cv_lib_$ac_lib_var=yes"
6778 else
6779   echo "configure: failed program was:" >&5
6780   cat conftest.$ac_ext >&5
6781   rm -rf conftest*
6782   eval "ac_cv_lib_$ac_lib_var=no"
6783 fi
6784 rm -f conftest*
6785 LIBS="$ac_save_LIBS"
6786
6787 fi
6788 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6789   echo "$ac_t""yes" 1>&6
6790     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6791     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6792   cat >> confdefs.h <<EOF
6793 #define $ac_tr_lib 1
6794 EOF
6795
6796   LIBS="-lsec $LIBS"
6797
6798 else
6799   echo "$ac_t""no" 1>&6
6800 fi
6801  
6802      for ac_func in putprpwnam
6803 do
6804 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6805 echo "configure:6806: checking for $ac_func" >&5
6806 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6807   echo $ac_n "(cached) $ac_c" 1>&6
6808 else
6809   cat > conftest.$ac_ext <<EOF
6810 #line 6811 "configure"
6811 #include "confdefs.h"
6812 /* System header to define __stub macros and hopefully few prototypes,
6813     which can conflict with char $ac_func(); below.  */
6814 #include <assert.h>
6815 /* Override any gcc2 internal prototype to avoid an error.  */
6816 /* We use char because int might match the return type of a gcc2
6817     builtin and then its argument prototype would still apply.  */
6818 char $ac_func();
6819
6820 int main() {
6821
6822 /* The GNU C library defines this for functions which it implements
6823     to always fail with ENOSYS.  Some functions are actually named
6824     something starting with __ and the normal name is an alias.  */
6825 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6826 choke me
6827 #else
6828 $ac_func();
6829 #endif
6830
6831 ; return 0; }
6832 EOF
6833 if { (eval echo configure:6834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6834   rm -rf conftest*
6835   eval "ac_cv_func_$ac_func=yes"
6836 else
6837   echo "configure: failed program was:" >&5
6838   cat conftest.$ac_ext >&5
6839   rm -rf conftest*
6840   eval "ac_cv_func_$ac_func=no"
6841 fi
6842 rm -f conftest*
6843 fi
6844
6845 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6846   echo "$ac_t""yes" 1>&6
6847     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6848   cat >> confdefs.h <<EOF
6849 #define $ac_tr_func 1
6850 EOF
6851  
6852 else
6853   echo "$ac_t""no" 1>&6
6854 fi
6855 done
6856
6857   ;;
6858   esac
6859
6860
6861 case "$LIBS" in
6862   *-lsecurity*) for ac_func in set_auth_parameters
6863 do
6864 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6865 echo "configure:6866: checking for $ac_func" >&5
6866 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6867   echo $ac_n "(cached) $ac_c" 1>&6
6868 else
6869   cat > conftest.$ac_ext <<EOF
6870 #line 6871 "configure"
6871 #include "confdefs.h"
6872 /* System header to define __stub macros and hopefully few prototypes,
6873     which can conflict with char $ac_func(); below.  */
6874 #include <assert.h>
6875 /* Override any gcc2 internal prototype to avoid an error.  */
6876 /* We use char because int might match the return type of a gcc2
6877     builtin and then its argument prototype would still apply.  */
6878 char $ac_func();
6879
6880 int main() {
6881
6882 /* The GNU C library defines this for functions which it implements
6883     to always fail with ENOSYS.  Some functions are actually named
6884     something starting with __ and the normal name is an alias.  */
6885 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6886 choke me
6887 #else
6888 $ac_func();
6889 #endif
6890
6891 ; return 0; }
6892 EOF
6893 if { (eval echo configure:6894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6894   rm -rf conftest*
6895   eval "ac_cv_func_$ac_func=yes"
6896 else
6897   echo "configure: failed program was:" >&5
6898   cat conftest.$ac_ext >&5
6899   rm -rf conftest*
6900   eval "ac_cv_func_$ac_func=no"
6901 fi
6902 rm -f conftest*
6903 fi
6904
6905 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6906   echo "$ac_t""yes" 1>&6
6907     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6908   cat >> confdefs.h <<EOF
6909 #define $ac_tr_func 1
6910 EOF
6911  
6912 else
6913   echo "$ac_t""no" 1>&6
6914 fi
6915 done
6916  ;;
6917   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
6918 echo "configure:6919: checking for set_auth_parameters in -lsecurity" >&5
6919 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
6920 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6921   echo $ac_n "(cached) $ac_c" 1>&6
6922 else
6923   ac_save_LIBS="$LIBS"
6924 LIBS="-lsecurity  $LIBS"
6925 cat > conftest.$ac_ext <<EOF
6926 #line 6927 "configure"
6927 #include "confdefs.h"
6928 /* Override any gcc2 internal prototype to avoid an error.  */
6929 /* We use char because int might match the return type of a gcc2
6930     builtin and then its argument prototype would still apply.  */
6931 char set_auth_parameters();
6932
6933 int main() {
6934 set_auth_parameters()
6935 ; return 0; }
6936 EOF
6937 if { (eval echo configure:6938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6938   rm -rf conftest*
6939   eval "ac_cv_lib_$ac_lib_var=yes"
6940 else
6941   echo "configure: failed program was:" >&5
6942   cat conftest.$ac_ext >&5
6943   rm -rf conftest*
6944   eval "ac_cv_lib_$ac_lib_var=no"
6945 fi
6946 rm -f conftest*
6947 LIBS="$ac_save_LIBS"
6948
6949 fi
6950 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6951   echo "$ac_t""yes" 1>&6
6952     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6953     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6954   cat >> confdefs.h <<EOF
6955 #define $ac_tr_lib 1
6956 EOF
6957
6958   LIBS="-lsecurity $LIBS"
6959
6960 else
6961   echo "$ac_t""no" 1>&6
6962 fi
6963  
6964      for ac_func in set_auth_parameters
6965 do
6966 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6967 echo "configure:6968: checking for $ac_func" >&5
6968 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6969   echo $ac_n "(cached) $ac_c" 1>&6
6970 else
6971   cat > conftest.$ac_ext <<EOF
6972 #line 6973 "configure"
6973 #include "confdefs.h"
6974 /* System header to define __stub macros and hopefully few prototypes,
6975     which can conflict with char $ac_func(); below.  */
6976 #include <assert.h>
6977 /* Override any gcc2 internal prototype to avoid an error.  */
6978 /* We use char because int might match the return type of a gcc2
6979     builtin and then its argument prototype would still apply.  */
6980 char $ac_func();
6981
6982 int main() {
6983
6984 /* The GNU C library defines this for functions which it implements
6985     to always fail with ENOSYS.  Some functions are actually named
6986     something starting with __ and the normal name is an alias.  */
6987 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6988 choke me
6989 #else
6990 $ac_func();
6991 #endif
6992
6993 ; return 0; }
6994 EOF
6995 if { (eval echo configure:6996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6996   rm -rf conftest*
6997   eval "ac_cv_func_$ac_func=yes"
6998 else
6999   echo "configure: failed program was:" >&5
7000   cat conftest.$ac_ext >&5
7001   rm -rf conftest*
7002   eval "ac_cv_func_$ac_func=no"
7003 fi
7004 rm -f conftest*
7005 fi
7006
7007 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7008   echo "$ac_t""yes" 1>&6
7009     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7010   cat >> confdefs.h <<EOF
7011 #define $ac_tr_func 1
7012 EOF
7013  
7014 else
7015   echo "$ac_t""no" 1>&6
7016 fi
7017 done
7018
7019   ;;
7020   esac
7021
7022 case "$LIBS" in
7023   *-lsec*) for ac_func in set_auth_parameters
7024 do
7025 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7026 echo "configure:7027: checking for $ac_func" >&5
7027 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7028   echo $ac_n "(cached) $ac_c" 1>&6
7029 else
7030   cat > conftest.$ac_ext <<EOF
7031 #line 7032 "configure"
7032 #include "confdefs.h"
7033 /* System header to define __stub macros and hopefully few prototypes,
7034     which can conflict with char $ac_func(); below.  */
7035 #include <assert.h>
7036 /* Override any gcc2 internal prototype to avoid an error.  */
7037 /* We use char because int might match the return type of a gcc2
7038     builtin and then its argument prototype would still apply.  */
7039 char $ac_func();
7040
7041 int main() {
7042
7043 /* The GNU C library defines this for functions which it implements
7044     to always fail with ENOSYS.  Some functions are actually named
7045     something starting with __ and the normal name is an alias.  */
7046 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7047 choke me
7048 #else
7049 $ac_func();
7050 #endif
7051
7052 ; return 0; }
7053 EOF
7054 if { (eval echo configure:7055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7055   rm -rf conftest*
7056   eval "ac_cv_func_$ac_func=yes"
7057 else
7058   echo "configure: failed program was:" >&5
7059   cat conftest.$ac_ext >&5
7060   rm -rf conftest*
7061   eval "ac_cv_func_$ac_func=no"
7062 fi
7063 rm -f conftest*
7064 fi
7065
7066 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7067   echo "$ac_t""yes" 1>&6
7068     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7069   cat >> confdefs.h <<EOF
7070 #define $ac_tr_func 1
7071 EOF
7072  
7073 else
7074   echo "$ac_t""no" 1>&6
7075 fi
7076 done
7077  ;;
7078   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7079 echo "configure:7080: checking for set_auth_parameters in -lsec" >&5
7080 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7081 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7082   echo $ac_n "(cached) $ac_c" 1>&6
7083 else
7084   ac_save_LIBS="$LIBS"
7085 LIBS="-lsec  $LIBS"
7086 cat > conftest.$ac_ext <<EOF
7087 #line 7088 "configure"
7088 #include "confdefs.h"
7089 /* Override any gcc2 internal prototype to avoid an error.  */
7090 /* We use char because int might match the return type of a gcc2
7091     builtin and then its argument prototype would still apply.  */
7092 char set_auth_parameters();
7093
7094 int main() {
7095 set_auth_parameters()
7096 ; return 0; }
7097 EOF
7098 if { (eval echo configure:7099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7099   rm -rf conftest*
7100   eval "ac_cv_lib_$ac_lib_var=yes"
7101 else
7102   echo "configure: failed program was:" >&5
7103   cat conftest.$ac_ext >&5
7104   rm -rf conftest*
7105   eval "ac_cv_lib_$ac_lib_var=no"
7106 fi
7107 rm -f conftest*
7108 LIBS="$ac_save_LIBS"
7109
7110 fi
7111 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7112   echo "$ac_t""yes" 1>&6
7113     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7114     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7115   cat >> confdefs.h <<EOF
7116 #define $ac_tr_lib 1
7117 EOF
7118
7119   LIBS="-lsec $LIBS"
7120
7121 else
7122   echo "$ac_t""no" 1>&6
7123 fi
7124  
7125      for ac_func in set_auth_parameters
7126 do
7127 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7128 echo "configure:7129: checking for $ac_func" >&5
7129 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7130   echo $ac_n "(cached) $ac_c" 1>&6
7131 else
7132   cat > conftest.$ac_ext <<EOF
7133 #line 7134 "configure"
7134 #include "confdefs.h"
7135 /* System header to define __stub macros and hopefully few prototypes,
7136     which can conflict with char $ac_func(); below.  */
7137 #include <assert.h>
7138 /* Override any gcc2 internal prototype to avoid an error.  */
7139 /* We use char because int might match the return type of a gcc2
7140     builtin and then its argument prototype would still apply.  */
7141 char $ac_func();
7142
7143 int main() {
7144
7145 /* The GNU C library defines this for functions which it implements
7146     to always fail with ENOSYS.  Some functions are actually named
7147     something starting with __ and the normal name is an alias.  */
7148 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7149 choke me
7150 #else
7151 $ac_func();
7152 #endif
7153
7154 ; return 0; }
7155 EOF
7156 if { (eval echo configure:7157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7157   rm -rf conftest*
7158   eval "ac_cv_func_$ac_func=yes"
7159 else
7160   echo "configure: failed program was:" >&5
7161   cat conftest.$ac_ext >&5
7162   rm -rf conftest*
7163   eval "ac_cv_func_$ac_func=no"
7164 fi
7165 rm -f conftest*
7166 fi
7167
7168 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7169   echo "$ac_t""yes" 1>&6
7170     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7171   cat >> confdefs.h <<EOF
7172 #define $ac_tr_func 1
7173 EOF
7174  
7175 else
7176   echo "$ac_t""no" 1>&6
7177 fi
7178 done
7179
7180   ;;
7181   esac
7182
7183
7184 # UnixWare 7.x has its getspnam in -lgen
7185 case "$LIBS" in
7186   *-lgen*) for ac_func in getspnam
7187 do
7188 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7189 echo "configure:7190: checking for $ac_func" >&5
7190 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7191   echo $ac_n "(cached) $ac_c" 1>&6
7192 else
7193   cat > conftest.$ac_ext <<EOF
7194 #line 7195 "configure"
7195 #include "confdefs.h"
7196 /* System header to define __stub macros and hopefully few prototypes,
7197     which can conflict with char $ac_func(); below.  */
7198 #include <assert.h>
7199 /* Override any gcc2 internal prototype to avoid an error.  */
7200 /* We use char because int might match the return type of a gcc2
7201     builtin and then its argument prototype would still apply.  */
7202 char $ac_func();
7203
7204 int main() {
7205
7206 /* The GNU C library defines this for functions which it implements
7207     to always fail with ENOSYS.  Some functions are actually named
7208     something starting with __ and the normal name is an alias.  */
7209 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7210 choke me
7211 #else
7212 $ac_func();
7213 #endif
7214
7215 ; return 0; }
7216 EOF
7217 if { (eval echo configure:7218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7218   rm -rf conftest*
7219   eval "ac_cv_func_$ac_func=yes"
7220 else
7221   echo "configure: failed program was:" >&5
7222   cat conftest.$ac_ext >&5
7223   rm -rf conftest*
7224   eval "ac_cv_func_$ac_func=no"
7225 fi
7226 rm -f conftest*
7227 fi
7228
7229 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7230   echo "$ac_t""yes" 1>&6
7231     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7232   cat >> confdefs.h <<EOF
7233 #define $ac_tr_func 1
7234 EOF
7235  
7236 else
7237   echo "$ac_t""no" 1>&6
7238 fi
7239 done
7240  ;;
7241   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7242 echo "configure:7243: checking for getspnam in -lgen" >&5
7243 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7244 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7245   echo $ac_n "(cached) $ac_c" 1>&6
7246 else
7247   ac_save_LIBS="$LIBS"
7248 LIBS="-lgen  $LIBS"
7249 cat > conftest.$ac_ext <<EOF
7250 #line 7251 "configure"
7251 #include "confdefs.h"
7252 /* Override any gcc2 internal prototype to avoid an error.  */
7253 /* We use char because int might match the return type of a gcc2
7254     builtin and then its argument prototype would still apply.  */
7255 char getspnam();
7256
7257 int main() {
7258 getspnam()
7259 ; return 0; }
7260 EOF
7261 if { (eval echo configure:7262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7262   rm -rf conftest*
7263   eval "ac_cv_lib_$ac_lib_var=yes"
7264 else
7265   echo "configure: failed program was:" >&5
7266   cat conftest.$ac_ext >&5
7267   rm -rf conftest*
7268   eval "ac_cv_lib_$ac_lib_var=no"
7269 fi
7270 rm -f conftest*
7271 LIBS="$ac_save_LIBS"
7272
7273 fi
7274 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7275   echo "$ac_t""yes" 1>&6
7276     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7277     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7278   cat >> confdefs.h <<EOF
7279 #define $ac_tr_lib 1
7280 EOF
7281
7282   LIBS="-lgen $LIBS"
7283
7284 else
7285   echo "$ac_t""no" 1>&6
7286 fi
7287  
7288      for ac_func in getspnam
7289 do
7290 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7291 echo "configure:7292: checking for $ac_func" >&5
7292 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7293   echo $ac_n "(cached) $ac_c" 1>&6
7294 else
7295   cat > conftest.$ac_ext <<EOF
7296 #line 7297 "configure"
7297 #include "confdefs.h"
7298 /* System header to define __stub macros and hopefully few prototypes,
7299     which can conflict with char $ac_func(); below.  */
7300 #include <assert.h>
7301 /* Override any gcc2 internal prototype to avoid an error.  */
7302 /* We use char because int might match the return type of a gcc2
7303     builtin and then its argument prototype would still apply.  */
7304 char $ac_func();
7305
7306 int main() {
7307
7308 /* The GNU C library defines this for functions which it implements
7309     to always fail with ENOSYS.  Some functions are actually named
7310     something starting with __ and the normal name is an alias.  */
7311 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7312 choke me
7313 #else
7314 $ac_func();
7315 #endif
7316
7317 ; return 0; }
7318 EOF
7319 if { (eval echo configure:7320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7320   rm -rf conftest*
7321   eval "ac_cv_func_$ac_func=yes"
7322 else
7323   echo "configure: failed program was:" >&5
7324   cat conftest.$ac_ext >&5
7325   rm -rf conftest*
7326   eval "ac_cv_func_$ac_func=no"
7327 fi
7328 rm -f conftest*
7329 fi
7330
7331 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7332   echo "$ac_t""yes" 1>&6
7333     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7334   cat >> confdefs.h <<EOF
7335 #define $ac_tr_func 1
7336 EOF
7337  
7338 else
7339   echo "$ac_t""no" 1>&6
7340 fi
7341 done
7342
7343   ;;
7344   esac
7345
7346
7347 case "$LIBS" in
7348   *-lsecurity*) for ac_func in getspnam
7349 do
7350 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7351 echo "configure:7352: checking for $ac_func" >&5
7352 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7353   echo $ac_n "(cached) $ac_c" 1>&6
7354 else
7355   cat > conftest.$ac_ext <<EOF
7356 #line 7357 "configure"
7357 #include "confdefs.h"
7358 /* System header to define __stub macros and hopefully few prototypes,
7359     which can conflict with char $ac_func(); below.  */
7360 #include <assert.h>
7361 /* Override any gcc2 internal prototype to avoid an error.  */
7362 /* We use char because int might match the return type of a gcc2
7363     builtin and then its argument prototype would still apply.  */
7364 char $ac_func();
7365
7366 int main() {
7367
7368 /* The GNU C library defines this for functions which it implements
7369     to always fail with ENOSYS.  Some functions are actually named
7370     something starting with __ and the normal name is an alias.  */
7371 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7372 choke me
7373 #else
7374 $ac_func();
7375 #endif
7376
7377 ; return 0; }
7378 EOF
7379 if { (eval echo configure:7380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7380   rm -rf conftest*
7381   eval "ac_cv_func_$ac_func=yes"
7382 else
7383   echo "configure: failed program was:" >&5
7384   cat conftest.$ac_ext >&5
7385   rm -rf conftest*
7386   eval "ac_cv_func_$ac_func=no"
7387 fi
7388 rm -f conftest*
7389 fi
7390
7391 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7392   echo "$ac_t""yes" 1>&6
7393     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7394   cat >> confdefs.h <<EOF
7395 #define $ac_tr_func 1
7396 EOF
7397  
7398 else
7399   echo "$ac_t""no" 1>&6
7400 fi
7401 done
7402  ;;
7403   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7404 echo "configure:7405: checking for getspnam in -lsecurity" >&5
7405 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7406 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7407   echo $ac_n "(cached) $ac_c" 1>&6
7408 else
7409   ac_save_LIBS="$LIBS"
7410 LIBS="-lsecurity  $LIBS"
7411 cat > conftest.$ac_ext <<EOF
7412 #line 7413 "configure"
7413 #include "confdefs.h"
7414 /* Override any gcc2 internal prototype to avoid an error.  */
7415 /* We use char because int might match the return type of a gcc2
7416     builtin and then its argument prototype would still apply.  */
7417 char getspnam();
7418
7419 int main() {
7420 getspnam()
7421 ; return 0; }
7422 EOF
7423 if { (eval echo configure:7424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7424   rm -rf conftest*
7425   eval "ac_cv_lib_$ac_lib_var=yes"
7426 else
7427   echo "configure: failed program was:" >&5
7428   cat conftest.$ac_ext >&5
7429   rm -rf conftest*
7430   eval "ac_cv_lib_$ac_lib_var=no"
7431 fi
7432 rm -f conftest*
7433 LIBS="$ac_save_LIBS"
7434
7435 fi
7436 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7437   echo "$ac_t""yes" 1>&6
7438     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7439     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7440   cat >> confdefs.h <<EOF
7441 #define $ac_tr_lib 1
7442 EOF
7443
7444   LIBS="-lsecurity $LIBS"
7445
7446 else
7447   echo "$ac_t""no" 1>&6
7448 fi
7449  
7450      for ac_func in getspnam
7451 do
7452 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7453 echo "configure:7454: checking for $ac_func" >&5
7454 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7455   echo $ac_n "(cached) $ac_c" 1>&6
7456 else
7457   cat > conftest.$ac_ext <<EOF
7458 #line 7459 "configure"
7459 #include "confdefs.h"
7460 /* System header to define __stub macros and hopefully few prototypes,
7461     which can conflict with char $ac_func(); below.  */
7462 #include <assert.h>
7463 /* Override any gcc2 internal prototype to avoid an error.  */
7464 /* We use char because int might match the return type of a gcc2
7465     builtin and then its argument prototype would still apply.  */
7466 char $ac_func();
7467
7468 int main() {
7469
7470 /* The GNU C library defines this for functions which it implements
7471     to always fail with ENOSYS.  Some functions are actually named
7472     something starting with __ and the normal name is an alias.  */
7473 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7474 choke me
7475 #else
7476 $ac_func();
7477 #endif
7478
7479 ; return 0; }
7480 EOF
7481 if { (eval echo configure:7482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7482   rm -rf conftest*
7483   eval "ac_cv_func_$ac_func=yes"
7484 else
7485   echo "configure: failed program was:" >&5
7486   cat conftest.$ac_ext >&5
7487   rm -rf conftest*
7488   eval "ac_cv_func_$ac_func=no"
7489 fi
7490 rm -f conftest*
7491 fi
7492
7493 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7494   echo "$ac_t""yes" 1>&6
7495     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7496   cat >> confdefs.h <<EOF
7497 #define $ac_tr_func 1
7498 EOF
7499  
7500 else
7501   echo "$ac_t""no" 1>&6
7502 fi
7503 done
7504
7505   ;;
7506   esac
7507
7508 case "$LIBS" in
7509   *-lsec*) for ac_func in getspnam
7510 do
7511 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7512 echo "configure:7513: checking for $ac_func" >&5
7513 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7514   echo $ac_n "(cached) $ac_c" 1>&6
7515 else
7516   cat > conftest.$ac_ext <<EOF
7517 #line 7518 "configure"
7518 #include "confdefs.h"
7519 /* System header to define __stub macros and hopefully few prototypes,
7520     which can conflict with char $ac_func(); below.  */
7521 #include <assert.h>
7522 /* Override any gcc2 internal prototype to avoid an error.  */
7523 /* We use char because int might match the return type of a gcc2
7524     builtin and then its argument prototype would still apply.  */
7525 char $ac_func();
7526
7527 int main() {
7528
7529 /* The GNU C library defines this for functions which it implements
7530     to always fail with ENOSYS.  Some functions are actually named
7531     something starting with __ and the normal name is an alias.  */
7532 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7533 choke me
7534 #else
7535 $ac_func();
7536 #endif
7537
7538 ; return 0; }
7539 EOF
7540 if { (eval echo configure:7541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7541   rm -rf conftest*
7542   eval "ac_cv_func_$ac_func=yes"
7543 else
7544   echo "configure: failed program was:" >&5
7545   cat conftest.$ac_ext >&5
7546   rm -rf conftest*
7547   eval "ac_cv_func_$ac_func=no"
7548 fi
7549 rm -f conftest*
7550 fi
7551
7552 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7553   echo "$ac_t""yes" 1>&6
7554     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7555   cat >> confdefs.h <<EOF
7556 #define $ac_tr_func 1
7557 EOF
7558  
7559 else
7560   echo "$ac_t""no" 1>&6
7561 fi
7562 done
7563  ;;
7564   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7565 echo "configure:7566: checking for getspnam in -lsec" >&5
7566 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7567 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7568   echo $ac_n "(cached) $ac_c" 1>&6
7569 else
7570   ac_save_LIBS="$LIBS"
7571 LIBS="-lsec  $LIBS"
7572 cat > conftest.$ac_ext <<EOF
7573 #line 7574 "configure"
7574 #include "confdefs.h"
7575 /* Override any gcc2 internal prototype to avoid an error.  */
7576 /* We use char because int might match the return type of a gcc2
7577     builtin and then its argument prototype would still apply.  */
7578 char getspnam();
7579
7580 int main() {
7581 getspnam()
7582 ; return 0; }
7583 EOF
7584 if { (eval echo configure:7585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7585   rm -rf conftest*
7586   eval "ac_cv_lib_$ac_lib_var=yes"
7587 else
7588   echo "configure: failed program was:" >&5
7589   cat conftest.$ac_ext >&5
7590   rm -rf conftest*
7591   eval "ac_cv_lib_$ac_lib_var=no"
7592 fi
7593 rm -f conftest*
7594 LIBS="$ac_save_LIBS"
7595
7596 fi
7597 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7598   echo "$ac_t""yes" 1>&6
7599     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7600     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7601   cat >> confdefs.h <<EOF
7602 #define $ac_tr_lib 1
7603 EOF
7604
7605   LIBS="-lsec $LIBS"
7606
7607 else
7608   echo "$ac_t""no" 1>&6
7609 fi
7610  
7611      for ac_func in getspnam
7612 do
7613 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7614 echo "configure:7615: checking for $ac_func" >&5
7615 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7616   echo $ac_n "(cached) $ac_c" 1>&6
7617 else
7618   cat > conftest.$ac_ext <<EOF
7619 #line 7620 "configure"
7620 #include "confdefs.h"
7621 /* System header to define __stub macros and hopefully few prototypes,
7622     which can conflict with char $ac_func(); below.  */
7623 #include <assert.h>
7624 /* Override any gcc2 internal prototype to avoid an error.  */
7625 /* We use char because int might match the return type of a gcc2
7626     builtin and then its argument prototype would still apply.  */
7627 char $ac_func();
7628
7629 int main() {
7630
7631 /* The GNU C library defines this for functions which it implements
7632     to always fail with ENOSYS.  Some functions are actually named
7633     something starting with __ and the normal name is an alias.  */
7634 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7635 choke me
7636 #else
7637 $ac_func();
7638 #endif
7639
7640 ; return 0; }
7641 EOF
7642 if { (eval echo configure:7643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7643   rm -rf conftest*
7644   eval "ac_cv_func_$ac_func=yes"
7645 else
7646   echo "configure: failed program was:" >&5
7647   cat conftest.$ac_ext >&5
7648   rm -rf conftest*
7649   eval "ac_cv_func_$ac_func=no"
7650 fi
7651 rm -f conftest*
7652 fi
7653
7654 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7655   echo "$ac_t""yes" 1>&6
7656     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7657   cat >> confdefs.h <<EOF
7658 #define $ac_tr_func 1
7659 EOF
7660  
7661 else
7662   echo "$ac_t""no" 1>&6
7663 fi
7664 done
7665
7666   ;;
7667   esac
7668
7669
7670 case "$LIBS" in
7671   *-lsecurity*) for ac_func in bigcrypt
7672 do
7673 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7674 echo "configure:7675: checking for $ac_func" >&5
7675 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7676   echo $ac_n "(cached) $ac_c" 1>&6
7677 else
7678   cat > conftest.$ac_ext <<EOF
7679 #line 7680 "configure"
7680 #include "confdefs.h"
7681 /* System header to define __stub macros and hopefully few prototypes,
7682     which can conflict with char $ac_func(); below.  */
7683 #include <assert.h>
7684 /* Override any gcc2 internal prototype to avoid an error.  */
7685 /* We use char because int might match the return type of a gcc2
7686     builtin and then its argument prototype would still apply.  */
7687 char $ac_func();
7688
7689 int main() {
7690
7691 /* The GNU C library defines this for functions which it implements
7692     to always fail with ENOSYS.  Some functions are actually named
7693     something starting with __ and the normal name is an alias.  */
7694 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7695 choke me
7696 #else
7697 $ac_func();
7698 #endif
7699
7700 ; return 0; }
7701 EOF
7702 if { (eval echo configure:7703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7703   rm -rf conftest*
7704   eval "ac_cv_func_$ac_func=yes"
7705 else
7706   echo "configure: failed program was:" >&5
7707   cat conftest.$ac_ext >&5
7708   rm -rf conftest*
7709   eval "ac_cv_func_$ac_func=no"
7710 fi
7711 rm -f conftest*
7712 fi
7713
7714 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7715   echo "$ac_t""yes" 1>&6
7716     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7717   cat >> confdefs.h <<EOF
7718 #define $ac_tr_func 1
7719 EOF
7720  
7721 else
7722   echo "$ac_t""no" 1>&6
7723 fi
7724 done
7725  ;;
7726   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
7727 echo "configure:7728: checking for bigcrypt in -lsecurity" >&5
7728 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
7729 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7730   echo $ac_n "(cached) $ac_c" 1>&6
7731 else
7732   ac_save_LIBS="$LIBS"
7733 LIBS="-lsecurity  $LIBS"
7734 cat > conftest.$ac_ext <<EOF
7735 #line 7736 "configure"
7736 #include "confdefs.h"
7737 /* Override any gcc2 internal prototype to avoid an error.  */
7738 /* We use char because int might match the return type of a gcc2
7739     builtin and then its argument prototype would still apply.  */
7740 char bigcrypt();
7741
7742 int main() {
7743 bigcrypt()
7744 ; return 0; }
7745 EOF
7746 if { (eval echo configure:7747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7747   rm -rf conftest*
7748   eval "ac_cv_lib_$ac_lib_var=yes"
7749 else
7750   echo "configure: failed program was:" >&5
7751   cat conftest.$ac_ext >&5
7752   rm -rf conftest*
7753   eval "ac_cv_lib_$ac_lib_var=no"
7754 fi
7755 rm -f conftest*
7756 LIBS="$ac_save_LIBS"
7757
7758 fi
7759 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7760   echo "$ac_t""yes" 1>&6
7761     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7762     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7763   cat >> confdefs.h <<EOF
7764 #define $ac_tr_lib 1
7765 EOF
7766
7767   LIBS="-lsecurity $LIBS"
7768
7769 else
7770   echo "$ac_t""no" 1>&6
7771 fi
7772  
7773      for ac_func in bigcrypt
7774 do
7775 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7776 echo "configure:7777: checking for $ac_func" >&5
7777 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7778   echo $ac_n "(cached) $ac_c" 1>&6
7779 else
7780   cat > conftest.$ac_ext <<EOF
7781 #line 7782 "configure"
7782 #include "confdefs.h"
7783 /* System header to define __stub macros and hopefully few prototypes,
7784     which can conflict with char $ac_func(); below.  */
7785 #include <assert.h>
7786 /* Override any gcc2 internal prototype to avoid an error.  */
7787 /* We use char because int might match the return type of a gcc2
7788     builtin and then its argument prototype would still apply.  */
7789 char $ac_func();
7790
7791 int main() {
7792
7793 /* The GNU C library defines this for functions which it implements
7794     to always fail with ENOSYS.  Some functions are actually named
7795     something starting with __ and the normal name is an alias.  */
7796 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7797 choke me
7798 #else
7799 $ac_func();
7800 #endif
7801
7802 ; return 0; }
7803 EOF
7804 if { (eval echo configure:7805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7805   rm -rf conftest*
7806   eval "ac_cv_func_$ac_func=yes"
7807 else
7808   echo "configure: failed program was:" >&5
7809   cat conftest.$ac_ext >&5
7810   rm -rf conftest*
7811   eval "ac_cv_func_$ac_func=no"
7812 fi
7813 rm -f conftest*
7814 fi
7815
7816 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7817   echo "$ac_t""yes" 1>&6
7818     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7819   cat >> confdefs.h <<EOF
7820 #define $ac_tr_func 1
7821 EOF
7822  
7823 else
7824   echo "$ac_t""no" 1>&6
7825 fi
7826 done
7827
7828   ;;
7829   esac
7830
7831 case "$LIBS" in
7832   *-lsec*) for ac_func in bigcrypt
7833 do
7834 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7835 echo "configure:7836: checking for $ac_func" >&5
7836 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7837   echo $ac_n "(cached) $ac_c" 1>&6
7838 else
7839   cat > conftest.$ac_ext <<EOF
7840 #line 7841 "configure"
7841 #include "confdefs.h"
7842 /* System header to define __stub macros and hopefully few prototypes,
7843     which can conflict with char $ac_func(); below.  */
7844 #include <assert.h>
7845 /* Override any gcc2 internal prototype to avoid an error.  */
7846 /* We use char because int might match the return type of a gcc2
7847     builtin and then its argument prototype would still apply.  */
7848 char $ac_func();
7849
7850 int main() {
7851
7852 /* The GNU C library defines this for functions which it implements
7853     to always fail with ENOSYS.  Some functions are actually named
7854     something starting with __ and the normal name is an alias.  */
7855 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7856 choke me
7857 #else
7858 $ac_func();
7859 #endif
7860
7861 ; return 0; }
7862 EOF
7863 if { (eval echo configure:7864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7864   rm -rf conftest*
7865   eval "ac_cv_func_$ac_func=yes"
7866 else
7867   echo "configure: failed program was:" >&5
7868   cat conftest.$ac_ext >&5
7869   rm -rf conftest*
7870   eval "ac_cv_func_$ac_func=no"
7871 fi
7872 rm -f conftest*
7873 fi
7874
7875 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7876   echo "$ac_t""yes" 1>&6
7877     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7878   cat >> confdefs.h <<EOF
7879 #define $ac_tr_func 1
7880 EOF
7881  
7882 else
7883   echo "$ac_t""no" 1>&6
7884 fi
7885 done
7886  ;;
7887   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
7888 echo "configure:7889: checking for bigcrypt in -lsec" >&5
7889 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
7890 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7891   echo $ac_n "(cached) $ac_c" 1>&6
7892 else
7893   ac_save_LIBS="$LIBS"
7894 LIBS="-lsec  $LIBS"
7895 cat > conftest.$ac_ext <<EOF
7896 #line 7897 "configure"
7897 #include "confdefs.h"
7898 /* Override any gcc2 internal prototype to avoid an error.  */
7899 /* We use char because int might match the return type of a gcc2
7900     builtin and then its argument prototype would still apply.  */
7901 char bigcrypt();
7902
7903 int main() {
7904 bigcrypt()
7905 ; return 0; }
7906 EOF
7907 if { (eval echo configure:7908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7908   rm -rf conftest*
7909   eval "ac_cv_lib_$ac_lib_var=yes"
7910 else
7911   echo "configure: failed program was:" >&5
7912   cat conftest.$ac_ext >&5
7913   rm -rf conftest*
7914   eval "ac_cv_lib_$ac_lib_var=no"
7915 fi
7916 rm -f conftest*
7917 LIBS="$ac_save_LIBS"
7918
7919 fi
7920 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7921   echo "$ac_t""yes" 1>&6
7922     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7923     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7924   cat >> confdefs.h <<EOF
7925 #define $ac_tr_lib 1
7926 EOF
7927
7928   LIBS="-lsec $LIBS"
7929
7930 else
7931   echo "$ac_t""no" 1>&6
7932 fi
7933  
7934      for ac_func in bigcrypt
7935 do
7936 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7937 echo "configure:7938: checking for $ac_func" >&5
7938 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7939   echo $ac_n "(cached) $ac_c" 1>&6
7940 else
7941   cat > conftest.$ac_ext <<EOF
7942 #line 7943 "configure"
7943 #include "confdefs.h"
7944 /* System header to define __stub macros and hopefully few prototypes,
7945     which can conflict with char $ac_func(); below.  */
7946 #include <assert.h>
7947 /* Override any gcc2 internal prototype to avoid an error.  */
7948 /* We use char because int might match the return type of a gcc2
7949     builtin and then its argument prototype would still apply.  */
7950 char $ac_func();
7951
7952 int main() {
7953
7954 /* The GNU C library defines this for functions which it implements
7955     to always fail with ENOSYS.  Some functions are actually named
7956     something starting with __ and the normal name is an alias.  */
7957 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7958 choke me
7959 #else
7960 $ac_func();
7961 #endif
7962
7963 ; return 0; }
7964 EOF
7965 if { (eval echo configure:7966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7966   rm -rf conftest*
7967   eval "ac_cv_func_$ac_func=yes"
7968 else
7969   echo "configure: failed program was:" >&5
7970   cat conftest.$ac_ext >&5
7971   rm -rf conftest*
7972   eval "ac_cv_func_$ac_func=no"
7973 fi
7974 rm -f conftest*
7975 fi
7976
7977 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7978   echo "$ac_t""yes" 1>&6
7979     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7980   cat >> confdefs.h <<EOF
7981 #define $ac_tr_func 1
7982 EOF
7983  
7984 else
7985   echo "$ac_t""no" 1>&6
7986 fi
7987 done
7988
7989   ;;
7990   esac
7991
7992
7993 case "$LIBS" in
7994   *-lsecurity*) for ac_func in getprpwnam
7995 do
7996 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7997 echo "configure:7998: checking for $ac_func" >&5
7998 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7999   echo $ac_n "(cached) $ac_c" 1>&6
8000 else
8001   cat > conftest.$ac_ext <<EOF
8002 #line 8003 "configure"
8003 #include "confdefs.h"
8004 /* System header to define __stub macros and hopefully few prototypes,
8005     which can conflict with char $ac_func(); below.  */
8006 #include <assert.h>
8007 /* Override any gcc2 internal prototype to avoid an error.  */
8008 /* We use char because int might match the return type of a gcc2
8009     builtin and then its argument prototype would still apply.  */
8010 char $ac_func();
8011
8012 int main() {
8013
8014 /* The GNU C library defines this for functions which it implements
8015     to always fail with ENOSYS.  Some functions are actually named
8016     something starting with __ and the normal name is an alias.  */
8017 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8018 choke me
8019 #else
8020 $ac_func();
8021 #endif
8022
8023 ; return 0; }
8024 EOF
8025 if { (eval echo configure:8026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8026   rm -rf conftest*
8027   eval "ac_cv_func_$ac_func=yes"
8028 else
8029   echo "configure: failed program was:" >&5
8030   cat conftest.$ac_ext >&5
8031   rm -rf conftest*
8032   eval "ac_cv_func_$ac_func=no"
8033 fi
8034 rm -f conftest*
8035 fi
8036
8037 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8038   echo "$ac_t""yes" 1>&6
8039     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8040   cat >> confdefs.h <<EOF
8041 #define $ac_tr_func 1
8042 EOF
8043  
8044 else
8045   echo "$ac_t""no" 1>&6
8046 fi
8047 done
8048  ;;
8049   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8050 echo "configure:8051: checking for getprpwnam in -lsecurity" >&5
8051 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8052 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8053   echo $ac_n "(cached) $ac_c" 1>&6
8054 else
8055   ac_save_LIBS="$LIBS"
8056 LIBS="-lsecurity  $LIBS"
8057 cat > conftest.$ac_ext <<EOF
8058 #line 8059 "configure"
8059 #include "confdefs.h"
8060 /* Override any gcc2 internal prototype to avoid an error.  */
8061 /* We use char because int might match the return type of a gcc2
8062     builtin and then its argument prototype would still apply.  */
8063 char getprpwnam();
8064
8065 int main() {
8066 getprpwnam()
8067 ; return 0; }
8068 EOF
8069 if { (eval echo configure:8070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8070   rm -rf conftest*
8071   eval "ac_cv_lib_$ac_lib_var=yes"
8072 else
8073   echo "configure: failed program was:" >&5
8074   cat conftest.$ac_ext >&5
8075   rm -rf conftest*
8076   eval "ac_cv_lib_$ac_lib_var=no"
8077 fi
8078 rm -f conftest*
8079 LIBS="$ac_save_LIBS"
8080
8081 fi
8082 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8083   echo "$ac_t""yes" 1>&6
8084     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8085     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8086   cat >> confdefs.h <<EOF
8087 #define $ac_tr_lib 1
8088 EOF
8089
8090   LIBS="-lsecurity $LIBS"
8091
8092 else
8093   echo "$ac_t""no" 1>&6
8094 fi
8095  
8096      for ac_func in getprpwnam
8097 do
8098 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8099 echo "configure:8100: checking for $ac_func" >&5
8100 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8101   echo $ac_n "(cached) $ac_c" 1>&6
8102 else
8103   cat > conftest.$ac_ext <<EOF
8104 #line 8105 "configure"
8105 #include "confdefs.h"
8106 /* System header to define __stub macros and hopefully few prototypes,
8107     which can conflict with char $ac_func(); below.  */
8108 #include <assert.h>
8109 /* Override any gcc2 internal prototype to avoid an error.  */
8110 /* We use char because int might match the return type of a gcc2
8111     builtin and then its argument prototype would still apply.  */
8112 char $ac_func();
8113
8114 int main() {
8115
8116 /* The GNU C library defines this for functions which it implements
8117     to always fail with ENOSYS.  Some functions are actually named
8118     something starting with __ and the normal name is an alias.  */
8119 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8120 choke me
8121 #else
8122 $ac_func();
8123 #endif
8124
8125 ; return 0; }
8126 EOF
8127 if { (eval echo configure:8128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8128   rm -rf conftest*
8129   eval "ac_cv_func_$ac_func=yes"
8130 else
8131   echo "configure: failed program was:" >&5
8132   cat conftest.$ac_ext >&5
8133   rm -rf conftest*
8134   eval "ac_cv_func_$ac_func=no"
8135 fi
8136 rm -f conftest*
8137 fi
8138
8139 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8140   echo "$ac_t""yes" 1>&6
8141     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8142   cat >> confdefs.h <<EOF
8143 #define $ac_tr_func 1
8144 EOF
8145  
8146 else
8147   echo "$ac_t""no" 1>&6
8148 fi
8149 done
8150
8151   ;;
8152   esac
8153
8154 case "$LIBS" in
8155   *-lsec*) for ac_func in getprpwnam
8156 do
8157 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8158 echo "configure:8159: checking for $ac_func" >&5
8159 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8160   echo $ac_n "(cached) $ac_c" 1>&6
8161 else
8162   cat > conftest.$ac_ext <<EOF
8163 #line 8164 "configure"
8164 #include "confdefs.h"
8165 /* System header to define __stub macros and hopefully few prototypes,
8166     which can conflict with char $ac_func(); below.  */
8167 #include <assert.h>
8168 /* Override any gcc2 internal prototype to avoid an error.  */
8169 /* We use char because int might match the return type of a gcc2
8170     builtin and then its argument prototype would still apply.  */
8171 char $ac_func();
8172
8173 int main() {
8174
8175 /* The GNU C library defines this for functions which it implements
8176     to always fail with ENOSYS.  Some functions are actually named
8177     something starting with __ and the normal name is an alias.  */
8178 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8179 choke me
8180 #else
8181 $ac_func();
8182 #endif
8183
8184 ; return 0; }
8185 EOF
8186 if { (eval echo configure:8187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8187   rm -rf conftest*
8188   eval "ac_cv_func_$ac_func=yes"
8189 else
8190   echo "configure: failed program was:" >&5
8191   cat conftest.$ac_ext >&5
8192   rm -rf conftest*
8193   eval "ac_cv_func_$ac_func=no"
8194 fi
8195 rm -f conftest*
8196 fi
8197
8198 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8199   echo "$ac_t""yes" 1>&6
8200     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8201   cat >> confdefs.h <<EOF
8202 #define $ac_tr_func 1
8203 EOF
8204  
8205 else
8206   echo "$ac_t""no" 1>&6
8207 fi
8208 done
8209  ;;
8210   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8211 echo "configure:8212: checking for getprpwnam in -lsec" >&5
8212 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8213 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8214   echo $ac_n "(cached) $ac_c" 1>&6
8215 else
8216   ac_save_LIBS="$LIBS"
8217 LIBS="-lsec  $LIBS"
8218 cat > conftest.$ac_ext <<EOF
8219 #line 8220 "configure"
8220 #include "confdefs.h"
8221 /* Override any gcc2 internal prototype to avoid an error.  */
8222 /* We use char because int might match the return type of a gcc2
8223     builtin and then its argument prototype would still apply.  */
8224 char getprpwnam();
8225
8226 int main() {
8227 getprpwnam()
8228 ; return 0; }
8229 EOF
8230 if { (eval echo configure:8231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8231   rm -rf conftest*
8232   eval "ac_cv_lib_$ac_lib_var=yes"
8233 else
8234   echo "configure: failed program was:" >&5
8235   cat conftest.$ac_ext >&5
8236   rm -rf conftest*
8237   eval "ac_cv_lib_$ac_lib_var=no"
8238 fi
8239 rm -f conftest*
8240 LIBS="$ac_save_LIBS"
8241
8242 fi
8243 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8244   echo "$ac_t""yes" 1>&6
8245     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8246     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8247   cat >> confdefs.h <<EOF
8248 #define $ac_tr_lib 1
8249 EOF
8250
8251   LIBS="-lsec $LIBS"
8252
8253 else
8254   echo "$ac_t""no" 1>&6
8255 fi
8256  
8257      for ac_func in getprpwnam
8258 do
8259 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8260 echo "configure:8261: checking for $ac_func" >&5
8261 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8262   echo $ac_n "(cached) $ac_c" 1>&6
8263 else
8264   cat > conftest.$ac_ext <<EOF
8265 #line 8266 "configure"
8266 #include "confdefs.h"
8267 /* System header to define __stub macros and hopefully few prototypes,
8268     which can conflict with char $ac_func(); below.  */
8269 #include <assert.h>
8270 /* Override any gcc2 internal prototype to avoid an error.  */
8271 /* We use char because int might match the return type of a gcc2
8272     builtin and then its argument prototype would still apply.  */
8273 char $ac_func();
8274
8275 int main() {
8276
8277 /* The GNU C library defines this for functions which it implements
8278     to always fail with ENOSYS.  Some functions are actually named
8279     something starting with __ and the normal name is an alias.  */
8280 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8281 choke me
8282 #else
8283 $ac_func();
8284 #endif
8285
8286 ; return 0; }
8287 EOF
8288 if { (eval echo configure:8289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8289   rm -rf conftest*
8290   eval "ac_cv_func_$ac_func=yes"
8291 else
8292   echo "configure: failed program was:" >&5
8293   cat conftest.$ac_ext >&5
8294   rm -rf conftest*
8295   eval "ac_cv_func_$ac_func=no"
8296 fi
8297 rm -f conftest*
8298 fi
8299
8300 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8301   echo "$ac_t""yes" 1>&6
8302     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8303   cat >> confdefs.h <<EOF
8304 #define $ac_tr_func 1
8305 EOF
8306  
8307 else
8308   echo "$ac_t""no" 1>&6
8309 fi
8310 done
8311
8312   ;;
8313   esac
8314
8315
8316 # this bit needs to be modified for each OS that is suported by
8317 # smbwrapper. You need to specify how to created a shared library and
8318 # how to compile C code to produce PIC object files
8319
8320 # these are the defaults, good for lots of systems
8321 HOST_OS="$host_os"
8322 LDSHFLAGS="-shared"
8323 SHLD="\${CC}"
8324 PICFLAG=""
8325 PICSUFFIX="po"
8326 POBAD_CC="#"
8327 SHLIBEXT="so"
8328 BLDSHARED="false"
8329
8330 # and these are for particular systems
8331 case "$host_os" in
8332                 *linux*)   cat >> confdefs.h <<\EOF
8333 #define LINUX 1
8334 EOF
8335
8336                         BLDSHARED="true"
8337                         LDSHFLAGS="-shared" 
8338                         PICFLAG="-fPIC"
8339                 ;;
8340                 *solaris*) cat >> confdefs.h <<\EOF
8341 #define SUNOS5 1
8342 EOF
8343
8344                         BLDSHARED="true"
8345                         LDSHFLAGS="-Wl,-h,\$@.so -G"
8346                         if test "${ac_cv_prog_CC}" = "gcc"; then
8347                                 PICFLAG="-fPIC"
8348                         else
8349                                 PICFLAG="-KPIC"
8350                                 POBAD_CC=""
8351                                 PICSUFFIX="po.o"
8352                         fi
8353                 ;;
8354                 *sunos*) cat >> confdefs.h <<\EOF
8355 #define SUNOS4 1
8356 EOF
8357
8358                         BLDSHARED="true"
8359                         LDSHFLAGS="-Wl,-h,\$@ -G"
8360                         PICFLAG="-KPIC"   # Is this correct for SunOS
8361                 ;;
8362                 *bsd*)  BLDSHARED="true"
8363                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8364                         PICFLAG="-fPIC"
8365                 ;;
8366                 *irix*) cat >> confdefs.h <<\EOF
8367 #define IRIX 1
8368 EOF
8369
8370                         case "$host_os" in
8371                         *irix6*) cat >> confdefs.h <<\EOF
8372 #define IRIX6 1
8373 EOF
8374
8375                         ;;
8376                         esac
8377                         ATTEMPT_WRAP32_BUILD=yes
8378                         BLDSHARED="true"
8379                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8380                         if test "${ac_cv_prog_CC}" = "gcc"; then
8381                                 PICFLAG="-fPIC"
8382                         else 
8383                                 PICFLAG="-KPIC"
8384                         fi
8385                 ;;
8386                 *aix*) cat >> confdefs.h <<\EOF
8387 #define AIX 1
8388 EOF
8389
8390                         BLDSHARED="true"
8391                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8392                         PICFLAG="-O2 -qmaxmem=6000"
8393                 ;;
8394                 *hpux*) cat >> confdefs.h <<\EOF
8395 #define HPUX 1
8396 EOF
8397
8398                         SHLIBEXT="sl"
8399                         # Use special PIC flags for the native HP-UX compiler.
8400                         if test $ac_cv_prog_cc_Ae = yes; then
8401                                 #BLDSHARED="true"
8402                                 LDSHFLAGS="-b -z +h \$@"
8403                                 PICFLAG="+z"
8404                         fi
8405                 ;;
8406                 *qnx*) cat >> confdefs.h <<\EOF
8407 #define QNX 1
8408 EOF
8409 ;;
8410                 *osf*) cat >> confdefs.h <<\EOF
8411 #define OSF1 1
8412 EOF
8413
8414                         BLDSHARED="true"
8415                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8416                         PICFLAG="-fPIC"
8417                 ;;
8418                 *sco*) cat >> confdefs.h <<\EOF
8419 #define SCO 1
8420 EOF
8421 ;;
8422                 *unixware*) cat >> confdefs.h <<\EOF
8423 #define UNIXWARE 1
8424 EOF
8425
8426                         BLDSHARED="true"
8427                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8428                         PICFLAG="-KPIC"
8429                 ;;
8430                 *next2*) cat >> confdefs.h <<\EOF
8431 #define NEXT2 1
8432 EOF
8433 ;;
8434                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8435 set dummy groff; ac_word=$2
8436 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8437 echo "configure:8438: checking for $ac_word" >&5
8438 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8439   echo $ac_n "(cached) $ac_c" 1>&6
8440 else
8441   if test -n "$ROFF"; then
8442   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8443 else
8444   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8445   ac_dummy="$PATH"
8446   for ac_dir in $ac_dummy; do
8447     test -z "$ac_dir" && ac_dir=.
8448     if test -f $ac_dir/$ac_word; then
8449       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8450       break
8451     fi
8452   done
8453   IFS="$ac_save_ifs"
8454 fi
8455 fi
8456 ROFF="$ac_cv_prog_ROFF"
8457 if test -n "$ROFF"; then
8458   echo "$ac_t""$ROFF" 1>&6
8459 else
8460   echo "$ac_t""no" 1>&6
8461 fi
8462 ;;
8463                 *sysv4*)
8464                         case "$host" in
8465                                 *-univel-*)     if  test "$GCC" != yes ; then
8466                                                                         cat >> confdefs.h <<\EOF
8467 #define HAVE_MEMSET 1
8468 EOF
8469
8470                                                                 fi
8471                                                                 LDSHFLAGS="-G"
8472                                 ;;
8473                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
8474 #define RELIANTUNIX 1
8475 EOF
8476 ;;
8477                         esac
8478                         ;;
8479                 *sysv5*)
8480                         if  test "$GCC" != yes ; then
8481                                 cat >> confdefs.h <<\EOF
8482 #define HAVE_MEMSET 1
8483 EOF
8484
8485                         fi
8486                         LDSHFLAGS="-G"
8487                         ;;
8488 esac
8489
8490 ################
8491
8492 echo $ac_n "checking for long long""... $ac_c" 1>&6
8493 echo "configure:8494: checking for long long" >&5
8494 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8495   echo $ac_n "(cached) $ac_c" 1>&6
8496 else
8497   
8498 if test "$cross_compiling" = yes; then
8499   samba_cv_have_longlong=cross
8500 else
8501   cat > conftest.$ac_ext <<EOF
8502 #line 8503 "configure"
8503 #include "confdefs.h"
8504 #include <stdio.h>
8505 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8506 EOF
8507 if { (eval echo configure:8508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8508 then
8509   samba_cv_have_longlong=yes
8510 else
8511   echo "configure: failed program was:" >&5
8512   cat conftest.$ac_ext >&5
8513   rm -fr conftest*
8514   samba_cv_have_longlong=no
8515 fi
8516 rm -fr conftest*
8517 fi
8518
8519 fi
8520
8521 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8522 if test x"$samba_cv_have_longlong" = x"yes"; then
8523     cat >> confdefs.h <<\EOF
8524 #define HAVE_LONGLONG 1
8525 EOF
8526
8527 fi
8528
8529 #
8530 # Check if the compiler supports the LL prefix on long long integers.
8531 # AIX needs this.
8532
8533 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8534 echo "configure:8535: checking for LL suffix on long long integers" >&5
8535 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8536   echo $ac_n "(cached) $ac_c" 1>&6
8537 else
8538   
8539     cat > conftest.$ac_ext <<EOF
8540 #line 8541 "configure"
8541 #include "confdefs.h"
8542 #include <stdio.h>
8543 int main() {
8544 long long i = 0x8000000000LL
8545 ; return 0; }
8546 EOF
8547 if { (eval echo configure:8548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8548   rm -rf conftest*
8549   samba_cv_compiler_supports_ll=yes
8550 else
8551   echo "configure: failed program was:" >&5
8552   cat conftest.$ac_ext >&5
8553   rm -rf conftest*
8554   samba_cv_compiler_supports_ll=no
8555 fi
8556 rm -f conftest*
8557 fi
8558
8559 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8560 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8561    cat >> confdefs.h <<\EOF
8562 #define COMPILER_SUPPORTS_LL 1
8563 EOF
8564
8565 fi
8566
8567   
8568 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8569 echo "configure:8570: checking for 64 bit off_t" >&5
8570 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8571   echo $ac_n "(cached) $ac_c" 1>&6
8572 else
8573   
8574 if test "$cross_compiling" = yes; then
8575   samba_cv_SIZEOF_OFF_T=cross
8576 else
8577   cat > conftest.$ac_ext <<EOF
8578 #line 8579 "configure"
8579 #include "confdefs.h"
8580 #include <stdio.h>
8581 #include <sys/stat.h>
8582 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8583 EOF
8584 if { (eval echo configure:8585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8585 then
8586   samba_cv_SIZEOF_OFF_T=yes
8587 else
8588   echo "configure: failed program was:" >&5
8589   cat conftest.$ac_ext >&5
8590   rm -fr conftest*
8591   samba_cv_SIZEOF_OFF_T=no
8592 fi
8593 rm -fr conftest*
8594 fi
8595
8596 fi
8597
8598 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8599 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8600     cat >> confdefs.h <<\EOF
8601 #define SIZEOF_OFF_T 8
8602 EOF
8603
8604 fi
8605
8606 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8607 echo "configure:8608: checking for off64_t" >&5
8608 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8609   echo $ac_n "(cached) $ac_c" 1>&6
8610 else
8611   
8612 if test "$cross_compiling" = yes; then
8613   samba_cv_HAVE_OFF64_T=cross
8614 else
8615   cat > conftest.$ac_ext <<EOF
8616 #line 8617 "configure"
8617 #include "confdefs.h"
8618
8619 #if defined(HAVE_UNISTD_H)
8620 #include <unistd.h>
8621 #endif
8622 #include <stdio.h>
8623 #include <sys/stat.h>
8624 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8625 EOF
8626 if { (eval echo configure:8627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8627 then
8628   samba_cv_HAVE_OFF64_T=yes
8629 else
8630   echo "configure: failed program was:" >&5
8631   cat conftest.$ac_ext >&5
8632   rm -fr conftest*
8633   samba_cv_HAVE_OFF64_T=no
8634 fi
8635 rm -fr conftest*
8636 fi
8637
8638 fi
8639
8640 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8641 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8642     cat >> confdefs.h <<\EOF
8643 #define HAVE_OFF64_T 1
8644 EOF
8645
8646 fi
8647
8648 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8649 echo "configure:8650: checking for 64 bit ino_t" >&5
8650 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8651   echo $ac_n "(cached) $ac_c" 1>&6
8652 else
8653   
8654 if test "$cross_compiling" = yes; then
8655   samba_cv_SIZEOF_INO_T=cross
8656 else
8657   cat > conftest.$ac_ext <<EOF
8658 #line 8659 "configure"
8659 #include "confdefs.h"
8660 #include <stdio.h>
8661 #include <sys/stat.h>
8662 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8663 EOF
8664 if { (eval echo configure:8665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8665 then
8666   samba_cv_SIZEOF_INO_T=yes
8667 else
8668   echo "configure: failed program was:" >&5
8669   cat conftest.$ac_ext >&5
8670   rm -fr conftest*
8671   samba_cv_SIZEOF_INO_T=no
8672 fi
8673 rm -fr conftest*
8674 fi
8675
8676 fi
8677
8678 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8679 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8680     cat >> confdefs.h <<\EOF
8681 #define SIZEOF_INO_T 8
8682 EOF
8683
8684 fi
8685
8686 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
8687 echo "configure:8688: checking for ino64_t" >&5
8688 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
8689   echo $ac_n "(cached) $ac_c" 1>&6
8690 else
8691   
8692 if test "$cross_compiling" = yes; then
8693   samba_cv_HAVE_INO64_T=cross
8694 else
8695   cat > conftest.$ac_ext <<EOF
8696 #line 8697 "configure"
8697 #include "confdefs.h"
8698
8699 #if defined(HAVE_UNISTD_H)
8700 #include <unistd.h>
8701 #endif
8702 #include <stdio.h>
8703 #include <sys/stat.h>
8704 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8705 EOF
8706 if { (eval echo configure:8707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8707 then
8708   samba_cv_HAVE_INO64_T=yes
8709 else
8710   echo "configure: failed program was:" >&5
8711   cat conftest.$ac_ext >&5
8712   rm -fr conftest*
8713   samba_cv_HAVE_INO64_T=no
8714 fi
8715 rm -fr conftest*
8716 fi
8717
8718 fi
8719
8720 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
8721 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
8722     cat >> confdefs.h <<\EOF
8723 #define HAVE_INO64_T 1
8724 EOF
8725
8726 fi
8727
8728 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
8729 echo "configure:8730: checking for struct dirent64" >&5
8730 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
8731   echo $ac_n "(cached) $ac_c" 1>&6
8732 else
8733   
8734 cat > conftest.$ac_ext <<EOF
8735 #line 8736 "configure"
8736 #include "confdefs.h"
8737
8738 #if defined(HAVE_UNISTD_H)
8739 #include <unistd.h>
8740 #endif
8741 #include <sys/types.h>
8742 #include <dirent.h>
8743 int main() {
8744 struct dirent64 de;
8745 ; return 0; }
8746 EOF
8747 if { (eval echo configure:8748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8748   rm -rf conftest*
8749   samba_cv_HAVE_STRUCT_DIRENT64=yes
8750 else
8751   echo "configure: failed program was:" >&5
8752   cat conftest.$ac_ext >&5
8753   rm -rf conftest*
8754   samba_cv_HAVE_STRUCT_DIRENT64=no
8755 fi
8756 rm -f conftest*
8757 fi
8758
8759 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
8760 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
8761     cat >> confdefs.h <<\EOF
8762 #define HAVE_STRUCT_DIRENT64 1
8763 EOF
8764
8765 fi
8766
8767 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
8768 echo "configure:8769: checking for unsigned char" >&5
8769 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
8770   echo $ac_n "(cached) $ac_c" 1>&6
8771 else
8772   
8773 if test "$cross_compiling" = yes; then
8774   samba_cv_HAVE_UNSIGNED_CHAR=cross
8775 else
8776   cat > conftest.$ac_ext <<EOF
8777 #line 8778 "configure"
8778 #include "confdefs.h"
8779 #include <stdio.h>
8780 main() { char c; c=250; exit((c > 0)?0:1); }
8781 EOF
8782 if { (eval echo configure:8783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8783 then
8784   samba_cv_HAVE_UNSIGNED_CHAR=yes
8785 else
8786   echo "configure: failed program was:" >&5
8787   cat conftest.$ac_ext >&5
8788   rm -fr conftest*
8789   samba_cv_HAVE_UNSIGNED_CHAR=no
8790 fi
8791 rm -fr conftest*
8792 fi
8793
8794 fi
8795
8796 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
8797 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
8798     cat >> confdefs.h <<\EOF
8799 #define HAVE_UNSIGNED_CHAR 1
8800 EOF
8801
8802 fi
8803
8804 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
8805 echo "configure:8806: checking for sin_len in sock" >&5
8806 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
8807   echo $ac_n "(cached) $ac_c" 1>&6
8808 else
8809   
8810 cat > conftest.$ac_ext <<EOF
8811 #line 8812 "configure"
8812 #include "confdefs.h"
8813 #include <sys/types.h>
8814 #include <sys/socket.h>
8815 #include <netinet/in.h>
8816 int main() {
8817 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
8818 ; return 0; }
8819 EOF
8820 if { (eval echo configure:8821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8821   rm -rf conftest*
8822   samba_cv_HAVE_SOCK_SIN_LEN=yes
8823 else
8824   echo "configure: failed program was:" >&5
8825   cat conftest.$ac_ext >&5
8826   rm -rf conftest*
8827   samba_cv_HAVE_SOCK_SIN_LEN=no
8828 fi
8829 rm -f conftest*
8830 fi
8831
8832 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
8833 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
8834     cat >> confdefs.h <<\EOF
8835 #define HAVE_SOCK_SIN_LEN 1
8836 EOF
8837
8838 fi
8839
8840 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
8841 echo "configure:8842: checking whether seekdir returns void" >&5
8842 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
8843   echo $ac_n "(cached) $ac_c" 1>&6
8844 else
8845   
8846 cat > conftest.$ac_ext <<EOF
8847 #line 8848 "configure"
8848 #include "confdefs.h"
8849 #include <sys/types.h>
8850 #include <dirent.h>
8851 void seekdir(DIR *d, long loc) { return; }
8852 int main() {
8853 return 0;
8854 ; return 0; }
8855 EOF
8856 if { (eval echo configure:8857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8857   rm -rf conftest*
8858   samba_cv_SEEKDIR_RETURNS_VOID=yes
8859 else
8860   echo "configure: failed program was:" >&5
8861   cat conftest.$ac_ext >&5
8862   rm -rf conftest*
8863   samba_cv_SEEKDIR_RETURNS_VOID=no
8864 fi
8865 rm -f conftest*
8866 fi
8867
8868 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
8869 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
8870     cat >> confdefs.h <<\EOF
8871 #define SEEKDIR_RETURNS_VOID 1
8872 EOF
8873
8874 fi
8875
8876 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
8877 echo "configure:8878: checking for __FILE__ macro" >&5
8878 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
8879   echo $ac_n "(cached) $ac_c" 1>&6
8880 else
8881   
8882 cat > conftest.$ac_ext <<EOF
8883 #line 8884 "configure"
8884 #include "confdefs.h"
8885 #include <stdio.h>
8886 int main() {
8887 printf("%s\n", __FILE__);
8888 ; return 0; }
8889 EOF
8890 if { (eval echo configure:8891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8891   rm -rf conftest*
8892   samba_cv_HAVE_FILE_MACRO=yes
8893 else
8894   echo "configure: failed program was:" >&5
8895   cat conftest.$ac_ext >&5
8896   rm -rf conftest*
8897   samba_cv_HAVE_FILE_MACRO=no
8898 fi
8899 rm -f conftest*
8900 fi
8901
8902 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
8903 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
8904     cat >> confdefs.h <<\EOF
8905 #define HAVE_FILE_MACRO 1
8906 EOF
8907
8908 fi
8909
8910 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
8911 echo "configure:8912: checking for __FUNCTION__ macro" >&5
8912 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
8913   echo $ac_n "(cached) $ac_c" 1>&6
8914 else
8915   
8916 cat > conftest.$ac_ext <<EOF
8917 #line 8918 "configure"
8918 #include "confdefs.h"
8919 #include <stdio.h>
8920 int main() {
8921 printf("%s\n", __FUNCTION__);
8922 ; return 0; }
8923 EOF
8924 if { (eval echo configure:8925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8925   rm -rf conftest*
8926   samba_cv_HAVE_FUNCTION_MACRO=yes
8927 else
8928   echo "configure: failed program was:" >&5
8929   cat conftest.$ac_ext >&5
8930   rm -rf conftest*
8931   samba_cv_HAVE_FUNCTION_MACRO=no
8932 fi
8933 rm -f conftest*
8934 fi
8935
8936 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
8937 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
8938     cat >> confdefs.h <<\EOF
8939 #define HAVE_FUNCTION_MACRO 1
8940 EOF
8941
8942 fi
8943
8944 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
8945 echo "configure:8946: checking if gettimeofday takes tz argument" >&5
8946 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
8947   echo $ac_n "(cached) $ac_c" 1>&6
8948 else
8949   
8950 if test "$cross_compiling" = yes; then
8951   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
8952 else
8953   cat > conftest.$ac_ext <<EOF
8954 #line 8955 "configure"
8955 #include "confdefs.h"
8956
8957 #include <sys/time.h>
8958 #include <unistd.h>
8959 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
8960 EOF
8961 if { (eval echo configure:8962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8962 then
8963   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
8964 else
8965   echo "configure: failed program was:" >&5
8966   cat conftest.$ac_ext >&5
8967   rm -fr conftest*
8968   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
8969 fi
8970 rm -fr conftest*
8971 fi
8972
8973 fi
8974
8975 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
8976 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
8977     cat >> confdefs.h <<\EOF
8978 #define HAVE_GETTIMEOFDAY_TZ 1
8979 EOF
8980
8981 fi
8982
8983 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
8984 echo "configure:8985: checking for C99 vsnprintf" >&5
8985 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
8986   echo $ac_n "(cached) $ac_c" 1>&6
8987 else
8988   
8989 if test "$cross_compiling" = yes; then
8990   samba_cv_HAVE_C99_VSNPRINTF=cross
8991 else
8992   cat > conftest.$ac_ext <<EOF
8993 #line 8994 "configure"
8994 #include "confdefs.h"
8995
8996 #include <sys/types.h>
8997 #include <stdarg.h>
8998 void foo(const char *format, ...) { 
8999        va_list ap;
9000        int len;
9001        char buf[5];
9002
9003        va_start(ap, format);
9004        len = vsnprintf(0, 0, format, ap);
9005        va_end(ap);
9006        if (len != 5) exit(1);
9007
9008        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9009
9010        exit(0);
9011 }
9012 main() { foo("hello"); }
9013
9014 EOF
9015 if { (eval echo configure:9016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9016 then
9017   samba_cv_HAVE_C99_VSNPRINTF=yes
9018 else
9019   echo "configure: failed program was:" >&5
9020   cat conftest.$ac_ext >&5
9021   rm -fr conftest*
9022   samba_cv_HAVE_C99_VSNPRINTF=no
9023 fi
9024 rm -fr conftest*
9025 fi
9026
9027 fi
9028
9029 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9030 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9031     cat >> confdefs.h <<\EOF
9032 #define HAVE_C99_VSNPRINTF 1
9033 EOF
9034
9035 fi
9036
9037 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9038 echo "configure:9039: checking for broken readdir" >&5
9039 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9040   echo $ac_n "(cached) $ac_c" 1>&6
9041 else
9042   
9043 if test "$cross_compiling" = yes; then
9044   samba_cv_HAVE_BROKEN_READDIR=cross
9045 else
9046   cat > conftest.$ac_ext <<EOF
9047 #line 9048 "configure"
9048 #include "confdefs.h"
9049 #include <sys/types.h>
9050 #include <dirent.h>
9051 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9052 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9053 di->d_name[0] == 0) exit(0); exit(1);} 
9054 EOF
9055 if { (eval echo configure:9056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9056 then
9057   samba_cv_HAVE_BROKEN_READDIR=yes
9058 else
9059   echo "configure: failed program was:" >&5
9060   cat conftest.$ac_ext >&5
9061   rm -fr conftest*
9062   samba_cv_HAVE_BROKEN_READDIR=no
9063 fi
9064 rm -fr conftest*
9065 fi
9066
9067 fi
9068
9069 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9070 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9071     cat >> confdefs.h <<\EOF
9072 #define HAVE_BROKEN_READDIR 1
9073 EOF
9074
9075 fi
9076
9077 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9078 echo "configure:9079: checking for utimbuf" >&5
9079 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9080   echo $ac_n "(cached) $ac_c" 1>&6
9081 else
9082   
9083 cat > conftest.$ac_ext <<EOF
9084 #line 9085 "configure"
9085 #include "confdefs.h"
9086 #include <sys/types.h>
9087 #include <utime.h>
9088 int main() {
9089 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9090 ; return 0; }
9091 EOF
9092 if { (eval echo configure:9093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9093   rm -rf conftest*
9094   samba_cv_HAVE_UTIMBUF=yes
9095 else
9096   echo "configure: failed program was:" >&5
9097   cat conftest.$ac_ext >&5
9098   rm -rf conftest*
9099   samba_cv_HAVE_UTIMBUF=no
9100 fi
9101 rm -f conftest*
9102 fi
9103
9104 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9105 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9106     cat >> confdefs.h <<\EOF
9107 #define HAVE_UTIMBUF 1
9108 EOF
9109
9110 fi
9111
9112
9113 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9114 do
9115 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9116 echo "configure:9117: checking for $ac_func" >&5
9117 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9118   echo $ac_n "(cached) $ac_c" 1>&6
9119 else
9120   cat > conftest.$ac_ext <<EOF
9121 #line 9122 "configure"
9122 #include "confdefs.h"
9123 /* System header to define __stub macros and hopefully few prototypes,
9124     which can conflict with char $ac_func(); below.  */
9125 #include <assert.h>
9126 /* Override any gcc2 internal prototype to avoid an error.  */
9127 /* We use char because int might match the return type of a gcc2
9128     builtin and then its argument prototype would still apply.  */
9129 char $ac_func();
9130
9131 int main() {
9132
9133 /* The GNU C library defines this for functions which it implements
9134     to always fail with ENOSYS.  Some functions are actually named
9135     something starting with __ and the normal name is an alias.  */
9136 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9137 choke me
9138 #else
9139 $ac_func();
9140 #endif
9141
9142 ; return 0; }
9143 EOF
9144 if { (eval echo configure:9145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9145   rm -rf conftest*
9146   eval "ac_cv_func_$ac_func=yes"
9147 else
9148   echo "configure: failed program was:" >&5
9149   cat conftest.$ac_ext >&5
9150   rm -rf conftest*
9151   eval "ac_cv_func_$ac_func=no"
9152 fi
9153 rm -f conftest*
9154 fi
9155
9156 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9157   echo "$ac_t""yes" 1>&6
9158     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9159   cat >> confdefs.h <<EOF
9160 #define $ac_tr_func 1
9161 EOF
9162  
9163 else
9164   echo "$ac_t""no" 1>&6
9165 fi
9166 done
9167
9168
9169 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9170 echo "configure:9171: checking for ut_name in utmp" >&5
9171 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9172   echo $ac_n "(cached) $ac_c" 1>&6
9173 else
9174   
9175 cat > conftest.$ac_ext <<EOF
9176 #line 9177 "configure"
9177 #include "confdefs.h"
9178 #include <sys/types.h>
9179 #include <utmp.h>
9180 int main() {
9181 struct utmp ut;  ut.ut_name[0] = 'a';
9182 ; return 0; }
9183 EOF
9184 if { (eval echo configure:9185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9185   rm -rf conftest*
9186   samba_cv_HAVE_UT_UT_NAME=yes
9187 else
9188   echo "configure: failed program was:" >&5
9189   cat conftest.$ac_ext >&5
9190   rm -rf conftest*
9191   samba_cv_HAVE_UT_UT_NAME=no
9192 fi
9193 rm -f conftest*
9194 fi
9195
9196 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9197 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9198     cat >> confdefs.h <<\EOF
9199 #define HAVE_UT_UT_NAME 1
9200 EOF
9201
9202 fi 
9203
9204 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9205 echo "configure:9206: checking for ut_user in utmp" >&5
9206 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9207   echo $ac_n "(cached) $ac_c" 1>&6
9208 else
9209   
9210 cat > conftest.$ac_ext <<EOF
9211 #line 9212 "configure"
9212 #include "confdefs.h"
9213 #include <sys/types.h>
9214 #include <utmp.h>
9215 int main() {
9216 struct utmp ut;  ut.ut_user[0] = 'a';
9217 ; return 0; }
9218 EOF
9219 if { (eval echo configure:9220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9220   rm -rf conftest*
9221   samba_cv_HAVE_UT_UT_USER=yes
9222 else
9223   echo "configure: failed program was:" >&5
9224   cat conftest.$ac_ext >&5
9225   rm -rf conftest*
9226   samba_cv_HAVE_UT_UT_USER=no
9227 fi
9228 rm -f conftest*
9229 fi
9230
9231 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9232 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9233     cat >> confdefs.h <<\EOF
9234 #define HAVE_UT_UT_USER 1
9235 EOF
9236
9237 fi 
9238
9239 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9240 echo "configure:9241: checking for ut_id in utmp" >&5
9241 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9242   echo $ac_n "(cached) $ac_c" 1>&6
9243 else
9244   
9245 cat > conftest.$ac_ext <<EOF
9246 #line 9247 "configure"
9247 #include "confdefs.h"
9248 #include <sys/types.h>
9249 #include <utmp.h>
9250 int main() {
9251 struct utmp ut;  ut.ut_id[0] = 'a';
9252 ; return 0; }
9253 EOF
9254 if { (eval echo configure:9255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9255   rm -rf conftest*
9256   samba_cv_HAVE_UT_UT_ID=yes
9257 else
9258   echo "configure: failed program was:" >&5
9259   cat conftest.$ac_ext >&5
9260   rm -rf conftest*
9261   samba_cv_HAVE_UT_UT_ID=no
9262 fi
9263 rm -f conftest*
9264 fi
9265
9266 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9267 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9268     cat >> confdefs.h <<\EOF
9269 #define HAVE_UT_UT_ID 1
9270 EOF
9271
9272 fi 
9273
9274 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9275 echo "configure:9276: checking for ut_host in utmp" >&5
9276 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9277   echo $ac_n "(cached) $ac_c" 1>&6
9278 else
9279   
9280 cat > conftest.$ac_ext <<EOF
9281 #line 9282 "configure"
9282 #include "confdefs.h"
9283 #include <sys/types.h>
9284 #include <utmp.h>
9285 int main() {
9286 struct utmp ut;  ut.ut_host[0] = 'a';
9287 ; return 0; }
9288 EOF
9289 if { (eval echo configure:9290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9290   rm -rf conftest*
9291   samba_cv_HAVE_UT_UT_HOST=yes
9292 else
9293   echo "configure: failed program was:" >&5
9294   cat conftest.$ac_ext >&5
9295   rm -rf conftest*
9296   samba_cv_HAVE_UT_UT_HOST=no
9297 fi
9298 rm -f conftest*
9299 fi
9300
9301 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9302 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9303     cat >> confdefs.h <<\EOF
9304 #define HAVE_UT_UT_HOST 1
9305 EOF
9306
9307 fi 
9308
9309 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9310 echo "configure:9311: checking for ut_time in utmp" >&5
9311 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9312   echo $ac_n "(cached) $ac_c" 1>&6
9313 else
9314   
9315 cat > conftest.$ac_ext <<EOF
9316 #line 9317 "configure"
9317 #include "confdefs.h"
9318 #include <sys/types.h>
9319 #include <utmp.h>
9320 int main() {
9321 struct utmp ut;  time_t t; ut.ut_time = t;
9322 ; return 0; }
9323 EOF
9324 if { (eval echo configure:9325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9325   rm -rf conftest*
9326   samba_cv_HAVE_UT_UT_TIME=yes
9327 else
9328   echo "configure: failed program was:" >&5
9329   cat conftest.$ac_ext >&5
9330   rm -rf conftest*
9331   samba_cv_HAVE_UT_UT_TIME=no
9332 fi
9333 rm -f conftest*
9334 fi
9335
9336 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9337 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9338     cat >> confdefs.h <<\EOF
9339 #define HAVE_UT_UT_TIME 1
9340 EOF
9341
9342 fi 
9343
9344 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9345 echo "configure:9346: checking for ut_tv in utmp" >&5
9346 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9347   echo $ac_n "(cached) $ac_c" 1>&6
9348 else
9349   
9350 cat > conftest.$ac_ext <<EOF
9351 #line 9352 "configure"
9352 #include "confdefs.h"
9353 #include <sys/types.h>
9354 #include <utmp.h>
9355 int main() {
9356 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9357 ; return 0; }
9358 EOF
9359 if { (eval echo configure:9360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9360   rm -rf conftest*
9361   samba_cv_HAVE_UT_UT_TV=yes
9362 else
9363   echo "configure: failed program was:" >&5
9364   cat conftest.$ac_ext >&5
9365   rm -rf conftest*
9366   samba_cv_HAVE_UT_UT_TV=no
9367 fi
9368 rm -f conftest*
9369 fi
9370
9371 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9372 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9373     cat >> confdefs.h <<\EOF
9374 #define HAVE_UT_UT_TV 1
9375 EOF
9376
9377 fi 
9378
9379 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9380 echo "configure:9381: checking for ut_type in utmp" >&5
9381 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9382   echo $ac_n "(cached) $ac_c" 1>&6
9383 else
9384   
9385 cat > conftest.$ac_ext <<EOF
9386 #line 9387 "configure"
9387 #include "confdefs.h"
9388 #include <sys/types.h>
9389 #include <utmp.h>
9390 int main() {
9391 struct utmp ut;  ut.ut_type = 0;
9392 ; return 0; }
9393 EOF
9394 if { (eval echo configure:9395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9395   rm -rf conftest*
9396   samba_cv_HAVE_UT_UT_TYPE=yes
9397 else
9398   echo "configure: failed program was:" >&5
9399   cat conftest.$ac_ext >&5
9400   rm -rf conftest*
9401   samba_cv_HAVE_UT_UT_TYPE=no
9402 fi
9403 rm -f conftest*
9404 fi
9405
9406 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9407 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9408     cat >> confdefs.h <<\EOF
9409 #define HAVE_UT_UT_TYPE 1
9410 EOF
9411
9412 fi 
9413
9414 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9415 echo "configure:9416: checking for ut_pid in utmp" >&5
9416 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9417   echo $ac_n "(cached) $ac_c" 1>&6
9418 else
9419   
9420 cat > conftest.$ac_ext <<EOF
9421 #line 9422 "configure"
9422 #include "confdefs.h"
9423 #include <sys/types.h>
9424 #include <utmp.h>
9425 int main() {
9426 struct utmp ut;  ut.ut_pid = 0;
9427 ; return 0; }
9428 EOF
9429 if { (eval echo configure:9430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9430   rm -rf conftest*
9431   samba_cv_HAVE_UT_UT_PID=yes
9432 else
9433   echo "configure: failed program was:" >&5
9434   cat conftest.$ac_ext >&5
9435   rm -rf conftest*
9436   samba_cv_HAVE_UT_UT_PID=no
9437 fi
9438 rm -f conftest*
9439 fi
9440
9441 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9442 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9443     cat >> confdefs.h <<\EOF
9444 #define HAVE_UT_UT_PID 1
9445 EOF
9446
9447 fi 
9448
9449 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9450 echo "configure:9451: checking for ut_exit in utmp" >&5
9451 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9452   echo $ac_n "(cached) $ac_c" 1>&6
9453 else
9454   
9455 cat > conftest.$ac_ext <<EOF
9456 #line 9457 "configure"
9457 #include "confdefs.h"
9458 #include <sys/types.h>
9459 #include <utmp.h>
9460 int main() {
9461 struct utmp ut;  ut.ut_exit.e_exit = 0;
9462 ; return 0; }
9463 EOF
9464 if { (eval echo configure:9465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9465   rm -rf conftest*
9466   samba_cv_HAVE_UT_UT_EXIT=yes
9467 else
9468   echo "configure: failed program was:" >&5
9469   cat conftest.$ac_ext >&5
9470   rm -rf conftest*
9471   samba_cv_HAVE_UT_UT_EXIT=no
9472 fi
9473 rm -f conftest*
9474 fi
9475
9476 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9477 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9478     cat >> confdefs.h <<\EOF
9479 #define HAVE_UT_UT_EXIT 1
9480 EOF
9481
9482 fi 
9483
9484 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9485 echo "configure:9486: checking for ut_addr in utmp" >&5
9486 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9487   echo $ac_n "(cached) $ac_c" 1>&6
9488 else
9489   
9490 cat > conftest.$ac_ext <<EOF
9491 #line 9492 "configure"
9492 #include "confdefs.h"
9493 #include <sys/types.h>
9494 #include <utmp.h>
9495 int main() {
9496 struct utmp ut;  ut.ut_addr = 0;
9497 ; return 0; }
9498 EOF
9499 if { (eval echo configure:9500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9500   rm -rf conftest*
9501   samba_cv_HAVE_UT_UT_ADDR=yes
9502 else
9503   echo "configure: failed program was:" >&5
9504   cat conftest.$ac_ext >&5
9505   rm -rf conftest*
9506   samba_cv_HAVE_UT_UT_ADDR=no
9507 fi
9508 rm -f conftest*
9509 fi
9510
9511 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9512 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9513     cat >> confdefs.h <<\EOF
9514 #define HAVE_UT_UT_ADDR 1
9515 EOF
9516
9517 fi 
9518
9519 if test x$ac_cv_func_pututline = xyes ; then
9520   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9521 echo "configure:9522: checking whether pututline returns pointer" >&5
9522 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9523   echo $ac_n "(cached) $ac_c" 1>&6
9524 else
9525   
9526   cat > conftest.$ac_ext <<EOF
9527 #line 9528 "configure"
9528 #include "confdefs.h"
9529 #include <sys/types.h>
9530 #include <utmp.h>
9531 int main() {
9532 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9533 ; return 0; }
9534 EOF
9535 if { (eval echo configure:9536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9536   rm -rf conftest*
9537   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9538 else
9539   echo "configure: failed program was:" >&5
9540   cat conftest.$ac_ext >&5
9541   rm -rf conftest*
9542   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9543 fi
9544 rm -f conftest*
9545 fi
9546
9547 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9548   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9549       cat >> confdefs.h <<\EOF
9550 #define PUTUTLINE_RETURNS_UTMP 1
9551 EOF
9552
9553   fi
9554 fi
9555
9556 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9557 echo "configure:9558: checking for ut_syslen in utmpx" >&5
9558 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9559   echo $ac_n "(cached) $ac_c" 1>&6
9560 else
9561   
9562 cat > conftest.$ac_ext <<EOF
9563 #line 9564 "configure"
9564 #include "confdefs.h"
9565 #include <sys/types.h>
9566 #include <utmpx.h>
9567 int main() {
9568 struct utmpx ux;  ux.ut_syslen = 0;
9569 ; return 0; }
9570 EOF
9571 if { (eval echo configure:9572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9572   rm -rf conftest*
9573   samba_cv_HAVE_UX_UT_SYSLEN=yes
9574 else
9575   echo "configure: failed program was:" >&5
9576   cat conftest.$ac_ext >&5
9577   rm -rf conftest*
9578   samba_cv_HAVE_UX_UT_SYSLEN=no
9579 fi
9580 rm -f conftest*
9581 fi
9582
9583 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
9584 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
9585     cat >> confdefs.h <<\EOF
9586 #define HAVE_UX_UT_SYSLEN 1
9587 EOF
9588
9589 fi 
9590
9591
9592 #################################################
9593 # check for libiconv support
9594 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
9595 echo "configure:9596: checking whether to use libiconv" >&5
9596 # Check whether --with-libiconv or --without-libiconv was given.
9597 if test "${with_libiconv+set}" = set; then
9598   withval="$with_libiconv"
9599    case "$withval" in
9600   no)
9601     echo "$ac_t""no" 1>&6
9602     ;;
9603   *)
9604     echo "$ac_t""yes" 1>&6
9605     CFLAGS="$CFLAGS -I$withval/include"
9606     LDFLAGS="$LDFLAGS -L$withval/lib"
9607     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
9608 echo "configure:9609: checking for iconv_open in -liconv" >&5
9609 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
9610 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9611   echo $ac_n "(cached) $ac_c" 1>&6
9612 else
9613   ac_save_LIBS="$LIBS"
9614 LIBS="-liconv  $LIBS"
9615 cat > conftest.$ac_ext <<EOF
9616 #line 9617 "configure"
9617 #include "confdefs.h"
9618 /* Override any gcc2 internal prototype to avoid an error.  */
9619 /* We use char because int might match the return type of a gcc2
9620     builtin and then its argument prototype would still apply.  */
9621 char iconv_open();
9622
9623 int main() {
9624 iconv_open()
9625 ; return 0; }
9626 EOF
9627 if { (eval echo configure:9628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9628   rm -rf conftest*
9629   eval "ac_cv_lib_$ac_lib_var=yes"
9630 else
9631   echo "configure: failed program was:" >&5
9632   cat conftest.$ac_ext >&5
9633   rm -rf conftest*
9634   eval "ac_cv_lib_$ac_lib_var=no"
9635 fi
9636 rm -f conftest*
9637 LIBS="$ac_save_LIBS"
9638
9639 fi
9640 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9641   echo "$ac_t""yes" 1>&6
9642     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9643     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9644   cat >> confdefs.h <<EOF
9645 #define $ac_tr_lib 1
9646 EOF
9647
9648   LIBS="-liconv $LIBS"
9649
9650 else
9651   echo "$ac_t""no" 1>&6
9652 fi
9653
9654     cat >> confdefs.h <<EOF
9655 #define WITH_LIBICONV "${withval}"
9656 EOF
9657
9658     ;;
9659   esac 
9660 else
9661   echo "$ac_t""no" 1>&6
9662
9663 fi
9664
9665
9666
9667 ############
9668 # check for iconv in libc
9669 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
9670 echo "configure:9671: checking for working iconv" >&5
9671 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
9672   echo $ac_n "(cached) $ac_c" 1>&6
9673 else
9674   
9675 if test "$cross_compiling" = yes; then
9676   samba_cv_HAVE_NATIVE_ICONV=cross
9677 else
9678   cat > conftest.$ac_ext <<EOF
9679 #line 9680 "configure"
9680 #include "confdefs.h"
9681
9682 #include <iconv.h>
9683 main() {
9684        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
9685        if (cd == 0 || cd == (iconv_t)-1) return -1;
9686        return 0;
9687 }
9688
9689 EOF
9690 if { (eval echo configure:9691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9691 then
9692   samba_cv_HAVE_NATIVE_ICONV=yes
9693 else
9694   echo "configure: failed program was:" >&5
9695   cat conftest.$ac_ext >&5
9696   rm -fr conftest*
9697   samba_cv_HAVE_NATIVE_ICONV=no
9698 fi
9699 rm -fr conftest*
9700 fi
9701
9702 fi
9703
9704 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
9705 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
9706     cat >> confdefs.h <<\EOF
9707 #define HAVE_NATIVE_ICONV 1
9708 EOF
9709
9710 fi
9711
9712
9713 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
9714 echo "configure:9715: checking for Linux kernel oplocks" >&5
9715 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
9716   echo $ac_n "(cached) $ac_c" 1>&6
9717 else
9718   
9719 if test "$cross_compiling" = yes; then
9720   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
9721 else
9722   cat > conftest.$ac_ext <<EOF
9723 #line 9724 "configure"
9724 #include "confdefs.h"
9725
9726 #include <sys/types.h>
9727 #include <fcntl.h>
9728 #ifndef F_GETLEASE
9729 #define F_GETLEASE      1025
9730 #endif
9731 main() {
9732        int fd = open("/dev/null", O_RDONLY);
9733        return fcntl(fd, F_GETLEASE, 0) == -1;
9734 }
9735
9736 EOF
9737 if { (eval echo configure:9738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9738 then
9739   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
9740 else
9741   echo "configure: failed program was:" >&5
9742   cat conftest.$ac_ext >&5
9743   rm -fr conftest*
9744   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
9745 fi
9746 rm -fr conftest*
9747 fi
9748
9749 fi
9750
9751 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
9752 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
9753     cat >> confdefs.h <<\EOF
9754 #define HAVE_KERNEL_OPLOCKS_LINUX 1
9755 EOF
9756
9757 fi
9758
9759 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
9760 echo "configure:9761: checking for kernel change notify support" >&5
9761 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
9762   echo $ac_n "(cached) $ac_c" 1>&6
9763 else
9764   
9765 if test "$cross_compiling" = yes; then
9766   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
9767 else
9768   cat > conftest.$ac_ext <<EOF
9769 #line 9770 "configure"
9770 #include "confdefs.h"
9771
9772 #include <sys/types.h>
9773 #include <fcntl.h>
9774 #include <signal.h>
9775 #ifndef F_NOTIFY
9776 #define F_NOTIFY 1026
9777 #endif
9778 main() {
9779         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
9780 }
9781
9782 EOF
9783 if { (eval echo configure:9784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9784 then
9785   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
9786 else
9787   echo "configure: failed program was:" >&5
9788   cat conftest.$ac_ext >&5
9789   rm -fr conftest*
9790   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
9791 fi
9792 rm -fr conftest*
9793 fi
9794
9795 fi
9796
9797 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
9798 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
9799     cat >> confdefs.h <<\EOF
9800 #define HAVE_KERNEL_CHANGE_NOTIFY 1
9801 EOF
9802
9803 fi
9804
9805 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
9806 echo "configure:9807: checking for kernel share modes" >&5
9807 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
9808   echo $ac_n "(cached) $ac_c" 1>&6
9809 else
9810   
9811 if test "$cross_compiling" = yes; then
9812   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
9813 else
9814   cat > conftest.$ac_ext <<EOF
9815 #line 9816 "configure"
9816 #include "confdefs.h"
9817
9818 #include <sys/types.h>
9819 #include <fcntl.h>
9820 #include <signal.h>
9821 #include <sys/file.h>
9822 #ifndef LOCK_MAND
9823 #define LOCK_MAND       32
9824 #define LOCK_READ       64
9825 #endif
9826 main() {
9827         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
9828 }
9829
9830 EOF
9831 if { (eval echo configure:9832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9832 then
9833   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
9834 else
9835   echo "configure: failed program was:" >&5
9836   cat conftest.$ac_ext >&5
9837   rm -fr conftest*
9838   samba_cv_HAVE_KERNEL_SHARE_MODES=no
9839 fi
9840 rm -fr conftest*
9841 fi
9842
9843 fi
9844
9845 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
9846 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
9847     cat >> confdefs.h <<\EOF
9848 #define HAVE_KERNEL_SHARE_MODES 1
9849 EOF
9850
9851 fi
9852
9853
9854
9855
9856 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
9857 echo "configure:9858: checking for IRIX kernel oplock type definitions" >&5
9858 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
9859   echo $ac_n "(cached) $ac_c" 1>&6
9860 else
9861   
9862 cat > conftest.$ac_ext <<EOF
9863 #line 9864 "configure"
9864 #include "confdefs.h"
9865 #include <sys/types.h>
9866 #include <fcntl.h>
9867 int main() {
9868 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
9869 ; return 0; }
9870 EOF
9871 if { (eval echo configure:9872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9872   rm -rf conftest*
9873   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
9874 else
9875   echo "configure: failed program was:" >&5
9876   cat conftest.$ac_ext >&5
9877   rm -rf conftest*
9878   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
9879 fi
9880 rm -f conftest*
9881 fi
9882
9883 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
9884 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
9885     cat >> confdefs.h <<\EOF
9886 #define HAVE_KERNEL_OPLOCKS_IRIX 1
9887 EOF
9888
9889 fi
9890
9891 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
9892 echo "configure:9893: checking for irix specific capabilities" >&5
9893 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
9894   echo $ac_n "(cached) $ac_c" 1>&6
9895 else
9896   
9897 if test "$cross_compiling" = yes; then
9898   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
9899 else
9900   cat > conftest.$ac_ext <<EOF
9901 #line 9902 "configure"
9902 #include "confdefs.h"
9903 #include <sys/types.h>
9904 #include <sys/capability.h>
9905 main() {
9906  cap_t cap;
9907  if ((cap = cap_get_proc()) == NULL)
9908    exit(1);
9909  cap->cap_effective |= CAP_NETWORK_MGT;
9910  cap->cap_inheritable |= CAP_NETWORK_MGT;
9911  cap_set_proc(cap);
9912  exit(0);
9913 }
9914
9915 EOF
9916 if { (eval echo configure:9917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9917 then
9918   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
9919 else
9920   echo "configure: failed program was:" >&5
9921   cat conftest.$ac_ext >&5
9922   rm -fr conftest*
9923   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
9924 fi
9925 rm -fr conftest*
9926 fi
9927
9928 fi
9929
9930 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
9931 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
9932     cat >> confdefs.h <<\EOF
9933 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
9934 EOF
9935
9936 fi
9937
9938 #
9939 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
9940 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
9941 #
9942
9943 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9944 echo "configure:9945: checking for int16 typedef included by rpc/rpc.h" >&5
9945 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
9946   echo $ac_n "(cached) $ac_c" 1>&6
9947 else
9948   
9949 cat > conftest.$ac_ext <<EOF
9950 #line 9951 "configure"
9951 #include "confdefs.h"
9952 #include <sys/types.h>
9953 #if defined(HAVE_RPC_RPC_H)
9954 #include <rpc/rpc.h>
9955 #endif
9956 int main() {
9957 int16 testvar;
9958 ; return 0; }
9959 EOF
9960 if { (eval echo configure:9961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9961   rm -rf conftest*
9962   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
9963 else
9964   echo "configure: failed program was:" >&5
9965   cat conftest.$ac_ext >&5
9966   rm -rf conftest*
9967   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
9968 fi
9969 rm -f conftest*
9970 fi
9971
9972 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
9973 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
9974     cat >> confdefs.h <<\EOF
9975 #define HAVE_INT16_FROM_RPC_RPC_H 1
9976 EOF
9977
9978 fi
9979
9980 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9981 echo "configure:9982: checking for uint16 typedef included by rpc/rpc.h" >&5
9982 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
9983   echo $ac_n "(cached) $ac_c" 1>&6
9984 else
9985   
9986 cat > conftest.$ac_ext <<EOF
9987 #line 9988 "configure"
9988 #include "confdefs.h"
9989 #include <sys/types.h>
9990 #if defined(HAVE_RPC_RPC_H)
9991 #include <rpc/rpc.h>
9992 #endif
9993 int main() {
9994 uint16 testvar;
9995 ; return 0; }
9996 EOF
9997 if { (eval echo configure:9998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9998   rm -rf conftest*
9999   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10000 else
10001   echo "configure: failed program was:" >&5
10002   cat conftest.$ac_ext >&5
10003   rm -rf conftest*
10004   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10005 fi
10006 rm -f conftest*
10007 fi
10008
10009 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10010 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10011     cat >> confdefs.h <<\EOF
10012 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10013 EOF
10014
10015 fi
10016
10017 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10018 echo "configure:10019: checking for int32 typedef included by rpc/rpc.h" >&5
10019 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10020   echo $ac_n "(cached) $ac_c" 1>&6
10021 else
10022   
10023 cat > conftest.$ac_ext <<EOF
10024 #line 10025 "configure"
10025 #include "confdefs.h"
10026 #include <sys/types.h>
10027 #if defined(HAVE_RPC_RPC_H)
10028 #include <rpc/rpc.h>
10029 #endif
10030 int main() {
10031 int32 testvar;
10032 ; return 0; }
10033 EOF
10034 if { (eval echo configure:10035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10035   rm -rf conftest*
10036   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10037 else
10038   echo "configure: failed program was:" >&5
10039   cat conftest.$ac_ext >&5
10040   rm -rf conftest*
10041   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10042 fi
10043 rm -f conftest*
10044 fi
10045
10046 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10047 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10048     cat >> confdefs.h <<\EOF
10049 #define HAVE_INT32_FROM_RPC_RPC_H 1
10050 EOF
10051
10052 fi
10053
10054 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10055 echo "configure:10056: checking for uint32 typedef included by rpc/rpc.h" >&5
10056 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10057   echo $ac_n "(cached) $ac_c" 1>&6
10058 else
10059   
10060 cat > conftest.$ac_ext <<EOF
10061 #line 10062 "configure"
10062 #include "confdefs.h"
10063 #include <sys/types.h>
10064 #if defined(HAVE_RPC_RPC_H)
10065 #include <rpc/rpc.h>
10066 #endif
10067 int main() {
10068 uint32 testvar;
10069 ; return 0; }
10070 EOF
10071 if { (eval echo configure:10072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10072   rm -rf conftest*
10073   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10074 else
10075   echo "configure: failed program was:" >&5
10076   cat conftest.$ac_ext >&5
10077   rm -rf conftest*
10078   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10079 fi
10080 rm -f conftest*
10081 fi
10082
10083 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10084 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10085     cat >> confdefs.h <<\EOF
10086 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10087 EOF
10088
10089 fi
10090
10091
10092 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10093 echo "configure:10094: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10094 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10095   echo $ac_n "(cached) $ac_c" 1>&6
10096 else
10097   
10098 cat > conftest.$ac_ext <<EOF
10099 #line 10100 "configure"
10100 #include "confdefs.h"
10101 #include <sys/types.h>
10102 #ifdef HAVE_SYS_SECURITY_H
10103 #include <sys/security.h>
10104 #include <prot.h>
10105 #endif  /* HAVE_SYS_SECURITY_H */
10106 #if defined(HAVE_RPC_RPC_H)
10107 #include <rpc/rpc.h>
10108 #endif
10109 int main() {
10110 int testvar;
10111 ; return 0; }
10112 EOF
10113 if { (eval echo configure:10114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10114   rm -rf conftest*
10115   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10116 else
10117   echo "configure: failed program was:" >&5
10118   cat conftest.$ac_ext >&5
10119   rm -rf conftest*
10120   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10121 fi
10122 rm -f conftest*
10123 fi
10124
10125 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10126 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10127     cat >> confdefs.h <<\EOF
10128 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10129 EOF
10130
10131 fi
10132
10133 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10134 echo "configure:10135: checking for test routines" >&5
10135 if test "$cross_compiling" = yes; then
10136   echo "configure: warning: cannot run when cross-compiling" 1>&2
10137 else
10138   cat > conftest.$ac_ext <<EOF
10139 #line 10140 "configure"
10140 #include "confdefs.h"
10141 #include "${srcdir-.}/tests/trivial.c"
10142 EOF
10143 if { (eval echo configure:10144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10144 then
10145   echo "$ac_t""yes" 1>&6
10146 else
10147   echo "configure: failed program was:" >&5
10148   cat conftest.$ac_ext >&5
10149   rm -fr conftest*
10150   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10151 fi
10152 rm -fr conftest*
10153 fi
10154
10155
10156 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10157 echo "configure:10158: checking for ftruncate extend" >&5
10158 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10159   echo $ac_n "(cached) $ac_c" 1>&6
10160 else
10161   
10162 if test "$cross_compiling" = yes; then
10163   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10164 else
10165   cat > conftest.$ac_ext <<EOF
10166 #line 10167 "configure"
10167 #include "confdefs.h"
10168 #include "${srcdir-.}/tests/ftruncate.c"
10169 EOF
10170 if { (eval echo configure:10171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10171 then
10172   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10173 else
10174   echo "configure: failed program was:" >&5
10175   cat conftest.$ac_ext >&5
10176   rm -fr conftest*
10177   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10178 fi
10179 rm -fr conftest*
10180 fi
10181
10182 fi
10183
10184 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10185 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10186     cat >> confdefs.h <<\EOF
10187 #define HAVE_FTRUNCATE_EXTEND 1
10188 EOF
10189
10190 fi
10191
10192 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10193 echo "configure:10194: checking for AF_LOCAL socket support" >&5
10194 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10195   echo $ac_n "(cached) $ac_c" 1>&6
10196 else
10197   
10198 if test "$cross_compiling" = yes; then
10199   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10200 else
10201   cat > conftest.$ac_ext <<EOF
10202 #line 10203 "configure"
10203 #include "confdefs.h"
10204 #include "${srcdir-.}/tests/unixsock.c"
10205 EOF
10206 if { (eval echo configure:10207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10207 then
10208   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10209 else
10210   echo "configure: failed program was:" >&5
10211   cat conftest.$ac_ext >&5
10212   rm -fr conftest*
10213   samba_cv_HAVE_WORKING_AF_LOCAL=no
10214 fi
10215 rm -fr conftest*
10216 fi
10217
10218 fi
10219
10220 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10221 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10222 then
10223     cat >> confdefs.h <<\EOF
10224 #define HAVE_WORKING_AF_LOCAL 1
10225 EOF
10226
10227 fi
10228
10229 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10230 echo "configure:10231: checking for broken getgroups" >&5
10231 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10232   echo $ac_n "(cached) $ac_c" 1>&6
10233 else
10234   
10235 if test "$cross_compiling" = yes; then
10236   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10237 else
10238   cat > conftest.$ac_ext <<EOF
10239 #line 10240 "configure"
10240 #include "confdefs.h"
10241 #include "${srcdir-.}/tests/getgroups.c"
10242 EOF
10243 if { (eval echo configure:10244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10244 then
10245   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10246 else
10247   echo "configure: failed program was:" >&5
10248   cat conftest.$ac_ext >&5
10249   rm -fr conftest*
10250   samba_cv_HAVE_BROKEN_GETGROUPS=no
10251 fi
10252 rm -fr conftest*
10253 fi
10254
10255 fi
10256
10257 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10258 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10259     cat >> confdefs.h <<\EOF
10260 #define HAVE_BROKEN_GETGROUPS 1
10261 EOF
10262
10263 fi
10264
10265 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10266 echo "configure:10267: checking whether getpass should be replaced" >&5
10267 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10268   echo $ac_n "(cached) $ac_c" 1>&6
10269 else
10270   
10271 SAVE_CPPFLAGS="$CPPFLAGS"
10272 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10273 cat > conftest.$ac_ext <<EOF
10274 #line 10275 "configure"
10275 #include "confdefs.h"
10276
10277 #define REPLACE_GETPASS 1
10278 #define NO_CONFIG_H 1
10279 #define main dont_declare_main
10280 #include "${srcdir-.}/lib/getsmbpass.c"
10281 #undef main
10282
10283 int main() {
10284
10285 ; return 0; }
10286 EOF
10287 if { (eval echo configure:10288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10288   rm -rf conftest*
10289   samba_cv_REPLACE_GETPASS=yes
10290 else
10291   echo "configure: failed program was:" >&5
10292   cat conftest.$ac_ext >&5
10293   rm -rf conftest*
10294   samba_cv_REPLACE_GETPASS=no
10295 fi
10296 rm -f conftest*
10297 CPPFLAGS="$SAVE_CPPFLAGS"
10298
10299 fi
10300
10301 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10302 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10303         cat >> confdefs.h <<\EOF
10304 #define REPLACE_GETPASS 1
10305 EOF
10306
10307 fi
10308
10309 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10310 echo "configure:10311: checking for broken inet_ntoa" >&5
10311 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10312   echo $ac_n "(cached) $ac_c" 1>&6
10313 else
10314   
10315 if test "$cross_compiling" = yes; then
10316   samba_cv_REPLACE_INET_NTOA=cross
10317 else
10318   cat > conftest.$ac_ext <<EOF
10319 #line 10320 "configure"
10320 #include "confdefs.h"
10321
10322 #include <stdio.h>
10323 #include <sys/types.h>
10324 #include <netinet/in.h>
10325 #ifdef HAVE_ARPA_INET_H
10326 #include <arpa/inet.h>
10327 #endif
10328 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10329 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10330     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10331 exit(1);}
10332 EOF
10333 if { (eval echo configure:10334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10334 then
10335   samba_cv_REPLACE_INET_NTOA=yes
10336 else
10337   echo "configure: failed program was:" >&5
10338   cat conftest.$ac_ext >&5
10339   rm -fr conftest*
10340   samba_cv_REPLACE_INET_NTOA=no
10341 fi
10342 rm -fr conftest*
10343 fi
10344
10345 fi
10346
10347 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10348 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10349     cat >> confdefs.h <<\EOF
10350 #define REPLACE_INET_NTOA 1
10351 EOF
10352
10353 fi
10354
10355 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10356 echo "configure:10357: checking for secure mkstemp" >&5
10357 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10358   echo $ac_n "(cached) $ac_c" 1>&6
10359 else
10360   
10361 if test "$cross_compiling" = yes; then
10362   samba_cv_HAVE_SECURE_MKSTEMP=cross
10363 else
10364   cat > conftest.$ac_ext <<EOF
10365 #line 10366 "configure"
10366 #include "confdefs.h"
10367 #include <stdlib.h>
10368 #include <sys/types.h>
10369 #include <sys/stat.h>
10370 #include <unistd.h>
10371 main() { 
10372   struct stat st;
10373   char tpl[20]="/tmp/test.XXXXXX"; 
10374   int fd = mkstemp(tpl); 
10375   if (fd == -1) exit(1);
10376   unlink(tpl);
10377   if (fstat(fd, &st) != 0) exit(1);
10378   if ((st.st_mode & 0777) != 0600) exit(1);
10379   exit(0);
10380 }
10381 EOF
10382 if { (eval echo configure:10383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10383 then
10384   samba_cv_HAVE_SECURE_MKSTEMP=yes
10385 else
10386   echo "configure: failed program was:" >&5
10387   cat conftest.$ac_ext >&5
10388   rm -fr conftest*
10389   samba_cv_HAVE_SECURE_MKSTEMP=no
10390 fi
10391 rm -fr conftest*
10392 fi
10393
10394 fi
10395
10396 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10397 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10398     cat >> confdefs.h <<\EOF
10399 #define HAVE_SECURE_MKSTEMP 1
10400 EOF
10401
10402 fi
10403
10404 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10405 echo "configure:10406: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10406 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10407   echo $ac_n "(cached) $ac_c" 1>&6
10408 else
10409   
10410 if test "$cross_compiling" = yes; then
10411   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10412 else
10413   cat > conftest.$ac_ext <<EOF
10414 #line 10415 "configure"
10415 #include "confdefs.h"
10416 #include <unistd.h>
10417 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10418 EOF
10419 if { (eval echo configure:10420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10420 then
10421   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10422 else
10423   echo "configure: failed program was:" >&5
10424   cat conftest.$ac_ext >&5
10425   rm -fr conftest*
10426   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10427 fi
10428 rm -fr conftest*
10429 fi
10430
10431 fi
10432
10433 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10434 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10435     cat >> confdefs.h <<\EOF
10436 #define SYSCONF_SC_NGROUPS_MAX 1
10437 EOF
10438
10439 fi
10440
10441 echo $ac_n "checking for root""... $ac_c" 1>&6
10442 echo "configure:10443: checking for root" >&5
10443 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10444   echo $ac_n "(cached) $ac_c" 1>&6
10445 else
10446   
10447 if test "$cross_compiling" = yes; then
10448   samba_cv_HAVE_ROOT=cross
10449 else
10450   cat > conftest.$ac_ext <<EOF
10451 #line 10452 "configure"
10452 #include "confdefs.h"
10453 main() { exit(getuid() != 0); }
10454 EOF
10455 if { (eval echo configure:10456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10456 then
10457   samba_cv_HAVE_ROOT=yes
10458 else
10459   echo "configure: failed program was:" >&5
10460   cat conftest.$ac_ext >&5
10461   rm -fr conftest*
10462   samba_cv_HAVE_ROOT=no
10463 fi
10464 rm -fr conftest*
10465 fi
10466
10467 fi
10468
10469 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10470 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10471     cat >> confdefs.h <<\EOF
10472 #define HAVE_ROOT 1
10473 EOF
10474
10475 else
10476     echo "configure: warning: running as non-root will disable some tests" 1>&2
10477 fi
10478
10479 ##################
10480 # look for a method of finding the list of network interfaces
10481 iface=no;
10482 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10483 echo "configure:10484: checking for iface AIX" >&5
10484 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10485   echo $ac_n "(cached) $ac_c" 1>&6
10486 else
10487   
10488 if test "$cross_compiling" = yes; then
10489   samba_cv_HAVE_IFACE_AIX=cross
10490 else
10491   cat > conftest.$ac_ext <<EOF
10492 #line 10493 "configure"
10493 #include "confdefs.h"
10494
10495 #define HAVE_IFACE_AIX 1
10496 #define AUTOCONF_TEST 1
10497 #include "confdefs.h"
10498 #include "${srcdir-.}/lib/interfaces.c"
10499 EOF
10500 if { (eval echo configure:10501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10501 then
10502   samba_cv_HAVE_IFACE_AIX=yes
10503 else
10504   echo "configure: failed program was:" >&5
10505   cat conftest.$ac_ext >&5
10506   rm -fr conftest*
10507   samba_cv_HAVE_IFACE_AIX=no
10508 fi
10509 rm -fr conftest*
10510 fi
10511
10512 fi
10513
10514 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10515 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10516     iface=yes;cat >> confdefs.h <<\EOF
10517 #define HAVE_IFACE_AIX 1
10518 EOF
10519
10520 fi
10521
10522 if test $iface = no; then
10523 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10524 echo "configure:10525: checking for iface ifconf" >&5
10525 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10526   echo $ac_n "(cached) $ac_c" 1>&6
10527 else
10528   
10529 if test "$cross_compiling" = yes; then
10530   samba_cv_HAVE_IFACE_IFCONF=cross
10531 else
10532   cat > conftest.$ac_ext <<EOF
10533 #line 10534 "configure"
10534 #include "confdefs.h"
10535
10536 #define HAVE_IFACE_IFCONF 1
10537 #define AUTOCONF_TEST 1
10538 #include "confdefs.h"
10539 #include "${srcdir-.}/lib/interfaces.c"
10540 EOF
10541 if { (eval echo configure:10542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10542 then
10543   samba_cv_HAVE_IFACE_IFCONF=yes
10544 else
10545   echo "configure: failed program was:" >&5
10546   cat conftest.$ac_ext >&5
10547   rm -fr conftest*
10548   samba_cv_HAVE_IFACE_IFCONF=no
10549 fi
10550 rm -fr conftest*
10551 fi
10552
10553 fi
10554
10555 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10556 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10557     iface=yes;cat >> confdefs.h <<\EOF
10558 #define HAVE_IFACE_IFCONF 1
10559 EOF
10560
10561 fi
10562 fi
10563
10564 if test $iface = no; then
10565 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
10566 echo "configure:10567: checking for iface ifreq" >&5
10567 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
10568   echo $ac_n "(cached) $ac_c" 1>&6
10569 else
10570   
10571 if test "$cross_compiling" = yes; then
10572   samba_cv_HAVE_IFACE_IFREQ=cross
10573 else
10574   cat > conftest.$ac_ext <<EOF
10575 #line 10576 "configure"
10576 #include "confdefs.h"
10577
10578 #define HAVE_IFACE_IFREQ 1
10579 #define AUTOCONF_TEST 1
10580 #include "confdefs.h"
10581 #include "${srcdir-.}/lib/interfaces.c"
10582 EOF
10583 if { (eval echo configure:10584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10584 then
10585   samba_cv_HAVE_IFACE_IFREQ=yes
10586 else
10587   echo "configure: failed program was:" >&5
10588   cat conftest.$ac_ext >&5
10589   rm -fr conftest*
10590   samba_cv_HAVE_IFACE_IFREQ=no
10591 fi
10592 rm -fr conftest*
10593 fi
10594
10595 fi
10596
10597 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
10598 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
10599     iface=yes;cat >> confdefs.h <<\EOF
10600 #define HAVE_IFACE_IFREQ 1
10601 EOF
10602
10603 fi
10604 fi
10605
10606
10607 ################################################
10608 # look for a method of setting the effective uid
10609 seteuid=no;
10610 if test $seteuid = no; then
10611 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
10612 echo "configure:10613: checking for setresuid" >&5
10613 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
10614   echo $ac_n "(cached) $ac_c" 1>&6
10615 else
10616   
10617 if test "$cross_compiling" = yes; then
10618   samba_cv_USE_SETRESUID=cross
10619 else
10620   cat > conftest.$ac_ext <<EOF
10621 #line 10622 "configure"
10622 #include "confdefs.h"
10623
10624 #define AUTOCONF_TEST 1
10625 #define USE_SETRESUID 1
10626 #include "confdefs.h"
10627 #include "${srcdir-.}/lib/util_sec.c"
10628 EOF
10629 if { (eval echo configure:10630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10630 then
10631   samba_cv_USE_SETRESUID=yes
10632 else
10633   echo "configure: failed program was:" >&5
10634   cat conftest.$ac_ext >&5
10635   rm -fr conftest*
10636   samba_cv_USE_SETRESUID=no
10637 fi
10638 rm -fr conftest*
10639 fi
10640
10641 fi
10642
10643 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
10644 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
10645     seteuid=yes;cat >> confdefs.h <<\EOF
10646 #define USE_SETRESUID 1
10647 EOF
10648
10649 fi
10650 fi
10651
10652
10653 if test $seteuid = no; then
10654 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
10655 echo "configure:10656: checking for setreuid" >&5
10656 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+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_SETREUID=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_SETREUID 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_SETREUID=yes
10675 else
10676   echo "configure: failed program was:" >&5
10677   cat conftest.$ac_ext >&5
10678   rm -fr conftest*
10679   samba_cv_USE_SETREUID=no
10680 fi
10681 rm -fr conftest*
10682 fi
10683
10684 fi
10685
10686 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
10687 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
10688     seteuid=yes;cat >> confdefs.h <<\EOF
10689 #define USE_SETREUID 1
10690 EOF
10691
10692 fi
10693 fi
10694
10695 if test $seteuid = no; then
10696 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
10697 echo "configure:10698: checking for seteuid" >&5
10698 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
10699   echo $ac_n "(cached) $ac_c" 1>&6
10700 else
10701   
10702 if test "$cross_compiling" = yes; then
10703   samba_cv_USE_SETEUID=cross
10704 else
10705   cat > conftest.$ac_ext <<EOF
10706 #line 10707 "configure"
10707 #include "confdefs.h"
10708
10709 #define AUTOCONF_TEST 1
10710 #define USE_SETEUID 1
10711 #include "confdefs.h"
10712 #include "${srcdir-.}/lib/util_sec.c"
10713 EOF
10714 if { (eval echo configure:10715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10715 then
10716   samba_cv_USE_SETEUID=yes
10717 else
10718   echo "configure: failed program was:" >&5
10719   cat conftest.$ac_ext >&5
10720   rm -fr conftest*
10721   samba_cv_USE_SETEUID=no
10722 fi
10723 rm -fr conftest*
10724 fi
10725
10726 fi
10727
10728 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
10729 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
10730     seteuid=yes;cat >> confdefs.h <<\EOF
10731 #define USE_SETEUID 1
10732 EOF
10733
10734 fi
10735 fi
10736
10737 if test $seteuid = no; then
10738 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
10739 echo "configure:10740: checking for setuidx" >&5
10740 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
10741   echo $ac_n "(cached) $ac_c" 1>&6
10742 else
10743   
10744 if test "$cross_compiling" = yes; then
10745   samba_cv_USE_SETUIDX=cross
10746 else
10747   cat > conftest.$ac_ext <<EOF
10748 #line 10749 "configure"
10749 #include "confdefs.h"
10750
10751 #define AUTOCONF_TEST 1
10752 #define USE_SETUIDX 1
10753 #include "confdefs.h"
10754 #include "${srcdir-.}/lib/util_sec.c"
10755 EOF
10756 if { (eval echo configure:10757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10757 then
10758   samba_cv_USE_SETUIDX=yes
10759 else
10760   echo "configure: failed program was:" >&5
10761   cat conftest.$ac_ext >&5
10762   rm -fr conftest*
10763   samba_cv_USE_SETUIDX=no
10764 fi
10765 rm -fr conftest*
10766 fi
10767
10768 fi
10769
10770 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
10771 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
10772     seteuid=yes;cat >> confdefs.h <<\EOF
10773 #define USE_SETUIDX 1
10774 EOF
10775
10776 fi
10777 fi
10778
10779
10780 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10781 echo "configure:10782: checking for working mmap" >&5
10782 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
10783   echo $ac_n "(cached) $ac_c" 1>&6
10784 else
10785   
10786 if test "$cross_compiling" = yes; then
10787   samba_cv_HAVE_MMAP=cross
10788 else
10789   cat > conftest.$ac_ext <<EOF
10790 #line 10791 "configure"
10791 #include "confdefs.h"
10792 #include "${srcdir-.}/tests/shared_mmap.c"
10793 EOF
10794 if { (eval echo configure:10795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10795 then
10796   samba_cv_HAVE_MMAP=yes
10797 else
10798   echo "configure: failed program was:" >&5
10799   cat conftest.$ac_ext >&5
10800   rm -fr conftest*
10801   samba_cv_HAVE_MMAP=no
10802 fi
10803 rm -fr conftest*
10804 fi
10805
10806 fi
10807
10808 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
10809 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
10810     cat >> confdefs.h <<\EOF
10811 #define HAVE_MMAP 1
10812 EOF
10813
10814 fi
10815
10816 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
10817 echo "configure:10818: checking for ftruncate needs root" >&5
10818 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
10819   echo $ac_n "(cached) $ac_c" 1>&6
10820 else
10821   
10822 if test "$cross_compiling" = yes; then
10823   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
10824 else
10825   cat > conftest.$ac_ext <<EOF
10826 #line 10827 "configure"
10827 #include "confdefs.h"
10828 #include "${srcdir-.}/tests/ftruncroot.c"
10829 EOF
10830 if { (eval echo configure:10831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10831 then
10832   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
10833 else
10834   echo "configure: failed program was:" >&5
10835   cat conftest.$ac_ext >&5
10836   rm -fr conftest*
10837   samba_cv_FTRUNCATE_NEEDS_ROOT=no
10838 fi
10839 rm -fr conftest*
10840 fi
10841
10842 fi
10843
10844 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
10845 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
10846     cat >> confdefs.h <<\EOF
10847 #define FTRUNCATE_NEEDS_ROOT 1
10848 EOF
10849
10850 fi
10851
10852 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
10853 echo "configure:10854: checking for fcntl locking" >&5
10854 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
10855   echo $ac_n "(cached) $ac_c" 1>&6
10856 else
10857   
10858 if test "$cross_compiling" = yes; then
10859   samba_cv_HAVE_FCNTL_LOCK=cross
10860 else
10861   cat > conftest.$ac_ext <<EOF
10862 #line 10863 "configure"
10863 #include "confdefs.h"
10864 #include "${srcdir-.}/tests/fcntl_lock.c"
10865 EOF
10866 if { (eval echo configure:10867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10867 then
10868   samba_cv_HAVE_FCNTL_LOCK=yes
10869 else
10870   echo "configure: failed program was:" >&5
10871   cat conftest.$ac_ext >&5
10872   rm -fr conftest*
10873   samba_cv_HAVE_FCNTL_LOCK=no
10874 fi
10875 rm -fr conftest*
10876 fi
10877
10878 fi
10879
10880 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
10881 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
10882     cat >> confdefs.h <<\EOF
10883 #define HAVE_FCNTL_LOCK 1
10884 EOF
10885
10886 fi
10887
10888 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
10889 echo "configure:10890: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
10890 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
10891   echo $ac_n "(cached) $ac_c" 1>&6
10892 else
10893   
10894 if test "$cross_compiling" = yes; then
10895   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
10896 else
10897   cat > conftest.$ac_ext <<EOF
10898 #line 10899 "configure"
10899 #include "confdefs.h"
10900 #include "${srcdir-.}/tests/fcntl_lock64.c"
10901 EOF
10902 if { (eval echo configure:10903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10903 then
10904   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
10905 else
10906   echo "configure: failed program was:" >&5
10907   cat conftest.$ac_ext >&5
10908   rm -fr conftest*
10909   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
10910 fi
10911 rm -fr conftest*
10912 fi
10913
10914 fi
10915
10916 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
10917 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
10918     cat >> confdefs.h <<\EOF
10919 #define HAVE_BROKEN_FCNTL64_LOCKS 1
10920 EOF
10921
10922
10923 else
10924
10925
10926   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
10927 echo "configure:10928: checking for 64 bit fcntl locking" >&5
10928 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
10929   echo $ac_n "(cached) $ac_c" 1>&6
10930 else
10931   
10932   if test "$cross_compiling" = yes; then
10933   samba_cv_HAVE_STRUCT_FLOCK64=cross
10934 else
10935   cat > conftest.$ac_ext <<EOF
10936 #line 10937 "configure"
10937 #include "confdefs.h"
10938
10939 #if defined(HAVE_UNISTD_H)
10940 #include <unistd.h>
10941 #endif
10942 #include <stdio.h>
10943 #include <stdlib.h>
10944
10945 #ifdef HAVE_FCNTL_H
10946 #include <fcntl.h>
10947 #endif
10948
10949 #ifdef HAVE_SYS_FCNTL_H
10950 #include <sys/fcntl.h>
10951 #endif
10952 main() { struct flock64 fl64;
10953 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
10954 exit(0);
10955 #else
10956 exit(1);
10957 #endif
10958 }
10959 EOF
10960 if { (eval echo configure:10961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10961 then
10962   samba_cv_HAVE_STRUCT_FLOCK64=yes
10963 else
10964   echo "configure: failed program was:" >&5
10965   cat conftest.$ac_ext >&5
10966   rm -fr conftest*
10967   samba_cv_HAVE_STRUCT_FLOCK64=no
10968 fi
10969 rm -fr conftest*
10970 fi
10971
10972 fi
10973
10974 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
10975
10976   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
10977       cat >> confdefs.h <<\EOF
10978 #define HAVE_STRUCT_FLOCK64 1
10979 EOF
10980
10981   fi
10982 fi
10983
10984 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
10985 echo "configure:10986: checking for broken nisplus include files" >&5
10986 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
10987   echo $ac_n "(cached) $ac_c" 1>&6
10988 else
10989   
10990 cat > conftest.$ac_ext <<EOF
10991 #line 10992 "configure"
10992 #include "confdefs.h"
10993 #include <sys/acl.h>
10994 #if defined(HAVE_RPCSVC_NIS_H)
10995 #include <rpcsvc/nis.h>
10996 #endif
10997 int main() {
10998 return 0;
10999 ; return 0; }
11000 EOF
11001 if { (eval echo configure:11002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11002   rm -rf conftest*
11003   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11004 else
11005   echo "configure: failed program was:" >&5
11006   cat conftest.$ac_ext >&5
11007   rm -rf conftest*
11008   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11009 fi
11010 rm -f conftest*
11011 fi
11012
11013 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11014 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11015     cat >> confdefs.h <<\EOF
11016 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11017 EOF
11018
11019 fi
11020
11021
11022 #################################################
11023 # check for smbwrapper support
11024 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11025 echo "configure:11026: checking whether to use smbwrapper" >&5
11026 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11027 if test "${with_smbwrapper+set}" = set; then
11028   withval="$with_smbwrapper"
11029    case "$withval" in
11030   yes)
11031     echo "$ac_t""yes" 1>&6
11032     cat >> confdefs.h <<\EOF
11033 #define WITH_SMBWRAPPER 1
11034 EOF
11035
11036         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11037
11038         if test x$ATTEMPT_WRAP32_BUILD = x; then
11039                 WRAP32=""
11040         else
11041                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11042         fi
11043
11044 # Conditions under which smbwrapper should not be built.
11045
11046         if test x$PICFLAG = x; then
11047            echo No support for PIC code - disabling smbwrapper and smbsh
11048            WRAP=""
11049            WRAP32=""
11050         elif test x$ac_cv_func_syscall = xno; then
11051            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11052            WRAP=""
11053            WRAP32=""
11054         fi
11055     ;;
11056   *)
11057     echo "$ac_t""no" 1>&6
11058     ;;
11059   esac 
11060 else
11061   echo "$ac_t""no" 1>&6
11062
11063 fi
11064
11065
11066 #################################################
11067 # check for the AFS filesystem
11068 echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
11069 echo "configure:11070: checking whether to use AFS" >&5
11070 # Check whether --with-afs or --without-afs was given.
11071 if test "${with_afs+set}" = set; then
11072   withval="$with_afs"
11073    case "$withval" in
11074   yes)
11075     echo "$ac_t""yes" 1>&6
11076     cat >> confdefs.h <<\EOF
11077 #define WITH_AFS 1
11078 EOF
11079
11080     ;;
11081   *)
11082     echo "$ac_t""no" 1>&6
11083     ;;
11084   esac 
11085 else
11086   echo "$ac_t""no" 1>&6
11087
11088 fi
11089
11090
11091
11092 #################################################
11093 # check for the DFS auth system
11094 echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
11095 echo "configure:11096: checking whether to use DFS auth" >&5
11096 # Check whether --with-dfs or --without-dfs was given.
11097 if test "${with_dfs+set}" = set; then
11098   withval="$with_dfs"
11099    case "$withval" in
11100   yes)
11101     echo "$ac_t""yes" 1>&6
11102     cat >> confdefs.h <<\EOF
11103 #define WITH_DFS 1
11104 EOF
11105
11106     ;;
11107   *)
11108     echo "$ac_t""no" 1>&6
11109     ;;
11110   esac 
11111 else
11112   echo "$ac_t""no" 1>&6
11113
11114 fi
11115
11116
11117 #################################################
11118 # check for Kerberos IV auth system
11119 echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
11120 echo "configure:11121: checking whether to use Kerberos IV" >&5
11121 # Check whether --with-krb4 or --without-krb4 was given.
11122 if test "${with_krb4+set}" = set; then
11123   withval="$with_krb4"
11124    case "$withval" in
11125   yes)
11126     echo "$ac_t""yes" 1>&6
11127     cat >> confdefs.h <<\EOF
11128 #define KRB4_AUTH 1
11129 EOF
11130
11131     echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
11132 echo "configure:11133: checking for dn_expand in -lresolv" >&5
11133 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
11134 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11135   echo $ac_n "(cached) $ac_c" 1>&6
11136 else
11137   ac_save_LIBS="$LIBS"
11138 LIBS="-lresolv  $LIBS"
11139 cat > conftest.$ac_ext <<EOF
11140 #line 11141 "configure"
11141 #include "confdefs.h"
11142 /* Override any gcc2 internal prototype to avoid an error.  */
11143 /* We use char because int might match the return type of a gcc2
11144     builtin and then its argument prototype would still apply.  */
11145 char dn_expand();
11146
11147 int main() {
11148 dn_expand()
11149 ; return 0; }
11150 EOF
11151 if { (eval echo configure:11152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11152   rm -rf conftest*
11153   eval "ac_cv_lib_$ac_lib_var=yes"
11154 else
11155   echo "configure: failed program was:" >&5
11156   cat conftest.$ac_ext >&5
11157   rm -rf conftest*
11158   eval "ac_cv_lib_$ac_lib_var=no"
11159 fi
11160 rm -f conftest*
11161 LIBS="$ac_save_LIBS"
11162
11163 fi
11164 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11165   echo "$ac_t""yes" 1>&6
11166     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11167     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11168   cat >> confdefs.h <<EOF
11169 #define $ac_tr_lib 1
11170 EOF
11171
11172   LIBS="-lresolv $LIBS"
11173
11174 else
11175   echo "$ac_t""no" 1>&6
11176 fi
11177
11178     LIBS="$LIBS -lkrb -ldes"
11179     CFLAGS="$CFLAGS -I$withval/include"
11180     LDFLAGS="$LDFLAGS -L$withval/lib"
11181     cat >> confdefs.h <<EOF
11182 #define KRB4_DIR ${withval}
11183 EOF
11184
11185     ;;
11186   *)
11187     echo "$ac_t""no" 1>&6
11188     ;;
11189   esac 
11190 else
11191   echo "$ac_t""no" 1>&6
11192
11193 fi
11194
11195
11196 #################################################
11197 # check for Kerberos 5 auth system
11198 echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6
11199 echo "configure:11200: checking whether to use Kerberos 5" >&5
11200 # Check whether --with-krb5 or --without-krb5 was given.
11201 if test "${with_krb5+set}" = set; then
11202   withval="$with_krb5"
11203    case "$withval" in
11204   yes)
11205     echo "$ac_t""yes" 1>&6
11206     cat >> confdefs.h <<\EOF
11207 #define KRB5_AUTH 1
11208 EOF
11209
11210     LIBS="$LIBS -ldes425 -lkrb5 -lcrypto -lcom_err"
11211     CFLAGS="$CFLAGS -I$withval/include"
11212     LDFLAGS="$LDFLAGS -L$withval/lib"
11213     cat >> confdefs.h <<EOF
11214 #define KRB5_DIR ${withval}
11215 EOF
11216
11217     ;;
11218   *)
11219     echo "$ac_t""no" 1>&6
11220     ;;
11221   esac 
11222 else
11223   echo "$ac_t""no" 1>&6
11224
11225 fi
11226
11227
11228 #################################################
11229 # check for automount support
11230 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
11231 echo "configure:11232: checking whether to use AUTOMOUNT" >&5
11232 # Check whether --with-automount or --without-automount was given.
11233 if test "${with_automount+set}" = set; then
11234   withval="$with_automount"
11235    case "$withval" in
11236   yes)
11237     echo "$ac_t""yes" 1>&6
11238     cat >> confdefs.h <<\EOF
11239 #define WITH_AUTOMOUNT 1
11240 EOF
11241
11242     ;;
11243   *)
11244     echo "$ac_t""no" 1>&6
11245     ;;
11246   esac 
11247 else
11248   echo "$ac_t""no" 1>&6
11249
11250 fi
11251
11252
11253 #################################################
11254 # check for smbmount support
11255 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
11256 echo "configure:11257: checking whether to use SMBMOUNT" >&5
11257 # Check whether --with-smbmount or --without-smbmount was given.
11258 if test "${with_smbmount+set}" = set; then
11259   withval="$with_smbmount"
11260    case "$withval" in
11261   yes)
11262         case "$host_os" in
11263         *linux*)
11264                 echo "$ac_t""yes" 1>&6
11265                 cat >> confdefs.h <<\EOF
11266 #define WITH_SMBMOUNT 1
11267 EOF
11268
11269                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
11270                 ;;
11271         *)
11272                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
11273                 ;;
11274         esac
11275     ;;
11276   *)
11277     echo "$ac_t""no" 1>&6
11278     MPROGS=
11279     ;;
11280   esac 
11281 else
11282   echo "$ac_t""no" 1>&6
11283   MPROGS=
11284
11285 fi
11286
11287
11288
11289 #################################################
11290 # check for a PAM password database
11291 with_pam_for_crypt=no
11292 echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6
11293 echo "configure:11294: checking whether to use PAM password database" >&5
11294 # Check whether --with-pam or --without-pam was given.
11295 if test "${with_pam+set}" = set; then
11296   withval="$with_pam"
11297    case "$withval" in
11298   yes)
11299     echo "$ac_t""yes" 1>&6
11300     cat >> confdefs.h <<\EOF
11301 #define WITH_PAM 1
11302 EOF
11303
11304     LIBS="$LIBS -lpam"
11305     with_pam_for_crypt=yes
11306     ;;
11307   *)
11308     echo "$ac_t""no" 1>&6
11309     ;;
11310   esac 
11311 else
11312   echo "$ac_t""no" 1>&6
11313
11314 fi
11315
11316
11317 # we can't build a pam module if we don't have pam.
11318 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
11319 echo "configure:11320: checking for pam_get_data in -lpam" >&5
11320 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
11321 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11322   echo $ac_n "(cached) $ac_c" 1>&6
11323 else
11324   ac_save_LIBS="$LIBS"
11325 LIBS="-lpam  $LIBS"
11326 cat > conftest.$ac_ext <<EOF
11327 #line 11328 "configure"
11328 #include "confdefs.h"
11329 /* Override any gcc2 internal prototype to avoid an error.  */
11330 /* We use char because int might match the return type of a gcc2
11331     builtin and then its argument prototype would still apply.  */
11332 char pam_get_data();
11333
11334 int main() {
11335 pam_get_data()
11336 ; return 0; }
11337 EOF
11338 if { (eval echo configure:11339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11339   rm -rf conftest*
11340   eval "ac_cv_lib_$ac_lib_var=yes"
11341 else
11342   echo "configure: failed program was:" >&5
11343   cat conftest.$ac_ext >&5
11344   rm -rf conftest*
11345   eval "ac_cv_lib_$ac_lib_var=no"
11346 fi
11347 rm -f conftest*
11348 LIBS="$ac_save_LIBS"
11349
11350 fi
11351 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11352   echo "$ac_t""yes" 1>&6
11353   cat >> confdefs.h <<\EOF
11354 #define HAVE_LIBPAM 1
11355 EOF
11356
11357 else
11358   echo "$ac_t""no" 1>&6
11359 fi
11360
11361
11362 #################################################
11363 # check for pam_smbpass support
11364 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
11365 echo "configure:11366: checking whether to use pam_smbpass" >&5
11366 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
11367 if test "${with_pam_smbpass+set}" = set; then
11368   withval="$with_pam_smbpass"
11369    case "$withval" in
11370   yes)
11371     echo "$ac_t""yes" 1>&6
11372
11373 # Conditions under which pam_smbpass should not be built.
11374
11375        if test x$PICFLAG = x; then
11376           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
11377           PAM_MOD=""
11378        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
11379           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
11380           PAM_MOD=""
11381        else
11382           PAM_MOD="bin/pam_smbpass.so"
11383        fi
11384     ;;
11385   *)
11386     echo "$ac_t""no" 1>&6
11387     ;;
11388   esac 
11389 else
11390   echo "$ac_t""no" 1>&6
11391
11392 fi
11393
11394
11395
11396 ###############################################
11397 # test for where we get crypt() from, but only
11398 # if not using PAM
11399 if test $with_pam_for_crypt = no; then
11400 for ac_func in crypt
11401 do
11402 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11403 echo "configure:11404: checking for $ac_func" >&5
11404 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11405   echo $ac_n "(cached) $ac_c" 1>&6
11406 else
11407   cat > conftest.$ac_ext <<EOF
11408 #line 11409 "configure"
11409 #include "confdefs.h"
11410 /* System header to define __stub macros and hopefully few prototypes,
11411     which can conflict with char $ac_func(); below.  */
11412 #include <assert.h>
11413 /* Override any gcc2 internal prototype to avoid an error.  */
11414 /* We use char because int might match the return type of a gcc2
11415     builtin and then its argument prototype would still apply.  */
11416 char $ac_func();
11417
11418 int main() {
11419
11420 /* The GNU C library defines this for functions which it implements
11421     to always fail with ENOSYS.  Some functions are actually named
11422     something starting with __ and the normal name is an alias.  */
11423 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11424 choke me
11425 #else
11426 $ac_func();
11427 #endif
11428
11429 ; return 0; }
11430 EOF
11431 if { (eval echo configure:11432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11432   rm -rf conftest*
11433   eval "ac_cv_func_$ac_func=yes"
11434 else
11435   echo "configure: failed program was:" >&5
11436   cat conftest.$ac_ext >&5
11437   rm -rf conftest*
11438   eval "ac_cv_func_$ac_func=no"
11439 fi
11440 rm -f conftest*
11441 fi
11442
11443 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11444   echo "$ac_t""yes" 1>&6
11445     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11446   cat >> confdefs.h <<EOF
11447 #define $ac_tr_func 1
11448 EOF
11449  
11450 else
11451   echo "$ac_t""no" 1>&6
11452 fi
11453 done
11454
11455 if test x"$ac_cv_func_crypt" = x"no"; then
11456     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
11457 echo "configure:11458: checking for crypt in -lcrypt" >&5
11458 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
11459 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11460   echo $ac_n "(cached) $ac_c" 1>&6
11461 else
11462   ac_save_LIBS="$LIBS"
11463 LIBS="-lcrypt  $LIBS"
11464 cat > conftest.$ac_ext <<EOF
11465 #line 11466 "configure"
11466 #include "confdefs.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 crypt();
11471
11472 int main() {
11473 crypt()
11474 ; return 0; }
11475 EOF
11476 if { (eval echo configure:11477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11477   rm -rf conftest*
11478   eval "ac_cv_lib_$ac_lib_var=yes"
11479 else
11480   echo "configure: failed program was:" >&5
11481   cat conftest.$ac_ext >&5
11482   rm -rf conftest*
11483   eval "ac_cv_lib_$ac_lib_var=no"
11484 fi
11485 rm -f conftest*
11486 LIBS="$ac_save_LIBS"
11487
11488 fi
11489 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11490   echo "$ac_t""yes" 1>&6
11491   LIBS="$LIBS -lcrypt";
11492         cat >> confdefs.h <<\EOF
11493 #define HAVE_CRYPT 1
11494 EOF
11495
11496 else
11497   echo "$ac_t""no" 1>&6
11498 fi
11499
11500 fi
11501 fi
11502
11503 ##
11504 ## moved after the check for -lcrypt in order to
11505 ## ensure that the necessary libraries are included
11506 ## check checking for truncated salt.  Wrapped by the
11507 ## $with_pam_for_crypt variable as above   --jerry
11508 ##
11509 if test $with_pam_for_crypt = no; then
11510 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
11511 echo "configure:11512: checking for a crypt that needs truncated salt" >&5
11512 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
11513   echo $ac_n "(cached) $ac_c" 1>&6
11514 else
11515   
11516 if test "$cross_compiling" = yes; then
11517   samba_cv_HAVE_TRUNCATED_SALT=cross
11518 else
11519   cat > conftest.$ac_ext <<EOF
11520 #line 11521 "configure"
11521 #include "confdefs.h"
11522 #include "${srcdir-.}/tests/crypttest.c"
11523 EOF
11524 if { (eval echo configure:11525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11525 then
11526   samba_cv_HAVE_TRUNCATED_SALT=no
11527 else
11528   echo "configure: failed program was:" >&5
11529   cat conftest.$ac_ext >&5
11530   rm -fr conftest*
11531   samba_cv_HAVE_TRUNCATED_SALT=yes
11532 fi
11533 rm -fr conftest*
11534 fi
11535
11536 fi
11537
11538 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
11539 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
11540         cat >> confdefs.h <<\EOF
11541 #define HAVE_TRUNCATED_SALT 1
11542 EOF
11543
11544 fi
11545 fi
11546
11547
11548 #################################################
11549 # check for a TDB password database
11550 echo $ac_n "checking whether to use TDB password database""... $ac_c" 1>&6
11551 echo "configure:11552: checking whether to use TDB password database" >&5
11552 # Check whether --with-tdbsam or --without-tdbsam was given.
11553 if test "${with_tdbsam+set}" = set; then
11554   withval="$with_tdbsam"
11555    case "$withval" in
11556   yes)
11557     echo "$ac_t""yes" 1>&6
11558     cat >> confdefs.h <<\EOF
11559 #define WITH_TDBSAM 1
11560 EOF
11561
11562     ;;
11563   *)
11564     echo "$ac_t""no" 1>&6
11565     ;;
11566   esac 
11567 else
11568   echo "$ac_t""no" 1>&6
11569
11570 fi
11571
11572
11573 #################################################
11574 # check for a LDAP password database
11575 echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6
11576 echo "configure:11577: checking whether to use LDAP password database" >&5
11577 # Check whether --with-ldap or --without-ldap was given.
11578 if test "${with_ldap+set}" = set; then
11579   withval="$with_ldap"
11580    case "$withval" in
11581   yes)
11582     echo "$ac_t""yes" 1>&6
11583     cat >> confdefs.h <<\EOF
11584 #define WITH_LDAP 1
11585 EOF
11586
11587     { echo "configure: error: LDAP password database not supported in this version." 1>&2; exit 1; }
11588     ;;
11589   *)
11590     echo "$ac_t""no" 1>&6
11591     ;;
11592   esac 
11593 else
11594   echo "$ac_t""no" 1>&6
11595
11596 fi
11597
11598
11599 #################################################
11600 # commented out by --jerry
11601 # check for a NISPLUS password database
11602 #AC_MSG_CHECKING(whether to use NISPLUS password database)
11603 #AC_ARG_WITH(nisplus,
11604 #[  --with-nisplus     Include NISPLUS password database support
11605 #[ case "$withval" in
11606 #  yes)
11607 #    AC_MSG_RESULT(yes)
11608 #    AC_DEFINE(WITH_NISPLUS)
11609 #    ;;
11610 #  *)
11611 #    AC_MSG_RESULT(no)
11612 #    ;;
11613 #  esac ],
11614 #  AC_MSG_RESULT(no)
11615 #)
11616
11617 #################################################
11618 # check for a NISPLUS_HOME support 
11619 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
11620 echo "configure:11621: checking whether to use NISPLUS_HOME" >&5
11621 # Check whether --with-nisplus-home or --without-nisplus-home was given.
11622 if test "${with_nisplus_home+set}" = set; then
11623   withval="$with_nisplus_home"
11624    case "$withval" in
11625   yes)
11626     echo "$ac_t""yes" 1>&6
11627     cat >> confdefs.h <<\EOF
11628 #define WITH_NISPLUS_HOME 1
11629 EOF
11630
11631     ;;
11632   *)
11633     echo "$ac_t""no" 1>&6
11634     ;;
11635   esac 
11636 else
11637   echo "$ac_t""no" 1>&6
11638
11639 fi
11640
11641
11642 #################################################
11643 # check for the secure socket layer
11644 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
11645 echo "configure:11646: checking whether to use SSL" >&5
11646 # Check whether --with-ssl or --without-ssl was given.
11647 if test "${with_ssl+set}" = set; then
11648   withval="$with_ssl"
11649    case "$withval" in
11650   yes)
11651     echo "$ac_t""yes" 1>&6
11652     cat >> confdefs.h <<\EOF
11653 #define WITH_SSL 1
11654 EOF
11655
11656     withval="/usr/local/ssl"     # default
11657
11658     if test "${with_sslinc+set}" = set; then
11659
11660         withval="$with_sslinc"
11661         case "$withval" in
11662         yes|no)
11663           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
11664           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
11665           LIBS="-lssl -lcrypto $LIBS"
11666           LDFLAGS="=L/usr/local/ssl/lib $LDFLAGS"
11667           cat >> confdefs.h <<\EOF
11668 #define SSL_DIR "/usr/local/ssl"
11669 EOF
11670
11671         ;;
11672         * )
11673           CFLAGS="-I${withval} $CFLAGS"
11674           LIBS="-lssl -lcrypto $LIBS"
11675           LDFLAGS="-L${withval}/lib $LDFLAGS"
11676           cat >> confdefs.h <<EOF
11677 #define SSL_DIR "${withval}"
11678 EOF
11679
11680         ;;
11681         esac
11682
11683     else
11684
11685         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
11686         LIBS="-lssl -lcrypto $LIBS"
11687         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
11688         cat >> confdefs.h <<\EOF
11689 #define SSL_DIR "/usr/local/ssl"
11690 EOF
11691
11692
11693     fi
11694     
11695     if test ! -d ${withval}; then
11696       echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
11697       exit 1
11698     fi 
11699
11700     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
11701
11702     ;;
11703   *)
11704     echo "$ac_t""no" 1>&6
11705     ;;
11706   esac 
11707 else
11708   echo "$ac_t""no" 1>&6
11709
11710 fi
11711
11712
11713 #################################################
11714 # check for syslog logging
11715 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
11716 echo "configure:11717: checking whether to use syslog logging" >&5
11717 # Check whether --with-syslog or --without-syslog was given.
11718 if test "${with_syslog+set}" = set; then
11719   withval="$with_syslog"
11720    case "$withval" in
11721   yes)
11722     echo "$ac_t""yes" 1>&6
11723     cat >> confdefs.h <<\EOF
11724 #define WITH_SYSLOG 1
11725 EOF
11726
11727     ;;
11728   *)
11729     echo "$ac_t""no" 1>&6
11730     ;;
11731   esac 
11732 else
11733   echo "$ac_t""no" 1>&6
11734
11735 fi
11736
11737
11738 #################################################
11739 # check for a shared memory profiling support
11740 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
11741 echo "configure:11742: checking whether to use profiling" >&5
11742 # Check whether --with-profiling-data or --without-profiling-data was given.
11743 if test "${with_profiling_data+set}" = set; then
11744   withval="$with_profiling_data"
11745    case "$withval" in
11746   yes)
11747     echo "$ac_t""yes" 1>&6
11748     cat >> confdefs.h <<\EOF
11749 #define WITH_PROFILE 1
11750 EOF
11751
11752     ;;
11753   *)
11754     echo "$ac_t""no" 1>&6
11755     ;;
11756   esac 
11757 else
11758   echo "$ac_t""no" 1>&6
11759
11760 fi
11761
11762
11763
11764 #################################################
11765 # check for experimental disk-quotas support
11766 QUOTAOBJS=smbd/noquotas.o
11767
11768 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
11769 echo "configure:11770: checking whether to support disk-quotas" >&5
11770 # Check whether --with-quotas or --without-quotas was given.
11771 if test "${with_quotas+set}" = set; then
11772   withval="$with_quotas"
11773    case "$withval" in
11774   yes)
11775     echo "$ac_t""yes" 1>&6
11776     QUOTAOBJS=smbd/quotas.o
11777     cat >> confdefs.h <<\EOF
11778 #define WITH_QUOTAS 1
11779 EOF
11780
11781     ;;
11782   *)
11783     echo "$ac_t""no" 1>&6
11784     ;;
11785   esac 
11786 else
11787   echo "$ac_t""no" 1>&6
11788
11789 fi
11790
11791
11792
11793 #################################################
11794 # check for experimental utmp accounting
11795
11796 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
11797 echo "configure:11798: checking whether to support utmp accounting" >&5
11798 # Check whether --with-utmp or --without-utmp was given.
11799 if test "${with_utmp+set}" = set; then
11800   withval="$with_utmp"
11801    case "$withval" in
11802   yes)
11803     echo "$ac_t""yes" 1>&6
11804     cat >> confdefs.h <<\EOF
11805 #define WITH_UTMP 1
11806 EOF
11807
11808     ;;
11809   *)
11810     echo "$ac_t""no" 1>&6
11811     ;;
11812   esac 
11813 else
11814   echo "$ac_t""no" 1>&6
11815
11816 fi
11817
11818
11819 #################################################
11820 # set private directory location
11821 # Check whether --with-privatedir or --without-privatedir was given.
11822 if test "${with_privatedir+set}" = set; then
11823   withval="$with_privatedir"
11824    case "$withval" in
11825   yes|no)
11826   #
11827   # Just in case anybody calls it without argument
11828   #
11829     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
11830     privatedir='${prefix}/private'
11831   ;;
11832   * )
11833     privatedir="$withval"
11834     ;;
11835   esac
11836   
11837 else
11838   privatedir='${prefix}/private'
11839    
11840
11841 fi
11842
11843
11844 #################################################
11845 # set lock directory location
11846 # Check whether --with-lockdir or --without-lockdir was given.
11847 if test "${with_lockdir+set}" = set; then
11848   withval="$with_lockdir"
11849    case "$withval" in
11850   yes|no)
11851   #
11852   # Just in case anybody calls it without argument
11853   #
11854     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
11855     lockdir='$(VARDIR)/locks'
11856   ;;
11857   * )
11858     lockdir="$withval"
11859     ;;
11860   esac
11861   
11862 else
11863   lockdir='$(VARDIR)/locks'
11864    
11865
11866 fi
11867
11868
11869 #################################################
11870 # set SWAT directory location
11871 # Check whether --with-swatdir or --without-swatdir was given.
11872 if test "${with_swatdir+set}" = set; then
11873   withval="$with_swatdir"
11874    case "$withval" in
11875   yes|no)
11876   #
11877   # Just in case anybody does it
11878   #
11879     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
11880     swatdir='${prefix}/swat'
11881   ;;
11882   * )
11883     swatdir="$withval"
11884     ;;
11885   esac
11886   
11887 else
11888   swatdir='${prefix}/swat'
11889    
11890
11891 fi
11892
11893
11894 #################################################
11895 # these tests are taken from the GNU fileutils package
11896 echo "checking how to get filesystem space usage" 1>&6
11897 echo "configure:11898: checking how to get filesystem space usage" >&5
11898 space=no
11899
11900 # Test for statvfs64.
11901 if test $space = no; then
11902   # SVR4
11903   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
11904 echo "configure:11905: checking statvfs64 function (SVR4)" >&5
11905 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
11906   echo $ac_n "(cached) $ac_c" 1>&6
11907 else
11908   if test "$cross_compiling" = yes; then
11909   fu_cv_sys_stat_statvfs64=cross
11910 else
11911   cat > conftest.$ac_ext <<EOF
11912 #line 11913 "configure"
11913 #include "confdefs.h"
11914
11915 #if defined(HAVE_UNISTD_H)
11916 #include <unistd.h>
11917 #endif
11918 #include <sys/types.h>
11919 #include <sys/statvfs.h>
11920   main ()
11921   {
11922     struct statvfs64 fsd;
11923     exit (statvfs64 (".", &fsd));
11924   }
11925 EOF
11926 if { (eval echo configure:11927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11927 then
11928   fu_cv_sys_stat_statvfs64=yes
11929 else
11930   echo "configure: failed program was:" >&5
11931   cat conftest.$ac_ext >&5
11932   rm -fr conftest*
11933   fu_cv_sys_stat_statvfs64=no
11934 fi
11935 rm -fr conftest*
11936 fi
11937
11938 fi
11939
11940 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
11941   if test $fu_cv_sys_stat_statvfs64 = yes; then
11942     space=yes
11943     cat >> confdefs.h <<\EOF
11944 #define STAT_STATVFS64 1
11945 EOF
11946
11947   fi
11948 fi
11949
11950 # Perform only the link test since it seems there are no variants of the
11951 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
11952 # because that got a false positive on SCO OSR5.  Adding the declaration
11953 # of a `struct statvfs' causes this test to fail (as it should) on such
11954 # systems.  That system is reported to work fine with STAT_STATFS4 which
11955 # is what it gets when this test fails.
11956 if test $space = no; then
11957   # SVR4
11958   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
11959 echo "configure:11960: checking statvfs function (SVR4)" >&5
11960 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
11961   echo $ac_n "(cached) $ac_c" 1>&6
11962 else
11963   cat > conftest.$ac_ext <<EOF
11964 #line 11965 "configure"
11965 #include "confdefs.h"
11966 #include <sys/types.h>
11967 #include <sys/statvfs.h>
11968 int main() {
11969 struct statvfs fsd; statvfs (0, &fsd);
11970 ; return 0; }
11971 EOF
11972 if { (eval echo configure:11973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11973   rm -rf conftest*
11974   fu_cv_sys_stat_statvfs=yes
11975 else
11976   echo "configure: failed program was:" >&5
11977   cat conftest.$ac_ext >&5
11978   rm -rf conftest*
11979   fu_cv_sys_stat_statvfs=no
11980 fi
11981 rm -f conftest*
11982 fi
11983
11984 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
11985   if test $fu_cv_sys_stat_statvfs = yes; then
11986     space=yes
11987     cat >> confdefs.h <<\EOF
11988 #define STAT_STATVFS 1
11989 EOF
11990
11991   fi
11992 fi
11993
11994 if test $space = no; then
11995   # DEC Alpha running OSF/1
11996   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
11997 echo "configure:11998: checking for 3-argument statfs function (DEC OSF/1)" >&5
11998   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
11999   echo $ac_n "(cached) $ac_c" 1>&6
12000 else
12001   if test "$cross_compiling" = yes; then
12002   fu_cv_sys_stat_statfs3_osf1=no
12003 else
12004   cat > conftest.$ac_ext <<EOF
12005 #line 12006 "configure"
12006 #include "confdefs.h"
12007
12008 #include <sys/param.h>
12009 #include <sys/types.h>
12010 #include <sys/mount.h>
12011   main ()
12012   {
12013     struct statfs fsd;
12014     fsd.f_fsize = 0;
12015     exit (statfs (".", &fsd, sizeof (struct statfs)));
12016   }
12017 EOF
12018 if { (eval echo configure:12019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12019 then
12020   fu_cv_sys_stat_statfs3_osf1=yes
12021 else
12022   echo "configure: failed program was:" >&5
12023   cat conftest.$ac_ext >&5
12024   rm -fr conftest*
12025   fu_cv_sys_stat_statfs3_osf1=no
12026 fi
12027 rm -fr conftest*
12028 fi
12029
12030 fi
12031
12032   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
12033   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
12034     space=yes
12035     cat >> confdefs.h <<\EOF
12036 #define STAT_STATFS3_OSF1 1
12037 EOF
12038
12039   fi
12040 fi
12041
12042 if test $space = no; then
12043 # AIX
12044   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
12045 echo "configure:12046: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
12046   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
12047   echo $ac_n "(cached) $ac_c" 1>&6
12048 else
12049   if test "$cross_compiling" = yes; then
12050   fu_cv_sys_stat_statfs2_bsize=no
12051 else
12052   cat > conftest.$ac_ext <<EOF
12053 #line 12054 "configure"
12054 #include "confdefs.h"
12055
12056 #ifdef HAVE_SYS_PARAM_H
12057 #include <sys/param.h>
12058 #endif
12059 #ifdef HAVE_SYS_MOUNT_H
12060 #include <sys/mount.h>
12061 #endif
12062 #ifdef HAVE_SYS_VFS_H
12063 #include <sys/vfs.h>
12064 #endif
12065   main ()
12066   {
12067   struct statfs fsd;
12068   fsd.f_bsize = 0;
12069   exit (statfs (".", &fsd));
12070   }
12071 EOF
12072 if { (eval echo configure:12073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12073 then
12074   fu_cv_sys_stat_statfs2_bsize=yes
12075 else
12076   echo "configure: failed program was:" >&5
12077   cat conftest.$ac_ext >&5
12078   rm -fr conftest*
12079   fu_cv_sys_stat_statfs2_bsize=no
12080 fi
12081 rm -fr conftest*
12082 fi
12083
12084 fi
12085
12086   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
12087   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
12088     space=yes
12089     cat >> confdefs.h <<\EOF
12090 #define STAT_STATFS2_BSIZE 1
12091 EOF
12092
12093   fi
12094 fi
12095
12096 if test $space = no; then
12097 # SVR3
12098   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
12099 echo "configure:12100: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
12100   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
12101   echo $ac_n "(cached) $ac_c" 1>&6
12102 else
12103   if test "$cross_compiling" = yes; then
12104   fu_cv_sys_stat_statfs4=no
12105 else
12106   cat > conftest.$ac_ext <<EOF
12107 #line 12108 "configure"
12108 #include "confdefs.h"
12109 #include <sys/types.h>
12110 #include <sys/statfs.h>
12111   main ()
12112   {
12113   struct statfs fsd;
12114   exit (statfs (".", &fsd, sizeof fsd, 0));
12115   }
12116 EOF
12117 if { (eval echo configure:12118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12118 then
12119   fu_cv_sys_stat_statfs4=yes
12120 else
12121   echo "configure: failed program was:" >&5
12122   cat conftest.$ac_ext >&5
12123   rm -fr conftest*
12124   fu_cv_sys_stat_statfs4=no
12125 fi
12126 rm -fr conftest*
12127 fi
12128
12129 fi
12130
12131   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
12132   if test $fu_cv_sys_stat_statfs4 = yes; then
12133     space=yes
12134     cat >> confdefs.h <<\EOF
12135 #define STAT_STATFS4 1
12136 EOF
12137
12138   fi
12139 fi
12140
12141 if test $space = no; then
12142 # 4.4BSD and NetBSD
12143   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
12144 echo "configure:12145: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
12145   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
12146   echo $ac_n "(cached) $ac_c" 1>&6
12147 else
12148   if test "$cross_compiling" = yes; then
12149   fu_cv_sys_stat_statfs2_fsize=no
12150 else
12151   cat > conftest.$ac_ext <<EOF
12152 #line 12153 "configure"
12153 #include "confdefs.h"
12154 #include <sys/types.h>
12155 #ifdef HAVE_SYS_PARAM_H
12156 #include <sys/param.h>
12157 #endif
12158 #ifdef HAVE_SYS_MOUNT_H
12159 #include <sys/mount.h>
12160 #endif
12161   main ()
12162   {
12163   struct statfs fsd;
12164   fsd.f_fsize = 0;
12165   exit (statfs (".", &fsd));
12166   }
12167 EOF
12168 if { (eval echo configure:12169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12169 then
12170   fu_cv_sys_stat_statfs2_fsize=yes
12171 else
12172   echo "configure: failed program was:" >&5
12173   cat conftest.$ac_ext >&5
12174   rm -fr conftest*
12175   fu_cv_sys_stat_statfs2_fsize=no
12176 fi
12177 rm -fr conftest*
12178 fi
12179
12180 fi
12181
12182   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
12183   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
12184     space=yes
12185     cat >> confdefs.h <<\EOF
12186 #define STAT_STATFS2_FSIZE 1
12187 EOF
12188
12189   fi
12190 fi
12191
12192 if test $space = no; then
12193   # Ultrix
12194   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
12195 echo "configure:12196: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
12196   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
12197   echo $ac_n "(cached) $ac_c" 1>&6
12198 else
12199   if test "$cross_compiling" = yes; then
12200   fu_cv_sys_stat_fs_data=no
12201 else
12202   cat > conftest.$ac_ext <<EOF
12203 #line 12204 "configure"
12204 #include "confdefs.h"
12205 #include <sys/types.h>
12206 #ifdef HAVE_SYS_PARAM_H
12207 #include <sys/param.h>
12208 #endif
12209 #ifdef HAVE_SYS_MOUNT_H
12210 #include <sys/mount.h>
12211 #endif
12212 #ifdef HAVE_SYS_FS_TYPES_H
12213 #include <sys/fs_types.h>
12214 #endif
12215   main ()
12216   {
12217   struct fs_data fsd;
12218   /* Ultrix's statfs returns 1 for success,
12219      0 for not mounted, -1 for failure.  */
12220   exit (statfs (".", &fsd) != 1);
12221   }
12222 EOF
12223 if { (eval echo configure:12224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12224 then
12225   fu_cv_sys_stat_fs_data=yes
12226 else
12227   echo "configure: failed program was:" >&5
12228   cat conftest.$ac_ext >&5
12229   rm -fr conftest*
12230   fu_cv_sys_stat_fs_data=no
12231 fi
12232 rm -fr conftest*
12233 fi
12234
12235 fi
12236
12237   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
12238   if test $fu_cv_sys_stat_fs_data = yes; then
12239     space=yes
12240     cat >> confdefs.h <<\EOF
12241 #define STAT_STATFS2_FS_DATA 1
12242 EOF
12243
12244   fi
12245 fi
12246
12247 #
12248 # As a gating factor for large file support, in order to
12249 # use <4GB files we must have the following minimal support
12250 # available.
12251 # long long, and a 64 bit off_t or off64_t.
12252 # If we don't have all of these then disable large
12253 # file support.
12254 #
12255 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
12256 echo "configure:12257: checking if large file support can be enabled" >&5
12257 cat > conftest.$ac_ext <<EOF
12258 #line 12259 "configure"
12259 #include "confdefs.h"
12260
12261 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
12262 #include <sys/types.h>
12263 #else
12264 __COMPILE_ERROR_
12265 #endif
12266
12267 int main() {
12268 int i
12269 ; return 0; }
12270 EOF
12271 if { (eval echo configure:12272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12272   rm -rf conftest*
12273   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
12274 else
12275   echo "configure: failed program was:" >&5
12276   cat conftest.$ac_ext >&5
12277   rm -rf conftest*
12278   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
12279 fi
12280 rm -f conftest*
12281 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
12282     cat >> confdefs.h <<\EOF
12283 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
12284 EOF
12285
12286 fi
12287 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
12288
12289 # Check whether --with-spinlocks or --without-spinlocks was given.
12290 if test "${with_spinlocks+set}" = set; then
12291   withval="$with_spinlocks"
12292   :
12293 fi
12294
12295 if test "x$with_spinlocks" = "xyes"; then
12296     cat >> confdefs.h <<\EOF
12297 #define USE_SPINLOCKS 1
12298 EOF
12299
12300
12301     case "$host_cpu" in
12302         sparc)
12303             cat >> confdefs.h <<\EOF
12304 #define SPARC_SPINLOCKS 1
12305 EOF
12306
12307             ;;
12308
12309         i386|i486|i586|i686)
12310             cat >> confdefs.h <<\EOF
12311 #define INTEL_SPINLOCKS 1
12312 EOF
12313
12314             ;;
12315
12316         mips)
12317             cat >> confdefs.h <<\EOF
12318 #define MIPS_SPINLOCKS 1
12319 EOF
12320
12321             ;;
12322
12323         powerpc)
12324             cat >> confdefs.h <<\EOF
12325 #define POWERPC_SPINLOCKS 1
12326 EOF
12327
12328             ;;
12329     esac
12330 fi
12331
12332 #################################################
12333 # check for ACL support
12334
12335 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
12336 echo "configure:12337: checking whether to support ACLs" >&5
12337 # Check whether --with-acl-support or --without-acl-support was given.
12338 if test "${with_acl_support+set}" = set; then
12339   withval="$with_acl_support"
12340    case "$withval" in
12341   yes)
12342
12343         case "$host_os" in
12344         *sysv5*)
12345             echo "$ac_t""Using UnixWare ACLs" 1>&6
12346             cat >> confdefs.h <<\EOF
12347 #define HAVE_UNIXWARE_ACLS 1
12348 EOF
12349
12350             ;;
12351         *solaris*)
12352             echo "$ac_t""Using solaris ACLs" 1>&6
12353             cat >> confdefs.h <<\EOF
12354 #define HAVE_SOLARIS_ACLS 1
12355 EOF
12356
12357             ;;
12358                 *irix*)
12359                         echo "$ac_t""Using IRIX ACLs" 1>&6
12360                         cat >> confdefs.h <<\EOF
12361 #define HAVE_IRIX_ACLS 1
12362 EOF
12363
12364                         ;;
12365                 *aix*)
12366                         echo "$ac_t""Using AIX ACLs" 1>&6
12367                         cat >> confdefs.h <<\EOF
12368 #define HAVE_AIX_ACLS 1
12369 EOF
12370
12371                         ;;
12372                 *osf*)
12373                         echo "$ac_t""Using Tru64 ACLs" 1>&6
12374                         cat >> confdefs.h <<\EOF
12375 #define HAVE_TRU64_ACLS 1
12376 EOF
12377
12378                         LIBS="$LIBS -lpacl"
12379                         ;;
12380         *)
12381                         echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
12382 echo "configure:12383: checking for acl_get_file in -lacl" >&5
12383 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
12384 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12385   echo $ac_n "(cached) $ac_c" 1>&6
12386 else
12387   ac_save_LIBS="$LIBS"
12388 LIBS="-lacl  $LIBS"
12389 cat > conftest.$ac_ext <<EOF
12390 #line 12391 "configure"
12391 #include "confdefs.h"
12392 /* Override any gcc2 internal prototype to avoid an error.  */
12393 /* We use char because int might match the return type of a gcc2
12394     builtin and then its argument prototype would still apply.  */
12395 char acl_get_file();
12396
12397 int main() {
12398 acl_get_file()
12399 ; return 0; }
12400 EOF
12401 if { (eval echo configure:12402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12402   rm -rf conftest*
12403   eval "ac_cv_lib_$ac_lib_var=yes"
12404 else
12405   echo "configure: failed program was:" >&5
12406   cat conftest.$ac_ext >&5
12407   rm -rf conftest*
12408   eval "ac_cv_lib_$ac_lib_var=no"
12409 fi
12410 rm -f conftest*
12411 LIBS="$ac_save_LIBS"
12412
12413 fi
12414 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12415   echo "$ac_t""yes" 1>&6
12416     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12417     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12418   cat >> confdefs.h <<EOF
12419 #define $ac_tr_lib 1
12420 EOF
12421
12422   LIBS="-lacl $LIBS"
12423
12424 else
12425   echo "$ac_t""no" 1>&6
12426 fi
12427
12428                         echo $ac_n "checking for ACL support""... $ac_c" 1>&6
12429 echo "configure:12430: checking for ACL support" >&5
12430 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
12431   echo $ac_n "(cached) $ac_c" 1>&6
12432 else
12433   
12434                         cat > conftest.$ac_ext <<EOF
12435 #line 12436 "configure"
12436 #include "confdefs.h"
12437 #include <sys/types.h>
12438 #include <sys/acl.h>
12439 int main() {
12440  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
12441 ; return 0; }
12442 EOF
12443 if { (eval echo configure:12444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12444   rm -rf conftest*
12445   samba_cv_HAVE_POSIX_ACLS=yes
12446 else
12447   echo "configure: failed program was:" >&5
12448   cat conftest.$ac_ext >&5
12449   rm -rf conftest*
12450   samba_cv_HAVE_POSIX_ACLS=no
12451 fi
12452 rm -f conftest*
12453 fi
12454
12455 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
12456                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
12457                                 echo "$ac_t""Using posix ACLs" 1>&6
12458                                 cat >> confdefs.h <<\EOF
12459 #define HAVE_POSIX_ACLS 1
12460 EOF
12461
12462                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
12463 echo "configure:12464: checking for acl_get_perm_np" >&5
12464 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
12465   echo $ac_n "(cached) $ac_c" 1>&6
12466 else
12467   
12468                                 cat > conftest.$ac_ext <<EOF
12469 #line 12470 "configure"
12470 #include "confdefs.h"
12471 #include <sys/types.h>
12472 #include <sys/acl.h>
12473 int main() {
12474  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
12475 ; return 0; }
12476 EOF
12477 if { (eval echo configure:12478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12478   rm -rf conftest*
12479   samba_cv_HAVE_ACL_GET_PERM_NP=yes
12480 else
12481   echo "configure: failed program was:" >&5
12482   cat conftest.$ac_ext >&5
12483   rm -rf conftest*
12484   samba_cv_HAVE_ACL_GET_PERM_NP=no
12485 fi
12486 rm -f conftest*
12487 fi
12488
12489 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
12490                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
12491                                         cat >> confdefs.h <<\EOF
12492 #define HAVE_ACL_GET_PERM_NP 1
12493 EOF
12494
12495                                 fi
12496                         fi
12497             ;;
12498         esac
12499         ;;
12500   *)
12501     echo "$ac_t""no" 1>&6
12502     cat >> confdefs.h <<\EOF
12503 #define HAVE_NO_ACLS 1
12504 EOF
12505
12506     ;;
12507   esac 
12508 else
12509   cat >> confdefs.h <<\EOF
12510 #define HAVE_NO_ACLS 1
12511 EOF
12512
12513   echo "$ac_t""no" 1>&6
12514
12515 fi
12516
12517
12518 #################################################
12519 # Check whether winbind is supported on this platform.  If so we need to
12520 # build and install client programs (WINBIND_TARGETS), sbin programs
12521 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
12522
12523 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
12524 echo "configure:12525: checking whether to build winbind" >&5
12525
12526 # Initially, the value of $host_os decides whether winbind is supported
12527
12528 case "$host_os" in 
12529         *linux*|*solaris*)
12530                 HAVE_WINBIND=yes
12531                 ;;
12532         *)
12533                 HAVE_WINBIND=no
12534                 winbind_no_reason=", unsupported on $host_os"
12535                 ;;
12536 esac
12537
12538 # Check the setting of --with-winbindd
12539
12540 # Check whether --with-winbind or --without-winbind was given.
12541 if test "${with_winbind+set}" = set; then
12542   withval="$with_winbind"
12543    
12544   case "$withval" in
12545         yes)
12546                 HAVE_WINBIND=yes
12547                 ;;
12548         no)
12549                 HAVE_WINBIND=no
12550                 winbind_reason=""
12551                 ;;
12552   esac 
12553 fi
12554
12555
12556 # We need unix domain sockets for winbind
12557
12558 if test x"$HAVE_WINBIND" = x"yes"; then
12559         if test x"$samba_cv_unixsocket" = x"no"; then
12560                 winbind_no_reason=", no unix domain socket support on $host_os"
12561                 HAVE_WINBIND=no
12562         fi
12563 fi
12564
12565 # Display test results
12566
12567 if test x"$HAVE_WINBIND" = x"yes"; then
12568
12569         echo "$ac_t""yes" 1>&6
12570
12571         WINBIND_TARGETS="\$(WINBIND_PROGS)"
12572         WINBIND_STARGETS="\$(WINBIND_SPROGS)"
12573         WINBIND_LTARGETS="\$(WINBIND_LPROGS)"
12574         case "$with_pam" in
12575                 yes)
12576                         WINBIND_PAM_PROGS="\$(WINBIND_PAM_PROGS)"
12577                 ;;
12578         esac
12579 else
12580         echo "$ac_t""no$winbind_no_reason" 1>&6
12581
12582         WINBIND_TARGETS=""
12583         WINBIND_STARGETS=""
12584         WINBIND_LTARGETS=""
12585         WINBIND_PAM_PROGS=""
12586 fi
12587
12588 # Substitution time!
12589
12590
12591
12592
12593
12594
12595 #################################################
12596 # final configure stuff
12597
12598 echo "checking configure summary"
12599 if test "$cross_compiling" = yes; then
12600   :
12601 else
12602   cat > conftest.$ac_ext <<EOF
12603 #line 12604 "configure"
12604 #include "confdefs.h"
12605 #include "${srcdir-.}/tests/summary.c"
12606 EOF
12607 if { (eval echo configure:12608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12608 then
12609   echo "configure OK";
12610 else
12611   echo "configure: failed program was:" >&5
12612   cat conftest.$ac_ext >&5
12613   rm -fr conftest*
12614   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
12615 fi
12616 rm -fr conftest*
12617 fi
12618
12619
12620 builddir=`pwd`
12621
12622
12623 trap '' 1 2 15
12624 cat > confcache <<\EOF
12625 # This file is a shell script that caches the results of configure
12626 # tests run on this system so they can be shared between configure
12627 # scripts and configure runs.  It is not useful on other systems.
12628 # If it contains results you don't want to keep, you may remove or edit it.
12629 #
12630 # By default, configure uses ./config.cache as the cache file,
12631 # creating it if it does not exist already.  You can give configure
12632 # the --cache-file=FILE option to use a different cache file; that is
12633 # what configure does when it calls configure scripts in
12634 # subdirectories, so they share the cache.
12635 # Giving --cache-file=/dev/null disables caching, for debugging configure.
12636 # config.status only pays attention to the cache file if you give it the
12637 # --recheck option to rerun configure.
12638 #
12639 EOF
12640 # The following way of writing the cache mishandles newlines in values,
12641 # but we know of no workaround that is simple, portable, and efficient.
12642 # So, don't put newlines in cache variables' values.
12643 # Ultrix sh set writes to stderr and can't be redirected directly,
12644 # and sets the high bit in the cache file unless we assign to the vars.
12645 (set) 2>&1 |
12646   case `(ac_space=' '; set | grep ac_space) 2>&1` in
12647   *ac_space=\ *)
12648     # `set' does not quote correctly, so add quotes (double-quote substitution
12649     # turns \\\\ into \\, and sed turns \\ into \).
12650     sed -n \
12651       -e "s/'/'\\\\''/g" \
12652       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
12653     ;;
12654   *)
12655     # `set' quotes correctly as required by POSIX, so do not add quotes.
12656     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
12657     ;;
12658   esac >> confcache
12659 if cmp -s $cache_file confcache; then
12660   :
12661 else
12662   if test -w $cache_file; then
12663     echo "updating cache $cache_file"
12664     cat confcache > $cache_file
12665   else
12666     echo "not updating unwritable cache $cache_file"
12667   fi
12668 fi
12669 rm -f confcache
12670
12671 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12672
12673 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12674 # Let make expand exec_prefix.
12675 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12676
12677 # Any assignment to VPATH causes Sun make to only execute
12678 # the first set of double-colon rules, so remove it if not needed.
12679 # If there is a colon in the path, we need to keep it.
12680 if test "x$srcdir" = x.; then
12681   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12682 fi
12683
12684 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12685
12686 DEFS=-DHAVE_CONFIG_H
12687
12688 # Without the "./", some shells look in PATH for config.status.
12689 : ${CONFIG_STATUS=./config.status}
12690
12691 echo creating $CONFIG_STATUS
12692 rm -f $CONFIG_STATUS
12693 cat > $CONFIG_STATUS <<EOF
12694 #! /bin/sh
12695 # Generated automatically by configure.
12696 # Run this file to recreate the current configuration.
12697 # This directory was configured as follows,
12698 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12699 #
12700 # $0 $ac_configure_args
12701 #
12702 # Compiler output produced by configure, useful for debugging
12703 # configure, is in ./config.log if it exists.
12704
12705 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12706 for ac_option
12707 do
12708   case "\$ac_option" in
12709   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12710     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12711     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12712   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12713     echo "$CONFIG_STATUS generated by autoconf version 2.13"
12714     exit 0 ;;
12715   -help | --help | --hel | --he | --h)
12716     echo "\$ac_cs_usage"; exit 0 ;;
12717   *) echo "\$ac_cs_usage"; exit 1 ;;
12718   esac
12719 done
12720
12721 ac_given_srcdir=$srcdir
12722 ac_given_INSTALL="$INSTALL"
12723
12724 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12725 EOF
12726 cat >> $CONFIG_STATUS <<EOF
12727
12728 # Protect against being on the right side of a sed subst in config.status.
12729 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12730  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12731 $ac_vpsub
12732 $extrasub
12733 s%@SHELL@%$SHELL%g
12734 s%@CFLAGS@%$CFLAGS%g
12735 s%@CPPFLAGS@%$CPPFLAGS%g
12736 s%@CXXFLAGS@%$CXXFLAGS%g
12737 s%@FFLAGS@%$FFLAGS%g
12738 s%@DEFS@%$DEFS%g
12739 s%@LDFLAGS@%$LDFLAGS%g
12740 s%@LIBS@%$LIBS%g
12741 s%@exec_prefix@%$exec_prefix%g
12742 s%@prefix@%$prefix%g
12743 s%@program_transform_name@%$program_transform_name%g
12744 s%@bindir@%$bindir%g
12745 s%@sbindir@%$sbindir%g
12746 s%@libexecdir@%$libexecdir%g
12747 s%@datadir@%$datadir%g
12748 s%@sysconfdir@%$sysconfdir%g
12749 s%@sharedstatedir@%$sharedstatedir%g
12750 s%@localstatedir@%$localstatedir%g
12751 s%@libdir@%$libdir%g
12752 s%@includedir@%$includedir%g
12753 s%@oldincludedir@%$oldincludedir%g
12754 s%@infodir@%$infodir%g
12755 s%@mandir@%$mandir%g
12756 s%@RUNPROG@%$RUNPROG%g
12757 s%@MPROGS@%$MPROGS%g
12758 s%@LDSHFLAGS@%$LDSHFLAGS%g
12759 s%@SHLD@%$SHLD%g
12760 s%@HOST_OS@%$HOST_OS%g
12761 s%@PAM_MOD@%$PAM_MOD%g
12762 s%@WRAP@%$WRAP%g
12763 s%@WRAP32@%$WRAP32%g
12764 s%@PICFLAG@%$PICFLAG%g
12765 s%@PICSUFFIX@%$PICSUFFIX%g
12766 s%@POBAD_CC@%$POBAD_CC%g
12767 s%@SHLIBEXT@%$SHLIBEXT%g
12768 s%@BLDSHARED@%$BLDSHARED%g
12769 s%@CC@%$CC%g
12770 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12771 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
12772 s%@INSTALL_DATA@%$INSTALL_DATA%g
12773 s%@AWK@%$AWK%g
12774 s%@BROKEN_CC@%$BROKEN_CC%g
12775 s%@host@%$host%g
12776 s%@host_alias@%$host_alias%g
12777 s%@host_cpu@%$host_cpu%g
12778 s%@host_vendor@%$host_vendor%g
12779 s%@host_os@%$host_os%g
12780 s%@target@%$target%g
12781 s%@target_alias@%$target_alias%g
12782 s%@target_cpu@%$target_cpu%g
12783 s%@target_vendor@%$target_vendor%g
12784 s%@target_os@%$target_os%g
12785 s%@build@%$build%g
12786 s%@build_alias@%$build_alias%g
12787 s%@build_cpu@%$build_cpu%g
12788 s%@build_vendor@%$build_vendor%g
12789 s%@build_os@%$build_os%g
12790 s%@CPP@%$CPP%g
12791 s%@LIBOBJS@%$LIBOBJS%g
12792 s%@TERMLIBS@%$TERMLIBS%g
12793 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
12794 s%@ROFF@%$ROFF%g
12795 s%@QUOTAOBJS@%$QUOTAOBJS%g
12796 s%@privatedir@%$privatedir%g
12797 s%@lockdir@%$lockdir%g
12798 s%@swatdir@%$swatdir%g
12799 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
12800 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
12801 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
12802 s%@WINBIND_PAM_PROGS@%$WINBIND_PAM_PROGS%g
12803 s%@builddir@%$builddir%g
12804
12805 CEOF
12806 EOF
12807
12808 cat >> $CONFIG_STATUS <<\EOF
12809
12810 # Split the substitutions into bite-sized pieces for seds with
12811 # small command number limits, like on Digital OSF/1 and HP-UX.
12812 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
12813 ac_file=1 # Number of current file.
12814 ac_beg=1 # First line for current file.
12815 ac_end=$ac_max_sed_cmds # Line after last line for current file.
12816 ac_more_lines=:
12817 ac_sed_cmds=""
12818 while $ac_more_lines; do
12819   if test $ac_beg -gt 1; then
12820     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
12821   else
12822     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
12823   fi
12824   if test ! -s conftest.s$ac_file; then
12825     ac_more_lines=false
12826     rm -f conftest.s$ac_file
12827   else
12828     if test -z "$ac_sed_cmds"; then
12829       ac_sed_cmds="sed -f conftest.s$ac_file"
12830     else
12831       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
12832     fi
12833     ac_file=`expr $ac_file + 1`
12834     ac_beg=$ac_end
12835     ac_end=`expr $ac_end + $ac_max_sed_cmds`
12836   fi
12837 done
12838 if test -z "$ac_sed_cmds"; then
12839   ac_sed_cmds=cat
12840 fi
12841 EOF
12842
12843 cat >> $CONFIG_STATUS <<EOF
12844
12845 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
12846 EOF
12847 cat >> $CONFIG_STATUS <<\EOF
12848 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
12849   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12850   case "$ac_file" in
12851   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12852        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12853   *) ac_file_in="${ac_file}.in" ;;
12854   esac
12855
12856   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
12857
12858   # Remove last slash and all that follows it.  Not all systems have dirname.
12859   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12860   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12861     # The file is in a subdirectory.
12862     test ! -d "$ac_dir" && mkdir "$ac_dir"
12863     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
12864     # A "../" for each directory in $ac_dir_suffix.
12865     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
12866   else
12867     ac_dir_suffix= ac_dots=
12868   fi
12869
12870   case "$ac_given_srcdir" in
12871   .)  srcdir=.
12872       if test -z "$ac_dots"; then top_srcdir=.
12873       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
12874   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
12875   *) # Relative path.
12876     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
12877     top_srcdir="$ac_dots$ac_given_srcdir" ;;
12878   esac
12879
12880   case "$ac_given_INSTALL" in
12881   [/$]*) INSTALL="$ac_given_INSTALL" ;;
12882   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
12883   esac
12884
12885   echo creating "$ac_file"
12886   rm -f "$ac_file"
12887   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
12888   case "$ac_file" in
12889   *Makefile*) ac_comsub="1i\\
12890 # $configure_input" ;;
12891   *) ac_comsub= ;;
12892   esac
12893
12894   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12895   sed -e "$ac_comsub
12896 s%@configure_input@%$configure_input%g
12897 s%@srcdir@%$srcdir%g
12898 s%@top_srcdir@%$top_srcdir%g
12899 s%@INSTALL@%$INSTALL%g
12900 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
12901 fi; done
12902 rm -f conftest.s*
12903
12904 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12905 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12906 #
12907 # ac_d sets the value in "#define NAME VALUE" lines.
12908 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12909 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
12910 ac_dC='\3'
12911 ac_dD='%g'
12912 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12913 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12914 ac_uB='\([      ]\)%\1#\2define\3'
12915 ac_uC=' '
12916 ac_uD='\4%g'
12917 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12918 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12919 ac_eB='$%\1#\2define\3'
12920 ac_eC=' '
12921 ac_eD='%g'
12922
12923 if test "${CONFIG_HEADERS+set}" != set; then
12924 EOF
12925 cat >> $CONFIG_STATUS <<EOF
12926   CONFIG_HEADERS="include/config.h"
12927 EOF
12928 cat >> $CONFIG_STATUS <<\EOF
12929 fi
12930 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
12931   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12932   case "$ac_file" in
12933   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12934        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12935   *) ac_file_in="${ac_file}.in" ;;
12936   esac
12937
12938   echo creating $ac_file
12939
12940   rm -f conftest.frag conftest.in conftest.out
12941   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12942   cat $ac_file_inputs > conftest.in
12943
12944 EOF
12945
12946 # Transform confdefs.h into a sed script conftest.vals that substitutes
12947 # the proper values into config.h.in to produce config.h.  And first:
12948 # Protect against being on the right side of a sed subst in config.status.
12949 # Protect against being in an unquoted here document in config.status.
12950 rm -f conftest.vals
12951 cat > conftest.hdr <<\EOF
12952 s/[\\&%]/\\&/g
12953 s%[\\$`]%\\&%g
12954 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
12955 s%ac_d%ac_u%gp
12956 s%ac_u%ac_e%gp
12957 EOF
12958 sed -n -f conftest.hdr confdefs.h > conftest.vals
12959 rm -f conftest.hdr
12960
12961 # This sed command replaces #undef with comments.  This is necessary, for
12962 # example, in the case of _POSIX_SOURCE, which is predefined and required
12963 # on some systems where configure will not decide to define it.
12964 cat >> conftest.vals <<\EOF
12965 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
12966 EOF
12967
12968 # Break up conftest.vals because some shells have a limit on
12969 # the size of here documents, and old seds have small limits too.
12970
12971 rm -f conftest.tail
12972 while :
12973 do
12974   ac_lines=`grep -c . conftest.vals`
12975   # grep -c gives empty output for an empty file on some AIX systems.
12976   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
12977   # Write a limited-size here document to conftest.frag.
12978   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
12979   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
12980   echo 'CEOF
12981   sed -f conftest.frag conftest.in > conftest.out
12982   rm -f conftest.in
12983   mv conftest.out conftest.in
12984 ' >> $CONFIG_STATUS
12985   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12986   rm -f conftest.vals
12987   mv conftest.tail conftest.vals
12988 done
12989 rm -f conftest.vals
12990
12991 cat >> $CONFIG_STATUS <<\EOF
12992   rm -f conftest.frag conftest.h
12993   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
12994   cat conftest.in >> conftest.h
12995   rm -f conftest.in
12996   if cmp -s $ac_file conftest.h 2>/dev/null; then
12997     echo "$ac_file is unchanged"
12998     rm -f conftest.h
12999   else
13000     # Remove last slash and all that follows it.  Not all systems have dirname.
13001       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13002       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13003       # The file is in a subdirectory.
13004       test ! -d "$ac_dir" && mkdir "$ac_dir"
13005     fi
13006     rm -f $ac_file
13007     mv conftest.h $ac_file
13008   fi
13009 fi; done
13010
13011 EOF
13012 cat >> $CONFIG_STATUS <<EOF
13013
13014 EOF
13015 cat >> $CONFIG_STATUS <<\EOF
13016
13017 exit 0
13018 EOF
13019 chmod +x $CONFIG_STATUS
13020 rm -fr confdefs* $ac_clean_files
13021 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
13022