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:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_default_prefix=/usr/local/samba
15ac_help="$ac_help
16  --enable-maintainer-mode enable some make rules for maintainers"
17ac_help="$ac_help
18  --with-smbwrapper     Include SMB wrapper support
19  --without-smbwrapper  Don't include SMB wrapper support (default)"
20ac_help="$ac_help
21  --with-afs     Include AFS support
22  --without-afs  Don't include AFS support (default)"
23ac_help="$ac_help
24  --with-dfs     Include DFS support
25  --without-dfs  Don't include DFS support (default)"
26ac_help="$ac_help
27  --with-krb4=base-dir     Include Kerberos IV support
28  --without-krb4          Don't include Kerberos IV support (default)"
29ac_help="$ac_help
30  --with-krb5=base-dir     Include Kerberos 5 support
31  --without-krb5          Don't include Kerberos 5 support (default)"
32ac_help="$ac_help
33  --with-automount     Include AUTOMOUNT support
34  --without-automount  Don't include AUTOMOUNT support (default)"
35ac_help="$ac_help
36  --with-smbmount     Include SMBMOUNT (Linux only) support
37  --without-smbmount  Don't include SMBMOUNT support (default)"
38ac_help="$ac_help
39  --with-pam     Include PAM password database support
40  --without-pam  Don't include PAM password database support (default)"
41ac_help="$ac_help
42  --with-ldap     Include LDAP support
43  --without-ldap  Don't include LDAP support (default)"
44ac_help="$ac_help
45  --with-nisplus     Include NISPLUS password database support
46  --without-nisplus  Don't include NISPLUS password database support (default)"
47ac_help="$ac_help
48  --with-nisplus-home     Include NISPLUS_HOME support
49  --without-nisplus-home  Don't include NISPLUS_HOME support (default)"
50ac_help="$ac_help
51  --with-ssl     Include SSL support
52  --without-ssl  Don't include SSL support (default)
53  --with-sslinc=DIR Where the SSL includes are (defaults to /usr/local/ssl)"
54ac_help="$ac_help
55  --with-syslog     Include experimental SYSLOG support
56  --without-syslog  Don't include SYSLOG support (default)"
57ac_help="$ac_help
58  --with-profile     Include profile support
59  --without-profile  Don't include profile support (default)"
60ac_help="$ac_help
61  --with-netatalk     Include experimental Netatalk support
62  --without-netatalk  Don't include experimental Netatalk support (default)"
63ac_help="$ac_help
64  --with-quotas     Include experimental disk-quota support
65  --without-quotas  Don't include experimental disk-quota support (default)"
66ac_help="$ac_help
67  --with-utmp     Include experimental utmp accounting
68  --without-utmp  Don't include experimental utmp accounting (default)"
69ac_help="$ac_help
70  --with-privatedir=DIR     Where to put smbpasswd ($ac_default_prefix/private)"
71ac_help="$ac_help
72  --with-lockdir=DIR     Where to put lock files ($ac_default_prefix/var/locks)"
73ac_help="$ac_help
74  --with-swatdir=DIR     Where to put SWAT files ($ac_default_prefix/swat)"
75ac_help="$ac_help
76  --with-sambabook=DIR  Where to put Using Samba book ($ac_default_prefix/swat/using_samba) (default)
77  --without-sambabook   Don't install Using Samba book"
78
79# Initialize some variables set by options.
80# The variables have the same names as the options, with
81# dashes changed to underlines.
82build=NONE
83cache_file=./config.cache
84exec_prefix=NONE
85host=NONE
86no_create=
87nonopt=NONE
88no_recursion=
89prefix=NONE
90program_prefix=NONE
91program_suffix=NONE
92program_transform_name=s,x,x,
93silent=
94site=
95srcdir=
96target=NONE
97verbose=
98x_includes=NONE
99x_libraries=NONE
100bindir='${exec_prefix}/bin'
101sbindir='${exec_prefix}/sbin'
102libexecdir='${exec_prefix}/libexec'
103datadir='${prefix}/share'
104sysconfdir='${prefix}/etc'
105sharedstatedir='${prefix}/com'
106localstatedir='${prefix}/var'
107libdir='${exec_prefix}/lib'
108includedir='${prefix}/include'
109oldincludedir='/usr/include'
110infodir='${prefix}/info'
111mandir='${prefix}/man'
112
113# Initialize some other variables.
114subdirs=
115MFLAGS= MAKEFLAGS=
116SHELL=${CONFIG_SHELL-/bin/sh}
117# Maximum number of lines to put in a shell here document.
118ac_max_here_lines=12
119
120ac_prev=
121for ac_option
122do
123
124  # If the previous option needs an argument, assign it.
125  if test -n "$ac_prev"; then
126    eval "$ac_prev=\$ac_option"
127    ac_prev=
128    continue
129  fi
130
131  case "$ac_option" in
132  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
133  *) ac_optarg= ;;
134  esac
135
136  # Accept the important Cygnus configure options, so we can diagnose typos.
137
138  case "$ac_option" in
139
140  -bindir | --bindir | --bindi | --bind | --bin | --bi)
141    ac_prev=bindir ;;
142  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
143    bindir="$ac_optarg" ;;
144
145  -build | --build | --buil | --bui | --bu)
146    ac_prev=build ;;
147  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
148    build="$ac_optarg" ;;
149
150  -cache-file | --cache-file | --cache-fil | --cache-fi \
151  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
152    ac_prev=cache_file ;;
153  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
154  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
155    cache_file="$ac_optarg" ;;
156
157  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
158    ac_prev=datadir ;;
159  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
160  | --da=*)
161    datadir="$ac_optarg" ;;
162
163  -disable-* | --disable-*)
164    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
165    # Reject names that are not valid shell variable names.
166    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
167      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
168    fi
169    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
170    eval "enable_${ac_feature}=no" ;;
171
172  -enable-* | --enable-*)
173    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
174    # Reject names that are not valid shell variable names.
175    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
176      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
177    fi
178    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
179    case "$ac_option" in
180      *=*) ;;
181      *) ac_optarg=yes ;;
182    esac
183    eval "enable_${ac_feature}='$ac_optarg'" ;;
184
185  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
186  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
187  | --exec | --exe | --ex)
188    ac_prev=exec_prefix ;;
189  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
190  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
191  | --exec=* | --exe=* | --ex=*)
192    exec_prefix="$ac_optarg" ;;
193
194  -gas | --gas | --ga | --g)
195    # Obsolete; use --with-gas.
196    with_gas=yes ;;
197
198  -help | --help | --hel | --he)
199    # Omit some internal or obsolete options to make the list less imposing.
200    # This message is too long to be a string in the A/UX 3.1 sh.
201    cat << EOF
202Usage: configure [options] [host]
203Options: [defaults in brackets after descriptions]
204Configuration:
205  --cache-file=FILE       cache test results in FILE
206  --help                  print this message
207  --no-create             do not create output files
208  --quiet, --silent       do not print \`checking...' messages
209  --version               print the version of autoconf that created configure
210Directory and file names:
211  --prefix=PREFIX         install architecture-independent files in PREFIX
212                          [$ac_default_prefix]
213  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
214                          [same as prefix]
215  --bindir=DIR            user executables in DIR [EPREFIX/bin]
216  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
217  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
218  --datadir=DIR           read-only architecture-independent data in DIR
219                          [PREFIX/share]
220  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
221  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
222                          [PREFIX/com]
223  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
224  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
225  --includedir=DIR        C header files in DIR [PREFIX/include]
226  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
227  --infodir=DIR           info documentation in DIR [PREFIX/info]
228  --mandir=DIR            man documentation in DIR [PREFIX/man]
229  --srcdir=DIR            find the sources in DIR [configure dir or ..]
230  --program-prefix=PREFIX prepend PREFIX to installed program names
231  --program-suffix=SUFFIX append SUFFIX to installed program names
232  --program-transform-name=PROGRAM
233                          run sed PROGRAM on installed program names
234EOF
235    cat << EOF
236Host type:
237  --build=BUILD           configure for building on BUILD [BUILD=HOST]
238  --host=HOST             configure for HOST [guessed]
239  --target=TARGET         configure for TARGET [TARGET=HOST]
240Features and packages:
241  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
242  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
243  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
244  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
245  --x-includes=DIR        X include files are in DIR
246  --x-libraries=DIR       X library files are in DIR
247EOF
248    if test -n "$ac_help"; then
249      echo "--enable and --with options recognized:$ac_help"
250    fi
251    exit 0 ;;
252
253  -host | --host | --hos | --ho)
254    ac_prev=host ;;
255  -host=* | --host=* | --hos=* | --ho=*)
256    host="$ac_optarg" ;;
257
258  -includedir | --includedir | --includedi | --included | --include \
259  | --includ | --inclu | --incl | --inc)
260    ac_prev=includedir ;;
261  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
262  | --includ=* | --inclu=* | --incl=* | --inc=*)
263    includedir="$ac_optarg" ;;
264
265  -infodir | --infodir | --infodi | --infod | --info | --inf)
266    ac_prev=infodir ;;
267  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
268    infodir="$ac_optarg" ;;
269
270  -libdir | --libdir | --libdi | --libd)
271    ac_prev=libdir ;;
272  -libdir=* | --libdir=* | --libdi=* | --libd=*)
273    libdir="$ac_optarg" ;;
274
275  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
276  | --libexe | --libex | --libe)
277    ac_prev=libexecdir ;;
278  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
279  | --libexe=* | --libex=* | --libe=*)
280    libexecdir="$ac_optarg" ;;
281
282  -localstatedir | --localstatedir | --localstatedi | --localstated \
283  | --localstate | --localstat | --localsta | --localst \
284  | --locals | --local | --loca | --loc | --lo)
285    ac_prev=localstatedir ;;
286  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
287  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
288  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
289    localstatedir="$ac_optarg" ;;
290
291  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
292    ac_prev=mandir ;;
293  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
294    mandir="$ac_optarg" ;;
295
296  -nfp | --nfp | --nf)
297    # Obsolete; use --without-fp.
298    with_fp=no ;;
299
300  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
301  | --no-cr | --no-c)
302    no_create=yes ;;
303
304  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
305  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
306    no_recursion=yes ;;
307
308  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
309  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
310  | --oldin | --oldi | --old | --ol | --o)
311    ac_prev=oldincludedir ;;
312  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
313  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
314  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
315    oldincludedir="$ac_optarg" ;;
316
317  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
318    ac_prev=prefix ;;
319  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
320    prefix="$ac_optarg" ;;
321
322  -program-prefix | --program-prefix | --program-prefi | --program-pref \
323  | --program-pre | --program-pr | --program-p)
324    ac_prev=program_prefix ;;
325  -program-prefix=* | --program-prefix=* | --program-prefi=* \
326  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
327    program_prefix="$ac_optarg" ;;
328
329  -program-suffix | --program-suffix | --program-suffi | --program-suff \
330  | --program-suf | --program-su | --program-s)
331    ac_prev=program_suffix ;;
332  -program-suffix=* | --program-suffix=* | --program-suffi=* \
333  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
334    program_suffix="$ac_optarg" ;;
335
336  -program-transform-name | --program-transform-name \
337  | --program-transform-nam | --program-transform-na \
338  | --program-transform-n | --program-transform- \
339  | --program-transform | --program-transfor \
340  | --program-transfo | --program-transf \
341  | --program-trans | --program-tran \
342  | --progr-tra | --program-tr | --program-t)
343    ac_prev=program_transform_name ;;
344  -program-transform-name=* | --program-transform-name=* \
345  | --program-transform-nam=* | --program-transform-na=* \
346  | --program-transform-n=* | --program-transform-=* \
347  | --program-transform=* | --program-transfor=* \
348  | --program-transfo=* | --program-transf=* \
349  | --program-trans=* | --program-tran=* \
350  | --progr-tra=* | --program-tr=* | --program-t=*)
351    program_transform_name="$ac_optarg" ;;
352
353  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
354  | -silent | --silent | --silen | --sile | --sil)
355    silent=yes ;;
356
357  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
358    ac_prev=sbindir ;;
359  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
360  | --sbi=* | --sb=*)
361    sbindir="$ac_optarg" ;;
362
363  -sharedstatedir | --sharedstatedir | --sharedstatedi \
364  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
365  | --sharedst | --shareds | --shared | --share | --shar \
366  | --sha | --sh)
367    ac_prev=sharedstatedir ;;
368  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
369  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
370  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
371  | --sha=* | --sh=*)
372    sharedstatedir="$ac_optarg" ;;
373
374  -site | --site | --sit)
375    ac_prev=site ;;
376  -site=* | --site=* | --sit=*)
377    site="$ac_optarg" ;;
378
379  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
380    ac_prev=srcdir ;;
381  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
382    srcdir="$ac_optarg" ;;
383
384  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
385  | --syscon | --sysco | --sysc | --sys | --sy)
386    ac_prev=sysconfdir ;;
387  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
388  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
389    sysconfdir="$ac_optarg" ;;
390
391  -target | --target | --targe | --targ | --tar | --ta | --t)
392    ac_prev=target ;;
393  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
394    target="$ac_optarg" ;;
395
396  -v | -verbose | --verbose | --verbos | --verbo | --verb)
397    verbose=yes ;;
398
399  -version | --version | --versio | --versi | --vers)
400    echo "configure generated by autoconf version 2.13"
401    exit 0 ;;
402
403  -with-* | --with-*)
404    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
405    # Reject names that are not valid shell variable names.
406    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
407      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
408    fi
409    ac_package=`echo $ac_package| sed 's/-/_/g'`
410    case "$ac_option" in
411      *=*) ;;
412      *) ac_optarg=yes ;;
413    esac
414    eval "with_${ac_package}='$ac_optarg'" ;;
415
416  -without-* | --without-*)
417    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
418    # Reject names that are not valid shell variable names.
419    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
420      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
421    fi
422    ac_package=`echo $ac_package| sed 's/-/_/g'`
423    eval "with_${ac_package}=no" ;;
424
425  --x)
426    # Obsolete; use --with-x.
427    with_x=yes ;;
428
429  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
430  | --x-incl | --x-inc | --x-in | --x-i)
431    ac_prev=x_includes ;;
432  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
433  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
434    x_includes="$ac_optarg" ;;
435
436  -x-libraries | --x-libraries | --x-librarie | --x-librari \
437  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
438    ac_prev=x_libraries ;;
439  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
440  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
441    x_libraries="$ac_optarg" ;;
442
443  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
444    ;;
445
446  *)
447    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
448      echo "configure: warning: $ac_option: invalid host type" 1>&2
449    fi
450    if test "x$nonopt" != xNONE; then
451      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
452    fi
453    nonopt="$ac_option"
454    ;;
455
456  esac
457done
458
459if test -n "$ac_prev"; then
460  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
461fi
462
463trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
464
465# File descriptor usage:
466# 0 standard input
467# 1 file creation
468# 2 errors and warnings
469# 3 some systems may open it to /dev/tty
470# 4 used on the Kubota Titan
471# 6 checking for... messages and results
472# 5 compiler messages saved in config.log
473if test "$silent" = yes; then
474  exec 6>/dev/null
475else
476  exec 6>&1
477fi
478exec 5>./config.log
479
480echo "\
481This file contains any messages produced by compilers while
482running configure, to aid debugging if configure makes a mistake.
483" 1>&5
484
485# Strip out --no-create and --no-recursion so they do not pile up.
486# Also quote any args containing shell metacharacters.
487ac_configure_args=
488for ac_arg
489do
490  case "$ac_arg" in
491  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
492  | --no-cr | --no-c) ;;
493  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
494  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
495  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
496  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
497  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
498  esac
499done
500
501# NLS nuisances.
502# Only set these to C if already set.  These must not be set unconditionally
503# because not all systems understand e.g. LANG=C (notably SCO).
504# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
505# Non-C LC_CTYPE values break the ctype check.
506if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
507if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
508if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
509if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
510
511# confdefs.h avoids OS command line length limits that DEFS can exceed.
512rm -rf conftest* confdefs.h
513# AIX cpp loses on an empty file, so make sure it contains at least a newline.
514echo > confdefs.h
515
516# A filename unique to this package, relative to the directory that
517# configure is in, which we can look for to find out if srcdir is correct.
518ac_unique_file=include/includes.h
519
520# Find the source files, if location was not specified.
521if test -z "$srcdir"; then
522  ac_srcdir_defaulted=yes
523  # Try the directory containing this script, then its parent.
524  ac_prog=$0
525  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
526  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
527  srcdir=$ac_confdir
528  if test ! -r $srcdir/$ac_unique_file; then
529    srcdir=..
530  fi
531else
532  ac_srcdir_defaulted=no
533fi
534if test ! -r $srcdir/$ac_unique_file; then
535  if test "$ac_srcdir_defaulted" = yes; then
536    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
537  else
538    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
539  fi
540fi
541srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
542
543# Prefer explicitly selected file to automatically selected ones.
544if test -z "$CONFIG_SITE"; then
545  if test "x$prefix" != xNONE; then
546    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
547  else
548    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
549  fi
550fi
551for ac_site_file in $CONFIG_SITE; do
552  if test -r "$ac_site_file"; then
553    echo "loading site script $ac_site_file"
554    . "$ac_site_file"
555  fi
556done
557
558if test -r "$cache_file"; then
559  echo "loading cache $cache_file"
560  . $cache_file
561else
562  echo "creating cache $cache_file"
563  > $cache_file
564fi
565
566ac_ext=c
567# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
568ac_cpp='$CPP $CPPFLAGS'
569ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
570ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
571cross_compiling=$ac_cv_prog_cc_cross
572
573ac_exeext=
574ac_objext=o
575if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
576  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
577  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
578    ac_n= ac_c='
579' ac_t='	'
580  else
581    ac_n=-n ac_c= ac_t=
582  fi
583else
584  ac_n= ac_c='\c' ac_t=
585fi
586
587
588
589
590# we want to be compatibe with older versions of Samba
591
592
593
594
595
596
597
598
599
600
601
602
603# compile with optimisation and without debugging by default
604CFLAGS=${CFLAGS-"-O"}
605
606# Extract the first word of "gcc", so it can be a program name with args.
607set dummy gcc; ac_word=$2
608echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
609echo "configure:610: checking for $ac_word" >&5
610if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
611  echo $ac_n "(cached) $ac_c" 1>&6
612else
613  if test -n "$CC"; then
614  ac_cv_prog_CC="$CC" # Let the user override the test.
615else
616  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
617  ac_dummy="$PATH"
618  for ac_dir in $ac_dummy; do
619    test -z "$ac_dir" && ac_dir=.
620    if test -f $ac_dir/$ac_word; then
621      ac_cv_prog_CC="gcc"
622      break
623    fi
624  done
625  IFS="$ac_save_ifs"
626fi
627fi
628CC="$ac_cv_prog_CC"
629if test -n "$CC"; then
630  echo "$ac_t""$CC" 1>&6
631else
632  echo "$ac_t""no" 1>&6
633fi
634
635if test -z "$CC"; then
636  # Extract the first word of "cc", so it can be a program name with args.
637set dummy cc; ac_word=$2
638echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
639echo "configure:640: checking for $ac_word" >&5
640if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
641  echo $ac_n "(cached) $ac_c" 1>&6
642else
643  if test -n "$CC"; then
644  ac_cv_prog_CC="$CC" # Let the user override the test.
645else
646  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
647  ac_prog_rejected=no
648  ac_dummy="$PATH"
649  for ac_dir in $ac_dummy; do
650    test -z "$ac_dir" && ac_dir=.
651    if test -f $ac_dir/$ac_word; then
652      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
653        ac_prog_rejected=yes
654	continue
655      fi
656      ac_cv_prog_CC="cc"
657      break
658    fi
659  done
660  IFS="$ac_save_ifs"
661if test $ac_prog_rejected = yes; then
662  # We found a bogon in the path, so make sure we never use it.
663  set dummy $ac_cv_prog_CC
664  shift
665  if test $# -gt 0; then
666    # We chose a different compiler from the bogus one.
667    # However, it has the same basename, so the bogon will be chosen
668    # first if we set CC to just the basename; use the full file name.
669    shift
670    set dummy "$ac_dir/$ac_word" "$@"
671    shift
672    ac_cv_prog_CC="$@"
673  fi
674fi
675fi
676fi
677CC="$ac_cv_prog_CC"
678if test -n "$CC"; then
679  echo "$ac_t""$CC" 1>&6
680else
681  echo "$ac_t""no" 1>&6
682fi
683
684  if test -z "$CC"; then
685    case "`uname -s`" in
686    *win32* | *WIN32*)
687      # Extract the first word of "cl", so it can be a program name with args.
688set dummy cl; ac_word=$2
689echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
690echo "configure:691: checking for $ac_word" >&5
691if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
692  echo $ac_n "(cached) $ac_c" 1>&6
693else
694  if test -n "$CC"; then
695  ac_cv_prog_CC="$CC" # Let the user override the test.
696else
697  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
698  ac_dummy="$PATH"
699  for ac_dir in $ac_dummy; do
700    test -z "$ac_dir" && ac_dir=.
701    if test -f $ac_dir/$ac_word; then
702      ac_cv_prog_CC="cl"
703      break
704    fi
705  done
706  IFS="$ac_save_ifs"
707fi
708fi
709CC="$ac_cv_prog_CC"
710if test -n "$CC"; then
711  echo "$ac_t""$CC" 1>&6
712else
713  echo "$ac_t""no" 1>&6
714fi
715 ;;
716    esac
717  fi
718  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
719fi
720
721echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
722echo "configure:723: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
723
724ac_ext=c
725# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
726ac_cpp='$CPP $CPPFLAGS'
727ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
728ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
729cross_compiling=$ac_cv_prog_cc_cross
730
731cat > conftest.$ac_ext << EOF
732
733#line 734 "configure"
734#include "confdefs.h"
735
736main(){return(0);}
737EOF
738if { (eval echo configure:739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
739  ac_cv_prog_cc_works=yes
740  # If we can't run a trivial program, we are probably using a cross compiler.
741  if (./conftest; exit) 2>/dev/null; then
742    ac_cv_prog_cc_cross=no
743  else
744    ac_cv_prog_cc_cross=yes
745  fi
746else
747  echo "configure: failed program was:" >&5
748  cat conftest.$ac_ext >&5
749  ac_cv_prog_cc_works=no
750fi
751rm -fr conftest*
752ac_ext=c
753# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
754ac_cpp='$CPP $CPPFLAGS'
755ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
756ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
757cross_compiling=$ac_cv_prog_cc_cross
758
759echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
760if test $ac_cv_prog_cc_works = no; then
761  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
762fi
763echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
764echo "configure:765: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
765echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
766cross_compiling=$ac_cv_prog_cc_cross
767
768echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
769echo "configure:770: checking whether we are using GNU C" >&5
770if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
771  echo $ac_n "(cached) $ac_c" 1>&6
772else
773  cat > conftest.c <<EOF
774#ifdef __GNUC__
775  yes;
776#endif
777EOF
778if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
779  ac_cv_prog_gcc=yes
780else
781  ac_cv_prog_gcc=no
782fi
783fi
784
785echo "$ac_t""$ac_cv_prog_gcc" 1>&6
786
787if test $ac_cv_prog_gcc = yes; then
788  GCC=yes
789else
790  GCC=
791fi
792
793ac_test_CFLAGS="${CFLAGS+set}"
794ac_save_CFLAGS="$CFLAGS"
795CFLAGS=
796echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
797echo "configure:798: checking whether ${CC-cc} accepts -g" >&5
798if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
799  echo $ac_n "(cached) $ac_c" 1>&6
800else
801  echo 'void f(){}' > conftest.c
802if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
803  ac_cv_prog_cc_g=yes
804else
805  ac_cv_prog_cc_g=no
806fi
807rm -f conftest*
808
809fi
810
811echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
812if test "$ac_test_CFLAGS" = set; then
813  CFLAGS="$ac_save_CFLAGS"
814elif test $ac_cv_prog_cc_g = yes; then
815  if test "$GCC" = yes; then
816    CFLAGS="-g -O2"
817  else
818    CFLAGS="-g"
819  fi
820else
821  if test "$GCC" = yes; then
822    CFLAGS="-O2"
823  else
824    CFLAGS=
825  fi
826fi
827
828ac_aux_dir=
829for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
830  if test -f $ac_dir/install-sh; then
831    ac_aux_dir=$ac_dir
832    ac_install_sh="$ac_aux_dir/install-sh -c"
833    break
834  elif 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  fi
839done
840if test -z "$ac_aux_dir"; then
841  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
842fi
843ac_config_guess=$ac_aux_dir/config.guess
844ac_config_sub=$ac_aux_dir/config.sub
845ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
846
847# Find a good install program.  We prefer a C program (faster),
848# so one script is as good as another.  But avoid the broken or
849# incompatible versions:
850# SysV /etc/install, /usr/sbin/install
851# SunOS /usr/etc/install
852# IRIX /sbin/install
853# AIX /bin/install
854# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
855# AFS /usr/afsws/bin/install, which mishandles nonexistent args
856# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
857# ./install, which can be erroneously created by make from ./install.sh.
858echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
859echo "configure:860: checking for a BSD compatible install" >&5
860if test -z "$INSTALL"; then
861if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
862  echo $ac_n "(cached) $ac_c" 1>&6
863else
864    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
865  for ac_dir in $PATH; do
866    # Account for people who put trailing slashes in PATH elements.
867    case "$ac_dir/" in
868    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
869    *)
870      # OSF1 and SCO ODT 3.0 have their own names for install.
871      # Don't use installbsd from OSF since it installs stuff as root
872      # by default.
873      for ac_prog in ginstall scoinst install; do
874        if test -f $ac_dir/$ac_prog; then
875	  if test $ac_prog = install &&
876            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
877	    # AIX install.  It has an incompatible calling convention.
878	    :
879	  else
880	    ac_cv_path_install="$ac_dir/$ac_prog -c"
881	    break 2
882	  fi
883	fi
884      done
885      ;;
886    esac
887  done
888  IFS="$ac_save_IFS"
889
890fi
891  if test "${ac_cv_path_install+set}" = set; then
892    INSTALL="$ac_cv_path_install"
893  else
894    # As a last resort, use the slow shell script.  We don't cache a
895    # path for INSTALL within a source directory, because that will
896    # break other packages using the cache if that directory is
897    # removed, or if the path is relative.
898    INSTALL="$ac_install_sh"
899  fi
900fi
901echo "$ac_t""$INSTALL" 1>&6
902
903# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
904# It thinks the first close brace ends the variable substitution.
905test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
906
907test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
908
909test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
910
911for ac_prog in gawk mawk nawk awk
912do
913# Extract the first word of "$ac_prog", so it can be a program name with args.
914set dummy $ac_prog; ac_word=$2
915echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
916echo "configure:917: checking for $ac_word" >&5
917if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
918  echo $ac_n "(cached) $ac_c" 1>&6
919else
920  if test -n "$AWK"; then
921  ac_cv_prog_AWK="$AWK" # Let the user override the test.
922else
923  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
924  ac_dummy="$PATH"
925  for ac_dir in $ac_dummy; do
926    test -z "$ac_dir" && ac_dir=.
927    if test -f $ac_dir/$ac_word; then
928      ac_cv_prog_AWK="$ac_prog"
929      break
930    fi
931  done
932  IFS="$ac_save_ifs"
933fi
934fi
935AWK="$ac_cv_prog_AWK"
936if test -n "$AWK"; then
937  echo "$ac_t""$AWK" 1>&6
938else
939  echo "$ac_t""no" 1>&6
940fi
941
942test -n "$AWK" && break
943done
944
945
946if test "x$CC" != xcc; then
947  echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
948echo "configure:949: checking whether $CC and cc understand -c and -o together" >&5
949else
950  echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
951echo "configure:952: checking whether cc understands -c and -o together" >&5
952fi
953set dummy $CC; ac_cc="`echo $2 |
954		       sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
955if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
956  echo $ac_n "(cached) $ac_c" 1>&6
957else
958  echo 'foo(){}' > conftest.c
959# Make sure it works both with $CC and with simple cc.
960# We do the test twice because some compilers refuse to overwrite an
961# existing .o file with -o, though they will create one.
962ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
963if { (eval echo configure:964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
964   test -f conftest.o && { (eval echo configure:965: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
965then
966  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
967  if test "x$CC" != xcc; then
968    # Test first that cc exists at all.
969    if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
970      ac_try='cc -c conftest.c -o conftest.o 1>&5'
971      if { (eval echo configure:972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
972	 test -f conftest.o && { (eval echo configure:973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
973      then
974        # cc works too.
975        :
976      else
977        # cc exists but doesn't like -o.
978        eval ac_cv_prog_cc_${ac_cc}_c_o=no
979      fi
980    fi
981  fi
982else
983  eval ac_cv_prog_cc_${ac_cc}_c_o=no
984fi
985rm -f conftest*
986
987fi
988if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
989  echo "$ac_t""yes" 1>&6
990else
991  echo "$ac_t""no" 1>&6
992  cat >> confdefs.h <<\EOF
993#define NO_MINUS_C_MINUS_O 1
994EOF
995
996fi
997
998if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
999      BROKEN_CC=
1000else
1001      BROKEN_CC=#
1002fi
1003
1004
1005echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1006echo "configure:1007: checking that the C compiler understands volatile" >&5
1007if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1008  echo $ac_n "(cached) $ac_c" 1>&6
1009else
1010  
1011    cat > conftest.$ac_ext <<EOF
1012#line 1013 "configure"
1013#include "confdefs.h"
1014#include <sys/types.h>
1015int main() {
1016volatile int i = 0
1017; return 0; }
1018EOF
1019if { (eval echo configure:1020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1020  rm -rf conftest*
1021  samba_cv_volatile=yes
1022else
1023  echo "configure: failed program was:" >&5
1024  cat conftest.$ac_ext >&5
1025  rm -rf conftest*
1026  samba_cv_volatile=no
1027fi
1028rm -f conftest*
1029fi
1030
1031echo "$ac_t""$samba_cv_volatile" 1>&6
1032if test x"$samba_cv_volatile" = x"yes"; then
1033   cat >> confdefs.h <<\EOF
1034#define HAVE_VOLATILE 1
1035EOF
1036
1037fi
1038
1039
1040
1041
1042# Do some error checking and defaulting for the host and target type.
1043# The inputs are:
1044#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1045#
1046# The rules are:
1047# 1. You are not allowed to specify --host, --target, and nonopt at the
1048#    same time.
1049# 2. Host defaults to nonopt.
1050# 3. If nonopt is not specified, then host defaults to the current host,
1051#    as determined by config.guess.
1052# 4. Target and build default to nonopt.
1053# 5. If nonopt is not specified, then target and build default to host.
1054
1055# The aliases save the names the user supplied, while $host etc.
1056# will get canonicalized.
1057case $host---$target---$nonopt in
1058NONE---*---* | *---NONE---* | *---*---NONE) ;;
1059*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1060esac
1061
1062
1063# Make sure we can run config.sub.
1064if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1065else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1066fi
1067
1068echo $ac_n "checking host system type""... $ac_c" 1>&6
1069echo "configure:1070: checking host system type" >&5
1070
1071host_alias=$host
1072case "$host_alias" in
1073NONE)
1074  case $nonopt in
1075  NONE)
1076    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1077    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1078    fi ;;
1079  *) host_alias=$nonopt ;;
1080  esac ;;
1081esac
1082
1083host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1084host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1085host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1086host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1087echo "$ac_t""$host" 1>&6
1088
1089echo $ac_n "checking target system type""... $ac_c" 1>&6
1090echo "configure:1091: checking target system type" >&5
1091
1092target_alias=$target
1093case "$target_alias" in
1094NONE)
1095  case $nonopt in
1096  NONE) target_alias=$host_alias ;;
1097  *) target_alias=$nonopt ;;
1098  esac ;;
1099esac
1100
1101target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1102target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1103target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1104target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1105echo "$ac_t""$target" 1>&6
1106
1107echo $ac_n "checking build system type""... $ac_c" 1>&6
1108echo "configure:1109: checking build system type" >&5
1109
1110build_alias=$build
1111case "$build_alias" in
1112NONE)
1113  case $nonopt in
1114  NONE) build_alias=$host_alias ;;
1115  *) build_alias=$nonopt ;;
1116  esac ;;
1117esac
1118
1119build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1120build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1121build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1122build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1123echo "$ac_t""$build" 1>&6
1124
1125test "$host_alias" != "$target_alias" &&
1126  test "$program_prefix$program_suffix$program_transform_name" = \
1127    NONENONEs,x,x, &&
1128  program_prefix=${target_alias}-
1129
1130
1131  case "$host_os" in
1132	*irix*) cat >> confdefs.h <<\EOF
1133#include <standards.h>
1134EOF
1135
1136	;;
1137esac
1138
1139
1140    
1141    echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1142echo "configure:1143: checking config.cache system type" >&5
1143    if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1144         test x"$ac_cv_host_system_type" != x"$host"; } ||
1145       { test x"${ac_cv_build_system_type+set}" = x"set" &&
1146         test x"$ac_cv_build_system_type" != x"$build"; } ||
1147       { test x"${ac_cv_target_system_type+set}" = x"set" &&
1148         test x"$ac_cv_target_system_type" != x"$target"; }; then
1149	echo "$ac_t""different" 1>&6
1150	{ echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1151    else
1152	echo "$ac_t""same" 1>&6
1153    fi
1154    ac_cv_host_system_type="$host"
1155    ac_cv_build_system_type="$build"
1156    ac_cv_target_system_type="$target"
1157
1158
1159  # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1160if test "${enable_maintainer_mode+set}" = set; then
1161  enableval="$enable_maintainer_mode"
1162  maint_mode=$enableval
1163else
1164  maint_mode=no
1165fi
1166
1167  if test x"$maint_mode" = x"yes"; then MAINT=; else MAINT='#'; fi
1168  
1169  # Extract the first word of "autoconf", so it can be a program name with args.
1170set dummy autoconf; ac_word=$2
1171echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1172echo "configure:1173: checking for $ac_word" >&5
1173if eval "test \"`echo '$''{'ac_cv_path_AUTOCONF'+set}'`\" = set"; then
1174  echo $ac_n "(cached) $ac_c" 1>&6
1175else
1176  case "$AUTOCONF" in
1177  /*)
1178  ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a path.
1179  ;;
1180  ?:/*)			 
1181  ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a dos path.
1182  ;;
1183  *)
1184  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1185  ac_dummy="$PATH"
1186  for ac_dir in $ac_dummy; do 
1187    test -z "$ac_dir" && ac_dir=.
1188    if test -f $ac_dir/$ac_word; then
1189      ac_cv_path_AUTOCONF="$ac_dir/$ac_word"
1190      break
1191    fi
1192  done
1193  IFS="$ac_save_ifs"
1194  test -z "$ac_cv_path_AUTOCONF" && ac_cv_path_AUTOCONF="autoconf"
1195  ;;
1196esac
1197fi
1198AUTOCONF="$ac_cv_path_AUTOCONF"
1199if test -n "$AUTOCONF"; then
1200  echo "$ac_t""$AUTOCONF" 1>&6
1201else
1202  echo "$ac_t""no" 1>&6
1203fi
1204
1205  
1206  # Extract the first word of "autoheader", so it can be a program name with args.
1207set dummy autoheader; ac_word=$2
1208echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1209echo "configure:1210: checking for $ac_word" >&5
1210if eval "test \"`echo '$''{'ac_cv_path_AUTOHEADER'+set}'`\" = set"; then
1211  echo $ac_n "(cached) $ac_c" 1>&6
1212else
1213  case "$AUTOHEADER" in
1214  /*)
1215  ac_cv_path_AUTOHEADER="$AUTOHEADER" # Let the user override the test with a path.
1216  ;;
1217  ?:/*)			 
1218  ac_cv_path_AUTOHEADER="$AUTOHEADER" # Let the user override the test with a dos path.
1219  ;;
1220  *)
1221  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1222  ac_dummy="$PATH"
1223  for ac_dir in $ac_dummy; do 
1224    test -z "$ac_dir" && ac_dir=.
1225    if test -f $ac_dir/$ac_word; then
1226      ac_cv_path_AUTOHEADER="$ac_dir/$ac_word"
1227      break
1228    fi
1229  done
1230  IFS="$ac_save_ifs"
1231  test -z "$ac_cv_path_AUTOHEADER" && ac_cv_path_AUTOHEADER="autoheader"
1232  ;;
1233esac
1234fi
1235AUTOHEADER="$ac_cv_path_AUTOHEADER"
1236if test -n "$AUTOHEADER"; then
1237  echo "$ac_t""$AUTOHEADER" 1>&6
1238else
1239  echo "$ac_t""no" 1>&6
1240fi
1241
1242  
1243
1244
1245#
1246# Config CPPFLAG settings for strange OS's that must be set
1247# before other tests.
1248#
1249case "$host_os" in
1250# Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1251    *hpux*)
1252      echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1253echo "configure:1254: checking whether ${CC-cc} accepts -Ae" >&5
1254if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1255  echo $ac_n "(cached) $ac_c" 1>&6
1256else
1257  echo 'void f(){}' > conftest.c
1258if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1259  ac_cv_prog_cc_Ae=yes
1260else
1261  ac_cv_prog_cc_Ae=no
1262fi
1263rm -f conftest*
1264
1265fi
1266
1267echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1268      if test $ac_cv_prog_cc_Ae = yes; then
1269        CPPFLAGS="$CPPFLAGS -Ae"
1270      fi
1271#
1272# Defines needed for HPUX support.
1273# HPUX has bigcrypt but (sometimes?) doesn't use it for
1274# password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1275#
1276      case `uname -r` in
1277			*9*|*10*)
1278				CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
1279		   		cat >> confdefs.h <<\EOF
1280#define USE_BOTH_CRYPT_CALLS 1
1281EOF
1282
1283				;;
1284			*11*)
1285				CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
1286		   		cat >> confdefs.h <<\EOF
1287#define USE_BOTH_CRYPT_CALLS 1
1288EOF
1289
1290				;;
1291      esac
1292      ;;
1293#
1294# AIX4.x doesn't even admit to having large
1295# files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1296#
1297    *aix4*)
1298	  echo "$ac_t""enabling large file support" 1>&6
1299      CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1300      ;;    
1301#
1302# Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1303# to the existance of large files..
1304# Note that -D_LARGEFILE64_SOURCE is different from the Sun
1305# recommendations on large file support, however it makes the
1306# compile work using gcc 2.7 and 2.8, whereas using the Sun
1307# recommendation makes the compile fail on gcc2.7. JRA.
1308#
1309	*solaris*)
1310		case `uname -r` in
1311			5.6*|5.7*)
1312			echo "$ac_t""enabling large file support" 1>&6
1313			if test "$ac_cv_prog_gcc" = yes; then
1314				${CC-cc} -v >conftest.c 2>&1
1315				ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1316				rm -fr conftest.c
1317				case "$ac_cv_gcc_compiler_version_number" in
1318					*"gcc version 2.6"*|*"gcc version 2.7"*)
1319						CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1320						;;
1321					*)
1322						CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1323						;;
1324				esac
1325			else
1326				CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1327			fi
1328			;;
1329		esac
1330		;;
1331#
1332# Tests needed for SINIX large file support.
1333#
1334    *sysv4*)
1335      if test $host = mips-sni-sysv4 ; then
1336        echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1337echo "configure:1338: checking for LFS support" >&5
1338        old_CPPFLAGS="$CPPFLAGS"
1339        CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1340        if test "$cross_compiling" = yes; then
1341  SINIX_LFS_SUPPORT=cross
1342else
1343  cat > conftest.$ac_ext <<EOF
1344#line 1345 "configure"
1345#include "confdefs.h"
1346
1347#include <unistd.h>
1348main () {
1349#if _LFS64_LARGEFILE == 1
1350exit(0);
1351#else
1352exit(1);
1353#endif
1354}
1355EOF
1356if { (eval echo configure:1357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1357then
1358  SINIX_LFS_SUPPORT=yes
1359else
1360  echo "configure: failed program was:" >&5
1361  cat conftest.$ac_ext >&5
1362  rm -fr conftest*
1363  SINIX_LFS_SUPPORT=no
1364fi
1365rm -fr conftest*
1366fi
1367
1368        CPPFLAGS="$old_CPPFLAGS"
1369        if test x$SINIX_LFS_SUPPORT = xyes ; then
1370          CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1371          CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1372          LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1373          LIBS="`getconf LFS64_LIBS` $LIBS"
1374        fi
1375      echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1376      fi
1377    ;;
1378
1379#
1380# Tests needed for glibc 2.1 large file support.
1381# 
1382	*linux*)
1383		echo "$ac_t""disabling large file support for glibc2.1 on Linux" 1>&6     
1384		;;
1385    *hurd*)
1386        echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1387echo "configure:1388: checking for LFS support" >&5
1388        old_CPPFLAGS="$CPPFLAGS"
1389        CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1390        if test "$cross_compiling" = yes; then
1391  GLIBC_LFS_SUPPORT=cross
1392else
1393  cat > conftest.$ac_ext <<EOF
1394#line 1395 "configure"
1395#include "confdefs.h"
1396
1397#include <unistd.h>
1398main () {
1399#if _LFS64_LARGEFILE == 1
1400exit(0);
1401#else
1402exit(1);
1403#endif
1404}
1405EOF
1406if { (eval echo configure:1407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1407then
1408  GLIBC_LFS_SUPPORT=yes
1409else
1410  echo "configure: failed program was:" >&5
1411  cat conftest.$ac_ext >&5
1412  rm -fr conftest*
1413  GLIBC_LFS_SUPPORT=no
1414fi
1415rm -fr conftest*
1416fi
1417
1418        CPPFLAGS="$old_CPPFLAGS"
1419        if test x$GLIBC_LFS_SUPPORT = xyes ; then
1420          CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1421        fi
1422      echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1423    ;;
1424
1425esac
1426
1427echo $ac_n "checking for inline""... $ac_c" 1>&6
1428echo "configure:1429: checking for inline" >&5
1429if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1430  echo $ac_n "(cached) $ac_c" 1>&6
1431else
1432  ac_cv_c_inline=no
1433for ac_kw in inline __inline__ __inline; do
1434  cat > conftest.$ac_ext <<EOF
1435#line 1436 "configure"
1436#include "confdefs.h"
1437
1438int main() {
1439} $ac_kw foo() {
1440; return 0; }
1441EOF
1442if { (eval echo configure:1443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1443  rm -rf conftest*
1444  ac_cv_c_inline=$ac_kw; break
1445else
1446  echo "configure: failed program was:" >&5
1447  cat conftest.$ac_ext >&5
1448fi
1449rm -f conftest*
1450done
1451
1452fi
1453
1454echo "$ac_t""$ac_cv_c_inline" 1>&6
1455case "$ac_cv_c_inline" in
1456  inline | yes) ;;
1457  no) cat >> confdefs.h <<\EOF
1458#define inline 
1459EOF
1460 ;;
1461  *)  cat >> confdefs.h <<EOF
1462#define inline $ac_cv_c_inline
1463EOF
1464 ;;
1465esac
1466
1467echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1468echo "configure:1469: checking how to run the C preprocessor" >&5
1469# On Suns, sometimes $CPP names a directory.
1470if test -n "$CPP" && test -d "$CPP"; then
1471  CPP=
1472fi
1473if test -z "$CPP"; then
1474if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1475  echo $ac_n "(cached) $ac_c" 1>&6
1476else
1477    # This must be in double quotes, not single quotes, because CPP may get
1478  # substituted into the Makefile and "${CC-cc}" will confuse make.
1479  CPP="${CC-cc} -E"
1480  # On the NeXT, cc -E runs the code through the compiler's parser,
1481  # not just through cpp.
1482  cat > conftest.$ac_ext <<EOF
1483#line 1484 "configure"
1484#include "confdefs.h"
1485#include <assert.h>
1486Syntax Error
1487EOF
1488ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1489{ (eval echo configure:1490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1490ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1491if test -z "$ac_err"; then
1492  :
1493else
1494  echo "$ac_err" >&5
1495  echo "configure: failed program was:" >&5
1496  cat conftest.$ac_ext >&5
1497  rm -rf conftest*
1498  CPP="${CC-cc} -E -traditional-cpp"
1499  cat > conftest.$ac_ext <<EOF
1500#line 1501 "configure"
1501#include "confdefs.h"
1502#include <assert.h>
1503Syntax Error
1504EOF
1505ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1506{ (eval echo configure:1507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1507ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1508if test -z "$ac_err"; then
1509  :
1510else
1511  echo "$ac_err" >&5
1512  echo "configure: failed program was:" >&5
1513  cat conftest.$ac_ext >&5
1514  rm -rf conftest*
1515  CPP="${CC-cc} -nologo -E"
1516  cat > conftest.$ac_ext <<EOF
1517#line 1518 "configure"
1518#include "confdefs.h"
1519#include <assert.h>
1520Syntax Error
1521EOF
1522ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1523{ (eval echo configure:1524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1524ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1525if test -z "$ac_err"; then
1526  :
1527else
1528  echo "$ac_err" >&5
1529  echo "configure: failed program was:" >&5
1530  cat conftest.$ac_ext >&5
1531  rm -rf conftest*
1532  CPP=/lib/cpp
1533fi
1534rm -f conftest*
1535fi
1536rm -f conftest*
1537fi
1538rm -f conftest*
1539  ac_cv_prog_CPP="$CPP"
1540fi
1541  CPP="$ac_cv_prog_CPP"
1542else
1543  ac_cv_prog_CPP="$CPP"
1544fi
1545echo "$ac_t""$CPP" 1>&6
1546
1547echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1548echo "configure:1549: checking for ANSI C header files" >&5
1549if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1550  echo $ac_n "(cached) $ac_c" 1>&6
1551else
1552  cat > conftest.$ac_ext <<EOF
1553#line 1554 "configure"
1554#include "confdefs.h"
1555#include <stdlib.h>
1556#include <stdarg.h>
1557#include <string.h>
1558#include <float.h>
1559EOF
1560ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1561{ (eval echo configure:1562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1562ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1563if test -z "$ac_err"; then
1564  rm -rf conftest*
1565  ac_cv_header_stdc=yes
1566else
1567  echo "$ac_err" >&5
1568  echo "configure: failed program was:" >&5
1569  cat conftest.$ac_ext >&5
1570  rm -rf conftest*
1571  ac_cv_header_stdc=no
1572fi
1573rm -f conftest*
1574
1575if test $ac_cv_header_stdc = yes; then
1576  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1577cat > conftest.$ac_ext <<EOF
1578#line 1579 "configure"
1579#include "confdefs.h"
1580#include <string.h>
1581EOF
1582if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1583  egrep "memchr" >/dev/null 2>&1; then
1584  :
1585else
1586  rm -rf conftest*
1587  ac_cv_header_stdc=no
1588fi
1589rm -f conftest*
1590
1591fi
1592
1593if test $ac_cv_header_stdc = yes; then
1594  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1595cat > conftest.$ac_ext <<EOF
1596#line 1597 "configure"
1597#include "confdefs.h"
1598#include <stdlib.h>
1599EOF
1600if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1601  egrep "free" >/dev/null 2>&1; then
1602  :
1603else
1604  rm -rf conftest*
1605  ac_cv_header_stdc=no
1606fi
1607rm -f conftest*
1608
1609fi
1610
1611if test $ac_cv_header_stdc = yes; then
1612  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1613if test "$cross_compiling" = yes; then
1614  :
1615else
1616  cat > conftest.$ac_ext <<EOF
1617#line 1618 "configure"
1618#include "confdefs.h"
1619#include <ctype.h>
1620#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1621#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1622#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1623int main () { int i; for (i = 0; i < 256; i++)
1624if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1625exit (0); }
1626
1627EOF
1628if { (eval echo configure:1629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1629then
1630  :
1631else
1632  echo "configure: failed program was:" >&5
1633  cat conftest.$ac_ext >&5
1634  rm -fr conftest*
1635  ac_cv_header_stdc=no
1636fi
1637rm -fr conftest*
1638fi
1639
1640fi
1641fi
1642
1643echo "$ac_t""$ac_cv_header_stdc" 1>&6
1644if test $ac_cv_header_stdc = yes; then
1645  cat >> confdefs.h <<\EOF
1646#define STDC_HEADERS 1
1647EOF
1648
1649fi
1650
1651ac_header_dirent=no
1652for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1653do
1654ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1655echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1656echo "configure:1657: checking for $ac_hdr that defines DIR" >&5
1657if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1658  echo $ac_n "(cached) $ac_c" 1>&6
1659else
1660  cat > conftest.$ac_ext <<EOF
1661#line 1662 "configure"
1662#include "confdefs.h"
1663#include <sys/types.h>
1664#include <$ac_hdr>
1665int main() {
1666DIR *dirp = 0;
1667; return 0; }
1668EOF
1669if { (eval echo configure:1670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1670  rm -rf conftest*
1671  eval "ac_cv_header_dirent_$ac_safe=yes"
1672else
1673  echo "configure: failed program was:" >&5
1674  cat conftest.$ac_ext >&5
1675  rm -rf conftest*
1676  eval "ac_cv_header_dirent_$ac_safe=no"
1677fi
1678rm -f conftest*
1679fi
1680if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1681  echo "$ac_t""yes" 1>&6
1682    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1683  cat >> confdefs.h <<EOF
1684#define $ac_tr_hdr 1
1685EOF
1686 ac_header_dirent=$ac_hdr; break
1687else
1688  echo "$ac_t""no" 1>&6
1689fi
1690done
1691# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1692if test $ac_header_dirent = dirent.h; then
1693echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1694echo "configure:1695: checking for opendir in -ldir" >&5
1695ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1696if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1697  echo $ac_n "(cached) $ac_c" 1>&6
1698else
1699  ac_save_LIBS="$LIBS"
1700LIBS="-ldir  $LIBS"
1701cat > conftest.$ac_ext <<EOF
1702#line 1703 "configure"
1703#include "confdefs.h"
1704/* Override any gcc2 internal prototype to avoid an error.  */
1705/* We use char because int might match the return type of a gcc2
1706    builtin and then its argument prototype would still apply.  */
1707char opendir();
1708
1709int main() {
1710opendir()
1711; return 0; }
1712EOF
1713if { (eval echo configure:1714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1714  rm -rf conftest*
1715  eval "ac_cv_lib_$ac_lib_var=yes"
1716else
1717  echo "configure: failed program was:" >&5
1718  cat conftest.$ac_ext >&5
1719  rm -rf conftest*
1720  eval "ac_cv_lib_$ac_lib_var=no"
1721fi
1722rm -f conftest*
1723LIBS="$ac_save_LIBS"
1724
1725fi
1726if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1727  echo "$ac_t""yes" 1>&6
1728  LIBS="$LIBS -ldir"
1729else
1730  echo "$ac_t""no" 1>&6
1731fi
1732
1733else
1734echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1735echo "configure:1736: checking for opendir in -lx" >&5
1736ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1737if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1738  echo $ac_n "(cached) $ac_c" 1>&6
1739else
1740  ac_save_LIBS="$LIBS"
1741LIBS="-lx  $LIBS"
1742cat > conftest.$ac_ext <<EOF
1743#line 1744 "configure"
1744#include "confdefs.h"
1745/* Override any gcc2 internal prototype to avoid an error.  */
1746/* We use char because int might match the return type of a gcc2
1747    builtin and then its argument prototype would still apply.  */
1748char opendir();
1749
1750int main() {
1751opendir()
1752; return 0; }
1753EOF
1754if { (eval echo configure:1755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1755  rm -rf conftest*
1756  eval "ac_cv_lib_$ac_lib_var=yes"
1757else
1758  echo "configure: failed program was:" >&5
1759  cat conftest.$ac_ext >&5
1760  rm -rf conftest*
1761  eval "ac_cv_lib_$ac_lib_var=no"
1762fi
1763rm -f conftest*
1764LIBS="$ac_save_LIBS"
1765
1766fi
1767if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1768  echo "$ac_t""yes" 1>&6
1769  LIBS="$LIBS -lx"
1770else
1771  echo "$ac_t""no" 1>&6
1772fi
1773
1774fi
1775
1776echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1777echo "configure:1778: checking whether time.h and sys/time.h may both be included" >&5
1778if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1779  echo $ac_n "(cached) $ac_c" 1>&6
1780else
1781  cat > conftest.$ac_ext <<EOF
1782#line 1783 "configure"
1783#include "confdefs.h"
1784#include <sys/types.h>
1785#include <sys/time.h>
1786#include <time.h>
1787int main() {
1788struct tm *tp;
1789; return 0; }
1790EOF
1791if { (eval echo configure:1792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1792  rm -rf conftest*
1793  ac_cv_header_time=yes
1794else
1795  echo "configure: failed program was:" >&5
1796  cat conftest.$ac_ext >&5
1797  rm -rf conftest*
1798  ac_cv_header_time=no
1799fi
1800rm -f conftest*
1801fi
1802
1803echo "$ac_t""$ac_cv_header_time" 1>&6
1804if test $ac_cv_header_time = yes; then
1805  cat >> confdefs.h <<\EOF
1806#define TIME_WITH_SYS_TIME 1
1807EOF
1808
1809fi
1810
1811echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1812echo "configure:1813: checking for sys/wait.h that is POSIX.1 compatible" >&5
1813if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1814  echo $ac_n "(cached) $ac_c" 1>&6
1815else
1816  cat > conftest.$ac_ext <<EOF
1817#line 1818 "configure"
1818#include "confdefs.h"
1819#include <sys/types.h>
1820#include <sys/wait.h>
1821#ifndef WEXITSTATUS
1822#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1823#endif
1824#ifndef WIFEXITED
1825#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1826#endif
1827int main() {
1828int s;
1829wait (&s);
1830s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1831; return 0; }
1832EOF
1833if { (eval echo configure:1834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1834  rm -rf conftest*
1835  ac_cv_header_sys_wait_h=yes
1836else
1837  echo "configure: failed program was:" >&5
1838  cat conftest.$ac_ext >&5
1839  rm -rf conftest*
1840  ac_cv_header_sys_wait_h=no
1841fi
1842rm -f conftest*
1843fi
1844
1845echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1846if test $ac_cv_header_sys_wait_h = yes; then
1847  cat >> confdefs.h <<\EOF
1848#define HAVE_SYS_WAIT_H 1
1849EOF
1850
1851fi
1852
1853for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1854do
1855ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1856echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1857echo "configure:1858: checking for $ac_hdr" >&5
1858if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1859  echo $ac_n "(cached) $ac_c" 1>&6
1860else
1861  cat > conftest.$ac_ext <<EOF
1862#line 1863 "configure"
1863#include "confdefs.h"
1864#include <$ac_hdr>
1865EOF
1866ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1867{ (eval echo configure:1868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1868ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1869if test -z "$ac_err"; then
1870  rm -rf conftest*
1871  eval "ac_cv_header_$ac_safe=yes"
1872else
1873  echo "$ac_err" >&5
1874  echo "configure: failed program was:" >&5
1875  cat conftest.$ac_ext >&5
1876  rm -rf conftest*
1877  eval "ac_cv_header_$ac_safe=no"
1878fi
1879rm -f conftest*
1880fi
1881if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1882  echo "$ac_t""yes" 1>&6
1883    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1884  cat >> confdefs.h <<EOF
1885#define $ac_tr_hdr 1
1886EOF
1887 
1888else
1889  echo "$ac_t""no" 1>&6
1890fi
1891done
1892
1893for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
1894do
1895ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1896echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1897echo "configure:1898: checking for $ac_hdr" >&5
1898if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1899  echo $ac_n "(cached) $ac_c" 1>&6
1900else
1901  cat > conftest.$ac_ext <<EOF
1902#line 1903 "configure"
1903#include "confdefs.h"
1904#include <$ac_hdr>
1905EOF
1906ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1907{ (eval echo configure:1908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1908ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1909if test -z "$ac_err"; then
1910  rm -rf conftest*
1911  eval "ac_cv_header_$ac_safe=yes"
1912else
1913  echo "$ac_err" >&5
1914  echo "configure: failed program was:" >&5
1915  cat conftest.$ac_ext >&5
1916  rm -rf conftest*
1917  eval "ac_cv_header_$ac_safe=no"
1918fi
1919rm -f conftest*
1920fi
1921if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1922  echo "$ac_t""yes" 1>&6
1923    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1924  cat >> confdefs.h <<EOF
1925#define $ac_tr_hdr 1
1926EOF
1927 
1928else
1929  echo "$ac_t""no" 1>&6
1930fi
1931done
1932
1933for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
1934do
1935ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1936echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1937echo "configure:1938: checking for $ac_hdr" >&5
1938if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1939  echo $ac_n "(cached) $ac_c" 1>&6
1940else
1941  cat > conftest.$ac_ext <<EOF
1942#line 1943 "configure"
1943#include "confdefs.h"
1944#include <$ac_hdr>
1945EOF
1946ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1947{ (eval echo configure:1948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1948ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1949if test -z "$ac_err"; then
1950  rm -rf conftest*
1951  eval "ac_cv_header_$ac_safe=yes"
1952else
1953  echo "$ac_err" >&5
1954  echo "configure: failed program was:" >&5
1955  cat conftest.$ac_ext >&5
1956  rm -rf conftest*
1957  eval "ac_cv_header_$ac_safe=no"
1958fi
1959rm -f conftest*
1960fi
1961if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1962  echo "$ac_t""yes" 1>&6
1963    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1964  cat >> confdefs.h <<EOF
1965#define $ac_tr_hdr 1
1966EOF
1967 
1968else
1969  echo "$ac_t""no" 1>&6
1970fi
1971done
1972
1973for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/mode.h
1974do
1975ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1976echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1977echo "configure:1978: checking for $ac_hdr" >&5
1978if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1979  echo $ac_n "(cached) $ac_c" 1>&6
1980else
1981  cat > conftest.$ac_ext <<EOF
1982#line 1983 "configure"
1983#include "confdefs.h"
1984#include <$ac_hdr>
1985EOF
1986ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1987{ (eval echo configure:1988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1988ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1989if test -z "$ac_err"; then
1990  rm -rf conftest*
1991  eval "ac_cv_header_$ac_safe=yes"
1992else
1993  echo "$ac_err" >&5
1994  echo "configure: failed program was:" >&5
1995  cat conftest.$ac_ext >&5
1996  rm -rf conftest*
1997  eval "ac_cv_header_$ac_safe=no"
1998fi
1999rm -f conftest*
2000fi
2001if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2002  echo "$ac_t""yes" 1>&6
2003    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2004  cat >> confdefs.h <<EOF
2005#define $ac_tr_hdr 1
2006EOF
2007 
2008else
2009  echo "$ac_t""no" 1>&6
2010fi
2011done
2012
2013for ac_hdr in sys/mman.h sys/filio.h sys/priv.h string.h strings.h stdlib.h sys/socket.h
2014do
2015ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2016echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2017echo "configure:2018: checking for $ac_hdr" >&5
2018if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2019  echo $ac_n "(cached) $ac_c" 1>&6
2020else
2021  cat > conftest.$ac_ext <<EOF
2022#line 2023 "configure"
2023#include "confdefs.h"
2024#include <$ac_hdr>
2025EOF
2026ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2027{ (eval echo configure:2028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2028ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2029if test -z "$ac_err"; then
2030  rm -rf conftest*
2031  eval "ac_cv_header_$ac_safe=yes"
2032else
2033  echo "$ac_err" >&5
2034  echo "configure: failed program was:" >&5
2035  cat conftest.$ac_ext >&5
2036  rm -rf conftest*
2037  eval "ac_cv_header_$ac_safe=no"
2038fi
2039rm -f conftest*
2040fi
2041if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2042  echo "$ac_t""yes" 1>&6
2043    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2044  cat >> confdefs.h <<EOF
2045#define $ac_tr_hdr 1
2046EOF
2047 
2048else
2049  echo "$ac_t""no" 1>&6
2050fi
2051done
2052
2053for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2054do
2055ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2056echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2057echo "configure:2058: checking for $ac_hdr" >&5
2058if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2059  echo $ac_n "(cached) $ac_c" 1>&6
2060else
2061  cat > conftest.$ac_ext <<EOF
2062#line 2063 "configure"
2063#include "confdefs.h"
2064#include <$ac_hdr>
2065EOF
2066ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2067{ (eval echo configure:2068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2068ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2069if test -z "$ac_err"; then
2070  rm -rf conftest*
2071  eval "ac_cv_header_$ac_safe=yes"
2072else
2073  echo "$ac_err" >&5
2074  echo "configure: failed program was:" >&5
2075  cat conftest.$ac_ext >&5
2076  rm -rf conftest*
2077  eval "ac_cv_header_$ac_safe=no"
2078fi
2079rm -f conftest*
2080fi
2081if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2082  echo "$ac_t""yes" 1>&6
2083    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2084  cat >> confdefs.h <<EOF
2085#define $ac_tr_hdr 1
2086EOF
2087 
2088else
2089  echo "$ac_t""no" 1>&6
2090fi
2091done
2092
2093for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2094do
2095ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2096echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2097echo "configure:2098: checking for $ac_hdr" >&5
2098if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2099  echo $ac_n "(cached) $ac_c" 1>&6
2100else
2101  cat > conftest.$ac_ext <<EOF
2102#line 2103 "configure"
2103#include "confdefs.h"
2104#include <$ac_hdr>
2105EOF
2106ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2107{ (eval echo configure:2108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2108ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2109if test -z "$ac_err"; then
2110  rm -rf conftest*
2111  eval "ac_cv_header_$ac_safe=yes"
2112else
2113  echo "$ac_err" >&5
2114  echo "configure: failed program was:" >&5
2115  cat conftest.$ac_ext >&5
2116  rm -rf conftest*
2117  eval "ac_cv_header_$ac_safe=no"
2118fi
2119rm -f conftest*
2120fi
2121if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2122  echo "$ac_t""yes" 1>&6
2123    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2124  cat >> confdefs.h <<EOF
2125#define $ac_tr_hdr 1
2126EOF
2127 
2128else
2129  echo "$ac_t""no" 1>&6
2130fi
2131done
2132
2133#
2134# HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2135# This causes configure to fail to detect it. Check for shadow separately on HPUX.
2136#
2137case "$host_os" in
2138    *hpux*)
2139		cat > conftest.$ac_ext <<EOF
2140#line 2141 "configure"
2141#include "confdefs.h"
2142#include <shadow.h>
2143int main() {
2144struct spwd testme
2145; return 0; }
2146EOF
2147if { (eval echo configure:2148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2148  rm -rf conftest*
2149  ac_cv_header_shadow_h=yes
2150else
2151  echo "configure: failed program was:" >&5
2152  cat conftest.$ac_ext >&5
2153  rm -rf conftest*
2154  ac_cv_header_shadow_h=no
2155fi
2156rm -f conftest*
2157		if test x"$ac_cv_header_shadow_h" = x"yes"; then
2158		   cat >> confdefs.h <<\EOF
2159#define HAVE_SHADOW_H 1
2160EOF
2161
2162		fi
2163	;;
2164esac
2165for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2166do
2167ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2168echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2169echo "configure:2170: checking for $ac_hdr" >&5
2170if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2171  echo $ac_n "(cached) $ac_c" 1>&6
2172else
2173  cat > conftest.$ac_ext <<EOF
2174#line 2175 "configure"
2175#include "confdefs.h"
2176#include <$ac_hdr>
2177EOF
2178ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2179{ (eval echo configure:2180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2180ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2181if test -z "$ac_err"; then
2182  rm -rf conftest*
2183  eval "ac_cv_header_$ac_safe=yes"
2184else
2185  echo "$ac_err" >&5
2186  echo "configure: failed program was:" >&5
2187  cat conftest.$ac_ext >&5
2188  rm -rf conftest*
2189  eval "ac_cv_header_$ac_safe=no"
2190fi
2191rm -f conftest*
2192fi
2193if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2194  echo "$ac_t""yes" 1>&6
2195    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2196  cat >> confdefs.h <<EOF
2197#define $ac_tr_hdr 1
2198EOF
2199 
2200else
2201  echo "$ac_t""no" 1>&6
2202fi
2203done
2204
2205for ac_hdr in sys/security.h security/pam_appl.h
2206do
2207ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2208echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2209echo "configure:2210: checking for $ac_hdr" >&5
2210if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2211  echo $ac_n "(cached) $ac_c" 1>&6
2212else
2213  cat > conftest.$ac_ext <<EOF
2214#line 2215 "configure"
2215#include "confdefs.h"
2216#include <$ac_hdr>
2217EOF
2218ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2219{ (eval echo configure:2220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2220ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2221if test -z "$ac_err"; then
2222  rm -rf conftest*
2223  eval "ac_cv_header_$ac_safe=yes"
2224else
2225  echo "$ac_err" >&5
2226  echo "configure: failed program was:" >&5
2227  cat conftest.$ac_ext >&5
2228  rm -rf conftest*
2229  eval "ac_cv_header_$ac_safe=no"
2230fi
2231rm -f conftest*
2232fi
2233if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2234  echo "$ac_t""yes" 1>&6
2235    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2236  cat >> confdefs.h <<EOF
2237#define $ac_tr_hdr 1
2238EOF
2239 
2240else
2241  echo "$ac_t""no" 1>&6
2242fi
2243done
2244
2245for ac_hdr in stropts.h poll.h readline.h history.h readline/readline.h
2246do
2247ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2248echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2249echo "configure:2250: checking for $ac_hdr" >&5
2250if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2251  echo $ac_n "(cached) $ac_c" 1>&6
2252else
2253  cat > conftest.$ac_ext <<EOF
2254#line 2255 "configure"
2255#include "confdefs.h"
2256#include <$ac_hdr>
2257EOF
2258ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2259{ (eval echo configure:2260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2260ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2261if test -z "$ac_err"; then
2262  rm -rf conftest*
2263  eval "ac_cv_header_$ac_safe=yes"
2264else
2265  echo "$ac_err" >&5
2266  echo "configure: failed program was:" >&5
2267  cat conftest.$ac_ext >&5
2268  rm -rf conftest*
2269  eval "ac_cv_header_$ac_safe=no"
2270fi
2271rm -f conftest*
2272fi
2273if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2274  echo "$ac_t""yes" 1>&6
2275    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2276  cat >> confdefs.h <<EOF
2277#define $ac_tr_hdr 1
2278EOF
2279 
2280else
2281  echo "$ac_t""no" 1>&6
2282fi
2283done
2284
2285for ac_hdr in readline/history.h sys/capability.h syscall.h sys/syscall.h
2286do
2287ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2288echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2289echo "configure:2290: checking for $ac_hdr" >&5
2290if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2291  echo $ac_n "(cached) $ac_c" 1>&6
2292else
2293  cat > conftest.$ac_ext <<EOF
2294#line 2295 "configure"
2295#include "confdefs.h"
2296#include <$ac_hdr>
2297EOF
2298ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2299{ (eval echo configure:2300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2300ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2301if test -z "$ac_err"; then
2302  rm -rf conftest*
2303  eval "ac_cv_header_$ac_safe=yes"
2304else
2305  echo "$ac_err" >&5
2306  echo "configure: failed program was:" >&5
2307  cat conftest.$ac_ext >&5
2308  rm -rf conftest*
2309  eval "ac_cv_header_$ac_safe=no"
2310fi
2311rm -f conftest*
2312fi
2313if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2314  echo "$ac_t""yes" 1>&6
2315    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2316  cat >> confdefs.h <<EOF
2317#define $ac_tr_hdr 1
2318EOF
2319 
2320else
2321  echo "$ac_t""no" 1>&6
2322fi
2323done
2324
2325for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2326do
2327ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2328echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2329echo "configure:2330: checking for $ac_hdr" >&5
2330if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2331  echo $ac_n "(cached) $ac_c" 1>&6
2332else
2333  cat > conftest.$ac_ext <<EOF
2334#line 2335 "configure"
2335#include "confdefs.h"
2336#include <$ac_hdr>
2337EOF
2338ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2339{ (eval echo configure:2340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2340ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2341if test -z "$ac_err"; then
2342  rm -rf conftest*
2343  eval "ac_cv_header_$ac_safe=yes"
2344else
2345  echo "$ac_err" >&5
2346  echo "configure: failed program was:" >&5
2347  cat conftest.$ac_ext >&5
2348  rm -rf conftest*
2349  eval "ac_cv_header_$ac_safe=no"
2350fi
2351rm -f conftest*
2352fi
2353if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2354  echo "$ac_t""yes" 1>&6
2355    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2356  cat >> confdefs.h <<EOF
2357#define $ac_tr_hdr 1
2358EOF
2359 
2360else
2361  echo "$ac_t""no" 1>&6
2362fi
2363done
2364
2365
2366# For experimental utmp support
2367for ac_hdr in utmp.h utmpx.h
2368do
2369ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2370echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2371echo "configure:2372: checking for $ac_hdr" >&5
2372if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2373  echo $ac_n "(cached) $ac_c" 1>&6
2374else
2375  cat > conftest.$ac_ext <<EOF
2376#line 2377 "configure"
2377#include "confdefs.h"
2378#include <$ac_hdr>
2379EOF
2380ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2381{ (eval echo configure:2382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2382ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2383if test -z "$ac_err"; then
2384  rm -rf conftest*
2385  eval "ac_cv_header_$ac_safe=yes"
2386else
2387  echo "$ac_err" >&5
2388  echo "configure: failed program was:" >&5
2389  cat conftest.$ac_ext >&5
2390  rm -rf conftest*
2391  eval "ac_cv_header_$ac_safe=no"
2392fi
2393rm -f conftest*
2394fi
2395if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2396  echo "$ac_t""yes" 1>&6
2397    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2398  cat >> confdefs.h <<EOF
2399#define $ac_tr_hdr 1
2400EOF
2401 
2402else
2403  echo "$ac_t""no" 1>&6
2404fi
2405done
2406
2407
2408# For quotas on Veritas VxFS filesystems
2409for ac_hdr in sys/fs/vx_quota.h
2410do
2411ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2412echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2413echo "configure:2414: checking for $ac_hdr" >&5
2414if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2415  echo $ac_n "(cached) $ac_c" 1>&6
2416else
2417  cat > conftest.$ac_ext <<EOF
2418#line 2419 "configure"
2419#include "confdefs.h"
2420#include <$ac_hdr>
2421EOF
2422ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2423{ (eval echo configure:2424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2424ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2425if test -z "$ac_err"; then
2426  rm -rf conftest*
2427  eval "ac_cv_header_$ac_safe=yes"
2428else
2429  echo "$ac_err" >&5
2430  echo "configure: failed program was:" >&5
2431  cat conftest.$ac_ext >&5
2432  rm -rf conftest*
2433  eval "ac_cv_header_$ac_safe=no"
2434fi
2435rm -f conftest*
2436fi
2437if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2438  echo "$ac_t""yes" 1>&6
2439    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2440  cat >> confdefs.h <<EOF
2441#define $ac_tr_hdr 1
2442EOF
2443 
2444else
2445  echo "$ac_t""no" 1>&6
2446fi
2447done
2448
2449
2450echo $ac_n "checking size of int""... $ac_c" 1>&6
2451echo "configure:2452: checking size of int" >&5
2452if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2453  echo $ac_n "(cached) $ac_c" 1>&6
2454else
2455  if test "$cross_compiling" = yes; then
2456  ac_cv_sizeof_int=cross
2457else
2458  cat > conftest.$ac_ext <<EOF
2459#line 2460 "configure"
2460#include "confdefs.h"
2461#include <stdio.h>
2462main()
2463{
2464  FILE *f=fopen("conftestval", "w");
2465  if (!f) exit(1);
2466  fprintf(f, "%d\n", sizeof(int));
2467  exit(0);
2468}
2469EOF
2470if { (eval echo configure:2471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2471then
2472  ac_cv_sizeof_int=`cat conftestval`
2473else
2474  echo "configure: failed program was:" >&5
2475  cat conftest.$ac_ext >&5
2476  rm -fr conftest*
2477  ac_cv_sizeof_int=0
2478fi
2479rm -fr conftest*
2480fi
2481
2482fi
2483echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2484cat >> confdefs.h <<EOF
2485#define SIZEOF_INT $ac_cv_sizeof_int
2486EOF
2487
2488
2489echo $ac_n "checking size of long""... $ac_c" 1>&6
2490echo "configure:2491: checking size of long" >&5
2491if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2492  echo $ac_n "(cached) $ac_c" 1>&6
2493else
2494  if test "$cross_compiling" = yes; then
2495  ac_cv_sizeof_long=cross
2496else
2497  cat > conftest.$ac_ext <<EOF
2498#line 2499 "configure"
2499#include "confdefs.h"
2500#include <stdio.h>
2501main()
2502{
2503  FILE *f=fopen("conftestval", "w");
2504  if (!f) exit(1);
2505  fprintf(f, "%d\n", sizeof(long));
2506  exit(0);
2507}
2508EOF
2509if { (eval echo configure:2510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2510then
2511  ac_cv_sizeof_long=`cat conftestval`
2512else
2513  echo "configure: failed program was:" >&5
2514  cat conftest.$ac_ext >&5
2515  rm -fr conftest*
2516  ac_cv_sizeof_long=0
2517fi
2518rm -fr conftest*
2519fi
2520
2521fi
2522echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2523cat >> confdefs.h <<EOF
2524#define SIZEOF_LONG $ac_cv_sizeof_long
2525EOF
2526
2527
2528echo $ac_n "checking size of short""... $ac_c" 1>&6
2529echo "configure:2530: checking size of short" >&5
2530if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2531  echo $ac_n "(cached) $ac_c" 1>&6
2532else
2533  if test "$cross_compiling" = yes; then
2534  ac_cv_sizeof_short=cross
2535else
2536  cat > conftest.$ac_ext <<EOF
2537#line 2538 "configure"
2538#include "confdefs.h"
2539#include <stdio.h>
2540main()
2541{
2542  FILE *f=fopen("conftestval", "w");
2543  if (!f) exit(1);
2544  fprintf(f, "%d\n", sizeof(short));
2545  exit(0);
2546}
2547EOF
2548if { (eval echo configure:2549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2549then
2550  ac_cv_sizeof_short=`cat conftestval`
2551else
2552  echo "configure: failed program was:" >&5
2553  cat conftest.$ac_ext >&5
2554  rm -fr conftest*
2555  ac_cv_sizeof_short=0
2556fi
2557rm -fr conftest*
2558fi
2559
2560fi
2561echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2562cat >> confdefs.h <<EOF
2563#define SIZEOF_SHORT $ac_cv_sizeof_short
2564EOF
2565
2566
2567
2568echo $ac_n "checking for working const""... $ac_c" 1>&6
2569echo "configure:2570: checking for working const" >&5
2570if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2571  echo $ac_n "(cached) $ac_c" 1>&6
2572else
2573  cat > conftest.$ac_ext <<EOF
2574#line 2575 "configure"
2575#include "confdefs.h"
2576
2577int main() {
2578
2579/* Ultrix mips cc rejects this.  */
2580typedef int charset[2]; const charset x;
2581/* SunOS 4.1.1 cc rejects this.  */
2582char const *const *ccp;
2583char **p;
2584/* NEC SVR4.0.2 mips cc rejects this.  */
2585struct point {int x, y;};
2586static struct point const zero = {0,0};
2587/* AIX XL C 1.02.0.0 rejects this.
2588   It does not let you subtract one const X* pointer from another in an arm
2589   of an if-expression whose if-part is not a constant expression */
2590const char *g = "string";
2591ccp = &g + (g ? g-g : 0);
2592/* HPUX 7.0 cc rejects these. */
2593++ccp;
2594p = (char**) ccp;
2595ccp = (char const *const *) p;
2596{ /* SCO 3.2v4 cc rejects this.  */
2597  char *t;
2598  char const *s = 0 ? (char *) 0 : (char const *) 0;
2599
2600  *t++ = 0;
2601}
2602{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2603  int x[] = {25, 17};
2604  const int *foo = &x[0];
2605  ++foo;
2606}
2607{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2608  typedef const int *iptr;
2609  iptr p = 0;
2610  ++p;
2611}
2612{ /* AIX XL C 1.02.0.0 rejects this saying
2613     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2614  struct s { int j; const int *ap[3]; };
2615  struct s *b; b->j = 5;
2616}
2617{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2618  const int foo = 10;
2619}
2620
2621; return 0; }
2622EOF
2623if { (eval echo configure:2624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2624  rm -rf conftest*
2625  ac_cv_c_const=yes
2626else
2627  echo "configure: failed program was:" >&5
2628  cat conftest.$ac_ext >&5
2629  rm -rf conftest*
2630  ac_cv_c_const=no
2631fi
2632rm -f conftest*
2633fi
2634
2635echo "$ac_t""$ac_cv_c_const" 1>&6
2636if test $ac_cv_c_const = no; then
2637  cat >> confdefs.h <<\EOF
2638#define const 
2639EOF
2640
2641fi
2642
2643echo $ac_n "checking for inline""... $ac_c" 1>&6
2644echo "configure:2645: checking for inline" >&5
2645if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2646  echo $ac_n "(cached) $ac_c" 1>&6
2647else
2648  ac_cv_c_inline=no
2649for ac_kw in inline __inline__ __inline; do
2650  cat > conftest.$ac_ext <<EOF
2651#line 2652 "configure"
2652#include "confdefs.h"
2653
2654int main() {
2655} $ac_kw foo() {
2656; return 0; }
2657EOF
2658if { (eval echo configure:2659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2659  rm -rf conftest*
2660  ac_cv_c_inline=$ac_kw; break
2661else
2662  echo "configure: failed program was:" >&5
2663  cat conftest.$ac_ext >&5
2664fi
2665rm -f conftest*
2666done
2667
2668fi
2669
2670echo "$ac_t""$ac_cv_c_inline" 1>&6
2671case "$ac_cv_c_inline" in
2672  inline | yes) ;;
2673  no) cat >> confdefs.h <<\EOF
2674#define inline 
2675EOF
2676 ;;
2677  *)  cat >> confdefs.h <<EOF
2678#define inline $ac_cv_c_inline
2679EOF
2680 ;;
2681esac
2682
2683echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2684echo "configure:2685: checking whether byte ordering is bigendian" >&5
2685if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2686  echo $ac_n "(cached) $ac_c" 1>&6
2687else
2688  ac_cv_c_bigendian=unknown
2689# See if sys/param.h defines the BYTE_ORDER macro.
2690cat > conftest.$ac_ext <<EOF
2691#line 2692 "configure"
2692#include "confdefs.h"
2693#include <sys/types.h>
2694#include <sys/param.h>
2695int main() {
2696
2697#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2698 bogus endian macros
2699#endif
2700; return 0; }
2701EOF
2702if { (eval echo configure:2703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2703  rm -rf conftest*
2704  # It does; now see whether it defined to BIG_ENDIAN or not.
2705cat > conftest.$ac_ext <<EOF
2706#line 2707 "configure"
2707#include "confdefs.h"
2708#include <sys/types.h>
2709#include <sys/param.h>
2710int main() {
2711
2712#if BYTE_ORDER != BIG_ENDIAN
2713 not big endian
2714#endif
2715; return 0; }
2716EOF
2717if { (eval echo configure:2718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2718  rm -rf conftest*
2719  ac_cv_c_bigendian=yes
2720else
2721  echo "configure: failed program was:" >&5
2722  cat conftest.$ac_ext >&5
2723  rm -rf conftest*
2724  ac_cv_c_bigendian=no
2725fi
2726rm -f conftest*
2727else
2728  echo "configure: failed program was:" >&5
2729  cat conftest.$ac_ext >&5
2730fi
2731rm -f conftest*
2732if test $ac_cv_c_bigendian = unknown; then
2733if test "$cross_compiling" = yes; then
2734    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2735else
2736  cat > conftest.$ac_ext <<EOF
2737#line 2738 "configure"
2738#include "confdefs.h"
2739main () {
2740  /* Are we little or big endian?  From Harbison&Steele.  */
2741  union
2742  {
2743    long l;
2744    char c[sizeof (long)];
2745  } u;
2746  u.l = 1;
2747  exit (u.c[sizeof (long) - 1] == 1);
2748}
2749EOF
2750if { (eval echo configure:2751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2751then
2752  ac_cv_c_bigendian=no
2753else
2754  echo "configure: failed program was:" >&5
2755  cat conftest.$ac_ext >&5
2756  rm -fr conftest*
2757  ac_cv_c_bigendian=yes
2758fi
2759rm -fr conftest*
2760fi
2761
2762fi
2763fi
2764
2765echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2766if test $ac_cv_c_bigendian = yes; then
2767  cat >> confdefs.h <<\EOF
2768#define WORDS_BIGENDIAN 1
2769EOF
2770
2771fi
2772
2773echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2774echo "configure:2775: checking whether char is unsigned" >&5
2775if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2776  echo $ac_n "(cached) $ac_c" 1>&6
2777else
2778  if test "$GCC" = yes; then
2779  # GCC predefines this symbol on systems where it applies.
2780cat > conftest.$ac_ext <<EOF
2781#line 2782 "configure"
2782#include "confdefs.h"
2783#ifdef __CHAR_UNSIGNED__
2784  yes
2785#endif
2786
2787EOF
2788if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2789  egrep "yes" >/dev/null 2>&1; then
2790  rm -rf conftest*
2791  ac_cv_c_char_unsigned=yes
2792else
2793  rm -rf conftest*
2794  ac_cv_c_char_unsigned=no
2795fi
2796rm -f conftest*
2797
2798else
2799if test "$cross_compiling" = yes; then
2800    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2801else
2802  cat > conftest.$ac_ext <<EOF
2803#line 2804 "configure"
2804#include "confdefs.h"
2805/* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2806#if !defined(__STDC__) || __STDC__ != 1
2807#define volatile
2808#endif
2809main() {
2810  volatile char c = 255; exit(c < 0);
2811}
2812EOF
2813if { (eval echo configure:2814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2814then
2815  ac_cv_c_char_unsigned=yes
2816else
2817  echo "configure: failed program was:" >&5
2818  cat conftest.$ac_ext >&5
2819  rm -fr conftest*
2820  ac_cv_c_char_unsigned=no
2821fi
2822rm -fr conftest*
2823fi
2824
2825fi
2826fi
2827
2828echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2829if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2830  cat >> confdefs.h <<\EOF
2831#define __CHAR_UNSIGNED__ 1
2832EOF
2833
2834fi
2835
2836
2837echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2838echo "configure:2839: checking return type of signal handlers" >&5
2839if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2840  echo $ac_n "(cached) $ac_c" 1>&6
2841else
2842  cat > conftest.$ac_ext <<EOF
2843#line 2844 "configure"
2844#include "confdefs.h"
2845#include <sys/types.h>
2846#include <signal.h>
2847#ifdef signal
2848#undef signal
2849#endif
2850#ifdef __cplusplus
2851extern "C" void (*signal (int, void (*)(int)))(int);
2852#else
2853void (*signal ()) ();
2854#endif
2855
2856int main() {
2857int i;
2858; return 0; }
2859EOF
2860if { (eval echo configure:2861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2861  rm -rf conftest*
2862  ac_cv_type_signal=void
2863else
2864  echo "configure: failed program was:" >&5
2865  cat conftest.$ac_ext >&5
2866  rm -rf conftest*
2867  ac_cv_type_signal=int
2868fi
2869rm -f conftest*
2870fi
2871
2872echo "$ac_t""$ac_cv_type_signal" 1>&6
2873cat >> confdefs.h <<EOF
2874#define RETSIGTYPE $ac_cv_type_signal
2875EOF
2876
2877
2878echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2879echo "configure:2880: checking for uid_t in sys/types.h" >&5
2880if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2881  echo $ac_n "(cached) $ac_c" 1>&6
2882else
2883  cat > conftest.$ac_ext <<EOF
2884#line 2885 "configure"
2885#include "confdefs.h"
2886#include <sys/types.h>
2887EOF
2888if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2889  egrep "uid_t" >/dev/null 2>&1; then
2890  rm -rf conftest*
2891  ac_cv_type_uid_t=yes
2892else
2893  rm -rf conftest*
2894  ac_cv_type_uid_t=no
2895fi
2896rm -f conftest*
2897
2898fi
2899
2900echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2901if test $ac_cv_type_uid_t = no; then
2902  cat >> confdefs.h <<\EOF
2903#define uid_t int
2904EOF
2905
2906  cat >> confdefs.h <<\EOF
2907#define gid_t int
2908EOF
2909
2910fi
2911
2912echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2913echo "configure:2914: checking for mode_t" >&5
2914if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2915  echo $ac_n "(cached) $ac_c" 1>&6
2916else
2917  cat > conftest.$ac_ext <<EOF
2918#line 2919 "configure"
2919#include "confdefs.h"
2920#include <sys/types.h>
2921#if STDC_HEADERS
2922#include <stdlib.h>
2923#include <stddef.h>
2924#endif
2925EOF
2926if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2927  egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2928  rm -rf conftest*
2929  ac_cv_type_mode_t=yes
2930else
2931  rm -rf conftest*
2932  ac_cv_type_mode_t=no
2933fi
2934rm -f conftest*
2935
2936fi
2937echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2938if test $ac_cv_type_mode_t = no; then
2939  cat >> confdefs.h <<\EOF
2940#define mode_t int
2941EOF
2942
2943fi
2944
2945echo $ac_n "checking for off_t""... $ac_c" 1>&6
2946echo "configure:2947: checking for off_t" >&5
2947if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2948  echo $ac_n "(cached) $ac_c" 1>&6
2949else
2950  cat > conftest.$ac_ext <<EOF
2951#line 2952 "configure"
2952#include "confdefs.h"
2953#include <sys/types.h>
2954#if STDC_HEADERS
2955#include <stdlib.h>
2956#include <stddef.h>
2957#endif
2958EOF
2959if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2960  egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2961  rm -rf conftest*
2962  ac_cv_type_off_t=yes
2963else
2964  rm -rf conftest*
2965  ac_cv_type_off_t=no
2966fi
2967rm -f conftest*
2968
2969fi
2970echo "$ac_t""$ac_cv_type_off_t" 1>&6
2971if test $ac_cv_type_off_t = no; then
2972  cat >> confdefs.h <<\EOF
2973#define off_t long
2974EOF
2975
2976fi
2977
2978echo $ac_n "checking for size_t""... $ac_c" 1>&6
2979echo "configure:2980: checking for size_t" >&5
2980if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2981  echo $ac_n "(cached) $ac_c" 1>&6
2982else
2983  cat > conftest.$ac_ext <<EOF
2984#line 2985 "configure"
2985#include "confdefs.h"
2986#include <sys/types.h>
2987#if STDC_HEADERS
2988#include <stdlib.h>
2989#include <stddef.h>
2990#endif
2991EOF
2992if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2993  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2994  rm -rf conftest*
2995  ac_cv_type_size_t=yes
2996else
2997  rm -rf conftest*
2998  ac_cv_type_size_t=no
2999fi
3000rm -f conftest*
3001
3002fi
3003echo "$ac_t""$ac_cv_type_size_t" 1>&6
3004if test $ac_cv_type_size_t = no; then
3005  cat >> confdefs.h <<\EOF
3006#define size_t unsigned
3007EOF
3008
3009fi
3010
3011echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3012echo "configure:3013: checking for pid_t" >&5
3013if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3014  echo $ac_n "(cached) $ac_c" 1>&6
3015else
3016  cat > conftest.$ac_ext <<EOF
3017#line 3018 "configure"
3018#include "confdefs.h"
3019#include <sys/types.h>
3020#if STDC_HEADERS
3021#include <stdlib.h>
3022#include <stddef.h>
3023#endif
3024EOF
3025if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3026  egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3027  rm -rf conftest*
3028  ac_cv_type_pid_t=yes
3029else
3030  rm -rf conftest*
3031  ac_cv_type_pid_t=no
3032fi
3033rm -f conftest*
3034
3035fi
3036echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3037if test $ac_cv_type_pid_t = no; then
3038  cat >> confdefs.h <<\EOF
3039#define pid_t int
3040EOF
3041
3042fi
3043
3044echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3045echo "configure:3046: checking for st_rdev in struct stat" >&5
3046if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3047  echo $ac_n "(cached) $ac_c" 1>&6
3048else
3049  cat > conftest.$ac_ext <<EOF
3050#line 3051 "configure"
3051#include "confdefs.h"
3052#include <sys/types.h>
3053#include <sys/stat.h>
3054int main() {
3055struct stat s; s.st_rdev;
3056; return 0; }
3057EOF
3058if { (eval echo configure:3059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3059  rm -rf conftest*
3060  ac_cv_struct_st_rdev=yes
3061else
3062  echo "configure: failed program was:" >&5
3063  cat conftest.$ac_ext >&5
3064  rm -rf conftest*
3065  ac_cv_struct_st_rdev=no
3066fi
3067rm -f conftest*
3068fi
3069
3070echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3071if test $ac_cv_struct_st_rdev = yes; then
3072  cat >> confdefs.h <<\EOF
3073#define HAVE_ST_RDEV 1
3074EOF
3075
3076fi
3077
3078echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3079echo "configure:3080: checking for d_off in dirent" >&5
3080if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3081  echo $ac_n "(cached) $ac_c" 1>&6
3082else
3083  cat > conftest.$ac_ext <<EOF
3084#line 3085 "configure"
3085#include "confdefs.h"
3086
3087#include <unistd.h>
3088#include <sys/types.h>
3089#include <dirent.h>
3090int main() {
3091struct dirent d; d.d_off;
3092; return 0; }
3093EOF
3094if { (eval echo configure:3095: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3095  rm -rf conftest*
3096  ac_cv_dirent_d_off=yes
3097else
3098  echo "configure: failed program was:" >&5
3099  cat conftest.$ac_ext >&5
3100  rm -rf conftest*
3101  ac_cv_dirent_d_off=no
3102fi
3103rm -f conftest*
3104fi
3105
3106echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3107if test $ac_cv_dirent_d_off = yes; then
3108  cat >> confdefs.h <<\EOF
3109#define HAVE_DIRENT_D_OFF 1
3110EOF
3111
3112fi
3113
3114echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3115echo "configure:3116: checking for ino_t" >&5
3116if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3117  echo $ac_n "(cached) $ac_c" 1>&6
3118else
3119  cat > conftest.$ac_ext <<EOF
3120#line 3121 "configure"
3121#include "confdefs.h"
3122#include <sys/types.h>
3123#if STDC_HEADERS
3124#include <stdlib.h>
3125#include <stddef.h>
3126#endif
3127EOF
3128if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3129  egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3130  rm -rf conftest*
3131  ac_cv_type_ino_t=yes
3132else
3133  rm -rf conftest*
3134  ac_cv_type_ino_t=no
3135fi
3136rm -f conftest*
3137
3138fi
3139echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3140if test $ac_cv_type_ino_t = no; then
3141  cat >> confdefs.h <<\EOF
3142#define ino_t unsigned
3143EOF
3144
3145fi
3146
3147echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3148echo "configure:3149: checking for loff_t" >&5
3149if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3150  echo $ac_n "(cached) $ac_c" 1>&6
3151else
3152  cat > conftest.$ac_ext <<EOF
3153#line 3154 "configure"
3154#include "confdefs.h"
3155#include <sys/types.h>
3156#if STDC_HEADERS
3157#include <stdlib.h>
3158#include <stddef.h>
3159#endif
3160EOF
3161if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3162  egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3163  rm -rf conftest*
3164  ac_cv_type_loff_t=yes
3165else
3166  rm -rf conftest*
3167  ac_cv_type_loff_t=no
3168fi
3169rm -f conftest*
3170
3171fi
3172echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3173if test $ac_cv_type_loff_t = no; then
3174  cat >> confdefs.h <<\EOF
3175#define loff_t off_t
3176EOF
3177
3178fi
3179
3180echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3181echo "configure:3182: checking for offset_t" >&5
3182if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3183  echo $ac_n "(cached) $ac_c" 1>&6
3184else
3185  cat > conftest.$ac_ext <<EOF
3186#line 3187 "configure"
3187#include "confdefs.h"
3188#include <sys/types.h>
3189#if STDC_HEADERS
3190#include <stdlib.h>
3191#include <stddef.h>
3192#endif
3193EOF
3194if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3195  egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3196  rm -rf conftest*
3197  ac_cv_type_offset_t=yes
3198else
3199  rm -rf conftest*
3200  ac_cv_type_offset_t=no
3201fi
3202rm -f conftest*
3203
3204fi
3205echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3206if test $ac_cv_type_offset_t = no; then
3207  cat >> confdefs.h <<\EOF
3208#define offset_t loff_t
3209EOF
3210
3211fi
3212
3213echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3214echo "configure:3215: checking for ssize_t" >&5
3215if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3216  echo $ac_n "(cached) $ac_c" 1>&6
3217else
3218  cat > conftest.$ac_ext <<EOF
3219#line 3220 "configure"
3220#include "confdefs.h"
3221#include <sys/types.h>
3222#if STDC_HEADERS
3223#include <stdlib.h>
3224#include <stddef.h>
3225#endif
3226EOF
3227if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3228  egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3229  rm -rf conftest*
3230  ac_cv_type_ssize_t=yes
3231else
3232  rm -rf conftest*
3233  ac_cv_type_ssize_t=no
3234fi
3235rm -f conftest*
3236
3237fi
3238echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3239if test $ac_cv_type_ssize_t = no; then
3240  cat >> confdefs.h <<\EOF
3241#define ssize_t int
3242EOF
3243
3244fi
3245
3246
3247# we need libcups for CUPS support...
3248echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3249echo "configure:3250: checking for httpConnect in -lcups" >&5
3250ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3251if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3252  echo $ac_n "(cached) $ac_c" 1>&6
3253else
3254  ac_save_LIBS="$LIBS"
3255LIBS="-lcups  $LIBS"
3256cat > conftest.$ac_ext <<EOF
3257#line 3258 "configure"
3258#include "confdefs.h"
3259/* Override any gcc2 internal prototype to avoid an error.  */
3260/* We use char because int might match the return type of a gcc2
3261    builtin and then its argument prototype would still apply.  */
3262char httpConnect();
3263
3264int main() {
3265httpConnect()
3266; return 0; }
3267EOF
3268if { (eval echo configure:3269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3269  rm -rf conftest*
3270  eval "ac_cv_lib_$ac_lib_var=yes"
3271else
3272  echo "configure: failed program was:" >&5
3273  cat conftest.$ac_ext >&5
3274  rm -rf conftest*
3275  eval "ac_cv_lib_$ac_lib_var=no"
3276fi
3277rm -f conftest*
3278LIBS="$ac_save_LIBS"
3279
3280fi
3281if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3282  echo "$ac_t""yes" 1>&6
3283    ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3284    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3285  cat >> confdefs.h <<EOF
3286#define $ac_tr_lib 1
3287EOF
3288
3289  LIBS="-lcups $LIBS"
3290
3291else
3292  echo "$ac_t""no" 1>&6
3293fi
3294
3295
3296# we need libdl for PAM and the new VFS code
3297echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
3298echo "configure:3299: checking for main in -ldl" >&5
3299ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
3300if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3301  echo $ac_n "(cached) $ac_c" 1>&6
3302else
3303  ac_save_LIBS="$LIBS"
3304LIBS="-ldl  $LIBS"
3305cat > conftest.$ac_ext <<EOF
3306#line 3307 "configure"
3307#include "confdefs.h"
3308
3309int main() {
3310main()
3311; return 0; }
3312EOF
3313if { (eval echo configure:3314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3314  rm -rf conftest*
3315  eval "ac_cv_lib_$ac_lib_var=yes"
3316else
3317  echo "configure: failed program was:" >&5
3318  cat conftest.$ac_ext >&5
3319  rm -rf conftest*
3320  eval "ac_cv_lib_$ac_lib_var=no"
3321fi
3322rm -f conftest*
3323LIBS="$ac_save_LIBS"
3324
3325fi
3326if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3327  echo "$ac_t""yes" 1>&6
3328    ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3329    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3330  cat >> confdefs.h <<EOF
3331#define $ac_tr_lib 1
3332EOF
3333
3334  LIBS="-ldl $LIBS"
3335
3336else
3337  echo "$ac_t""no" 1>&6
3338fi
3339
3340
3341echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3342echo "configure:3343: checking for sig_atomic_t type" >&5
3343if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3344  echo $ac_n "(cached) $ac_c" 1>&6
3345else
3346  
3347    cat > conftest.$ac_ext <<EOF
3348#line 3349 "configure"
3349#include "confdefs.h"
3350
3351#include <sys/types.h>
3352#if STDC_HEADERS
3353#include <stdlib.h>
3354#include <stddef.h>
3355#endif
3356#include <signal.h>
3357int main() {
3358sig_atomic_t i = 0
3359; return 0; }
3360EOF
3361if { (eval echo configure:3362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3362  rm -rf conftest*
3363  samba_cv_sig_atomic_t=yes
3364else
3365  echo "configure: failed program was:" >&5
3366  cat conftest.$ac_ext >&5
3367  rm -rf conftest*
3368  samba_cv_sig_atomic_t=no
3369fi
3370rm -f conftest*
3371fi
3372
3373echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3374if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3375   cat >> confdefs.h <<\EOF
3376#define HAVE_SIG_ATOMIC_T_TYPE 1
3377EOF
3378
3379fi
3380
3381echo $ac_n "checking for errno in errno.h""... $ac_c" 1>&6
3382echo "configure:3383: checking for errno in errno.h" >&5
3383if eval "test \"`echo '$''{'samba_cv_errno'+set}'`\" = set"; then
3384  echo $ac_n "(cached) $ac_c" 1>&6
3385else
3386  
3387    cat > conftest.$ac_ext <<EOF
3388#line 3389 "configure"
3389#include "confdefs.h"
3390#include <errno.h>
3391int main() {
3392int i = errno
3393; return 0; }
3394EOF
3395if { (eval echo configure:3396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3396  rm -rf conftest*
3397  samba_cv_errno=yes
3398else
3399  echo "configure: failed program was:" >&5
3400  cat conftest.$ac_ext >&5
3401  rm -rf conftest*
3402  samba_cv_have_errno=no
3403fi
3404rm -f conftest*
3405fi
3406
3407echo "$ac_t""$samba_cv_errno" 1>&6
3408if test x"$samba_cv_errno" = x"yes"; then
3409   cat >> confdefs.h <<\EOF
3410#define HAVE_ERRNO_DECL 1
3411EOF
3412
3413fi
3414
3415# stupid glibc has the functions but no declaration. grrrr.
3416echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3417echo "configure:3418: checking for setresuid declaration" >&5
3418if eval "test \"`echo '$''{'samba_cv_have_setresuid_decl'+set}'`\" = set"; then
3419  echo $ac_n "(cached) $ac_c" 1>&6
3420else
3421  
3422    cat > conftest.$ac_ext <<EOF
3423#line 3424 "configure"
3424#include "confdefs.h"
3425#include <unistd.h>
3426int main() {
3427int i = (int)setresuid
3428; return 0; }
3429EOF
3430if { (eval echo configure:3431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3431  rm -rf conftest*
3432  samba_cv_have_setresuid_decl=yes
3433else
3434  echo "configure: failed program was:" >&5
3435  cat conftest.$ac_ext >&5
3436  rm -rf conftest*
3437  samba_cv_have_setresuid_decl=no
3438fi
3439rm -f conftest*
3440fi
3441
3442echo "$ac_t""$samba_cv_have_setresuid_decl" 1>&6
3443if test x"$samba_cv_have_setresuid_decl" = x"yes"; then
3444    cat >> confdefs.h <<\EOF
3445#define HAVE_SETRESUID_DECL 1
3446EOF
3447
3448fi
3449
3450# stupid glibc has the functions but no declaration. grrrr.
3451echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
3452echo "configure:3453: checking for setresgid declaration" >&5
3453if eval "test \"`echo '$''{'samba_cv_have_setresgid_decl'+set}'`\" = set"; then
3454  echo $ac_n "(cached) $ac_c" 1>&6
3455else
3456  
3457    cat > conftest.$ac_ext <<EOF
3458#line 3459 "configure"
3459#include "confdefs.h"
3460#include <unistd.h>
3461int main() {
3462int i = (int)setresgid
3463; return 0; }
3464EOF
3465if { (eval echo configure:3466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3466  rm -rf conftest*
3467  samba_cv_have_setresgid_decl=yes
3468else
3469  echo "configure: failed program was:" >&5
3470  cat conftest.$ac_ext >&5
3471  rm -rf conftest*
3472  samba_cv_have_setresgid_decl=no
3473fi
3474rm -f conftest*
3475fi
3476
3477echo "$ac_t""$samba_cv_have_setresgid_decl" 1>&6
3478if test x"$samba_cv_have_setresgid_decl" = x"yes"; then
3479    cat >> confdefs.h <<\EOF
3480#define HAVE_SETRESGID_DECL 1
3481EOF
3482
3483fi
3484
3485# and glibc has setresuid under linux but the function does
3486# nothing until kernel 2.1.44! very dumb.
3487echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
3488echo "configure:3489: checking for real setresuid" >&5
3489if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
3490  echo $ac_n "(cached) $ac_c" 1>&6
3491else
3492  
3493    if test "$cross_compiling" = yes; then
3494  samba_cv_have_setresuid=cross
3495else
3496  cat > conftest.$ac_ext <<EOF
3497#line 3498 "configure"
3498#include "confdefs.h"
3499#include <errno.h>
3500main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
3501EOF
3502if { (eval echo configure:3503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3503then
3504  samba_cv_have_setresuid=yes
3505else
3506  echo "configure: failed program was:" >&5
3507  cat conftest.$ac_ext >&5
3508  rm -fr conftest*
3509  samba_cv_have_setresuid=no
3510fi
3511rm -fr conftest*
3512fi
3513
3514fi
3515
3516echo "$ac_t""$samba_cv_have_setresuid" 1>&6
3517if test x"$samba_cv_have_setresuid" = x"yes"; then
3518    cat >> confdefs.h <<\EOF
3519#define HAVE_SETRESUID 1
3520EOF
3521
3522fi
3523
3524# Do the same check for setresguid...
3525#
3526echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
3527echo "configure:3528: checking for real setresgid" >&5
3528if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
3529  echo $ac_n "(cached) $ac_c" 1>&6
3530else
3531  
3532    if test "$cross_compiling" = yes; then
3533  samba_cv_have_setresgid=cross
3534else
3535  cat > conftest.$ac_ext <<EOF
3536#line 3537 "configure"
3537#include "confdefs.h"
3538#include <unistd.h>
3539#include <errno.h>
3540main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
3541EOF
3542if { (eval echo configure:3543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3543then
3544  samba_cv_have_setresgid=yes
3545else
3546  echo "configure: failed program was:" >&5
3547  cat conftest.$ac_ext >&5
3548  rm -fr conftest*
3549  samba_cv_have_setresgid=no
3550fi
3551rm -fr conftest*
3552fi
3553
3554fi
3555
3556echo "$ac_t""$samba_cv_have_setresgid" 1>&6
3557if test x"$samba_cv_have_setresgid" = x"yes"; then
3558    cat >> confdefs.h <<\EOF
3559#define HAVE_SETRESGID 1
3560EOF
3561
3562fi
3563
3564echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
3565echo "configure:3566: checking for 8-bit clean memcmp" >&5
3566if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
3567  echo $ac_n "(cached) $ac_c" 1>&6
3568else
3569  if test "$cross_compiling" = yes; then
3570  ac_cv_func_memcmp_clean=no
3571else
3572  cat > conftest.$ac_ext <<EOF
3573#line 3574 "configure"
3574#include "confdefs.h"
3575
3576main()
3577{
3578  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
3579  exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
3580}
3581
3582EOF
3583if { (eval echo configure:3584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3584then
3585  ac_cv_func_memcmp_clean=yes
3586else
3587  echo "configure: failed program was:" >&5
3588  cat conftest.$ac_ext >&5
3589  rm -fr conftest*
3590  ac_cv_func_memcmp_clean=no
3591fi
3592rm -fr conftest*
3593fi
3594
3595fi
3596
3597echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
3598test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
3599
3600
3601###############################################
3602# test for where we get crypt() from
3603for ac_func in crypt
3604do
3605echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3606echo "configure:3607: checking for $ac_func" >&5
3607if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3608  echo $ac_n "(cached) $ac_c" 1>&6
3609else
3610  cat > conftest.$ac_ext <<EOF
3611#line 3612 "configure"
3612#include "confdefs.h"
3613/* System header to define __stub macros and hopefully few prototypes,
3614    which can conflict with char $ac_func(); below.  */
3615#include <assert.h>
3616/* Override any gcc2 internal prototype to avoid an error.  */
3617/* We use char because int might match the return type of a gcc2
3618    builtin and then its argument prototype would still apply.  */
3619char $ac_func();
3620
3621int main() {
3622
3623/* The GNU C library defines this for functions which it implements
3624    to always fail with ENOSYS.  Some functions are actually named
3625    something starting with __ and the normal name is an alias.  */
3626#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3627choke me
3628#else
3629$ac_func();
3630#endif
3631
3632; return 0; }
3633EOF
3634if { (eval echo configure:3635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3635  rm -rf conftest*
3636  eval "ac_cv_func_$ac_func=yes"
3637else
3638  echo "configure: failed program was:" >&5
3639  cat conftest.$ac_ext >&5
3640  rm -rf conftest*
3641  eval "ac_cv_func_$ac_func=no"
3642fi
3643rm -f conftest*
3644fi
3645
3646if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3647  echo "$ac_t""yes" 1>&6
3648    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3649  cat >> confdefs.h <<EOF
3650#define $ac_tr_func 1
3651EOF
3652 
3653else
3654  echo "$ac_t""no" 1>&6
3655fi
3656done
3657
3658if test x"$ac_cv_func_crypt" = x"no"; then
3659    echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
3660echo "configure:3661: checking for crypt in -lcrypt" >&5
3661ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
3662if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3663  echo $ac_n "(cached) $ac_c" 1>&6
3664else
3665  ac_save_LIBS="$LIBS"
3666LIBS="-lcrypt  $LIBS"
3667cat > conftest.$ac_ext <<EOF
3668#line 3669 "configure"
3669#include "confdefs.h"
3670/* Override any gcc2 internal prototype to avoid an error.  */
3671/* We use char because int might match the return type of a gcc2
3672    builtin and then its argument prototype would still apply.  */
3673char crypt();
3674
3675int main() {
3676crypt()
3677; return 0; }
3678EOF
3679if { (eval echo configure:3680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3680  rm -rf conftest*
3681  eval "ac_cv_lib_$ac_lib_var=yes"
3682else
3683  echo "configure: failed program was:" >&5
3684  cat conftest.$ac_ext >&5
3685  rm -rf conftest*
3686  eval "ac_cv_lib_$ac_lib_var=no"
3687fi
3688rm -f conftest*
3689LIBS="$ac_save_LIBS"
3690
3691fi
3692if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3693  echo "$ac_t""yes" 1>&6
3694  LIBS="$LIBS -lcrypt";
3695	cat >> confdefs.h <<\EOF
3696#define HAVE_CRYPT 1
3697EOF
3698
3699else
3700  echo "$ac_t""no" 1>&6
3701fi
3702
3703fi
3704
3705
3706###############################################
3707# test for where we get readline() from
3708if test "$ac_cv_header_readline_h" = "yes" ||
3709   test "$ac_cv_header_readline_readline_h" = "yes"; then
3710  echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
3711echo "configure:3712: checking for readline in -lreadline" >&5
3712ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
3713if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3714  echo $ac_n "(cached) $ac_c" 1>&6
3715else
3716  ac_save_LIBS="$LIBS"
3717LIBS="-lreadline  $LIBS"
3718cat > conftest.$ac_ext <<EOF
3719#line 3720 "configure"
3720#include "confdefs.h"
3721/* Override any gcc2 internal prototype to avoid an error.  */
3722/* We use char because int might match the return type of a gcc2
3723    builtin and then its argument prototype would still apply.  */
3724char readline();
3725
3726int main() {
3727readline()
3728; return 0; }
3729EOF
3730if { (eval echo configure:3731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3731  rm -rf conftest*
3732  eval "ac_cv_lib_$ac_lib_var=yes"
3733else
3734  echo "configure: failed program was:" >&5
3735  cat conftest.$ac_ext >&5
3736  rm -rf conftest*
3737  eval "ac_cv_lib_$ac_lib_var=no"
3738fi
3739rm -f conftest*
3740LIBS="$ac_save_LIBS"
3741
3742fi
3743if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3744  echo "$ac_t""yes" 1>&6
3745    ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3746    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3747  cat >> confdefs.h <<EOF
3748#define $ac_tr_lib 1
3749EOF
3750
3751  LIBS="-lreadline $LIBS"
3752
3753else
3754  echo "$ac_t""no" 1>&6
3755fi
3756
3757fi
3758
3759
3760# The following test taken from the cvs sources
3761# If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
3762# The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
3763# libsocket.so which has a bad implementation of gethostbyname (it
3764# only looks in /etc/hosts), so we only look for -lsocket if we need
3765# it.
3766for ac_func in connect
3767do
3768echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3769echo "configure:3770: checking for $ac_func" >&5
3770if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3771  echo $ac_n "(cached) $ac_c" 1>&6
3772else
3773  cat > conftest.$ac_ext <<EOF
3774#line 3775 "configure"
3775#include "confdefs.h"
3776/* System header to define __stub macros and hopefully few prototypes,
3777    which can conflict with char $ac_func(); below.  */
3778#include <assert.h>
3779/* Override any gcc2 internal prototype to avoid an error.  */
3780/* We use char because int might match the return type of a gcc2
3781    builtin and then its argument prototype would still apply.  */
3782char $ac_func();
3783
3784int main() {
3785
3786/* The GNU C library defines this for functions which it implements
3787    to always fail with ENOSYS.  Some functions are actually named
3788    something starting with __ and the normal name is an alias.  */
3789#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3790choke me
3791#else
3792$ac_func();
3793#endif
3794
3795; return 0; }
3796EOF
3797if { (eval echo configure:3798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3798  rm -rf conftest*
3799  eval "ac_cv_func_$ac_func=yes"
3800else
3801  echo "configure: failed program was:" >&5
3802  cat conftest.$ac_ext >&5
3803  rm -rf conftest*
3804  eval "ac_cv_func_$ac_func=no"
3805fi
3806rm -f conftest*
3807fi
3808
3809if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3810  echo "$ac_t""yes" 1>&6
3811    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3812  cat >> confdefs.h <<EOF
3813#define $ac_tr_func 1
3814EOF
3815 
3816else
3817  echo "$ac_t""no" 1>&6
3818fi
3819done
3820
3821if test x"$ac_cv_func_connect" = x"no"; then
3822    case "$LIBS" in
3823    *-lnsl*) ;;
3824    *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
3825echo "configure:3826: checking for printf in -lnsl_s" >&5
3826ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
3827if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3828  echo $ac_n "(cached) $ac_c" 1>&6
3829else
3830  ac_save_LIBS="$LIBS"
3831LIBS="-lnsl_s  $LIBS"
3832cat > conftest.$ac_ext <<EOF
3833#line 3834 "configure"
3834#include "confdefs.h"
3835/* Override any gcc2 internal prototype to avoid an error.  */
3836/* We use char because int might match the return type of a gcc2
3837    builtin and then its argument prototype would still apply.  */
3838char printf();
3839
3840int main() {
3841printf()
3842; return 0; }
3843EOF
3844if { (eval echo configure:3845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3845  rm -rf conftest*
3846  eval "ac_cv_lib_$ac_lib_var=yes"
3847else
3848  echo "configure: failed program was:" >&5
3849  cat conftest.$ac_ext >&5
3850  rm -rf conftest*
3851  eval "ac_cv_lib_$ac_lib_var=no"
3852fi
3853rm -f conftest*
3854LIBS="$ac_save_LIBS"
3855
3856fi
3857if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3858  echo "$ac_t""yes" 1>&6
3859    ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3860    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3861  cat >> confdefs.h <<EOF
3862#define $ac_tr_lib 1
3863EOF
3864
3865  LIBS="-lnsl_s $LIBS"
3866
3867else
3868  echo "$ac_t""no" 1>&6
3869fi
3870 ;;
3871    esac
3872    case "$LIBS" in
3873    *-lnsl*) ;;
3874    *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
3875echo "configure:3876: checking for printf in -lnsl" >&5
3876ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
3877if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3878  echo $ac_n "(cached) $ac_c" 1>&6
3879else
3880  ac_save_LIBS="$LIBS"
3881LIBS="-lnsl  $LIBS"
3882cat > conftest.$ac_ext <<EOF
3883#line 3884 "configure"
3884#include "confdefs.h"
3885/* Override any gcc2 internal prototype to avoid an error.  */
3886/* We use char because int might match the return type of a gcc2
3887    builtin and then its argument prototype would still apply.  */
3888char printf();
3889
3890int main() {
3891printf()
3892; return 0; }
3893EOF
3894if { (eval echo configure:3895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3895  rm -rf conftest*
3896  eval "ac_cv_lib_$ac_lib_var=yes"
3897else
3898  echo "configure: failed program was:" >&5
3899  cat conftest.$ac_ext >&5
3900  rm -rf conftest*
3901  eval "ac_cv_lib_$ac_lib_var=no"
3902fi
3903rm -f conftest*
3904LIBS="$ac_save_LIBS"
3905
3906fi
3907if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3908  echo "$ac_t""yes" 1>&6
3909    ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3910    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3911  cat >> confdefs.h <<EOF
3912#define $ac_tr_lib 1
3913EOF
3914
3915  LIBS="-lnsl $LIBS"
3916
3917else
3918  echo "$ac_t""no" 1>&6
3919fi
3920 ;;
3921    esac
3922    case "$LIBS" in
3923    *-lsocket*) ;;
3924    *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
3925echo "configure:3926: checking for connect in -lsocket" >&5
3926ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
3927if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3928  echo $ac_n "(cached) $ac_c" 1>&6
3929else
3930  ac_save_LIBS="$LIBS"
3931LIBS="-lsocket  $LIBS"
3932cat > conftest.$ac_ext <<EOF
3933#line 3934 "configure"
3934#include "confdefs.h"
3935/* Override any gcc2 internal prototype to avoid an error.  */
3936/* We use char because int might match the return type of a gcc2
3937    builtin and then its argument prototype would still apply.  */
3938char connect();
3939
3940int main() {
3941connect()
3942; return 0; }
3943EOF
3944if { (eval echo configure:3945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3945  rm -rf conftest*
3946  eval "ac_cv_lib_$ac_lib_var=yes"
3947else
3948  echo "configure: failed program was:" >&5
3949  cat conftest.$ac_ext >&5
3950  rm -rf conftest*
3951  eval "ac_cv_lib_$ac_lib_var=no"
3952fi
3953rm -f conftest*
3954LIBS="$ac_save_LIBS"
3955
3956fi
3957if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3958  echo "$ac_t""yes" 1>&6
3959    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3960    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3961  cat >> confdefs.h <<EOF
3962#define $ac_tr_lib 1
3963EOF
3964
3965  LIBS="-lsocket $LIBS"
3966
3967else
3968  echo "$ac_t""no" 1>&6
3969fi
3970 ;;
3971    esac
3972    case "$LIBS" in
3973    *-linet*) ;;
3974    *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
3975echo "configure:3976: checking for connect in -linet" >&5
3976ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
3977if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3978  echo $ac_n "(cached) $ac_c" 1>&6
3979else
3980  ac_save_LIBS="$LIBS"
3981LIBS="-linet  $LIBS"
3982cat > conftest.$ac_ext <<EOF
3983#line 3984 "configure"
3984#include "confdefs.h"
3985/* Override any gcc2 internal prototype to avoid an error.  */
3986/* We use char because int might match the return type of a gcc2
3987    builtin and then its argument prototype would still apply.  */
3988char connect();
3989
3990int main() {
3991connect()
3992; return 0; }
3993EOF
3994if { (eval echo configure:3995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3995  rm -rf conftest*
3996  eval "ac_cv_lib_$ac_lib_var=yes"
3997else
3998  echo "configure: failed program was:" >&5
3999  cat conftest.$ac_ext >&5
4000  rm -rf conftest*
4001  eval "ac_cv_lib_$ac_lib_var=no"
4002fi
4003rm -f conftest*
4004LIBS="$ac_save_LIBS"
4005
4006fi
4007if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4008  echo "$ac_t""yes" 1>&6
4009    ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4010    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4011  cat >> confdefs.h <<EOF
4012#define $ac_tr_lib 1
4013EOF
4014
4015  LIBS="-linet $LIBS"
4016
4017else
4018  echo "$ac_t""no" 1>&6
4019fi
4020 ;;
4021    esac
4022            if test x"$ac_cv_lib_socket_connect" = x"yes" || 
4023       test x"$ac_cv_lib_inet_connect" = x"yes"; then
4024        # ac_cv_func_connect=yes
4025        # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
4026        cat >> confdefs.h <<\EOF
4027#define HAVE_CONNECT 1
4028EOF
4029
4030    fi
4031fi
4032
4033# Check if we have execl, if not we need to compile smbrun.
4034for ac_func in execl
4035do
4036echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4037echo "configure:4038: checking for $ac_func" >&5
4038if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4039  echo $ac_n "(cached) $ac_c" 1>&6
4040else
4041  cat > conftest.$ac_ext <<EOF
4042#line 4043 "configure"
4043#include "confdefs.h"
4044/* System header to define __stub macros and hopefully few prototypes,
4045    which can conflict with char $ac_func(); below.  */
4046#include <assert.h>
4047/* Override any gcc2 internal prototype to avoid an error.  */
4048/* We use char because int might match the return type of a gcc2
4049    builtin and then its argument prototype would still apply.  */
4050char $ac_func();
4051
4052int main() {
4053
4054/* The GNU C library defines this for functions which it implements
4055    to always fail with ENOSYS.  Some functions are actually named
4056    something starting with __ and the normal name is an alias.  */
4057#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4058choke me
4059#else
4060$ac_func();
4061#endif
4062
4063; return 0; }
4064EOF
4065if { (eval echo configure:4066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4066  rm -rf conftest*
4067  eval "ac_cv_func_$ac_func=yes"
4068else
4069  echo "configure: failed program was:" >&5
4070  cat conftest.$ac_ext >&5
4071  rm -rf conftest*
4072  eval "ac_cv_func_$ac_func=no"
4073fi
4074rm -f conftest*
4075fi
4076
4077if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4078  echo "$ac_t""yes" 1>&6
4079    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4080  cat >> confdefs.h <<EOF
4081#define $ac_tr_func 1
4082EOF
4083 
4084else
4085  echo "$ac_t""no" 1>&6
4086fi
4087done
4088
4089if test x"$ac_cv_func_execl" = x"no"; then
4090    RUNPROG="bin/smbrun"
4091else
4092    RUNPROG=""
4093fi
4094
4095for ac_func in waitpid getcwd strdup strtoul strerror chown chmod chroot
4096do
4097echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4098echo "configure:4099: checking for $ac_func" >&5
4099if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4100  echo $ac_n "(cached) $ac_c" 1>&6
4101else
4102  cat > conftest.$ac_ext <<EOF
4103#line 4104 "configure"
4104#include "confdefs.h"
4105/* System header to define __stub macros and hopefully few prototypes,
4106    which can conflict with char $ac_func(); below.  */
4107#include <assert.h>
4108/* Override any gcc2 internal prototype to avoid an error.  */
4109/* We use char because int might match the return type of a gcc2
4110    builtin and then its argument prototype would still apply.  */
4111char $ac_func();
4112
4113int main() {
4114
4115/* The GNU C library defines this for functions which it implements
4116    to always fail with ENOSYS.  Some functions are actually named
4117    something starting with __ and the normal name is an alias.  */
4118#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4119choke me
4120#else
4121$ac_func();
4122#endif
4123
4124; return 0; }
4125EOF
4126if { (eval echo configure:4127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4127  rm -rf conftest*
4128  eval "ac_cv_func_$ac_func=yes"
4129else
4130  echo "configure: failed program was:" >&5
4131  cat conftest.$ac_ext >&5
4132  rm -rf conftest*
4133  eval "ac_cv_func_$ac_func=no"
4134fi
4135rm -f conftest*
4136fi
4137
4138if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4139  echo "$ac_t""yes" 1>&6
4140    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4141  cat >> confdefs.h <<EOF
4142#define $ac_tr_func 1
4143EOF
4144 
4145else
4146  echo "$ac_t""no" 1>&6
4147fi
4148done
4149
4150for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset
4151do
4152echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4153echo "configure:4154: checking for $ac_func" >&5
4154if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4155  echo $ac_n "(cached) $ac_c" 1>&6
4156else
4157  cat > conftest.$ac_ext <<EOF
4158#line 4159 "configure"
4159#include "confdefs.h"
4160/* System header to define __stub macros and hopefully few prototypes,
4161    which can conflict with char $ac_func(); below.  */
4162#include <assert.h>
4163/* Override any gcc2 internal prototype to avoid an error.  */
4164/* We use char because int might match the return type of a gcc2
4165    builtin and then its argument prototype would still apply.  */
4166char $ac_func();
4167
4168int main() {
4169
4170/* The GNU C library defines this for functions which it implements
4171    to always fail with ENOSYS.  Some functions are actually named
4172    something starting with __ and the normal name is an alias.  */
4173#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4174choke me
4175#else
4176$ac_func();
4177#endif
4178
4179; return 0; }
4180EOF
4181if { (eval echo configure:4182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4182  rm -rf conftest*
4183  eval "ac_cv_func_$ac_func=yes"
4184else
4185  echo "configure: failed program was:" >&5
4186  cat conftest.$ac_ext >&5
4187  rm -rf conftest*
4188  eval "ac_cv_func_$ac_func=no"
4189fi
4190rm -f conftest*
4191fi
4192
4193if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4194  echo "$ac_t""yes" 1>&6
4195    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4196  cat >> confdefs.h <<EOF
4197#define $ac_tr_func 1
4198EOF
4199 
4200else
4201  echo "$ac_t""no" 1>&6
4202fi
4203done
4204
4205for ac_func in memmove vsnprintf snprintf setsid glob strpbrk pipe crypt16 getauthuid
4206do
4207echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4208echo "configure:4209: checking for $ac_func" >&5
4209if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4210  echo $ac_n "(cached) $ac_c" 1>&6
4211else
4212  cat > conftest.$ac_ext <<EOF
4213#line 4214 "configure"
4214#include "confdefs.h"
4215/* System header to define __stub macros and hopefully few prototypes,
4216    which can conflict with char $ac_func(); below.  */
4217#include <assert.h>
4218/* Override any gcc2 internal prototype to avoid an error.  */
4219/* We use char because int might match the return type of a gcc2
4220    builtin and then its argument prototype would still apply.  */
4221char $ac_func();
4222
4223int main() {
4224
4225/* The GNU C library defines this for functions which it implements
4226    to always fail with ENOSYS.  Some functions are actually named
4227    something starting with __ and the normal name is an alias.  */
4228#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4229choke me
4230#else
4231$ac_func();
4232#endif
4233
4234; return 0; }
4235EOF
4236if { (eval echo configure:4237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4237  rm -rf conftest*
4238  eval "ac_cv_func_$ac_func=yes"
4239else
4240  echo "configure: failed program was:" >&5
4241  cat conftest.$ac_ext >&5
4242  rm -rf conftest*
4243  eval "ac_cv_func_$ac_func=no"
4244fi
4245rm -f conftest*
4246fi
4247
4248if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4249  echo "$ac_t""yes" 1>&6
4250    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4251  cat >> confdefs.h <<EOF
4252#define $ac_tr_func 1
4253EOF
4254 
4255else
4256  echo "$ac_t""no" 1>&6
4257fi
4258done
4259
4260for ac_func in strftime sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent
4261do
4262echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4263echo "configure:4264: checking for $ac_func" >&5
4264if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4265  echo $ac_n "(cached) $ac_c" 1>&6
4266else
4267  cat > conftest.$ac_ext <<EOF
4268#line 4269 "configure"
4269#include "confdefs.h"
4270/* System header to define __stub macros and hopefully few prototypes,
4271    which can conflict with char $ac_func(); below.  */
4272#include <assert.h>
4273/* Override any gcc2 internal prototype to avoid an error.  */
4274/* We use char because int might match the return type of a gcc2
4275    builtin and then its argument prototype would still apply.  */
4276char $ac_func();
4277
4278int main() {
4279
4280/* The GNU C library defines this for functions which it implements
4281    to always fail with ENOSYS.  Some functions are actually named
4282    something starting with __ and the normal name is an alias.  */
4283#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4284choke me
4285#else
4286$ac_func();
4287#endif
4288
4289; return 0; }
4290EOF
4291if { (eval echo configure:4292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4292  rm -rf conftest*
4293  eval "ac_cv_func_$ac_func=yes"
4294else
4295  echo "configure: failed program was:" >&5
4296  cat conftest.$ac_ext >&5
4297  rm -rf conftest*
4298  eval "ac_cv_func_$ac_func=no"
4299fi
4300rm -f conftest*
4301fi
4302
4303if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4304  echo "$ac_t""yes" 1>&6
4305    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4306  cat >> confdefs.h <<EOF
4307#define $ac_tr_func 1
4308EOF
4309 
4310else
4311  echo "$ac_t""no" 1>&6
4312fi
4313done
4314
4315for ac_func in initgroups select rdchk getgrnam getgrent pathconf
4316do
4317echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4318echo "configure:4319: checking for $ac_func" >&5
4319if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4320  echo $ac_n "(cached) $ac_c" 1>&6
4321else
4322  cat > conftest.$ac_ext <<EOF
4323#line 4324 "configure"
4324#include "confdefs.h"
4325/* System header to define __stub macros and hopefully few prototypes,
4326    which can conflict with char $ac_func(); below.  */
4327#include <assert.h>
4328/* Override any gcc2 internal prototype to avoid an error.  */
4329/* We use char because int might match the return type of a gcc2
4330    builtin and then its argument prototype would still apply.  */
4331char $ac_func();
4332
4333int main() {
4334
4335/* The GNU C library defines this for functions which it implements
4336    to always fail with ENOSYS.  Some functions are actually named
4337    something starting with __ and the normal name is an alias.  */
4338#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4339choke me
4340#else
4341$ac_func();
4342#endif
4343
4344; return 0; }
4345EOF
4346if { (eval echo configure:4347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4347  rm -rf conftest*
4348  eval "ac_cv_func_$ac_func=yes"
4349else
4350  echo "configure: failed program was:" >&5
4351  cat conftest.$ac_ext >&5
4352  rm -rf conftest*
4353  eval "ac_cv_func_$ac_func=no"
4354fi
4355rm -f conftest*
4356fi
4357
4358if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4359  echo "$ac_t""yes" 1>&6
4360    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4361  cat >> confdefs.h <<EOF
4362#define $ac_tr_func 1
4363EOF
4364 
4365else
4366  echo "$ac_t""no" 1>&6
4367fi
4368done
4369
4370for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
4371do
4372echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4373echo "configure:4374: checking for $ac_func" >&5
4374if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4375  echo $ac_n "(cached) $ac_c" 1>&6
4376else
4377  cat > conftest.$ac_ext <<EOF
4378#line 4379 "configure"
4379#include "confdefs.h"
4380/* System header to define __stub macros and hopefully few prototypes,
4381    which can conflict with char $ac_func(); below.  */
4382#include <assert.h>
4383/* Override any gcc2 internal prototype to avoid an error.  */
4384/* We use char because int might match the return type of a gcc2
4385    builtin and then its argument prototype would still apply.  */
4386char $ac_func();
4387
4388int main() {
4389
4390/* The GNU C library defines this for functions which it implements
4391    to always fail with ENOSYS.  Some functions are actually named
4392    something starting with __ and the normal name is an alias.  */
4393#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4394choke me
4395#else
4396$ac_func();
4397#endif
4398
4399; return 0; }
4400EOF
4401if { (eval echo configure:4402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4402  rm -rf conftest*
4403  eval "ac_cv_func_$ac_func=yes"
4404else
4405  echo "configure: failed program was:" >&5
4406  cat conftest.$ac_ext >&5
4407  rm -rf conftest*
4408  eval "ac_cv_func_$ac_func=no"
4409fi
4410rm -f conftest*
4411fi
4412
4413if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4414  echo "$ac_t""yes" 1>&6
4415    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4416  cat >> confdefs.h <<EOF
4417#define $ac_tr_func 1
4418EOF
4419 
4420else
4421  echo "$ac_t""no" 1>&6
4422fi
4423done
4424
4425for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
4426do
4427echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4428echo "configure:4429: checking for $ac_func" >&5
4429if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4430  echo $ac_n "(cached) $ac_c" 1>&6
4431else
4432  cat > conftest.$ac_ext <<EOF
4433#line 4434 "configure"
4434#include "confdefs.h"
4435/* System header to define __stub macros and hopefully few prototypes,
4436    which can conflict with char $ac_func(); below.  */
4437#include <assert.h>
4438/* Override any gcc2 internal prototype to avoid an error.  */
4439/* We use char because int might match the return type of a gcc2
4440    builtin and then its argument prototype would still apply.  */
4441char $ac_func();
4442
4443int main() {
4444
4445/* The GNU C library defines this for functions which it implements
4446    to always fail with ENOSYS.  Some functions are actually named
4447    something starting with __ and the normal name is an alias.  */
4448#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4449choke me
4450#else
4451$ac_func();
4452#endif
4453
4454; return 0; }
4455EOF
4456if { (eval echo configure:4457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4457  rm -rf conftest*
4458  eval "ac_cv_func_$ac_func=yes"
4459else
4460  echo "configure: failed program was:" >&5
4461  cat conftest.$ac_ext >&5
4462  rm -rf conftest*
4463  eval "ac_cv_func_$ac_func=no"
4464fi
4465rm -f conftest*
4466fi
4467
4468if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4469  echo "$ac_t""yes" 1>&6
4470    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4471  cat >> confdefs.h <<EOF
4472#define $ac_tr_func 1
4473EOF
4474 
4475else
4476  echo "$ac_t""no" 1>&6
4477fi
4478done
4479
4480for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid yp_get_default_domain getpwanam
4481do
4482echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4483echo "configure:4484: checking for $ac_func" >&5
4484if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4485  echo $ac_n "(cached) $ac_c" 1>&6
4486else
4487  cat > conftest.$ac_ext <<EOF
4488#line 4489 "configure"
4489#include "confdefs.h"
4490/* System header to define __stub macros and hopefully few prototypes,
4491    which can conflict with char $ac_func(); below.  */
4492#include <assert.h>
4493/* Override any gcc2 internal prototype to avoid an error.  */
4494/* We use char because int might match the return type of a gcc2
4495    builtin and then its argument prototype would still apply.  */
4496char $ac_func();
4497
4498int main() {
4499
4500/* The GNU C library defines this for functions which it implements
4501    to always fail with ENOSYS.  Some functions are actually named
4502    something starting with __ and the normal name is an alias.  */
4503#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4504choke me
4505#else
4506$ac_func();
4507#endif
4508
4509; return 0; }
4510EOF
4511if { (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_func_$ac_func=yes"
4514else
4515  echo "configure: failed program was:" >&5
4516  cat conftest.$ac_ext >&5
4517  rm -rf conftest*
4518  eval "ac_cv_func_$ac_func=no"
4519fi
4520rm -f conftest*
4521fi
4522
4523if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4524  echo "$ac_t""yes" 1>&6
4525    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4526  cat >> confdefs.h <<EOF
4527#define $ac_tr_func 1
4528EOF
4529 
4530else
4531  echo "$ac_t""no" 1>&6
4532fi
4533done
4534
4535for ac_func in srandom random srand rand setenv usleep mmap64 strcasecmp fcvt fcvtl
4536do
4537echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4538echo "configure:4539: checking for $ac_func" >&5
4539if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4540  echo $ac_n "(cached) $ac_c" 1>&6
4541else
4542  cat > conftest.$ac_ext <<EOF
4543#line 4544 "configure"
4544#include "confdefs.h"
4545/* System header to define __stub macros and hopefully few prototypes,
4546    which can conflict with char $ac_func(); below.  */
4547#include <assert.h>
4548/* Override any gcc2 internal prototype to avoid an error.  */
4549/* We use char because int might match the return type of a gcc2
4550    builtin and then its argument prototype would still apply.  */
4551char $ac_func();
4552
4553int main() {
4554
4555/* The GNU C library defines this for functions which it implements
4556    to always fail with ENOSYS.  Some functions are actually named
4557    something starting with __ and the normal name is an alias.  */
4558#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4559choke me
4560#else
4561$ac_func();
4562#endif
4563
4564; return 0; }
4565EOF
4566if { (eval echo configure:4567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4567  rm -rf conftest*
4568  eval "ac_cv_func_$ac_func=yes"
4569else
4570  echo "configure: failed program was:" >&5
4571  cat conftest.$ac_ext >&5
4572  rm -rf conftest*
4573  eval "ac_cv_func_$ac_func=no"
4574fi
4575rm -f conftest*
4576fi
4577
4578if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4579  echo "$ac_t""yes" 1>&6
4580    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4581  cat >> confdefs.h <<EOF
4582#define $ac_tr_func 1
4583EOF
4584 
4585else
4586  echo "$ac_t""no" 1>&6
4587fi
4588done
4589
4590
4591# syscall() is needed for smbwrapper.
4592for ac_func in syscall
4593do
4594echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4595echo "configure:4596: checking for $ac_func" >&5
4596if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4597  echo $ac_n "(cached) $ac_c" 1>&6
4598else
4599  cat > conftest.$ac_ext <<EOF
4600#line 4601 "configure"
4601#include "confdefs.h"
4602/* System header to define __stub macros and hopefully few prototypes,
4603    which can conflict with char $ac_func(); below.  */
4604#include <assert.h>
4605/* Override any gcc2 internal prototype to avoid an error.  */
4606/* We use char because int might match the return type of a gcc2
4607    builtin and then its argument prototype would still apply.  */
4608char $ac_func();
4609
4610int main() {
4611
4612/* The GNU C library defines this for functions which it implements
4613    to always fail with ENOSYS.  Some functions are actually named
4614    something starting with __ and the normal name is an alias.  */
4615#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4616choke me
4617#else
4618$ac_func();
4619#endif
4620
4621; return 0; }
4622EOF
4623if { (eval echo configure:4624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4624  rm -rf conftest*
4625  eval "ac_cv_func_$ac_func=yes"
4626else
4627  echo "configure: failed program was:" >&5
4628  cat conftest.$ac_ext >&5
4629  rm -rf conftest*
4630  eval "ac_cv_func_$ac_func=no"
4631fi
4632rm -f conftest*
4633fi
4634
4635if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4636  echo "$ac_t""yes" 1>&6
4637    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4638  cat >> confdefs.h <<EOF
4639#define $ac_tr_func 1
4640EOF
4641 
4642else
4643  echo "$ac_t""no" 1>&6
4644fi
4645done
4646
4647
4648for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
4649do
4650echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4651echo "configure:4652: checking for $ac_func" >&5
4652if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4653  echo $ac_n "(cached) $ac_c" 1>&6
4654else
4655  cat > conftest.$ac_ext <<EOF
4656#line 4657 "configure"
4657#include "confdefs.h"
4658/* System header to define __stub macros and hopefully few prototypes,
4659    which can conflict with char $ac_func(); below.  */
4660#include <assert.h>
4661/* Override any gcc2 internal prototype to avoid an error.  */
4662/* We use char because int might match the return type of a gcc2
4663    builtin and then its argument prototype would still apply.  */
4664char $ac_func();
4665
4666int main() {
4667
4668/* The GNU C library defines this for functions which it implements
4669    to always fail with ENOSYS.  Some functions are actually named
4670    something starting with __ and the normal name is an alias.  */
4671#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4672choke me
4673#else
4674$ac_func();
4675#endif
4676
4677; return 0; }
4678EOF
4679if { (eval echo configure:4680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4680  rm -rf conftest*
4681  eval "ac_cv_func_$ac_func=yes"
4682else
4683  echo "configure: failed program was:" >&5
4684  cat conftest.$ac_ext >&5
4685  rm -rf conftest*
4686  eval "ac_cv_func_$ac_func=no"
4687fi
4688rm -f conftest*
4689fi
4690
4691if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4692  echo "$ac_t""yes" 1>&6
4693    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4694  cat >> confdefs.h <<EOF
4695#define $ac_tr_func 1
4696EOF
4697 
4698else
4699  echo "$ac_t""no" 1>&6
4700fi
4701done
4702
4703for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
4704do
4705echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4706echo "configure:4707: checking for $ac_func" >&5
4707if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4708  echo $ac_n "(cached) $ac_c" 1>&6
4709else
4710  cat > conftest.$ac_ext <<EOF
4711#line 4712 "configure"
4712#include "confdefs.h"
4713/* System header to define __stub macros and hopefully few prototypes,
4714    which can conflict with char $ac_func(); below.  */
4715#include <assert.h>
4716/* Override any gcc2 internal prototype to avoid an error.  */
4717/* We use char because int might match the return type of a gcc2
4718    builtin and then its argument prototype would still apply.  */
4719char $ac_func();
4720
4721int main() {
4722
4723/* The GNU C library defines this for functions which it implements
4724    to always fail with ENOSYS.  Some functions are actually named
4725    something starting with __ and the normal name is an alias.  */
4726#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4727choke me
4728#else
4729$ac_func();
4730#endif
4731
4732; return 0; }
4733EOF
4734if { (eval echo configure:4735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4735  rm -rf conftest*
4736  eval "ac_cv_func_$ac_func=yes"
4737else
4738  echo "configure: failed program was:" >&5
4739  cat conftest.$ac_ext >&5
4740  rm -rf conftest*
4741  eval "ac_cv_func_$ac_func=no"
4742fi
4743rm -f conftest*
4744fi
4745
4746if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4747  echo "$ac_t""yes" 1>&6
4748    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4749  cat >> confdefs.h <<EOF
4750#define $ac_tr_func 1
4751EOF
4752 
4753else
4754  echo "$ac_t""no" 1>&6
4755fi
4756done
4757
4758for ac_func in __getcwd _getcwd
4759do
4760echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4761echo "configure:4762: checking for $ac_func" >&5
4762if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4763  echo $ac_n "(cached) $ac_c" 1>&6
4764else
4765  cat > conftest.$ac_ext <<EOF
4766#line 4767 "configure"
4767#include "confdefs.h"
4768/* System header to define __stub macros and hopefully few prototypes,
4769    which can conflict with char $ac_func(); below.  */
4770#include <assert.h>
4771/* Override any gcc2 internal prototype to avoid an error.  */
4772/* We use char because int might match the return type of a gcc2
4773    builtin and then its argument prototype would still apply.  */
4774char $ac_func();
4775
4776int main() {
4777
4778/* The GNU C library defines this for functions which it implements
4779    to always fail with ENOSYS.  Some functions are actually named
4780    something starting with __ and the normal name is an alias.  */
4781#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4782choke me
4783#else
4784$ac_func();
4785#endif
4786
4787; return 0; }
4788EOF
4789if { (eval echo configure:4790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4790  rm -rf conftest*
4791  eval "ac_cv_func_$ac_func=yes"
4792else
4793  echo "configure: failed program was:" >&5
4794  cat conftest.$ac_ext >&5
4795  rm -rf conftest*
4796  eval "ac_cv_func_$ac_func=no"
4797fi
4798rm -f conftest*
4799fi
4800
4801if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4802  echo "$ac_t""yes" 1>&6
4803    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4804  cat >> confdefs.h <<EOF
4805#define $ac_tr_func 1
4806EOF
4807 
4808else
4809  echo "$ac_t""no" 1>&6
4810fi
4811done
4812
4813for ac_func in __xstat __fxstat __lxstat
4814do
4815echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4816echo "configure:4817: checking for $ac_func" >&5
4817if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4818  echo $ac_n "(cached) $ac_c" 1>&6
4819else
4820  cat > conftest.$ac_ext <<EOF
4821#line 4822 "configure"
4822#include "confdefs.h"
4823/* System header to define __stub macros and hopefully few prototypes,
4824    which can conflict with char $ac_func(); below.  */
4825#include <assert.h>
4826/* Override any gcc2 internal prototype to avoid an error.  */
4827/* We use char because int might match the return type of a gcc2
4828    builtin and then its argument prototype would still apply.  */
4829char $ac_func();
4830
4831int main() {
4832
4833/* The GNU C library defines this for functions which it implements
4834    to always fail with ENOSYS.  Some functions are actually named
4835    something starting with __ and the normal name is an alias.  */
4836#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4837choke me
4838#else
4839$ac_func();
4840#endif
4841
4842; return 0; }
4843EOF
4844if { (eval echo configure:4845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4845  rm -rf conftest*
4846  eval "ac_cv_func_$ac_func=yes"
4847else
4848  echo "configure: failed program was:" >&5
4849  cat conftest.$ac_ext >&5
4850  rm -rf conftest*
4851  eval "ac_cv_func_$ac_func=no"
4852fi
4853rm -f conftest*
4854fi
4855
4856if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4857  echo "$ac_t""yes" 1>&6
4858    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4859  cat >> confdefs.h <<EOF
4860#define $ac_tr_func 1
4861EOF
4862 
4863else
4864  echo "$ac_t""no" 1>&6
4865fi
4866done
4867
4868for ac_func in _stat _lstat _fstat __stat __lstat __fstat
4869do
4870echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4871echo "configure:4872: checking for $ac_func" >&5
4872if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4873  echo $ac_n "(cached) $ac_c" 1>&6
4874else
4875  cat > conftest.$ac_ext <<EOF
4876#line 4877 "configure"
4877#include "confdefs.h"
4878/* System header to define __stub macros and hopefully few prototypes,
4879    which can conflict with char $ac_func(); below.  */
4880#include <assert.h>
4881/* Override any gcc2 internal prototype to avoid an error.  */
4882/* We use char because int might match the return type of a gcc2
4883    builtin and then its argument prototype would still apply.  */
4884char $ac_func();
4885
4886int main() {
4887
4888/* The GNU C library defines this for functions which it implements
4889    to always fail with ENOSYS.  Some functions are actually named
4890    something starting with __ and the normal name is an alias.  */
4891#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4892choke me
4893#else
4894$ac_func();
4895#endif
4896
4897; return 0; }
4898EOF
4899if { (eval echo configure:4900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4900  rm -rf conftest*
4901  eval "ac_cv_func_$ac_func=yes"
4902else
4903  echo "configure: failed program was:" >&5
4904  cat conftest.$ac_ext >&5
4905  rm -rf conftest*
4906  eval "ac_cv_func_$ac_func=no"
4907fi
4908rm -f conftest*
4909fi
4910
4911if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4912  echo "$ac_t""yes" 1>&6
4913    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4914  cat >> confdefs.h <<EOF
4915#define $ac_tr_func 1
4916EOF
4917 
4918else
4919  echo "$ac_t""no" 1>&6
4920fi
4921done
4922
4923for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
4924do
4925echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4926echo "configure:4927: checking for $ac_func" >&5
4927if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4928  echo $ac_n "(cached) $ac_c" 1>&6
4929else
4930  cat > conftest.$ac_ext <<EOF
4931#line 4932 "configure"
4932#include "confdefs.h"
4933/* System header to define __stub macros and hopefully few prototypes,
4934    which can conflict with char $ac_func(); below.  */
4935#include <assert.h>
4936/* Override any gcc2 internal prototype to avoid an error.  */
4937/* We use char because int might match the return type of a gcc2
4938    builtin and then its argument prototype would still apply.  */
4939char $ac_func();
4940
4941int main() {
4942
4943/* The GNU C library defines this for functions which it implements
4944    to always fail with ENOSYS.  Some functions are actually named
4945    something starting with __ and the normal name is an alias.  */
4946#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4947choke me
4948#else
4949$ac_func();
4950#endif
4951
4952; return 0; }
4953EOF
4954if { (eval echo configure:4955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4955  rm -rf conftest*
4956  eval "ac_cv_func_$ac_func=yes"
4957else
4958  echo "configure: failed program was:" >&5
4959  cat conftest.$ac_ext >&5
4960  rm -rf conftest*
4961  eval "ac_cv_func_$ac_func=no"
4962fi
4963rm -f conftest*
4964fi
4965
4966if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4967  echo "$ac_t""yes" 1>&6
4968    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4969  cat >> confdefs.h <<EOF
4970#define $ac_tr_func 1
4971EOF
4972 
4973else
4974  echo "$ac_t""no" 1>&6
4975fi
4976done
4977
4978for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
4979do
4980echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4981echo "configure:4982: checking for $ac_func" >&5
4982if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4983  echo $ac_n "(cached) $ac_c" 1>&6
4984else
4985  cat > conftest.$ac_ext <<EOF
4986#line 4987 "configure"
4987#include "confdefs.h"
4988/* System header to define __stub macros and hopefully few prototypes,
4989    which can conflict with char $ac_func(); below.  */
4990#include <assert.h>
4991/* Override any gcc2 internal prototype to avoid an error.  */
4992/* We use char because int might match the return type of a gcc2
4993    builtin and then its argument prototype would still apply.  */
4994char $ac_func();
4995
4996int main() {
4997
4998/* The GNU C library defines this for functions which it implements
4999    to always fail with ENOSYS.  Some functions are actually named
5000    something starting with __ and the normal name is an alias.  */
5001#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5002choke me
5003#else
5004$ac_func();
5005#endif
5006
5007; return 0; }
5008EOF
5009if { (eval echo configure:5010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5010  rm -rf conftest*
5011  eval "ac_cv_func_$ac_func=yes"
5012else
5013  echo "configure: failed program was:" >&5
5014  cat conftest.$ac_ext >&5
5015  rm -rf conftest*
5016  eval "ac_cv_func_$ac_func=no"
5017fi
5018rm -f conftest*
5019fi
5020
5021if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5022  echo "$ac_t""yes" 1>&6
5023    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5024  cat >> confdefs.h <<EOF
5025#define $ac_tr_func 1
5026EOF
5027 
5028else
5029  echo "$ac_t""no" 1>&6
5030fi
5031done
5032
5033for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
5034do
5035echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5036echo "configure:5037: checking for $ac_func" >&5
5037if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5038  echo $ac_n "(cached) $ac_c" 1>&6
5039else
5040  cat > conftest.$ac_ext <<EOF
5041#line 5042 "configure"
5042#include "confdefs.h"
5043/* System header to define __stub macros and hopefully few prototypes,
5044    which can conflict with char $ac_func(); below.  */
5045#include <assert.h>
5046/* Override any gcc2 internal prototype to avoid an error.  */
5047/* We use char because int might match the return type of a gcc2
5048    builtin and then its argument prototype would still apply.  */
5049char $ac_func();
5050
5051int main() {
5052
5053/* The GNU C library defines this for functions which it implements
5054    to always fail with ENOSYS.  Some functions are actually named
5055    something starting with __ and the normal name is an alias.  */
5056#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5057choke me
5058#else
5059$ac_func();
5060#endif
5061
5062; return 0; }
5063EOF
5064if { (eval echo configure:5065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5065  rm -rf conftest*
5066  eval "ac_cv_func_$ac_func=yes"
5067else
5068  echo "configure: failed program was:" >&5
5069  cat conftest.$ac_ext >&5
5070  rm -rf conftest*
5071  eval "ac_cv_func_$ac_func=no"
5072fi
5073rm -f conftest*
5074fi
5075
5076if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5077  echo "$ac_t""yes" 1>&6
5078    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5079  cat >> confdefs.h <<EOF
5080#define $ac_tr_func 1
5081EOF
5082 
5083else
5084  echo "$ac_t""no" 1>&6
5085fi
5086done
5087
5088for ac_func in _write __write _fork __fork
5089do
5090echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5091echo "configure:5092: checking for $ac_func" >&5
5092if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5093  echo $ac_n "(cached) $ac_c" 1>&6
5094else
5095  cat > conftest.$ac_ext <<EOF
5096#line 5097 "configure"
5097#include "confdefs.h"
5098/* System header to define __stub macros and hopefully few prototypes,
5099    which can conflict with char $ac_func(); below.  */
5100#include <assert.h>
5101/* Override any gcc2 internal prototype to avoid an error.  */
5102/* We use char because int might match the return type of a gcc2
5103    builtin and then its argument prototype would still apply.  */
5104char $ac_func();
5105
5106int main() {
5107
5108/* The GNU C library defines this for functions which it implements
5109    to always fail with ENOSYS.  Some functions are actually named
5110    something starting with __ and the normal name is an alias.  */
5111#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5112choke me
5113#else
5114$ac_func();
5115#endif
5116
5117; return 0; }
5118EOF
5119if { (eval echo configure:5120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5120  rm -rf conftest*
5121  eval "ac_cv_func_$ac_func=yes"
5122else
5123  echo "configure: failed program was:" >&5
5124  cat conftest.$ac_ext >&5
5125  rm -rf conftest*
5126  eval "ac_cv_func_$ac_func=no"
5127fi
5128rm -f conftest*
5129fi
5130
5131if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5132  echo "$ac_t""yes" 1>&6
5133    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5134  cat >> confdefs.h <<EOF
5135#define $ac_tr_func 1
5136EOF
5137 
5138else
5139  echo "$ac_t""no" 1>&6
5140fi
5141done
5142
5143for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
5144do
5145echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5146echo "configure:5147: checking for $ac_func" >&5
5147if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5148  echo $ac_n "(cached) $ac_c" 1>&6
5149else
5150  cat > conftest.$ac_ext <<EOF
5151#line 5152 "configure"
5152#include "confdefs.h"
5153/* System header to define __stub macros and hopefully few prototypes,
5154    which can conflict with char $ac_func(); below.  */
5155#include <assert.h>
5156/* Override any gcc2 internal prototype to avoid an error.  */
5157/* We use char because int might match the return type of a gcc2
5158    builtin and then its argument prototype would still apply.  */
5159char $ac_func();
5160
5161int main() {
5162
5163/* The GNU C library defines this for functions which it implements
5164    to always fail with ENOSYS.  Some functions are actually named
5165    something starting with __ and the normal name is an alias.  */
5166#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5167choke me
5168#else
5169$ac_func();
5170#endif
5171
5172; return 0; }
5173EOF
5174if { (eval echo configure:5175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5175  rm -rf conftest*
5176  eval "ac_cv_func_$ac_func=yes"
5177else
5178  echo "configure: failed program was:" >&5
5179  cat conftest.$ac_ext >&5
5180  rm -rf conftest*
5181  eval "ac_cv_func_$ac_func=no"
5182fi
5183rm -f conftest*
5184fi
5185
5186if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5187  echo "$ac_t""yes" 1>&6
5188    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5189  cat >> confdefs.h <<EOF
5190#define $ac_tr_func 1
5191EOF
5192 
5193else
5194  echo "$ac_t""no" 1>&6
5195fi
5196done
5197
5198for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
5199do
5200echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5201echo "configure:5202: checking for $ac_func" >&5
5202if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5203  echo $ac_n "(cached) $ac_c" 1>&6
5204else
5205  cat > conftest.$ac_ext <<EOF
5206#line 5207 "configure"
5207#include "confdefs.h"
5208/* System header to define __stub macros and hopefully few prototypes,
5209    which can conflict with char $ac_func(); below.  */
5210#include <assert.h>
5211/* Override any gcc2 internal prototype to avoid an error.  */
5212/* We use char because int might match the return type of a gcc2
5213    builtin and then its argument prototype would still apply.  */
5214char $ac_func();
5215
5216int main() {
5217
5218/* The GNU C library defines this for functions which it implements
5219    to always fail with ENOSYS.  Some functions are actually named
5220    something starting with __ and the normal name is an alias.  */
5221#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5222choke me
5223#else
5224$ac_func();
5225#endif
5226
5227; return 0; }
5228EOF
5229if { (eval echo configure:5230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5230  rm -rf conftest*
5231  eval "ac_cv_func_$ac_func=yes"
5232else
5233  echo "configure: failed program was:" >&5
5234  cat conftest.$ac_ext >&5
5235  rm -rf conftest*
5236  eval "ac_cv_func_$ac_func=no"
5237fi
5238rm -f conftest*
5239fi
5240
5241if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5242  echo "$ac_t""yes" 1>&6
5243    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5244  cat >> confdefs.h <<EOF
5245#define $ac_tr_func 1
5246EOF
5247 
5248else
5249  echo "$ac_t""no" 1>&6
5250fi
5251done
5252
5253for ac_func in pread _pread __pread pread64 _pread64 __pread64
5254do
5255echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5256echo "configure:5257: checking for $ac_func" >&5
5257if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5258  echo $ac_n "(cached) $ac_c" 1>&6
5259else
5260  cat > conftest.$ac_ext <<EOF
5261#line 5262 "configure"
5262#include "confdefs.h"
5263/* System header to define __stub macros and hopefully few prototypes,
5264    which can conflict with char $ac_func(); below.  */
5265#include <assert.h>
5266/* Override any gcc2 internal prototype to avoid an error.  */
5267/* We use char because int might match the return type of a gcc2
5268    builtin and then its argument prototype would still apply.  */
5269char $ac_func();
5270
5271int main() {
5272
5273/* The GNU C library defines this for functions which it implements
5274    to always fail with ENOSYS.  Some functions are actually named
5275    something starting with __ and the normal name is an alias.  */
5276#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5277choke me
5278#else
5279$ac_func();
5280#endif
5281
5282; return 0; }
5283EOF
5284if { (eval echo configure:5285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5285  rm -rf conftest*
5286  eval "ac_cv_func_$ac_func=yes"
5287else
5288  echo "configure: failed program was:" >&5
5289  cat conftest.$ac_ext >&5
5290  rm -rf conftest*
5291  eval "ac_cv_func_$ac_func=no"
5292fi
5293rm -f conftest*
5294fi
5295
5296if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5297  echo "$ac_t""yes" 1>&6
5298    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5299  cat >> confdefs.h <<EOF
5300#define $ac_tr_func 1
5301EOF
5302 
5303else
5304  echo "$ac_t""no" 1>&6
5305fi
5306done
5307
5308for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
5309do
5310echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5311echo "configure:5312: checking for $ac_func" >&5
5312if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5313  echo $ac_n "(cached) $ac_c" 1>&6
5314else
5315  cat > conftest.$ac_ext <<EOF
5316#line 5317 "configure"
5317#include "confdefs.h"
5318/* System header to define __stub macros and hopefully few prototypes,
5319    which can conflict with char $ac_func(); below.  */
5320#include <assert.h>
5321/* Override any gcc2 internal prototype to avoid an error.  */
5322/* We use char because int might match the return type of a gcc2
5323    builtin and then its argument prototype would still apply.  */
5324char $ac_func();
5325
5326int main() {
5327
5328/* The GNU C library defines this for functions which it implements
5329    to always fail with ENOSYS.  Some functions are actually named
5330    something starting with __ and the normal name is an alias.  */
5331#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5332choke me
5333#else
5334$ac_func();
5335#endif
5336
5337; return 0; }
5338EOF
5339if { (eval echo configure:5340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5340  rm -rf conftest*
5341  eval "ac_cv_func_$ac_func=yes"
5342else
5343  echo "configure: failed program was:" >&5
5344  cat conftest.$ac_ext >&5
5345  rm -rf conftest*
5346  eval "ac_cv_func_$ac_func=no"
5347fi
5348rm -f conftest*
5349fi
5350
5351if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5352  echo "$ac_t""yes" 1>&6
5353    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5354  cat >> confdefs.h <<EOF
5355#define $ac_tr_func 1
5356EOF
5357 
5358else
5359  echo "$ac_t""no" 1>&6
5360fi
5361done
5362
5363for ac_func in open64 _open64 __open64 creat64
5364do
5365echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5366echo "configure:5367: checking for $ac_func" >&5
5367if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5368  echo $ac_n "(cached) $ac_c" 1>&6
5369else
5370  cat > conftest.$ac_ext <<EOF
5371#line 5372 "configure"
5372#include "confdefs.h"
5373/* System header to define __stub macros and hopefully few prototypes,
5374    which can conflict with char $ac_func(); below.  */
5375#include <assert.h>
5376/* Override any gcc2 internal prototype to avoid an error.  */
5377/* We use char because int might match the return type of a gcc2
5378    builtin and then its argument prototype would still apply.  */
5379char $ac_func();
5380
5381int main() {
5382
5383/* The GNU C library defines this for functions which it implements
5384    to always fail with ENOSYS.  Some functions are actually named
5385    something starting with __ and the normal name is an alias.  */
5386#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5387choke me
5388#else
5389$ac_func();
5390#endif
5391
5392; return 0; }
5393EOF
5394if { (eval echo configure:5395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5395  rm -rf conftest*
5396  eval "ac_cv_func_$ac_func=yes"
5397else
5398  echo "configure: failed program was:" >&5
5399  cat conftest.$ac_ext >&5
5400  rm -rf conftest*
5401  eval "ac_cv_func_$ac_func=no"
5402fi
5403rm -f conftest*
5404fi
5405
5406if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5407  echo "$ac_t""yes" 1>&6
5408    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5409  cat >> confdefs.h <<EOF
5410#define $ac_tr_func 1
5411EOF
5412 
5413else
5414  echo "$ac_t""no" 1>&6
5415fi
5416done
5417
5418
5419#
5420# stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
5421#
5422
5423if test x$ac_cv_func_stat64 = xno ; then
5424  echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
5425echo "configure:5426: checking for stat64 in <sys/stat.h>" >&5
5426  cat > conftest.$ac_ext <<EOF
5427#line 5428 "configure"
5428#include "confdefs.h"
5429
5430#if defined(HAVE_UNISTD_H)
5431#include <unistd.h>
5432#endif
5433#include <sys/stat.h>
5434
5435int main() {
5436struct stat64 st64; exit(stat64(".",&st64));
5437; return 0; }
5438EOF
5439if { (eval echo configure:5440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5440  rm -rf conftest*
5441  ac_cv_func_stat64=yes
5442else
5443  echo "configure: failed program was:" >&5
5444  cat conftest.$ac_ext >&5
5445fi
5446rm -f conftest*
5447  echo "$ac_t""$ac_cv_func_stat64" 1>&6
5448  if test x$ac_cv_func_stat64 = xyes ; then
5449    cat >> confdefs.h <<\EOF
5450#define HAVE_STAT64 1
5451EOF
5452
5453  fi
5454fi
5455
5456if test x$ac_cv_func_lstat64 = xno ; then
5457  echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
5458echo "configure:5459: checking for lstat64 in <sys/stat.h>" >&5
5459  cat > conftest.$ac_ext <<EOF
5460#line 5461 "configure"
5461#include "confdefs.h"
5462
5463#if defined(HAVE_UNISTD_H)
5464#include <unistd.h>
5465#endif
5466#include <sys/stat.h>
5467
5468int main() {
5469struct stat64 st64; exit(lstat64(".",&st64));
5470; return 0; }
5471EOF
5472if { (eval echo configure:5473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5473  rm -rf conftest*
5474  ac_cv_func_lstat64=yes
5475else
5476  echo "configure: failed program was:" >&5
5477  cat conftest.$ac_ext >&5
5478fi
5479rm -f conftest*
5480  echo "$ac_t""$ac_cv_func_lstat64" 1>&6
5481  if test x$ac_cv_func_lstat64 = xyes ; then
5482    cat >> confdefs.h <<\EOF
5483#define HAVE_LSTAT64 1
5484EOF
5485
5486  fi
5487fi
5488
5489if test x$ac_cv_func_fstat64 = xno ; then
5490  echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
5491echo "configure:5492: checking for fstat64 in <sys/stat.h>" >&5
5492  cat > conftest.$ac_ext <<EOF
5493#line 5494 "configure"
5494#include "confdefs.h"
5495
5496#if defined(HAVE_UNISTD_H)
5497#include <unistd.h>
5498#endif
5499#include <sys/stat.h>
5500
5501int main() {
5502struct stat64 st64; exit(fstat64(0,&st64));
5503; return 0; }
5504EOF
5505if { (eval echo configure:5506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5506  rm -rf conftest*
5507  ac_cv_func_fstat64=yes
5508else
5509  echo "configure: failed program was:" >&5
5510  cat conftest.$ac_ext >&5
5511fi
5512rm -f conftest*
5513  echo "$ac_t""$ac_cv_func_fstat64" 1>&6
5514  if test x$ac_cv_func_fstat64 = xyes ; then
5515    cat >> confdefs.h <<\EOF
5516#define HAVE_FSTAT64 1
5517EOF
5518
5519  fi
5520fi
5521
5522#
5523# If no strcasecmp, check for it in some known places
5524# It is in -lresolv on ReliantUNIX and UnixWare
5525#   -lresolve *must* follow -lnsl for name resolution to work properly
5526#
5527
5528if test x$ac_cv_func_strcasecmp = xno ; then
5529	echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6
5530echo "configure:5531: checking for strcasecmp in -lresolv" >&5
5531ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'`
5532if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5533  echo $ac_n "(cached) $ac_c" 1>&6
5534else
5535  ac_save_LIBS="$LIBS"
5536LIBS="-lresolv  $LIBS"
5537cat > conftest.$ac_ext <<EOF
5538#line 5539 "configure"
5539#include "confdefs.h"
5540/* Override any gcc2 internal prototype to avoid an error.  */
5541/* We use char because int might match the return type of a gcc2
5542    builtin and then its argument prototype would still apply.  */
5543char strcasecmp();
5544
5545int main() {
5546strcasecmp()
5547; return 0; }
5548EOF
5549if { (eval echo configure:5550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5550  rm -rf conftest*
5551  eval "ac_cv_lib_$ac_lib_var=yes"
5552else
5553  echo "configure: failed program was:" >&5
5554  cat conftest.$ac_ext >&5
5555  rm -rf conftest*
5556  eval "ac_cv_lib_$ac_lib_var=no"
5557fi
5558rm -f conftest*
5559LIBS="$ac_save_LIBS"
5560
5561fi
5562if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5563  echo "$ac_t""yes" 1>&6
5564  LIBS="$LIBS -lresolv"
5565		cat >> confdefs.h <<\EOF
5566#define HAVE_STRCASECMP 1
5567EOF
5568
5569else
5570  echo "$ac_t""no" 1>&6
5571fi
5572
5573fi
5574
5575#
5576# Check for the functions putprpwnam, set_auth_parameters,
5577# getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
5578# Needed for OSF1 and HPUX.
5579#
5580
5581case "$LIBS" in
5582  *-lsecurity*) for ac_func in putprpwnam
5583do
5584echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5585echo "configure:5586: checking for $ac_func" >&5
5586if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5587  echo $ac_n "(cached) $ac_c" 1>&6
5588else
5589  cat > conftest.$ac_ext <<EOF
5590#line 5591 "configure"
5591#include "confdefs.h"
5592/* System header to define __stub macros and hopefully few prototypes,
5593    which can conflict with char $ac_func(); below.  */
5594#include <assert.h>
5595/* Override any gcc2 internal prototype to avoid an error.  */
5596/* We use char because int might match the return type of a gcc2
5597    builtin and then its argument prototype would still apply.  */
5598char $ac_func();
5599
5600int main() {
5601
5602/* The GNU C library defines this for functions which it implements
5603    to always fail with ENOSYS.  Some functions are actually named
5604    something starting with __ and the normal name is an alias.  */
5605#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5606choke me
5607#else
5608$ac_func();
5609#endif
5610
5611; return 0; }
5612EOF
5613if { (eval echo configure:5614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5614  rm -rf conftest*
5615  eval "ac_cv_func_$ac_func=yes"
5616else
5617  echo "configure: failed program was:" >&5
5618  cat conftest.$ac_ext >&5
5619  rm -rf conftest*
5620  eval "ac_cv_func_$ac_func=no"
5621fi
5622rm -f conftest*
5623fi
5624
5625if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5626  echo "$ac_t""yes" 1>&6
5627    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5628  cat >> confdefs.h <<EOF
5629#define $ac_tr_func 1
5630EOF
5631 
5632else
5633  echo "$ac_t""no" 1>&6
5634fi
5635done
5636 ;;
5637  *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
5638echo "configure:5639: checking for putprpwnam in -lsecurity" >&5
5639ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
5640if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5641  echo $ac_n "(cached) $ac_c" 1>&6
5642else
5643  ac_save_LIBS="$LIBS"
5644LIBS="-lsecurity  $LIBS"
5645cat > conftest.$ac_ext <<EOF
5646#line 5647 "configure"
5647#include "confdefs.h"
5648/* Override any gcc2 internal prototype to avoid an error.  */
5649/* We use char because int might match the return type of a gcc2
5650    builtin and then its argument prototype would still apply.  */
5651char putprpwnam();
5652
5653int main() {
5654putprpwnam()
5655; return 0; }
5656EOF
5657if { (eval echo configure:5658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5658  rm -rf conftest*
5659  eval "ac_cv_lib_$ac_lib_var=yes"
5660else
5661  echo "configure: failed program was:" >&5
5662  cat conftest.$ac_ext >&5
5663  rm -rf conftest*
5664  eval "ac_cv_lib_$ac_lib_var=no"
5665fi
5666rm -f conftest*
5667LIBS="$ac_save_LIBS"
5668
5669fi
5670if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5671  echo "$ac_t""yes" 1>&6
5672    ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5673    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5674  cat >> confdefs.h <<EOF
5675#define $ac_tr_lib 1
5676EOF
5677
5678  LIBS="-lsecurity $LIBS"
5679
5680else
5681  echo "$ac_t""no" 1>&6
5682fi
5683 
5684     for ac_func in putprpwnam
5685do
5686echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5687echo "configure:5688: checking for $ac_func" >&5
5688if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5689  echo $ac_n "(cached) $ac_c" 1>&6
5690else
5691  cat > conftest.$ac_ext <<EOF
5692#line 5693 "configure"
5693#include "confdefs.h"
5694/* System header to define __stub macros and hopefully few prototypes,
5695    which can conflict with char $ac_func(); below.  */
5696#include <assert.h>
5697/* Override any gcc2 internal prototype to avoid an error.  */
5698/* We use char because int might match the return type of a gcc2
5699    builtin and then its argument prototype would still apply.  */
5700char $ac_func();
5701
5702int main() {
5703
5704/* The GNU C library defines this for functions which it implements
5705    to always fail with ENOSYS.  Some functions are actually named
5706    something starting with __ and the normal name is an alias.  */
5707#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5708choke me
5709#else
5710$ac_func();
5711#endif
5712
5713; return 0; }
5714EOF
5715if { (eval echo configure:5716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5716  rm -rf conftest*
5717  eval "ac_cv_func_$ac_func=yes"
5718else
5719  echo "configure: failed program was:" >&5
5720  cat conftest.$ac_ext >&5
5721  rm -rf conftest*
5722  eval "ac_cv_func_$ac_func=no"
5723fi
5724rm -f conftest*
5725fi
5726
5727if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5728  echo "$ac_t""yes" 1>&6
5729    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5730  cat >> confdefs.h <<EOF
5731#define $ac_tr_func 1
5732EOF
5733 
5734else
5735  echo "$ac_t""no" 1>&6
5736fi
5737done
5738
5739  ;;
5740  esac
5741
5742case "$LIBS" in
5743  *-lsec*) for ac_func in putprpwnam
5744do
5745echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5746echo "configure:5747: checking for $ac_func" >&5
5747if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5748  echo $ac_n "(cached) $ac_c" 1>&6
5749else
5750  cat > conftest.$ac_ext <<EOF
5751#line 5752 "configure"
5752#include "confdefs.h"
5753/* System header to define __stub macros and hopefully few prototypes,
5754    which can conflict with char $ac_func(); below.  */
5755#include <assert.h>
5756/* Override any gcc2 internal prototype to avoid an error.  */
5757/* We use char because int might match the return type of a gcc2
5758    builtin and then its argument prototype would still apply.  */
5759char $ac_func();
5760
5761int main() {
5762
5763/* The GNU C library defines this for functions which it implements
5764    to always fail with ENOSYS.  Some functions are actually named
5765    something starting with __ and the normal name is an alias.  */
5766#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5767choke me
5768#else
5769$ac_func();
5770#endif
5771
5772; return 0; }
5773EOF
5774if { (eval echo configure:5775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5775  rm -rf conftest*
5776  eval "ac_cv_func_$ac_func=yes"
5777else
5778  echo "configure: failed program was:" >&5
5779  cat conftest.$ac_ext >&5
5780  rm -rf conftest*
5781  eval "ac_cv_func_$ac_func=no"
5782fi
5783rm -f conftest*
5784fi
5785
5786if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5787  echo "$ac_t""yes" 1>&6
5788    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5789  cat >> confdefs.h <<EOF
5790#define $ac_tr_func 1
5791EOF
5792 
5793else
5794  echo "$ac_t""no" 1>&6
5795fi
5796done
5797 ;;
5798  *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
5799echo "configure:5800: checking for putprpwnam in -lsec" >&5
5800ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
5801if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5802  echo $ac_n "(cached) $ac_c" 1>&6
5803else
5804  ac_save_LIBS="$LIBS"
5805LIBS="-lsec  $LIBS"
5806cat > conftest.$ac_ext <<EOF
5807#line 5808 "configure"
5808#include "confdefs.h"
5809/* Override any gcc2 internal prototype to avoid an error.  */
5810/* We use char because int might match the return type of a gcc2
5811    builtin and then its argument prototype would still apply.  */
5812char putprpwnam();
5813
5814int main() {
5815putprpwnam()
5816; return 0; }
5817EOF
5818if { (eval echo configure:5819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5819  rm -rf conftest*
5820  eval "ac_cv_lib_$ac_lib_var=yes"
5821else
5822  echo "configure: failed program was:" >&5
5823  cat conftest.$ac_ext >&5
5824  rm -rf conftest*
5825  eval "ac_cv_lib_$ac_lib_var=no"
5826fi
5827rm -f conftest*
5828LIBS="$ac_save_LIBS"
5829
5830fi
5831if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5832  echo "$ac_t""yes" 1>&6
5833    ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5834    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5835  cat >> confdefs.h <<EOF
5836#define $ac_tr_lib 1
5837EOF
5838
5839  LIBS="-lsec $LIBS"
5840
5841else
5842  echo "$ac_t""no" 1>&6
5843fi
5844 
5845     for ac_func in putprpwnam
5846do
5847echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5848echo "configure:5849: checking for $ac_func" >&5
5849if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5850  echo $ac_n "(cached) $ac_c" 1>&6
5851else
5852  cat > conftest.$ac_ext <<EOF
5853#line 5854 "configure"
5854#include "confdefs.h"
5855/* System header to define __stub macros and hopefully few prototypes,
5856    which can conflict with char $ac_func(); below.  */
5857#include <assert.h>
5858/* Override any gcc2 internal prototype to avoid an error.  */
5859/* We use char because int might match the return type of a gcc2
5860    builtin and then its argument prototype would still apply.  */
5861char $ac_func();
5862
5863int main() {
5864
5865/* The GNU C library defines this for functions which it implements
5866    to always fail with ENOSYS.  Some functions are actually named
5867    something starting with __ and the normal name is an alias.  */
5868#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5869choke me
5870#else
5871$ac_func();
5872#endif
5873
5874; return 0; }
5875EOF
5876if { (eval echo configure:5877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5877  rm -rf conftest*
5878  eval "ac_cv_func_$ac_func=yes"
5879else
5880  echo "configure: failed program was:" >&5
5881  cat conftest.$ac_ext >&5
5882  rm -rf conftest*
5883  eval "ac_cv_func_$ac_func=no"
5884fi
5885rm -f conftest*
5886fi
5887
5888if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5889  echo "$ac_t""yes" 1>&6
5890    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5891  cat >> confdefs.h <<EOF
5892#define $ac_tr_func 1
5893EOF
5894 
5895else
5896  echo "$ac_t""no" 1>&6
5897fi
5898done
5899
5900  ;;
5901  esac
5902
5903
5904case "$LIBS" in
5905  *-lsecurity*) for ac_func in set_auth_parameters
5906do
5907echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5908echo "configure:5909: checking for $ac_func" >&5
5909if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5910  echo $ac_n "(cached) $ac_c" 1>&6
5911else
5912  cat > conftest.$ac_ext <<EOF
5913#line 5914 "configure"
5914#include "confdefs.h"
5915/* System header to define __stub macros and hopefully few prototypes,
5916    which can conflict with char $ac_func(); below.  */
5917#include <assert.h>
5918/* Override any gcc2 internal prototype to avoid an error.  */
5919/* We use char because int might match the return type of a gcc2
5920    builtin and then its argument prototype would still apply.  */
5921char $ac_func();
5922
5923int main() {
5924
5925/* The GNU C library defines this for functions which it implements
5926    to always fail with ENOSYS.  Some functions are actually named
5927    something starting with __ and the normal name is an alias.  */
5928#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5929choke me
5930#else
5931$ac_func();
5932#endif
5933
5934; return 0; }
5935EOF
5936if { (eval echo configure:5937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5937  rm -rf conftest*
5938  eval "ac_cv_func_$ac_func=yes"
5939else
5940  echo "configure: failed program was:" >&5
5941  cat conftest.$ac_ext >&5
5942  rm -rf conftest*
5943  eval "ac_cv_func_$ac_func=no"
5944fi
5945rm -f conftest*
5946fi
5947
5948if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5949  echo "$ac_t""yes" 1>&6
5950    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5951  cat >> confdefs.h <<EOF
5952#define $ac_tr_func 1
5953EOF
5954 
5955else
5956  echo "$ac_t""no" 1>&6
5957fi
5958done
5959 ;;
5960  *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
5961echo "configure:5962: checking for set_auth_parameters in -lsecurity" >&5
5962ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
5963if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5964  echo $ac_n "(cached) $ac_c" 1>&6
5965else
5966  ac_save_LIBS="$LIBS"
5967LIBS="-lsecurity  $LIBS"
5968cat > conftest.$ac_ext <<EOF
5969#line 5970 "configure"
5970#include "confdefs.h"
5971/* Override any gcc2 internal prototype to avoid an error.  */
5972/* We use char because int might match the return type of a gcc2
5973    builtin and then its argument prototype would still apply.  */
5974char set_auth_parameters();
5975
5976int main() {
5977set_auth_parameters()
5978; return 0; }
5979EOF
5980if { (eval echo configure:5981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5981  rm -rf conftest*
5982  eval "ac_cv_lib_$ac_lib_var=yes"
5983else
5984  echo "configure: failed program was:" >&5
5985  cat conftest.$ac_ext >&5
5986  rm -rf conftest*
5987  eval "ac_cv_lib_$ac_lib_var=no"
5988fi
5989rm -f conftest*
5990LIBS="$ac_save_LIBS"
5991
5992fi
5993if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5994  echo "$ac_t""yes" 1>&6
5995    ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5996    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5997  cat >> confdefs.h <<EOF
5998#define $ac_tr_lib 1
5999EOF
6000
6001  LIBS="-lsecurity $LIBS"
6002
6003else
6004  echo "$ac_t""no" 1>&6
6005fi
6006 
6007     for ac_func in set_auth_parameters
6008do
6009echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6010echo "configure:6011: checking for $ac_func" >&5
6011if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6012  echo $ac_n "(cached) $ac_c" 1>&6
6013else
6014  cat > conftest.$ac_ext <<EOF
6015#line 6016 "configure"
6016#include "confdefs.h"
6017/* System header to define __stub macros and hopefully few prototypes,
6018    which can conflict with char $ac_func(); below.  */
6019#include <assert.h>
6020/* Override any gcc2 internal prototype to avoid an error.  */
6021/* We use char because int might match the return type of a gcc2
6022    builtin and then its argument prototype would still apply.  */
6023char $ac_func();
6024
6025int main() {
6026
6027/* The GNU C library defines this for functions which it implements
6028    to always fail with ENOSYS.  Some functions are actually named
6029    something starting with __ and the normal name is an alias.  */
6030#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6031choke me
6032#else
6033$ac_func();
6034#endif
6035
6036; return 0; }
6037EOF
6038if { (eval echo configure:6039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6039  rm -rf conftest*
6040  eval "ac_cv_func_$ac_func=yes"
6041else
6042  echo "configure: failed program was:" >&5
6043  cat conftest.$ac_ext >&5
6044  rm -rf conftest*
6045  eval "ac_cv_func_$ac_func=no"
6046fi
6047rm -f conftest*
6048fi
6049
6050if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6051  echo "$ac_t""yes" 1>&6
6052    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6053  cat >> confdefs.h <<EOF
6054#define $ac_tr_func 1
6055EOF
6056 
6057else
6058  echo "$ac_t""no" 1>&6
6059fi
6060done
6061
6062  ;;
6063  esac
6064
6065case "$LIBS" in
6066  *-lsec*) for ac_func in set_auth_parameters
6067do
6068echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6069echo "configure:6070: checking for $ac_func" >&5
6070if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6071  echo $ac_n "(cached) $ac_c" 1>&6
6072else
6073  cat > conftest.$ac_ext <<EOF
6074#line 6075 "configure"
6075#include "confdefs.h"
6076/* System header to define __stub macros and hopefully few prototypes,
6077    which can conflict with char $ac_func(); below.  */
6078#include <assert.h>
6079/* Override any gcc2 internal prototype to avoid an error.  */
6080/* We use char because int might match the return type of a gcc2
6081    builtin and then its argument prototype would still apply.  */
6082char $ac_func();
6083
6084int main() {
6085
6086/* The GNU C library defines this for functions which it implements
6087    to always fail with ENOSYS.  Some functions are actually named
6088    something starting with __ and the normal name is an alias.  */
6089#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6090choke me
6091#else
6092$ac_func();
6093#endif
6094
6095; return 0; }
6096EOF
6097if { (eval echo configure:6098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6098  rm -rf conftest*
6099  eval "ac_cv_func_$ac_func=yes"
6100else
6101  echo "configure: failed program was:" >&5
6102  cat conftest.$ac_ext >&5
6103  rm -rf conftest*
6104  eval "ac_cv_func_$ac_func=no"
6105fi
6106rm -f conftest*
6107fi
6108
6109if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6110  echo "$ac_t""yes" 1>&6
6111    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6112  cat >> confdefs.h <<EOF
6113#define $ac_tr_func 1
6114EOF
6115 
6116else
6117  echo "$ac_t""no" 1>&6
6118fi
6119done
6120 ;;
6121  *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
6122echo "configure:6123: checking for set_auth_parameters in -lsec" >&5
6123ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
6124if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6125  echo $ac_n "(cached) $ac_c" 1>&6
6126else
6127  ac_save_LIBS="$LIBS"
6128LIBS="-lsec  $LIBS"
6129cat > conftest.$ac_ext <<EOF
6130#line 6131 "configure"
6131#include "confdefs.h"
6132/* Override any gcc2 internal prototype to avoid an error.  */
6133/* We use char because int might match the return type of a gcc2
6134    builtin and then its argument prototype would still apply.  */
6135char set_auth_parameters();
6136
6137int main() {
6138set_auth_parameters()
6139; return 0; }
6140EOF
6141if { (eval echo configure:6142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6142  rm -rf conftest*
6143  eval "ac_cv_lib_$ac_lib_var=yes"
6144else
6145  echo "configure: failed program was:" >&5
6146  cat conftest.$ac_ext >&5
6147  rm -rf conftest*
6148  eval "ac_cv_lib_$ac_lib_var=no"
6149fi
6150rm -f conftest*
6151LIBS="$ac_save_LIBS"
6152
6153fi
6154if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6155  echo "$ac_t""yes" 1>&6
6156    ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6157    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6158  cat >> confdefs.h <<EOF
6159#define $ac_tr_lib 1
6160EOF
6161
6162  LIBS="-lsec $LIBS"
6163
6164else
6165  echo "$ac_t""no" 1>&6
6166fi
6167 
6168     for ac_func in set_auth_parameters
6169do
6170echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6171echo "configure:6172: checking for $ac_func" >&5
6172if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6173  echo $ac_n "(cached) $ac_c" 1>&6
6174else
6175  cat > conftest.$ac_ext <<EOF
6176#line 6177 "configure"
6177#include "confdefs.h"
6178/* System header to define __stub macros and hopefully few prototypes,
6179    which can conflict with char $ac_func(); below.  */
6180#include <assert.h>
6181/* Override any gcc2 internal prototype to avoid an error.  */
6182/* We use char because int might match the return type of a gcc2
6183    builtin and then its argument prototype would still apply.  */
6184char $ac_func();
6185
6186int main() {
6187
6188/* The GNU C library defines this for functions which it implements
6189    to always fail with ENOSYS.  Some functions are actually named
6190    something starting with __ and the normal name is an alias.  */
6191#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6192choke me
6193#else
6194$ac_func();
6195#endif
6196
6197; return 0; }
6198EOF
6199if { (eval echo configure:6200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6200  rm -rf conftest*
6201  eval "ac_cv_func_$ac_func=yes"
6202else
6203  echo "configure: failed program was:" >&5
6204  cat conftest.$ac_ext >&5
6205  rm -rf conftest*
6206  eval "ac_cv_func_$ac_func=no"
6207fi
6208rm -f conftest*
6209fi
6210
6211if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6212  echo "$ac_t""yes" 1>&6
6213    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6214  cat >> confdefs.h <<EOF
6215#define $ac_tr_func 1
6216EOF
6217 
6218else
6219  echo "$ac_t""no" 1>&6
6220fi
6221done
6222
6223  ;;
6224  esac
6225
6226
6227# UnixWare 7.x has its getspnam in -lgen
6228case "$LIBS" in
6229  *-lgen*) for ac_func in getspnam
6230do
6231echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6232echo "configure:6233: checking for $ac_func" >&5
6233if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6234  echo $ac_n "(cached) $ac_c" 1>&6
6235else
6236  cat > conftest.$ac_ext <<EOF
6237#line 6238 "configure"
6238#include "confdefs.h"
6239/* System header to define __stub macros and hopefully few prototypes,
6240    which can conflict with char $ac_func(); below.  */
6241#include <assert.h>
6242/* Override any gcc2 internal prototype to avoid an error.  */
6243/* We use char because int might match the return type of a gcc2
6244    builtin and then its argument prototype would still apply.  */
6245char $ac_func();
6246
6247int main() {
6248
6249/* The GNU C library defines this for functions which it implements
6250    to always fail with ENOSYS.  Some functions are actually named
6251    something starting with __ and the normal name is an alias.  */
6252#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6253choke me
6254#else
6255$ac_func();
6256#endif
6257
6258; return 0; }
6259EOF
6260if { (eval echo configure:6261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6261  rm -rf conftest*
6262  eval "ac_cv_func_$ac_func=yes"
6263else
6264  echo "configure: failed program was:" >&5
6265  cat conftest.$ac_ext >&5
6266  rm -rf conftest*
6267  eval "ac_cv_func_$ac_func=no"
6268fi
6269rm -f conftest*
6270fi
6271
6272if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6273  echo "$ac_t""yes" 1>&6
6274    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6275  cat >> confdefs.h <<EOF
6276#define $ac_tr_func 1
6277EOF
6278 
6279else
6280  echo "$ac_t""no" 1>&6
6281fi
6282done
6283 ;;
6284  *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
6285echo "configure:6286: checking for getspnam in -lgen" >&5
6286ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
6287if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6288  echo $ac_n "(cached) $ac_c" 1>&6
6289else
6290  ac_save_LIBS="$LIBS"
6291LIBS="-lgen  $LIBS"
6292cat > conftest.$ac_ext <<EOF
6293#line 6294 "configure"
6294#include "confdefs.h"
6295/* Override any gcc2 internal prototype to avoid an error.  */
6296/* We use char because int might match the return type of a gcc2
6297    builtin and then its argument prototype would still apply.  */
6298char getspnam();
6299
6300int main() {
6301getspnam()
6302; return 0; }
6303EOF
6304if { (eval echo configure:6305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6305  rm -rf conftest*
6306  eval "ac_cv_lib_$ac_lib_var=yes"
6307else
6308  echo "configure: failed program was:" >&5
6309  cat conftest.$ac_ext >&5
6310  rm -rf conftest*
6311  eval "ac_cv_lib_$ac_lib_var=no"
6312fi
6313rm -f conftest*
6314LIBS="$ac_save_LIBS"
6315
6316fi
6317if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6318  echo "$ac_t""yes" 1>&6
6319    ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6320    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6321  cat >> confdefs.h <<EOF
6322#define $ac_tr_lib 1
6323EOF
6324
6325  LIBS="-lgen $LIBS"
6326
6327else
6328  echo "$ac_t""no" 1>&6
6329fi
6330 
6331     for ac_func in getspnam
6332do
6333echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6334echo "configure:6335: checking for $ac_func" >&5
6335if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6336  echo $ac_n "(cached) $ac_c" 1>&6
6337else
6338  cat > conftest.$ac_ext <<EOF
6339#line 6340 "configure"
6340#include "confdefs.h"
6341/* System header to define __stub macros and hopefully few prototypes,
6342    which can conflict with char $ac_func(); below.  */
6343#include <assert.h>
6344/* Override any gcc2 internal prototype to avoid an error.  */
6345/* We use char because int might match the return type of a gcc2
6346    builtin and then its argument prototype would still apply.  */
6347char $ac_func();
6348
6349int main() {
6350
6351/* The GNU C library defines this for functions which it implements
6352    to always fail with ENOSYS.  Some functions are actually named
6353    something starting with __ and the normal name is an alias.  */
6354#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6355choke me
6356#else
6357$ac_func();
6358#endif
6359
6360; return 0; }
6361EOF
6362if { (eval echo configure:6363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6363  rm -rf conftest*
6364  eval "ac_cv_func_$ac_func=yes"
6365else
6366  echo "configure: failed program was:" >&5
6367  cat conftest.$ac_ext >&5
6368  rm -rf conftest*
6369  eval "ac_cv_func_$ac_func=no"
6370fi
6371rm -f conftest*
6372fi
6373
6374if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6375  echo "$ac_t""yes" 1>&6
6376    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6377  cat >> confdefs.h <<EOF
6378#define $ac_tr_func 1
6379EOF
6380 
6381else
6382  echo "$ac_t""no" 1>&6
6383fi
6384done
6385
6386  ;;
6387  esac
6388
6389
6390case "$LIBS" in
6391  *-lsecurity*) for ac_func in getspnam
6392do
6393echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6394echo "configure:6395: checking for $ac_func" >&5
6395if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6396  echo $ac_n "(cached) $ac_c" 1>&6
6397else
6398  cat > conftest.$ac_ext <<EOF
6399#line 6400 "configure"
6400#include "confdefs.h"
6401/* System header to define __stub macros and hopefully few prototypes,
6402    which can conflict with char $ac_func(); below.  */
6403#include <assert.h>
6404/* Override any gcc2 internal prototype to avoid an error.  */
6405/* We use char because int might match the return type of a gcc2
6406    builtin and then its argument prototype would still apply.  */
6407char $ac_func();
6408
6409int main() {
6410
6411/* The GNU C library defines this for functions which it implements
6412    to always fail with ENOSYS.  Some functions are actually named
6413    something starting with __ and the normal name is an alias.  */
6414#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6415choke me
6416#else
6417$ac_func();
6418#endif
6419
6420; return 0; }
6421EOF
6422if { (eval echo configure:6423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6423  rm -rf conftest*
6424  eval "ac_cv_func_$ac_func=yes"
6425else
6426  echo "configure: failed program was:" >&5
6427  cat conftest.$ac_ext >&5
6428  rm -rf conftest*
6429  eval "ac_cv_func_$ac_func=no"
6430fi
6431rm -f conftest*
6432fi
6433
6434if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6435  echo "$ac_t""yes" 1>&6
6436    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6437  cat >> confdefs.h <<EOF
6438#define $ac_tr_func 1
6439EOF
6440 
6441else
6442  echo "$ac_t""no" 1>&6
6443fi
6444done
6445 ;;
6446  *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
6447echo "configure:6448: checking for getspnam in -lsecurity" >&5
6448ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
6449if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6450  echo $ac_n "(cached) $ac_c" 1>&6
6451else
6452  ac_save_LIBS="$LIBS"
6453LIBS="-lsecurity  $LIBS"
6454cat > conftest.$ac_ext <<EOF
6455#line 6456 "configure"
6456#include "confdefs.h"
6457/* Override any gcc2 internal prototype to avoid an error.  */
6458/* We use char because int might match the return type of a gcc2
6459    builtin and then its argument prototype would still apply.  */
6460char getspnam();
6461
6462int main() {
6463getspnam()
6464; return 0; }
6465EOF
6466if { (eval echo configure:6467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6467  rm -rf conftest*
6468  eval "ac_cv_lib_$ac_lib_var=yes"
6469else
6470  echo "configure: failed program was:" >&5
6471  cat conftest.$ac_ext >&5
6472  rm -rf conftest*
6473  eval "ac_cv_lib_$ac_lib_var=no"
6474fi
6475rm -f conftest*
6476LIBS="$ac_save_LIBS"
6477
6478fi
6479if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6480  echo "$ac_t""yes" 1>&6
6481    ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6482    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6483  cat >> confdefs.h <<EOF
6484#define $ac_tr_lib 1
6485EOF
6486
6487  LIBS="-lsecurity $LIBS"
6488
6489else
6490  echo "$ac_t""no" 1>&6
6491fi
6492 
6493     for ac_func in getspnam
6494do
6495echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6496echo "configure:6497: checking for $ac_func" >&5
6497if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6498  echo $ac_n "(cached) $ac_c" 1>&6
6499else
6500  cat > conftest.$ac_ext <<EOF
6501#line 6502 "configure"
6502#include "confdefs.h"
6503/* System header to define __stub macros and hopefully few prototypes,
6504    which can conflict with char $ac_func(); below.  */
6505#include <assert.h>
6506/* Override any gcc2 internal prototype to avoid an error.  */
6507/* We use char because int might match the return type of a gcc2
6508    builtin and then its argument prototype would still apply.  */
6509char $ac_func();
6510
6511int main() {
6512
6513/* The GNU C library defines this for functions which it implements
6514    to always fail with ENOSYS.  Some functions are actually named
6515    something starting with __ and the normal name is an alias.  */
6516#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6517choke me
6518#else
6519$ac_func();
6520#endif
6521
6522; return 0; }
6523EOF
6524if { (eval echo configure:6525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6525  rm -rf conftest*
6526  eval "ac_cv_func_$ac_func=yes"
6527else
6528  echo "configure: failed program was:" >&5
6529  cat conftest.$ac_ext >&5
6530  rm -rf conftest*
6531  eval "ac_cv_func_$ac_func=no"
6532fi
6533rm -f conftest*
6534fi
6535
6536if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6537  echo "$ac_t""yes" 1>&6
6538    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6539  cat >> confdefs.h <<EOF
6540#define $ac_tr_func 1
6541EOF
6542 
6543else
6544  echo "$ac_t""no" 1>&6
6545fi
6546done
6547
6548  ;;
6549  esac
6550
6551case "$LIBS" in
6552  *-lsec*) for ac_func in getspnam
6553do
6554echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6555echo "configure:6556: checking for $ac_func" >&5
6556if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6557  echo $ac_n "(cached) $ac_c" 1>&6
6558else
6559  cat > conftest.$ac_ext <<EOF
6560#line 6561 "configure"
6561#include "confdefs.h"
6562/* System header to define __stub macros and hopefully few prototypes,
6563    which can conflict with char $ac_func(); below.  */
6564#include <assert.h>
6565/* Override any gcc2 internal prototype to avoid an error.  */
6566/* We use char because int might match the return type of a gcc2
6567    builtin and then its argument prototype would still apply.  */
6568char $ac_func();
6569
6570int main() {
6571
6572/* The GNU C library defines this for functions which it implements
6573    to always fail with ENOSYS.  Some functions are actually named
6574    something starting with __ and the normal name is an alias.  */
6575#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6576choke me
6577#else
6578$ac_func();
6579#endif
6580
6581; return 0; }
6582EOF
6583if { (eval echo configure:6584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6584  rm -rf conftest*
6585  eval "ac_cv_func_$ac_func=yes"
6586else
6587  echo "configure: failed program was:" >&5
6588  cat conftest.$ac_ext >&5
6589  rm -rf conftest*
6590  eval "ac_cv_func_$ac_func=no"
6591fi
6592rm -f conftest*
6593fi
6594
6595if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6596  echo "$ac_t""yes" 1>&6
6597    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6598  cat >> confdefs.h <<EOF
6599#define $ac_tr_func 1
6600EOF
6601 
6602else
6603  echo "$ac_t""no" 1>&6
6604fi
6605done
6606 ;;
6607  *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
6608echo "configure:6609: checking for getspnam in -lsec" >&5
6609ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
6610if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6611  echo $ac_n "(cached) $ac_c" 1>&6
6612else
6613  ac_save_LIBS="$LIBS"
6614LIBS="-lsec  $LIBS"
6615cat > conftest.$ac_ext <<EOF
6616#line 6617 "configure"
6617#include "confdefs.h"
6618/* Override any gcc2 internal prototype to avoid an error.  */
6619/* We use char because int might match the return type of a gcc2
6620    builtin and then its argument prototype would still apply.  */
6621char getspnam();
6622
6623int main() {
6624getspnam()
6625; return 0; }
6626EOF
6627if { (eval echo configure:6628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6628  rm -rf conftest*
6629  eval "ac_cv_lib_$ac_lib_var=yes"
6630else
6631  echo "configure: failed program was:" >&5
6632  cat conftest.$ac_ext >&5
6633  rm -rf conftest*
6634  eval "ac_cv_lib_$ac_lib_var=no"
6635fi
6636rm -f conftest*
6637LIBS="$ac_save_LIBS"
6638
6639fi
6640if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6641  echo "$ac_t""yes" 1>&6
6642    ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6643    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6644  cat >> confdefs.h <<EOF
6645#define $ac_tr_lib 1
6646EOF
6647
6648  LIBS="-lsec $LIBS"
6649
6650else
6651  echo "$ac_t""no" 1>&6
6652fi
6653 
6654     for ac_func in getspnam
6655do
6656echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6657echo "configure:6658: checking for $ac_func" >&5
6658if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6659  echo $ac_n "(cached) $ac_c" 1>&6
6660else
6661  cat > conftest.$ac_ext <<EOF
6662#line 6663 "configure"
6663#include "confdefs.h"
6664/* System header to define __stub macros and hopefully few prototypes,
6665    which can conflict with char $ac_func(); below.  */
6666#include <assert.h>
6667/* Override any gcc2 internal prototype to avoid an error.  */
6668/* We use char because int might match the return type of a gcc2
6669    builtin and then its argument prototype would still apply.  */
6670char $ac_func();
6671
6672int main() {
6673
6674/* The GNU C library defines this for functions which it implements
6675    to always fail with ENOSYS.  Some functions are actually named
6676    something starting with __ and the normal name is an alias.  */
6677#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6678choke me
6679#else
6680$ac_func();
6681#endif
6682
6683; return 0; }
6684EOF
6685if { (eval echo configure:6686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6686  rm -rf conftest*
6687  eval "ac_cv_func_$ac_func=yes"
6688else
6689  echo "configure: failed program was:" >&5
6690  cat conftest.$ac_ext >&5
6691  rm -rf conftest*
6692  eval "ac_cv_func_$ac_func=no"
6693fi
6694rm -f conftest*
6695fi
6696
6697if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6698  echo "$ac_t""yes" 1>&6
6699    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6700  cat >> confdefs.h <<EOF
6701#define $ac_tr_func 1
6702EOF
6703 
6704else
6705  echo "$ac_t""no" 1>&6
6706fi
6707done
6708
6709  ;;
6710  esac
6711
6712
6713case "$LIBS" in
6714  *-lsecurity*) for ac_func in bigcrypt
6715do
6716echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6717echo "configure:6718: checking for $ac_func" >&5
6718if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6719  echo $ac_n "(cached) $ac_c" 1>&6
6720else
6721  cat > conftest.$ac_ext <<EOF
6722#line 6723 "configure"
6723#include "confdefs.h"
6724/* System header to define __stub macros and hopefully few prototypes,
6725    which can conflict with char $ac_func(); below.  */
6726#include <assert.h>
6727/* Override any gcc2 internal prototype to avoid an error.  */
6728/* We use char because int might match the return type of a gcc2
6729    builtin and then its argument prototype would still apply.  */
6730char $ac_func();
6731
6732int main() {
6733
6734/* The GNU C library defines this for functions which it implements
6735    to always fail with ENOSYS.  Some functions are actually named
6736    something starting with __ and the normal name is an alias.  */
6737#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6738choke me
6739#else
6740$ac_func();
6741#endif
6742
6743; return 0; }
6744EOF
6745if { (eval echo configure:6746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6746  rm -rf conftest*
6747  eval "ac_cv_func_$ac_func=yes"
6748else
6749  echo "configure: failed program was:" >&5
6750  cat conftest.$ac_ext >&5
6751  rm -rf conftest*
6752  eval "ac_cv_func_$ac_func=no"
6753fi
6754rm -f conftest*
6755fi
6756
6757if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6758  echo "$ac_t""yes" 1>&6
6759    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6760  cat >> confdefs.h <<EOF
6761#define $ac_tr_func 1
6762EOF
6763 
6764else
6765  echo "$ac_t""no" 1>&6
6766fi
6767done
6768 ;;
6769  *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
6770echo "configure:6771: checking for bigcrypt in -lsecurity" >&5
6771ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
6772if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6773  echo $ac_n "(cached) $ac_c" 1>&6
6774else
6775  ac_save_LIBS="$LIBS"
6776LIBS="-lsecurity  $LIBS"
6777cat > conftest.$ac_ext <<EOF
6778#line 6779 "configure"
6779#include "confdefs.h"
6780/* Override any gcc2 internal prototype to avoid an error.  */
6781/* We use char because int might match the return type of a gcc2
6782    builtin and then its argument prototype would still apply.  */
6783char bigcrypt();
6784
6785int main() {
6786bigcrypt()
6787; return 0; }
6788EOF
6789if { (eval echo configure:6790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6790  rm -rf conftest*
6791  eval "ac_cv_lib_$ac_lib_var=yes"
6792else
6793  echo "configure: failed program was:" >&5
6794  cat conftest.$ac_ext >&5
6795  rm -rf conftest*
6796  eval "ac_cv_lib_$ac_lib_var=no"
6797fi
6798rm -f conftest*
6799LIBS="$ac_save_LIBS"
6800
6801fi
6802if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6803  echo "$ac_t""yes" 1>&6
6804    ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6805    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6806  cat >> confdefs.h <<EOF
6807#define $ac_tr_lib 1
6808EOF
6809
6810  LIBS="-lsecurity $LIBS"
6811
6812else
6813  echo "$ac_t""no" 1>&6
6814fi
6815 
6816     for ac_func in bigcrypt
6817do
6818echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6819echo "configure:6820: checking for $ac_func" >&5
6820if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6821  echo $ac_n "(cached) $ac_c" 1>&6
6822else
6823  cat > conftest.$ac_ext <<EOF
6824#line 6825 "configure"
6825#include "confdefs.h"
6826/* System header to define __stub macros and hopefully few prototypes,
6827    which can conflict with char $ac_func(); below.  */
6828#include <assert.h>
6829/* Override any gcc2 internal prototype to avoid an error.  */
6830/* We use char because int might match the return type of a gcc2
6831    builtin and then its argument prototype would still apply.  */
6832char $ac_func();
6833
6834int main() {
6835
6836/* The GNU C library defines this for functions which it implements
6837    to always fail with ENOSYS.  Some functions are actually named
6838    something starting with __ and the normal name is an alias.  */
6839#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6840choke me
6841#else
6842$ac_func();
6843#endif
6844
6845; return 0; }
6846EOF
6847if { (eval echo configure:6848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6848  rm -rf conftest*
6849  eval "ac_cv_func_$ac_func=yes"
6850else
6851  echo "configure: failed program was:" >&5
6852  cat conftest.$ac_ext >&5
6853  rm -rf conftest*
6854  eval "ac_cv_func_$ac_func=no"
6855fi
6856rm -f conftest*
6857fi
6858
6859if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6860  echo "$ac_t""yes" 1>&6
6861    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6862  cat >> confdefs.h <<EOF
6863#define $ac_tr_func 1
6864EOF
6865 
6866else
6867  echo "$ac_t""no" 1>&6
6868fi
6869done
6870
6871  ;;
6872  esac
6873
6874case "$LIBS" in
6875  *-lsec*) for ac_func in bigcrypt
6876do
6877echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6878echo "configure:6879: checking for $ac_func" >&5
6879if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6880  echo $ac_n "(cached) $ac_c" 1>&6
6881else
6882  cat > conftest.$ac_ext <<EOF
6883#line 6884 "configure"
6884#include "confdefs.h"
6885/* System header to define __stub macros and hopefully few prototypes,
6886    which can conflict with char $ac_func(); below.  */
6887#include <assert.h>
6888/* Override any gcc2 internal prototype to avoid an error.  */
6889/* We use char because int might match the return type of a gcc2
6890    builtin and then its argument prototype would still apply.  */
6891char $ac_func();
6892
6893int main() {
6894
6895/* The GNU C library defines this for functions which it implements
6896    to always fail with ENOSYS.  Some functions are actually named
6897    something starting with __ and the normal name is an alias.  */
6898#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6899choke me
6900#else
6901$ac_func();
6902#endif
6903
6904; return 0; }
6905EOF
6906if { (eval echo configure:6907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6907  rm -rf conftest*
6908  eval "ac_cv_func_$ac_func=yes"
6909else
6910  echo "configure: failed program was:" >&5
6911  cat conftest.$ac_ext >&5
6912  rm -rf conftest*
6913  eval "ac_cv_func_$ac_func=no"
6914fi
6915rm -f conftest*
6916fi
6917
6918if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6919  echo "$ac_t""yes" 1>&6
6920    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6921  cat >> confdefs.h <<EOF
6922#define $ac_tr_func 1
6923EOF
6924 
6925else
6926  echo "$ac_t""no" 1>&6
6927fi
6928done
6929 ;;
6930  *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
6931echo "configure:6932: checking for bigcrypt in -lsec" >&5
6932ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
6933if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6934  echo $ac_n "(cached) $ac_c" 1>&6
6935else
6936  ac_save_LIBS="$LIBS"
6937LIBS="-lsec  $LIBS"
6938cat > conftest.$ac_ext <<EOF
6939#line 6940 "configure"
6940#include "confdefs.h"
6941/* Override any gcc2 internal prototype to avoid an error.  */
6942/* We use char because int might match the return type of a gcc2
6943    builtin and then its argument prototype would still apply.  */
6944char bigcrypt();
6945
6946int main() {
6947bigcrypt()
6948; return 0; }
6949EOF
6950if { (eval echo configure:6951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6951  rm -rf conftest*
6952  eval "ac_cv_lib_$ac_lib_var=yes"
6953else
6954  echo "configure: failed program was:" >&5
6955  cat conftest.$ac_ext >&5
6956  rm -rf conftest*
6957  eval "ac_cv_lib_$ac_lib_var=no"
6958fi
6959rm -f conftest*
6960LIBS="$ac_save_LIBS"
6961
6962fi
6963if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6964  echo "$ac_t""yes" 1>&6
6965    ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6966    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6967  cat >> confdefs.h <<EOF
6968#define $ac_tr_lib 1
6969EOF
6970
6971  LIBS="-lsec $LIBS"
6972
6973else
6974  echo "$ac_t""no" 1>&6
6975fi
6976 
6977     for ac_func in bigcrypt
6978do
6979echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6980echo "configure:6981: checking for $ac_func" >&5
6981if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6982  echo $ac_n "(cached) $ac_c" 1>&6
6983else
6984  cat > conftest.$ac_ext <<EOF
6985#line 6986 "configure"
6986#include "confdefs.h"
6987/* System header to define __stub macros and hopefully few prototypes,
6988    which can conflict with char $ac_func(); below.  */
6989#include <assert.h>
6990/* Override any gcc2 internal prototype to avoid an error.  */
6991/* We use char because int might match the return type of a gcc2
6992    builtin and then its argument prototype would still apply.  */
6993char $ac_func();
6994
6995int main() {
6996
6997/* The GNU C library defines this for functions which it implements
6998    to always fail with ENOSYS.  Some functions are actually named
6999    something starting with __ and the normal name is an alias.  */
7000#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7001choke me
7002#else
7003$ac_func();
7004#endif
7005
7006; return 0; }
7007EOF
7008if { (eval echo configure:7009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7009  rm -rf conftest*
7010  eval "ac_cv_func_$ac_func=yes"
7011else
7012  echo "configure: failed program was:" >&5
7013  cat conftest.$ac_ext >&5
7014  rm -rf conftest*
7015  eval "ac_cv_func_$ac_func=no"
7016fi
7017rm -f conftest*
7018fi
7019
7020if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7021  echo "$ac_t""yes" 1>&6
7022    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7023  cat >> confdefs.h <<EOF
7024#define $ac_tr_func 1
7025EOF
7026 
7027else
7028  echo "$ac_t""no" 1>&6
7029fi
7030done
7031
7032  ;;
7033  esac
7034
7035
7036case "$LIBS" in
7037  *-lsecurity*) for ac_func in getprpwnam
7038do
7039echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7040echo "configure:7041: checking for $ac_func" >&5
7041if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7042  echo $ac_n "(cached) $ac_c" 1>&6
7043else
7044  cat > conftest.$ac_ext <<EOF
7045#line 7046 "configure"
7046#include "confdefs.h"
7047/* System header to define __stub macros and hopefully few prototypes,
7048    which can conflict with char $ac_func(); below.  */
7049#include <assert.h>
7050/* Override any gcc2 internal prototype to avoid an error.  */
7051/* We use char because int might match the return type of a gcc2
7052    builtin and then its argument prototype would still apply.  */
7053char $ac_func();
7054
7055int main() {
7056
7057/* The GNU C library defines this for functions which it implements
7058    to always fail with ENOSYS.  Some functions are actually named
7059    something starting with __ and the normal name is an alias.  */
7060#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7061choke me
7062#else
7063$ac_func();
7064#endif
7065
7066; return 0; }
7067EOF
7068if { (eval echo configure:7069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7069  rm -rf conftest*
7070  eval "ac_cv_func_$ac_func=yes"
7071else
7072  echo "configure: failed program was:" >&5
7073  cat conftest.$ac_ext >&5
7074  rm -rf conftest*
7075  eval "ac_cv_func_$ac_func=no"
7076fi
7077rm -f conftest*
7078fi
7079
7080if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7081  echo "$ac_t""yes" 1>&6
7082    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7083  cat >> confdefs.h <<EOF
7084#define $ac_tr_func 1
7085EOF
7086 
7087else
7088  echo "$ac_t""no" 1>&6
7089fi
7090done
7091 ;;
7092  *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
7093echo "configure:7094: checking for getprpwnam in -lsecurity" >&5
7094ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
7095if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7096  echo $ac_n "(cached) $ac_c" 1>&6
7097else
7098  ac_save_LIBS="$LIBS"
7099LIBS="-lsecurity  $LIBS"
7100cat > conftest.$ac_ext <<EOF
7101#line 7102 "configure"
7102#include "confdefs.h"
7103/* Override any gcc2 internal prototype to avoid an error.  */
7104/* We use char because int might match the return type of a gcc2
7105    builtin and then its argument prototype would still apply.  */
7106char getprpwnam();
7107
7108int main() {
7109getprpwnam()
7110; return 0; }
7111EOF
7112if { (eval echo configure:7113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7113  rm -rf conftest*
7114  eval "ac_cv_lib_$ac_lib_var=yes"
7115else
7116  echo "configure: failed program was:" >&5
7117  cat conftest.$ac_ext >&5
7118  rm -rf conftest*
7119  eval "ac_cv_lib_$ac_lib_var=no"
7120fi
7121rm -f conftest*
7122LIBS="$ac_save_LIBS"
7123
7124fi
7125if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7126  echo "$ac_t""yes" 1>&6
7127    ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7128    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7129  cat >> confdefs.h <<EOF
7130#define $ac_tr_lib 1
7131EOF
7132
7133  LIBS="-lsecurity $LIBS"
7134
7135else
7136  echo "$ac_t""no" 1>&6
7137fi
7138 
7139     for ac_func in getprpwnam
7140do
7141echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7142echo "configure:7143: checking for $ac_func" >&5
7143if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7144  echo $ac_n "(cached) $ac_c" 1>&6
7145else
7146  cat > conftest.$ac_ext <<EOF
7147#line 7148 "configure"
7148#include "confdefs.h"
7149/* System header to define __stub macros and hopefully few prototypes,
7150    which can conflict with char $ac_func(); below.  */
7151#include <assert.h>
7152/* Override any gcc2 internal prototype to avoid an error.  */
7153/* We use char because int might match the return type of a gcc2
7154    builtin and then its argument prototype would still apply.  */
7155char $ac_func();
7156
7157int main() {
7158
7159/* The GNU C library defines this for functions which it implements
7160    to always fail with ENOSYS.  Some functions are actually named
7161    something starting with __ and the normal name is an alias.  */
7162#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7163choke me
7164#else
7165$ac_func();
7166#endif
7167
7168; return 0; }
7169EOF
7170if { (eval echo configure:7171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7171  rm -rf conftest*
7172  eval "ac_cv_func_$ac_func=yes"
7173else
7174  echo "configure: failed program was:" >&5
7175  cat conftest.$ac_ext >&5
7176  rm -rf conftest*
7177  eval "ac_cv_func_$ac_func=no"
7178fi
7179rm -f conftest*
7180fi
7181
7182if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7183  echo "$ac_t""yes" 1>&6
7184    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7185  cat >> confdefs.h <<EOF
7186#define $ac_tr_func 1
7187EOF
7188 
7189else
7190  echo "$ac_t""no" 1>&6
7191fi
7192done
7193
7194  ;;
7195  esac
7196
7197case "$LIBS" in
7198  *-lsec*) for ac_func in getprpwnam
7199do
7200echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7201echo "configure:7202: checking for $ac_func" >&5
7202if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7203  echo $ac_n "(cached) $ac_c" 1>&6
7204else
7205  cat > conftest.$ac_ext <<EOF
7206#line 7207 "configure"
7207#include "confdefs.h"
7208/* System header to define __stub macros and hopefully few prototypes,
7209    which can conflict with char $ac_func(); below.  */
7210#include <assert.h>
7211/* Override any gcc2 internal prototype to avoid an error.  */
7212/* We use char because int might match the return type of a gcc2
7213    builtin and then its argument prototype would still apply.  */
7214char $ac_func();
7215
7216int main() {
7217
7218/* The GNU C library defines this for functions which it implements
7219    to always fail with ENOSYS.  Some functions are actually named
7220    something starting with __ and the normal name is an alias.  */
7221#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7222choke me
7223#else
7224$ac_func();
7225#endif
7226
7227; return 0; }
7228EOF
7229if { (eval echo configure:7230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7230  rm -rf conftest*
7231  eval "ac_cv_func_$ac_func=yes"
7232else
7233  echo "configure: failed program was:" >&5
7234  cat conftest.$ac_ext >&5
7235  rm -rf conftest*
7236  eval "ac_cv_func_$ac_func=no"
7237fi
7238rm -f conftest*
7239fi
7240
7241if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7242  echo "$ac_t""yes" 1>&6
7243    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7244  cat >> confdefs.h <<EOF
7245#define $ac_tr_func 1
7246EOF
7247 
7248else
7249  echo "$ac_t""no" 1>&6
7250fi
7251done
7252 ;;
7253  *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
7254echo "configure:7255: checking for getprpwnam in -lsec" >&5
7255ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
7256if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7257  echo $ac_n "(cached) $ac_c" 1>&6
7258else
7259  ac_save_LIBS="$LIBS"
7260LIBS="-lsec  $LIBS"
7261cat > conftest.$ac_ext <<EOF
7262#line 7263 "configure"
7263#include "confdefs.h"
7264/* Override any gcc2 internal prototype to avoid an error.  */
7265/* We use char because int might match the return type of a gcc2
7266    builtin and then its argument prototype would still apply.  */
7267char getprpwnam();
7268
7269int main() {
7270getprpwnam()
7271; return 0; }
7272EOF
7273if { (eval echo configure:7274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7274  rm -rf conftest*
7275  eval "ac_cv_lib_$ac_lib_var=yes"
7276else
7277  echo "configure: failed program was:" >&5
7278  cat conftest.$ac_ext >&5
7279  rm -rf conftest*
7280  eval "ac_cv_lib_$ac_lib_var=no"
7281fi
7282rm -f conftest*
7283LIBS="$ac_save_LIBS"
7284
7285fi
7286if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7287  echo "$ac_t""yes" 1>&6
7288    ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7289    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7290  cat >> confdefs.h <<EOF
7291#define $ac_tr_lib 1
7292EOF
7293
7294  LIBS="-lsec $LIBS"
7295
7296else
7297  echo "$ac_t""no" 1>&6
7298fi
7299 
7300     for ac_func in getprpwnam
7301do
7302echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7303echo "configure:7304: checking for $ac_func" >&5
7304if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7305  echo $ac_n "(cached) $ac_c" 1>&6
7306else
7307  cat > conftest.$ac_ext <<EOF
7308#line 7309 "configure"
7309#include "confdefs.h"
7310/* System header to define __stub macros and hopefully few prototypes,
7311    which can conflict with char $ac_func(); below.  */
7312#include <assert.h>
7313/* Override any gcc2 internal prototype to avoid an error.  */
7314/* We use char because int might match the return type of a gcc2
7315    builtin and then its argument prototype would still apply.  */
7316char $ac_func();
7317
7318int main() {
7319
7320/* The GNU C library defines this for functions which it implements
7321    to always fail with ENOSYS.  Some functions are actually named
7322    something starting with __ and the normal name is an alias.  */
7323#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7324choke me
7325#else
7326$ac_func();
7327#endif
7328
7329; return 0; }
7330EOF
7331if { (eval echo configure:7332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7332  rm -rf conftest*
7333  eval "ac_cv_func_$ac_func=yes"
7334else
7335  echo "configure: failed program was:" >&5
7336  cat conftest.$ac_ext >&5
7337  rm -rf conftest*
7338  eval "ac_cv_func_$ac_func=no"
7339fi
7340rm -f conftest*
7341fi
7342
7343if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7344  echo "$ac_t""yes" 1>&6
7345    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7346  cat >> confdefs.h <<EOF
7347#define $ac_tr_func 1
7348EOF
7349 
7350else
7351  echo "$ac_t""no" 1>&6
7352fi
7353done
7354
7355  ;;
7356  esac
7357
7358
7359# this bit needs to be modified for each OS that is suported by
7360# smbwrapper. You need to specify how to created a shared library and
7361# how to compile C code to produce PIC object files
7362
7363# these are the defaults, good for lots of systems
7364HOST_OS="$host_os"
7365LDSHFLAGS="-shared"
7366PICFLAG=""
7367SHLIBEXT="so"
7368
7369# and these are for particular systems
7370case "$host_os" in
7371		*linux*)   cat >> confdefs.h <<\EOF
7372#define LINUX 1
7373EOF
7374;;
7375		*solaris*) cat >> confdefs.h <<\EOF
7376#define SUNOS5 1
7377EOF
7378
7379					LDSHFLAGS="-G"
7380		;;
7381		*sunos*) cat >> confdefs.h <<\EOF
7382#define SUNOS4 1
7383EOF
7384
7385					LDSHFLAGS=""
7386		;;
7387		*bsd*) LDSHFLAGS="-shared -Bshareable"
7388		;;
7389		*irix*) cat >> confdefs.h <<\EOF
7390#define IRIX 1
7391EOF
7392
7393			case "$host_os" in
7394			*irix6*) cat >> confdefs.h <<\EOF
7395#define IRIX6 1
7396EOF
7397
7398			;;
7399			esac
7400			ATTEMPT_WRAP32_BUILD=yes
7401		;;
7402		*aix*) cat >> confdefs.h <<\EOF
7403#define AIX 1
7404EOF
7405;;
7406		*hpux*) cat >> confdefs.h <<\EOF
7407#define HPUX 1
7408EOF
7409
7410			SHLIBEXT="sl"
7411			# Use special PIC flags for the native HP-UX compiler.
7412			if test $ac_cv_prog_cc_Ae = yes; then
7413				LDSHFLAGS="-b"
7414				PICFLAG="+z"
7415			fi
7416		;;
7417		*qnx*) cat >> confdefs.h <<\EOF
7418#define QNX 1
7419EOF
7420;;
7421		*osf*) cat >> confdefs.h <<\EOF
7422#define OSF1 1
7423EOF
7424;;
7425		*sco*) cat >> confdefs.h <<\EOF
7426#define SCO 1
7427EOF
7428;;
7429		*next2*) cat >> confdefs.h <<\EOF
7430#define NEXT2 1
7431EOF
7432;;
7433		*dgux*) # Extract the first word of "groff", so it can be a program name with args.
7434set dummy groff; ac_word=$2
7435echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7436echo "configure:7437: checking for $ac_word" >&5
7437if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
7438  echo $ac_n "(cached) $ac_c" 1>&6
7439else
7440  if test -n "$ROFF"; then
7441  ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
7442else
7443  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
7444  ac_dummy="$PATH"
7445  for ac_dir in $ac_dummy; do
7446    test -z "$ac_dir" && ac_dir=.
7447    if test -f $ac_dir/$ac_word; then
7448      ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
7449      break
7450    fi
7451  done
7452  IFS="$ac_save_ifs"
7453fi
7454fi
7455ROFF="$ac_cv_prog_ROFF"
7456if test -n "$ROFF"; then
7457  echo "$ac_t""$ROFF" 1>&6
7458else
7459  echo "$ac_t""no" 1>&6
7460fi
7461;;
7462		*sysv4*)
7463			case "$host" in
7464				*-univel-*)     if  test "$GCC" != yes ; then
7465									cat >> confdefs.h <<\EOF
7466#define HAVE_MEMSET 1
7467EOF
7468
7469								fi
7470								LDSHFLAGS="-G"
7471				;;
7472				*mips-sni-sysv4*) cat >> confdefs.h <<\EOF
7473#define RELIANTUNIX 1
7474EOF
7475;;
7476			esac
7477			;;
7478		*sysv5*)
7479			if  test "$GCC" != yes ; then
7480				cat >> confdefs.h <<\EOF
7481#define HAVE_MEMSET 1
7482EOF
7483
7484			fi
7485			LDSHFLAGS="-G"
7486			;;
7487esac
7488
7489# try to work out how to produce pic code with this compiler
7490echo $ac_n "checking whether ${CC-cc} accepts -fpic""... $ac_c" 1>&6
7491echo "configure:7492: checking whether ${CC-cc} accepts -fpic" >&5
7492if eval "test \"`echo '$''{'ac_cv_prog_cc_fpic'+set}'`\" = set"; then
7493  echo $ac_n "(cached) $ac_c" 1>&6
7494else
7495  echo 'void f(){}' > conftest.c
7496if test -z "`${CC-cc} -fpic -c conftest.c 2>&1`"; then
7497  ac_cv_prog_cc_fpic=yes
7498else
7499  ac_cv_prog_cc_fpic=no
7500fi
7501rm -f conftest*
7502
7503fi
7504
7505echo "$ac_t""$ac_cv_prog_cc_fpic" 1>&6
7506if test $ac_cv_prog_cc_fpic = yes; then
7507    PICFLAG="-fpic";
7508fi
7509if test x$PICFLAG = x; then
7510  echo $ac_n "checking whether ${CC-cc} accepts -Kpic""... $ac_c" 1>&6
7511echo "configure:7512: checking whether ${CC-cc} accepts -Kpic" >&5
7512if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then
7513  echo $ac_n "(cached) $ac_c" 1>&6
7514else
7515  echo 'void f(){}' > conftest.c
7516if test -z "`${CC-cc} -Kpic -c conftest.c 2>&1`"; then
7517  ac_cv_prog_cc_Kpic=yes
7518else
7519  ac_cv_prog_cc_Kpic=no
7520fi
7521rm -f conftest*
7522
7523fi
7524
7525echo "$ac_t""$ac_cv_prog_cc_Kpic" 1>&6
7526  if test $ac_cv_prog_cc_Kpic = yes; then
7527    PICFLAG="-Kpic";
7528  fi
7529fi
7530if test x$PICFLAG = x; then
7531  echo $ac_n "checking whether ${CC-cc} accepts -KPIC""... $ac_c" 1>&6
7532echo "configure:7533: checking whether ${CC-cc} accepts -KPIC" >&5
7533if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then
7534  echo $ac_n "(cached) $ac_c" 1>&6
7535else
7536  echo 'void f(){}' > conftest.c
7537if test -z "`${CC-cc} -KPIC -c conftest.c 2>&1`"; then
7538  ac_cv_prog_cc_KPIC=yes
7539else
7540  ac_cv_prog_cc_KPIC=no
7541fi
7542rm -f conftest*
7543
7544fi
7545
7546echo "$ac_t""$ac_cv_prog_cc_KPIC" 1>&6
7547  if test $ac_cv_prog_cc_KPIC = yes; then
7548    PICFLAG="-KPIC";
7549  fi
7550fi
7551
7552################
7553
7554echo $ac_n "checking for long long""... $ac_c" 1>&6
7555echo "configure:7556: checking for long long" >&5
7556if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
7557  echo $ac_n "(cached) $ac_c" 1>&6
7558else
7559  
7560if test "$cross_compiling" = yes; then
7561  samba_cv_have_longlong=cross
7562else
7563  cat > conftest.$ac_ext <<EOF
7564#line 7565 "configure"
7565#include "confdefs.h"
7566#include <stdio.h>
7567main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
7568EOF
7569if { (eval echo configure:7570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7570then
7571  samba_cv_have_longlong=yes
7572else
7573  echo "configure: failed program was:" >&5
7574  cat conftest.$ac_ext >&5
7575  rm -fr conftest*
7576  samba_cv_have_longlong=no
7577fi
7578rm -fr conftest*
7579fi
7580
7581fi
7582
7583echo "$ac_t""$samba_cv_have_longlong" 1>&6
7584if test x"$samba_cv_have_longlong" = x"yes"; then
7585    cat >> confdefs.h <<\EOF
7586#define HAVE_LONGLONG 1
7587EOF
7588
7589fi
7590
7591#
7592# Check if the compiler supports the LL prefix on long long integers.
7593# AIX needs this.
7594
7595echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
7596echo "configure:7597: checking for LL suffix on long long integers" >&5
7597if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
7598  echo $ac_n "(cached) $ac_c" 1>&6
7599else
7600  
7601    cat > conftest.$ac_ext <<EOF
7602#line 7603 "configure"
7603#include "confdefs.h"
7604#include <stdio.h>
7605int main() {
7606long long i = 0x8000000000LL
7607; return 0; }
7608EOF
7609if { (eval echo configure:7610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7610  rm -rf conftest*
7611  samba_cv_compiler_supports_ll=yes
7612else
7613  echo "configure: failed program was:" >&5
7614  cat conftest.$ac_ext >&5
7615  rm -rf conftest*
7616  samba_cv_compiler_supports_ll=no
7617fi
7618rm -f conftest*
7619fi
7620
7621echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
7622if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
7623   cat >> confdefs.h <<\EOF
7624#define COMPILER_SUPPORTS_LL 1
7625EOF
7626
7627fi
7628
7629  
7630echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
7631echo "configure:7632: checking for 64 bit off_t" >&5
7632if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
7633  echo $ac_n "(cached) $ac_c" 1>&6
7634else
7635  
7636if test "$cross_compiling" = yes; then
7637  samba_cv_SIZEOF_OFF_T=cross
7638else
7639  cat > conftest.$ac_ext <<EOF
7640#line 7641 "configure"
7641#include "confdefs.h"
7642#include <stdio.h>
7643#include <sys/stat.h>
7644main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
7645EOF
7646if { (eval echo configure:7647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7647then
7648  samba_cv_SIZEOF_OFF_T=yes
7649else
7650  echo "configure: failed program was:" >&5
7651  cat conftest.$ac_ext >&5
7652  rm -fr conftest*
7653  samba_cv_SIZEOF_OFF_T=no
7654fi
7655rm -fr conftest*
7656fi
7657
7658fi
7659
7660echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
7661if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
7662    cat >> confdefs.h <<\EOF
7663#define SIZEOF_OFF_T 8
7664EOF
7665
7666fi
7667
7668echo $ac_n "checking for off64_t""... $ac_c" 1>&6
7669echo "configure:7670: checking for off64_t" >&5
7670if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
7671  echo $ac_n "(cached) $ac_c" 1>&6
7672else
7673  
7674if test "$cross_compiling" = yes; then
7675  samba_cv_HAVE_OFF64_T=cross
7676else
7677  cat > conftest.$ac_ext <<EOF
7678#line 7679 "configure"
7679#include "confdefs.h"
7680
7681#if defined(HAVE_UNISTD_H)
7682#include <unistd.h>
7683#endif
7684#include <stdio.h>
7685#include <sys/stat.h>
7686main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
7687EOF
7688if { (eval echo configure:7689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7689then
7690  samba_cv_HAVE_OFF64_T=yes
7691else
7692  echo "configure: failed program was:" >&5
7693  cat conftest.$ac_ext >&5
7694  rm -fr conftest*
7695  samba_cv_HAVE_OFF64_T=no
7696fi
7697rm -fr conftest*
7698fi
7699
7700fi
7701
7702echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
7703if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
7704    cat >> confdefs.h <<\EOF
7705#define HAVE_OFF64_T 1
7706EOF
7707
7708fi
7709
7710echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
7711echo "configure:7712: checking for 64 bit ino_t" >&5
7712if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
7713  echo $ac_n "(cached) $ac_c" 1>&6
7714else
7715  
7716if test "$cross_compiling" = yes; then
7717  samba_cv_SIZEOF_INO_T=cross
7718else
7719  cat > conftest.$ac_ext <<EOF
7720#line 7721 "configure"
7721#include "confdefs.h"
7722#include <stdio.h>
7723#include <sys/stat.h>
7724main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
7725EOF
7726if { (eval echo configure:7727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7727then
7728  samba_cv_SIZEOF_INO_T=yes
7729else
7730  echo "configure: failed program was:" >&5
7731  cat conftest.$ac_ext >&5
7732  rm -fr conftest*
7733  samba_cv_SIZEOF_INO_T=no
7734fi
7735rm -fr conftest*
7736fi
7737
7738fi
7739
7740echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
7741if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
7742    cat >> confdefs.h <<\EOF
7743#define SIZEOF_INO_T 8
7744EOF
7745
7746fi
7747
7748echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
7749echo "configure:7750: checking for ino64_t" >&5
7750if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
7751  echo $ac_n "(cached) $ac_c" 1>&6
7752else
7753  
7754if test "$cross_compiling" = yes; then
7755  samba_cv_HAVE_INO64_T=cross
7756else
7757  cat > conftest.$ac_ext <<EOF
7758#line 7759 "configure"
7759#include "confdefs.h"
7760
7761#if defined(HAVE_UNISTD_H)
7762#include <unistd.h>
7763#endif
7764#include <stdio.h>
7765#include <sys/stat.h>
7766main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
7767EOF
7768if { (eval echo configure:7769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7769then
7770  samba_cv_HAVE_INO64_T=yes
7771else
7772  echo "configure: failed program was:" >&5
7773  cat conftest.$ac_ext >&5
7774  rm -fr conftest*
7775  samba_cv_HAVE_INO64_T=no
7776fi
7777rm -fr conftest*
7778fi
7779
7780fi
7781
7782echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
7783if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
7784    cat >> confdefs.h <<\EOF
7785#define HAVE_INO64_T 1
7786EOF
7787
7788fi
7789
7790echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
7791echo "configure:7792: checking for struct dirent64" >&5
7792if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
7793  echo $ac_n "(cached) $ac_c" 1>&6
7794else
7795  
7796cat > conftest.$ac_ext <<EOF
7797#line 7798 "configure"
7798#include "confdefs.h"
7799
7800#if defined(HAVE_UNISTD_H)
7801#include <unistd.h>
7802#endif
7803#include <sys/types.h>
7804#include <dirent.h>
7805int main() {
7806struct dirent64 de;
7807; return 0; }
7808EOF
7809if { (eval echo configure:7810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7810  rm -rf conftest*
7811  samba_cv_HAVE_STRUCT_DIRENT64=yes
7812else
7813  echo "configure: failed program was:" >&5
7814  cat conftest.$ac_ext >&5
7815  rm -rf conftest*
7816  samba_cv_HAVE_STRUCT_DIRENT64=no
7817fi
7818rm -f conftest*
7819fi
7820
7821echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
7822if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
7823    cat >> confdefs.h <<\EOF
7824#define HAVE_STRUCT_DIRENT64 1
7825EOF
7826
7827fi
7828
7829echo $ac_n "checking for union semun""... $ac_c" 1>&6
7830echo "configure:7831: checking for union semun" >&5
7831if eval "test \"`echo '$''{'samba_cv_HAVE_UNION_SEMUN'+set}'`\" = set"; then
7832  echo $ac_n "(cached) $ac_c" 1>&6
7833else
7834  
7835if test "$cross_compiling" = yes; then
7836  samba_cv_HAVE_UNION_SEMUN=cross
7837else
7838  cat > conftest.$ac_ext <<EOF
7839#line 7840 "configure"
7840#include "confdefs.h"
7841
7842#include <sys/types.h>
7843#include <sys/ipc.h>
7844#include <sys/sem.h>
7845main() { union semun ss; exit(0); }
7846EOF
7847if { (eval echo configure:7848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7848then
7849  samba_cv_HAVE_UNION_SEMUN=yes
7850else
7851  echo "configure: failed program was:" >&5
7852  cat conftest.$ac_ext >&5
7853  rm -fr conftest*
7854  samba_cv_HAVE_UNION_SEMUN=no
7855fi
7856rm -fr conftest*
7857fi
7858
7859fi
7860
7861echo "$ac_t""$samba_cv_HAVE_UNION_SEMUN" 1>&6
7862if test x"$samba_cv_HAVE_UNION_SEMUN" = x"yes"; then
7863    cat >> confdefs.h <<\EOF
7864#define HAVE_UNION_SEMUN 1
7865EOF
7866
7867fi
7868
7869echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
7870echo "configure:7871: checking for unsigned char" >&5
7871if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
7872  echo $ac_n "(cached) $ac_c" 1>&6
7873else
7874  
7875if test "$cross_compiling" = yes; then
7876  samba_cv_HAVE_UNSIGNED_CHAR=cross
7877else
7878  cat > conftest.$ac_ext <<EOF
7879#line 7880 "configure"
7880#include "confdefs.h"
7881#include <stdio.h>
7882main() { char c; c=250; exit((c > 0)?0:1); }
7883EOF
7884if { (eval echo configure:7885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7885then
7886  samba_cv_HAVE_UNSIGNED_CHAR=yes
7887else
7888  echo "configure: failed program was:" >&5
7889  cat conftest.$ac_ext >&5
7890  rm -fr conftest*
7891  samba_cv_HAVE_UNSIGNED_CHAR=no
7892fi
7893rm -fr conftest*
7894fi
7895
7896fi
7897
7898echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
7899if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
7900    cat >> confdefs.h <<\EOF
7901#define HAVE_UNSIGNED_CHAR 1
7902EOF
7903
7904fi
7905
7906echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
7907echo "configure:7908: checking for sin_len in sock" >&5
7908if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
7909  echo $ac_n "(cached) $ac_c" 1>&6
7910else
7911  
7912cat > conftest.$ac_ext <<EOF
7913#line 7914 "configure"
7914#include "confdefs.h"
7915#include <sys/types.h>
7916#include <sys/socket.h>
7917#include <netinet/in.h>
7918int main() {
7919struct sockaddr_in sock; sock.sin_len = sizeof(sock);
7920; return 0; }
7921EOF
7922if { (eval echo configure:7923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7923  rm -rf conftest*
7924  samba_cv_HAVE_SOCK_SIN_LEN=yes
7925else
7926  echo "configure: failed program was:" >&5
7927  cat conftest.$ac_ext >&5
7928  rm -rf conftest*
7929  samba_cv_HAVE_SOCK_SIN_LEN=no
7930fi
7931rm -f conftest*
7932fi
7933
7934echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
7935if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
7936    cat >> confdefs.h <<\EOF
7937#define HAVE_SOCK_SIN_LEN 1
7938EOF
7939
7940fi
7941
7942echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
7943echo "configure:7944: checking whether seekdir returns void" >&5
7944if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
7945  echo $ac_n "(cached) $ac_c" 1>&6
7946else
7947  
7948cat > conftest.$ac_ext <<EOF
7949#line 7950 "configure"
7950#include "confdefs.h"
7951#include <sys/types.h>
7952#include <dirent.h>
7953void seekdir(DIR *d, long loc) { return; }
7954int main() {
7955return 0;
7956; return 0; }
7957EOF
7958if { (eval echo configure:7959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7959  rm -rf conftest*
7960  samba_cv_SEEKDIR_RETURNS_VOID=yes
7961else
7962  echo "configure: failed program was:" >&5
7963  cat conftest.$ac_ext >&5
7964  rm -rf conftest*
7965  samba_cv_SEEKDIR_RETURNS_VOID=no
7966fi
7967rm -f conftest*
7968fi
7969
7970echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
7971if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
7972    cat >> confdefs.h <<\EOF
7973#define SEEKDIR_RETURNS_VOID 1
7974EOF
7975
7976fi
7977
7978echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
7979echo "configure:7980: checking for __FILE__ macro" >&5
7980if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
7981  echo $ac_n "(cached) $ac_c" 1>&6
7982else
7983  
7984cat > conftest.$ac_ext <<EOF
7985#line 7986 "configure"
7986#include "confdefs.h"
7987#include <stdio.h>
7988int main() {
7989printf("%s\n", __FILE__);
7990; return 0; }
7991EOF
7992if { (eval echo configure:7993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7993  rm -rf conftest*
7994  samba_cv_HAVE_FILE_MACRO=yes
7995else
7996  echo "configure: failed program was:" >&5
7997  cat conftest.$ac_ext >&5
7998  rm -rf conftest*
7999  samba_cv_HAVE_FILE_MACRO=no
8000fi
8001rm -f conftest*
8002fi
8003
8004echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
8005if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
8006    cat >> confdefs.h <<\EOF
8007#define HAVE_FILE_MACRO 1
8008EOF
8009
8010fi
8011
8012echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
8013echo "configure:8014: checking for __FUNCTION__ macro" >&5
8014if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
8015  echo $ac_n "(cached) $ac_c" 1>&6
8016else
8017  
8018cat > conftest.$ac_ext <<EOF
8019#line 8020 "configure"
8020#include "confdefs.h"
8021#include <stdio.h>
8022int main() {
8023printf("%s\n", __FUNCTION__);
8024; return 0; }
8025EOF
8026if { (eval echo configure:8027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8027  rm -rf conftest*
8028  samba_cv_HAVE_FUNCTION_MACRO=yes
8029else
8030  echo "configure: failed program was:" >&5
8031  cat conftest.$ac_ext >&5
8032  rm -rf conftest*
8033  samba_cv_HAVE_FUNCTION_MACRO=no
8034fi
8035rm -f conftest*
8036fi
8037
8038echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
8039if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
8040    cat >> confdefs.h <<\EOF
8041#define HAVE_FUNCTION_MACRO 1
8042EOF
8043
8044fi
8045
8046echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
8047echo "configure:8048: checking if gettimeofday takes tz argument" >&5
8048if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
8049  echo $ac_n "(cached) $ac_c" 1>&6
8050else
8051  
8052if test "$cross_compiling" = yes; then
8053  samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
8054else
8055  cat > conftest.$ac_ext <<EOF
8056#line 8057 "configure"
8057#include "confdefs.h"
8058
8059#include <sys/time.h>
8060#include <unistd.h>
8061main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
8062EOF
8063if { (eval echo configure:8064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8064then
8065  samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
8066else
8067  echo "configure: failed program was:" >&5
8068  cat conftest.$ac_ext >&5
8069  rm -fr conftest*
8070  samba_cv_HAVE_GETTIMEOFDAY_TZ=no
8071fi
8072rm -fr conftest*
8073fi
8074
8075fi
8076
8077echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
8078if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
8079    cat >> confdefs.h <<\EOF
8080#define HAVE_GETTIMEOFDAY_TZ 1
8081EOF
8082
8083fi
8084
8085
8086echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
8087echo "configure:8088: checking for broken readdir" >&5
8088if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
8089  echo $ac_n "(cached) $ac_c" 1>&6
8090else
8091  
8092if test "$cross_compiling" = yes; then
8093  samba_cv_HAVE_BROKEN_READDIR=cross
8094else
8095  cat > conftest.$ac_ext <<EOF
8096#line 8097 "configure"
8097#include "confdefs.h"
8098#include <sys/types.h>
8099#include <dirent.h>
8100main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
8101if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
8102di->d_name[0] == 0) exit(0); exit(1);} 
8103EOF
8104if { (eval echo configure:8105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8105then
8106  samba_cv_HAVE_BROKEN_READDIR=yes
8107else
8108  echo "configure: failed program was:" >&5
8109  cat conftest.$ac_ext >&5
8110  rm -fr conftest*
8111  samba_cv_HAVE_BROKEN_READDIR=no
8112fi
8113rm -fr conftest*
8114fi
8115
8116fi
8117
8118echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
8119if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
8120    cat >> confdefs.h <<\EOF
8121#define HAVE_BROKEN_READDIR 1
8122EOF
8123
8124fi
8125
8126echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
8127echo "configure:8128: checking for utimbuf" >&5
8128if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
8129  echo $ac_n "(cached) $ac_c" 1>&6
8130else
8131  
8132cat > conftest.$ac_ext <<EOF
8133#line 8134 "configure"
8134#include "confdefs.h"
8135#include <sys/types.h>
8136#include <utime.h>
8137int main() {
8138struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
8139; return 0; }
8140EOF
8141if { (eval echo configure:8142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8142  rm -rf conftest*
8143  samba_cv_HAVE_UTIMBUF=yes
8144else
8145  echo "configure: failed program was:" >&5
8146  cat conftest.$ac_ext >&5
8147  rm -rf conftest*
8148  samba_cv_HAVE_UTIMBUF=no
8149fi
8150rm -f conftest*
8151fi
8152
8153echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
8154if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
8155    cat >> confdefs.h <<\EOF
8156#define HAVE_UTIMBUF 1
8157EOF
8158
8159fi
8160
8161
8162echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
8163echo "configure:8164: checking for ut_name in utmp" >&5
8164if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
8165  echo $ac_n "(cached) $ac_c" 1>&6
8166else
8167  
8168cat > conftest.$ac_ext <<EOF
8169#line 8170 "configure"
8170#include "confdefs.h"
8171#include <utmp.h>
8172int main() {
8173struct utmp ut;  ut.ut_name[0] = 'a';
8174; return 0; }
8175EOF
8176if { (eval echo configure:8177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8177  rm -rf conftest*
8178  samba_cv_HAVE_UT_UT_NAME=yes
8179else
8180  echo "configure: failed program was:" >&5
8181  cat conftest.$ac_ext >&5
8182  rm -rf conftest*
8183  samba_cv_HAVE_UT_UT_NAME=no
8184fi
8185rm -f conftest*
8186fi
8187
8188echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
8189if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
8190    cat >> confdefs.h <<\EOF
8191#define HAVE_UT_UT_NAME 1
8192EOF
8193
8194fi 
8195
8196echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
8197echo "configure:8198: checking for ut_user in utmp" >&5
8198if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
8199  echo $ac_n "(cached) $ac_c" 1>&6
8200else
8201  
8202cat > conftest.$ac_ext <<EOF
8203#line 8204 "configure"
8204#include "confdefs.h"
8205#include <utmp.h>
8206int main() {
8207struct utmp ut;  ut.ut_user[0] = 'a';
8208; return 0; }
8209EOF
8210if { (eval echo configure:8211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8211  rm -rf conftest*
8212  samba_cv_HAVE_UT_UT_USER=yes
8213else
8214  echo "configure: failed program was:" >&5
8215  cat conftest.$ac_ext >&5
8216  rm -rf conftest*
8217  samba_cv_HAVE_UT_UT_USER=no
8218fi
8219rm -f conftest*
8220fi
8221
8222echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
8223if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
8224    cat >> confdefs.h <<\EOF
8225#define HAVE_UT_UT_USER 1
8226EOF
8227
8228fi 
8229
8230echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
8231echo "configure:8232: checking for ut_id in utmp" >&5
8232if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
8233  echo $ac_n "(cached) $ac_c" 1>&6
8234else
8235  
8236cat > conftest.$ac_ext <<EOF
8237#line 8238 "configure"
8238#include "confdefs.h"
8239#include <utmp.h>
8240int main() {
8241struct utmp ut;  ut.ut_id[0] = 'a';
8242; return 0; }
8243EOF
8244if { (eval echo configure:8245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8245  rm -rf conftest*
8246  samba_cv_HAVE_UT_UT_ID=yes
8247else
8248  echo "configure: failed program was:" >&5
8249  cat conftest.$ac_ext >&5
8250  rm -rf conftest*
8251  samba_cv_HAVE_UT_UT_ID=no
8252fi
8253rm -f conftest*
8254fi
8255
8256echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
8257if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
8258    cat >> confdefs.h <<\EOF
8259#define HAVE_UT_UT_ID 1
8260EOF
8261
8262fi 
8263
8264echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
8265echo "configure:8266: checking for ut_host in utmp" >&5
8266if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
8267  echo $ac_n "(cached) $ac_c" 1>&6
8268else
8269  
8270cat > conftest.$ac_ext <<EOF
8271#line 8272 "configure"
8272#include "confdefs.h"
8273#include <utmp.h>
8274int main() {
8275struct utmp ut;  ut.ut_host[0] = 'a';
8276; return 0; }
8277EOF
8278if { (eval echo configure:8279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8279  rm -rf conftest*
8280  samba_cv_HAVE_UT_UT_HOST=yes
8281else
8282  echo "configure: failed program was:" >&5
8283  cat conftest.$ac_ext >&5
8284  rm -rf conftest*
8285  samba_cv_HAVE_UT_UT_HOST=no
8286fi
8287rm -f conftest*
8288fi
8289
8290echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
8291if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
8292    cat >> confdefs.h <<\EOF
8293#define HAVE_UT_UT_HOST 1
8294EOF
8295
8296fi 
8297
8298echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
8299echo "configure:8300: checking for ut_time in utmp" >&5
8300if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
8301  echo $ac_n "(cached) $ac_c" 1>&6
8302else
8303  
8304cat > conftest.$ac_ext <<EOF
8305#line 8306 "configure"
8306#include "confdefs.h"
8307#include <utmp.h>
8308int main() {
8309struct utmp ut;  time_t t; ut.ut_time = t;
8310; return 0; }
8311EOF
8312if { (eval echo configure:8313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8313  rm -rf conftest*
8314  samba_cv_HAVE_UT_UT_TIME=yes
8315else
8316  echo "configure: failed program was:" >&5
8317  cat conftest.$ac_ext >&5
8318  rm -rf conftest*
8319  samba_cv_HAVE_UT_UT_TIME=no
8320fi
8321rm -f conftest*
8322fi
8323
8324echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
8325if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
8326    cat >> confdefs.h <<\EOF
8327#define HAVE_UT_UT_TIME 1
8328EOF
8329
8330fi 
8331
8332echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
8333echo "configure:8334: checking for ut_tv in utmp" >&5
8334if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
8335  echo $ac_n "(cached) $ac_c" 1>&6
8336else
8337  
8338cat > conftest.$ac_ext <<EOF
8339#line 8340 "configure"
8340#include "confdefs.h"
8341#include <utmp.h>
8342int main() {
8343struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
8344; return 0; }
8345EOF
8346if { (eval echo configure:8347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8347  rm -rf conftest*
8348  samba_cv_HAVE_UT_UT_TV=yes
8349else
8350  echo "configure: failed program was:" >&5
8351  cat conftest.$ac_ext >&5
8352  rm -rf conftest*
8353  samba_cv_HAVE_UT_UT_TV=no
8354fi
8355rm -f conftest*
8356fi
8357
8358echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
8359if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
8360    cat >> confdefs.h <<\EOF
8361#define HAVE_UT_UT_TV 1
8362EOF
8363
8364fi 
8365
8366echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
8367echo "configure:8368: checking for ut_syslen in utmpx" >&5
8368if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
8369  echo $ac_n "(cached) $ac_c" 1>&6
8370else
8371  
8372cat > conftest.$ac_ext <<EOF
8373#line 8374 "configure"
8374#include "confdefs.h"
8375#include <utmpx.h>
8376int main() {
8377struct utmpx ux;  ux.ut_syslen = 0;
8378; return 0; }
8379EOF
8380if { (eval echo configure:8381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8381  rm -rf conftest*
8382  samba_cv_HAVE_UX_UT_SYSLEN=yes
8383else
8384  echo "configure: failed program was:" >&5
8385  cat conftest.$ac_ext >&5
8386  rm -rf conftest*
8387  samba_cv_HAVE_UX_UT_SYSLEN=no
8388fi
8389rm -f conftest*
8390fi
8391
8392echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
8393if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
8394    cat >> confdefs.h <<\EOF
8395#define HAVE_UX_UT_SYSLEN 1
8396EOF
8397
8398fi 
8399
8400echo $ac_n "checking for kernel oplock type definitions""... $ac_c" 1>&6
8401echo "configure:8402: checking for kernel oplock type definitions" >&5
8402if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS'+set}'`\" = set"; then
8403  echo $ac_n "(cached) $ac_c" 1>&6
8404else
8405  
8406cat > conftest.$ac_ext <<EOF
8407#line 8408 "configure"
8408#include "confdefs.h"
8409#include <sys/types.h>
8410#include <fcntl.h>
8411int main() {
8412oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
8413; return 0; }
8414EOF
8415if { (eval echo configure:8416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8416  rm -rf conftest*
8417  samba_cv_HAVE_KERNEL_OPLOCKS=yes
8418else
8419  echo "configure: failed program was:" >&5
8420  cat conftest.$ac_ext >&5
8421  rm -rf conftest*
8422  samba_cv_HAVE_KERNEL_OPLOCKS=no
8423fi
8424rm -f conftest*
8425fi
8426
8427echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS" 1>&6
8428if test x"$samba_cv_HAVE_KERNEL_OPLOCKS" = x"yes"; then
8429    cat >> confdefs.h <<\EOF
8430#define HAVE_KERNEL_OPLOCKS 1
8431EOF
8432
8433fi
8434
8435echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
8436echo "configure:8437: checking for irix specific capabilities" >&5
8437if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
8438  echo $ac_n "(cached) $ac_c" 1>&6
8439else
8440  
8441if test "$cross_compiling" = yes; then
8442  samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
8443else
8444  cat > conftest.$ac_ext <<EOF
8445#line 8446 "configure"
8446#include "confdefs.h"
8447#include <sys/types.h>
8448#include <sys/capability.h>
8449main() {
8450 cap_t cap;
8451 if ((cap = cap_get_proc()) == NULL)
8452   exit(1);
8453 cap->cap_effective |= CAP_NETWORK_MGT;
8454 cap->cap_inheritable |= CAP_NETWORK_MGT;
8455 cap_set_proc(cap);
8456 exit(0);
8457}
8458
8459EOF
8460if { (eval echo configure:8461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8461then
8462  samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
8463else
8464  echo "configure: failed program was:" >&5
8465  cat conftest.$ac_ext >&5
8466  rm -fr conftest*
8467  samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
8468fi
8469rm -fr conftest*
8470fi
8471
8472fi
8473
8474echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
8475if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
8476    cat >> confdefs.h <<\EOF
8477#define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
8478EOF
8479
8480fi
8481
8482#
8483# Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
8484# This is *really* broken but some systems (DEC OSF1) do this.... JRA.
8485#
8486
8487echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
8488echo "configure:8489: checking for int16 typedef included by rpc/rpc.h" >&5
8489if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
8490  echo $ac_n "(cached) $ac_c" 1>&6
8491else
8492  
8493cat > conftest.$ac_ext <<EOF
8494#line 8495 "configure"
8495#include "confdefs.h"
8496#include <sys/types.h>
8497#if defined(HAVE_RPC_RPC_H)
8498#include <rpc/rpc.h>
8499#endif
8500int main() {
8501int16 testvar;
8502; return 0; }
8503EOF
8504if { (eval echo configure:8505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8505  rm -rf conftest*
8506  samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
8507else
8508  echo "configure: failed program was:" >&5
8509  cat conftest.$ac_ext >&5
8510  rm -rf conftest*
8511  samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
8512fi
8513rm -f conftest*
8514fi
8515
8516echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
8517if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
8518    cat >> confdefs.h <<\EOF
8519#define HAVE_INT16_FROM_RPC_RPC_H 1
8520EOF
8521
8522fi
8523
8524echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
8525echo "configure:8526: checking for uint16 typedef included by rpc/rpc.h" >&5
8526if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
8527  echo $ac_n "(cached) $ac_c" 1>&6
8528else
8529  
8530cat > conftest.$ac_ext <<EOF
8531#line 8532 "configure"
8532#include "confdefs.h"
8533#include <sys/types.h>
8534#if defined(HAVE_RPC_RPC_H)
8535#include <rpc/rpc.h>
8536#endif
8537int main() {
8538uint16 testvar;
8539; return 0; }
8540EOF
8541if { (eval echo configure:8542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8542  rm -rf conftest*
8543  samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
8544else
8545  echo "configure: failed program was:" >&5
8546  cat conftest.$ac_ext >&5
8547  rm -rf conftest*
8548  samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
8549fi
8550rm -f conftest*
8551fi
8552
8553echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
8554if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
8555    cat >> confdefs.h <<\EOF
8556#define HAVE_UINT16_FROM_RPC_RPC_H 1
8557EOF
8558
8559fi
8560
8561echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
8562echo "configure:8563: checking for int32 typedef included by rpc/rpc.h" >&5
8563if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
8564  echo $ac_n "(cached) $ac_c" 1>&6
8565else
8566  
8567cat > conftest.$ac_ext <<EOF
8568#line 8569 "configure"
8569#include "confdefs.h"
8570#include <sys/types.h>
8571#if defined(HAVE_RPC_RPC_H)
8572#include <rpc/rpc.h>
8573#endif
8574int main() {
8575int32 testvar;
8576; return 0; }
8577EOF
8578if { (eval echo configure:8579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8579  rm -rf conftest*
8580  samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
8581else
8582  echo "configure: failed program was:" >&5
8583  cat conftest.$ac_ext >&5
8584  rm -rf conftest*
8585  samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
8586fi
8587rm -f conftest*
8588fi
8589
8590echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
8591if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
8592    cat >> confdefs.h <<\EOF
8593#define HAVE_INT32_FROM_RPC_RPC_H 1
8594EOF
8595
8596fi
8597
8598echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
8599echo "configure:8600: checking for uint32 typedef included by rpc/rpc.h" >&5
8600if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
8601  echo $ac_n "(cached) $ac_c" 1>&6
8602else
8603  
8604cat > conftest.$ac_ext <<EOF
8605#line 8606 "configure"
8606#include "confdefs.h"
8607#include <sys/types.h>
8608#if defined(HAVE_RPC_RPC_H)
8609#include <rpc/rpc.h>
8610#endif
8611int main() {
8612uint32 testvar;
8613; return 0; }
8614EOF
8615if { (eval echo configure:8616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8616  rm -rf conftest*
8617  samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
8618else
8619  echo "configure: failed program was:" >&5
8620  cat conftest.$ac_ext >&5
8621  rm -rf conftest*
8622  samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
8623fi
8624rm -f conftest*
8625fi
8626
8627echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
8628if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
8629    cat >> confdefs.h <<\EOF
8630#define HAVE_UINT32_FROM_RPC_RPC_H 1
8631EOF
8632
8633fi
8634
8635
8636echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
8637echo "configure:8638: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
8638if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
8639  echo $ac_n "(cached) $ac_c" 1>&6
8640else
8641  
8642cat > conftest.$ac_ext <<EOF
8643#line 8644 "configure"
8644#include "confdefs.h"
8645#include <sys/types.h>
8646#ifdef HAVE_SYS_SECURITY_H
8647#include <sys/security.h>
8648#include <prot.h>
8649#endif  /* HAVE_SYS_SECURITY_H */
8650#if defined(HAVE_RPC_RPC_H)
8651#include <rpc/rpc.h>
8652#endif
8653int main() {
8654int testvar;
8655; return 0; }
8656EOF
8657if { (eval echo configure:8658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8658  rm -rf conftest*
8659  samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
8660else
8661  echo "configure: failed program was:" >&5
8662  cat conftest.$ac_ext >&5
8663  rm -rf conftest*
8664  samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
8665fi
8666rm -f conftest*
8667fi
8668
8669echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
8670if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
8671    cat >> confdefs.h <<\EOF
8672#define HAVE_RPC_AUTH_ERROR_CONFLICT 1
8673EOF
8674
8675fi
8676
8677echo $ac_n "checking for test routines""... $ac_c" 1>&6
8678echo "configure:8679: checking for test routines" >&5
8679if test "$cross_compiling" = yes; then
8680  echo "configure: warning: cannot run when cross-compiling" 1>&2
8681else
8682  cat > conftest.$ac_ext <<EOF
8683#line 8684 "configure"
8684#include "confdefs.h"
8685#include "${srcdir-.}/tests/trivial.c"
8686EOF
8687if { (eval echo configure:8688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8688then
8689  echo "$ac_t""yes" 1>&6
8690else
8691  echo "configure: failed program was:" >&5
8692  cat conftest.$ac_ext >&5
8693  rm -fr conftest*
8694  { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
8695fi
8696rm -fr conftest*
8697fi
8698
8699
8700echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
8701echo "configure:8702: checking for ftruncate extend" >&5
8702if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
8703  echo $ac_n "(cached) $ac_c" 1>&6
8704else
8705  
8706if test "$cross_compiling" = yes; then
8707  samba_cv_HAVE_FTRUNCATE_EXTEND=cross
8708else
8709  cat > conftest.$ac_ext <<EOF
8710#line 8711 "configure"
8711#include "confdefs.h"
8712#include "${srcdir-.}/tests/ftruncate.c"
8713EOF
8714if { (eval echo configure:8715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8715then
8716  samba_cv_HAVE_FTRUNCATE_EXTEND=yes
8717else
8718  echo "configure: failed program was:" >&5
8719  cat conftest.$ac_ext >&5
8720  rm -fr conftest*
8721  samba_cv_HAVE_FTRUNCATE_EXTEND=no
8722fi
8723rm -fr conftest*
8724fi
8725
8726fi
8727
8728echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
8729if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
8730    cat >> confdefs.h <<\EOF
8731#define HAVE_FTRUNCATE_EXTEND 1
8732EOF
8733
8734fi
8735
8736echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
8737echo "configure:8738: checking for broken getgroups" >&5
8738if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
8739  echo $ac_n "(cached) $ac_c" 1>&6
8740else
8741  
8742if test "$cross_compiling" = yes; then
8743  samba_cv_HAVE_BROKEN_GETGROUPS=cross
8744else
8745  cat > conftest.$ac_ext <<EOF
8746#line 8747 "configure"
8747#include "confdefs.h"
8748#include "${srcdir-.}/tests/getgroups.c"
8749EOF
8750if { (eval echo configure:8751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8751then
8752  samba_cv_HAVE_BROKEN_GETGROUPS=yes
8753else
8754  echo "configure: failed program was:" >&5
8755  cat conftest.$ac_ext >&5
8756  rm -fr conftest*
8757  samba_cv_HAVE_BROKEN_GETGROUPS=no
8758fi
8759rm -fr conftest*
8760fi
8761
8762fi
8763
8764echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
8765if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
8766    cat >> confdefs.h <<\EOF
8767#define HAVE_BROKEN_GETGROUPS 1
8768EOF
8769
8770fi
8771
8772echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
8773echo "configure:8774: checking whether getpass should be replaced" >&5
8774if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
8775  echo $ac_n "(cached) $ac_c" 1>&6
8776else
8777  
8778SAVE_CPPFLAGS="$CPPFLAGS"
8779CPPFLAGS="$CPPFLAGS -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
8780cat > conftest.$ac_ext <<EOF
8781#line 8782 "configure"
8782#include "confdefs.h"
8783
8784#define REPLACE_GETPASS 1
8785#define NO_CONFIG_H 1
8786#define main dont_declare_main
8787#include "${srcdir-.}/lib/getsmbpass.c"
8788#undef main
8789
8790int main() {
8791
8792; return 0; }
8793EOF
8794if { (eval echo configure:8795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8795  rm -rf conftest*
8796  samba_cv_REPLACE_GETPASS=yes
8797else
8798  echo "configure: failed program was:" >&5
8799  cat conftest.$ac_ext >&5
8800  rm -rf conftest*
8801  samba_cv_REPLACE_GETPASS=no
8802fi
8803rm -f conftest*
8804CPPFLAGS="$SAVE_CPPFLAGS"
8805
8806fi
8807
8808echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
8809if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
8810	cat >> confdefs.h <<\EOF
8811#define REPLACE_GETPASS 1
8812EOF
8813
8814fi
8815
8816echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6
8817echo "configure:8818: checking for working fnmatch" >&5
8818if eval "test \"`echo '$''{'samba_cv_HAVE_FNMATCH'+set}'`\" = set"; then
8819  echo $ac_n "(cached) $ac_c" 1>&6
8820else
8821  
8822if test "$cross_compiling" = yes; then
8823  samba_cv_HAVE_FNMATCH=cross
8824else
8825  cat > conftest.$ac_ext <<EOF
8826#line 8827 "configure"
8827#include "confdefs.h"
8828#include <fnmatch.h>
8829main() { exit(fnmatch("*.o", "x.o", FNM_PATHNAME) == 0? 0: 1); }
8830EOF
8831if { (eval echo configure:8832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8832then
8833  samba_cv_HAVE_FNMATCH=yes
8834else
8835  echo "configure: failed program was:" >&5
8836  cat conftest.$ac_ext >&5
8837  rm -fr conftest*
8838  samba_cv_HAVE_FNMATCH=no
8839fi
8840rm -fr conftest*
8841fi
8842
8843fi
8844
8845echo "$ac_t""$samba_cv_HAVE_FNMATCH" 1>&6
8846if test x"$samba_cv_HAVE_FNMATCH" = x"yes"; then
8847    cat >> confdefs.h <<\EOF
8848#define HAVE_FNMATCH 1
8849EOF
8850
8851fi
8852
8853echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
8854echo "configure:8855: checking for secure mkstemp" >&5
8855if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
8856  echo $ac_n "(cached) $ac_c" 1>&6
8857else
8858  
8859if test "$cross_compiling" = yes; then
8860  samba_cv_HAVE_SECURE_MKSTEMP=cross
8861else
8862  cat > conftest.$ac_ext <<EOF
8863#line 8864 "configure"
8864#include "confdefs.h"
8865#include <stdlib.h>
8866#include <sys/types.h>
8867#include <sys/stat.h>
8868#include <unistd.h>
8869main() { 
8870  struct stat st;
8871  char tpl[20]="/tmp/test.XXXXXX"; 
8872  int fd = mkstemp(tpl); 
8873  if (fd == -1) exit(1);
8874  unlink(tpl);
8875  if (fstat(fd, &st) != 0) exit(1);
8876  if ((st.st_mode & 0777) != 0600) exit(1);
8877  exit(0);
8878}
8879EOF
8880if { (eval echo configure:8881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8881then
8882  samba_cv_HAVE_SECURE_MKSTEMP=yes
8883else
8884  echo "configure: failed program was:" >&5
8885  cat conftest.$ac_ext >&5
8886  rm -fr conftest*
8887  samba_cv_HAVE_SECURE_MKSTEMP=no
8888fi
8889rm -fr conftest*
8890fi
8891
8892fi
8893
8894echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
8895if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
8896    cat >> confdefs.h <<\EOF
8897#define HAVE_SECURE_MKSTEMP 1
8898EOF
8899
8900fi
8901
8902echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
8903echo "configure:8904: checking for broken inet_ntoa" >&5
8904if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
8905  echo $ac_n "(cached) $ac_c" 1>&6
8906else
8907  
8908if test "$cross_compiling" = yes; then
8909  samba_cv_REPLACE_INET_NTOA=cross
8910else
8911  cat > conftest.$ac_ext <<EOF
8912#line 8913 "configure"
8913#include "confdefs.h"
8914
8915#include <stdio.h>
8916#include <sys/types.h>
8917#include <netinet/in.h>
8918#ifdef HAVE_ARPA_INET_H
8919#include <arpa/inet.h>
8920#endif
8921main() { struct in_addr ip; ip.s_addr = 0x12345678;
8922if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
8923    strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
8924exit(1);}
8925EOF
8926if { (eval echo configure:8927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8927then
8928  samba_cv_REPLACE_INET_NTOA=yes
8929else
8930  echo "configure: failed program was:" >&5
8931  cat conftest.$ac_ext >&5
8932  rm -fr conftest*
8933  samba_cv_REPLACE_INET_NTOA=no
8934fi
8935rm -fr conftest*
8936fi
8937
8938fi
8939
8940echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
8941if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
8942    cat >> confdefs.h <<\EOF
8943#define REPLACE_INET_NTOA 1
8944EOF
8945
8946fi
8947
8948echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
8949echo "configure:8950: checking for sysconf(_SC_NGROUPS_MAX)" >&5
8950if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
8951  echo $ac_n "(cached) $ac_c" 1>&6
8952else
8953  
8954if test "$cross_compiling" = yes; then
8955  samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
8956else
8957  cat > conftest.$ac_ext <<EOF
8958#line 8959 "configure"
8959#include "confdefs.h"
8960#include <unistd.h>
8961main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
8962EOF
8963if { (eval echo configure:8964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8964then
8965  samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
8966else
8967  echo "configure: failed program was:" >&5
8968  cat conftest.$ac_ext >&5
8969  rm -fr conftest*
8970  samba_cv_SYSCONF_SC_NGROUPS_MAX=no
8971fi
8972rm -fr conftest*
8973fi
8974
8975fi
8976
8977echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
8978if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
8979    cat >> confdefs.h <<\EOF
8980#define SYSCONF_SC_NGROUPS_MAX 1
8981EOF
8982
8983fi
8984
8985echo $ac_n "checking for root""... $ac_c" 1>&6
8986echo "configure:8987: checking for root" >&5
8987if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
8988  echo $ac_n "(cached) $ac_c" 1>&6
8989else
8990  
8991if test "$cross_compiling" = yes; then
8992  samba_cv_HAVE_ROOT=cross
8993else
8994  cat > conftest.$ac_ext <<EOF
8995#line 8996 "configure"
8996#include "confdefs.h"
8997main() { exit(getuid() != 0); }
8998EOF
8999if { (eval echo configure:9000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9000then
9001  samba_cv_HAVE_ROOT=yes
9002else
9003  echo "configure: failed program was:" >&5
9004  cat conftest.$ac_ext >&5
9005  rm -fr conftest*
9006  samba_cv_HAVE_ROOT=no
9007fi
9008rm -fr conftest*
9009fi
9010
9011fi
9012
9013echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
9014if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
9015    cat >> confdefs.h <<\EOF
9016#define HAVE_ROOT 1
9017EOF
9018
9019else
9020    echo "configure: warning: running as non-root will disable some tests" 1>&2
9021fi
9022
9023##################
9024# look for a method of finding the list of network interfaces
9025iface=no;
9026echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
9027echo "configure:9028: checking for iface AIX" >&5
9028if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
9029  echo $ac_n "(cached) $ac_c" 1>&6
9030else
9031  
9032if test "$cross_compiling" = yes; then
9033  samba_cv_HAVE_IFACE_AIX=cross
9034else
9035  cat > conftest.$ac_ext <<EOF
9036#line 9037 "configure"
9037#include "confdefs.h"
9038
9039#define HAVE_IFACE_AIX 1
9040#define AUTOCONF_TEST 1
9041#include "confdefs.h"
9042#include "${srcdir-.}/lib/interfaces.c"
9043EOF
9044if { (eval echo configure:9045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9045then
9046  samba_cv_HAVE_IFACE_AIX=yes
9047else
9048  echo "configure: failed program was:" >&5
9049  cat conftest.$ac_ext >&5
9050  rm -fr conftest*
9051  samba_cv_HAVE_IFACE_AIX=no
9052fi
9053rm -fr conftest*
9054fi
9055
9056fi
9057
9058echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
9059if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
9060    iface=yes;cat >> confdefs.h <<\EOF
9061#define HAVE_IFACE_AIX 1
9062EOF
9063
9064fi
9065
9066if test $iface = no; then
9067echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
9068echo "configure:9069: checking for iface ifconf" >&5
9069if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
9070  echo $ac_n "(cached) $ac_c" 1>&6
9071else
9072  
9073if test "$cross_compiling" = yes; then
9074  samba_cv_HAVE_IFACE_IFCONF=cross
9075else
9076  cat > conftest.$ac_ext <<EOF
9077#line 9078 "configure"
9078#include "confdefs.h"
9079
9080#define HAVE_IFACE_IFCONF 1
9081#define AUTOCONF_TEST 1
9082#include "confdefs.h"
9083#include "${srcdir-.}/lib/interfaces.c"
9084EOF
9085if { (eval echo configure:9086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9086then
9087  samba_cv_HAVE_IFACE_IFCONF=yes
9088else
9089  echo "configure: failed program was:" >&5
9090  cat conftest.$ac_ext >&5
9091  rm -fr conftest*
9092  samba_cv_HAVE_IFACE_IFCONF=no
9093fi
9094rm -fr conftest*
9095fi
9096
9097fi
9098
9099echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
9100if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
9101    iface=yes;cat >> confdefs.h <<\EOF
9102#define HAVE_IFACE_IFCONF 1
9103EOF
9104
9105fi
9106fi
9107
9108if test $iface = no; then
9109echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
9110echo "configure:9111: checking for iface ifreq" >&5
9111if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
9112  echo $ac_n "(cached) $ac_c" 1>&6
9113else
9114  
9115if test "$cross_compiling" = yes; then
9116  samba_cv_HAVE_IFACE_IFREQ=cross
9117else
9118  cat > conftest.$ac_ext <<EOF
9119#line 9120 "configure"
9120#include "confdefs.h"
9121
9122#define HAVE_IFACE_IFREQ 1
9123#define AUTOCONF_TEST 1
9124#include "confdefs.h"
9125#include "${srcdir-.}/lib/interfaces.c"
9126EOF
9127if { (eval echo configure:9128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9128then
9129  samba_cv_HAVE_IFACE_IFREQ=yes
9130else
9131  echo "configure: failed program was:" >&5
9132  cat conftest.$ac_ext >&5
9133  rm -fr conftest*
9134  samba_cv_HAVE_IFACE_IFREQ=no
9135fi
9136rm -fr conftest*
9137fi
9138
9139fi
9140
9141echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
9142if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
9143    iface=yes;cat >> confdefs.h <<\EOF
9144#define HAVE_IFACE_IFREQ 1
9145EOF
9146
9147fi
9148fi
9149
9150
9151################################################
9152# look for a method of setting the effective uid
9153seteuid=no;
9154if test $seteuid = no; then
9155echo $ac_n "checking for setresuid""... $ac_c" 1>&6
9156echo "configure:9157: checking for setresuid" >&5
9157if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
9158  echo $ac_n "(cached) $ac_c" 1>&6
9159else
9160  
9161if test "$cross_compiling" = yes; then
9162  samba_cv_USE_SETRESUID=cross
9163else
9164  cat > conftest.$ac_ext <<EOF
9165#line 9166 "configure"
9166#include "confdefs.h"
9167
9168#define AUTOCONF_TEST 1
9169#define USE_SETRESUID 1
9170#include "confdefs.h"
9171#include "${srcdir-.}/lib/util_sec.c"
9172EOF
9173if { (eval echo configure:9174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9174then
9175  samba_cv_USE_SETRESUID=yes
9176else
9177  echo "configure: failed program was:" >&5
9178  cat conftest.$ac_ext >&5
9179  rm -fr conftest*
9180  samba_cv_USE_SETRESUID=no
9181fi
9182rm -fr conftest*
9183fi
9184
9185fi
9186
9187echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
9188if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
9189    seteuid=yes;cat >> confdefs.h <<\EOF
9190#define USE_SETRESUID 1
9191EOF
9192
9193fi
9194fi
9195
9196
9197if test $seteuid = no; then
9198echo $ac_n "checking for setreuid""... $ac_c" 1>&6
9199echo "configure:9200: checking for setreuid" >&5
9200if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
9201  echo $ac_n "(cached) $ac_c" 1>&6
9202else
9203  
9204if test "$cross_compiling" = yes; then
9205  samba_cv_USE_SETREUID=cross
9206else
9207  cat > conftest.$ac_ext <<EOF
9208#line 9209 "configure"
9209#include "confdefs.h"
9210
9211#define AUTOCONF_TEST 1
9212#define USE_SETREUID 1
9213#include "confdefs.h"
9214#include "${srcdir-.}/lib/util_sec.c"
9215EOF
9216if { (eval echo configure:9217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9217then
9218  samba_cv_USE_SETREUID=yes
9219else
9220  echo "configure: failed program was:" >&5
9221  cat conftest.$ac_ext >&5
9222  rm -fr conftest*
9223  samba_cv_USE_SETREUID=no
9224fi
9225rm -fr conftest*
9226fi
9227
9228fi
9229
9230echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
9231if test x"$samba_cv_USE_SETREUID" = x"yes"; then
9232    seteuid=yes;cat >> confdefs.h <<\EOF
9233#define USE_SETREUID 1
9234EOF
9235
9236fi
9237fi
9238
9239if test $seteuid = no; then
9240echo $ac_n "checking for seteuid""... $ac_c" 1>&6
9241echo "configure:9242: checking for seteuid" >&5
9242if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
9243  echo $ac_n "(cached) $ac_c" 1>&6
9244else
9245  
9246if test "$cross_compiling" = yes; then
9247  samba_cv_USE_SETEUID=cross
9248else
9249  cat > conftest.$ac_ext <<EOF
9250#line 9251 "configure"
9251#include "confdefs.h"
9252
9253#define AUTOCONF_TEST 1
9254#define USE_SETEUID 1
9255#include "confdefs.h"
9256#include "${srcdir-.}/lib/util_sec.c"
9257EOF
9258if { (eval echo configure:9259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9259then
9260  samba_cv_USE_SETEUID=yes
9261else
9262  echo "configure: failed program was:" >&5
9263  cat conftest.$ac_ext >&5
9264  rm -fr conftest*
9265  samba_cv_USE_SETEUID=no
9266fi
9267rm -fr conftest*
9268fi
9269
9270fi
9271
9272echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
9273if test x"$samba_cv_USE_SETEUID" = x"yes"; then
9274    seteuid=yes;cat >> confdefs.h <<\EOF
9275#define USE_SETEUID 1
9276EOF
9277
9278fi
9279fi
9280
9281if test $seteuid = no; then
9282echo $ac_n "checking for setuidx""... $ac_c" 1>&6
9283echo "configure:9284: checking for setuidx" >&5
9284if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
9285  echo $ac_n "(cached) $ac_c" 1>&6
9286else
9287  
9288if test "$cross_compiling" = yes; then
9289  samba_cv_USE_SETUIDX=cross
9290else
9291  cat > conftest.$ac_ext <<EOF
9292#line 9293 "configure"
9293#include "confdefs.h"
9294
9295#define AUTOCONF_TEST 1
9296#define USE_SETUIDX 1
9297#include "confdefs.h"
9298#include "${srcdir-.}/lib/util_sec.c"
9299EOF
9300if { (eval echo configure:9301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9301then
9302  samba_cv_USE_SETUIDX=yes
9303else
9304  echo "configure: failed program was:" >&5
9305  cat conftest.$ac_ext >&5
9306  rm -fr conftest*
9307  samba_cv_USE_SETUIDX=no
9308fi
9309rm -fr conftest*
9310fi
9311
9312fi
9313
9314echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
9315if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
9316    seteuid=yes;cat >> confdefs.h <<\EOF
9317#define USE_SETUIDX 1
9318EOF
9319
9320fi
9321fi
9322
9323
9324echo $ac_n "checking for shared mmap""... $ac_c" 1>&6
9325echo "configure:9326: checking for shared mmap" >&5
9326if eval "test \"`echo '$''{'samba_cv_HAVE_SHARED_MMAP'+set}'`\" = set"; then
9327  echo $ac_n "(cached) $ac_c" 1>&6
9328else
9329  
9330if test "$cross_compiling" = yes; then
9331  samba_cv_HAVE_SHARED_MMAP=cross
9332else
9333  cat > conftest.$ac_ext <<EOF
9334#line 9335 "configure"
9335#include "confdefs.h"
9336#include "${srcdir-.}/tests/shared_mmap.c"
9337EOF
9338if { (eval echo configure:9339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9339then
9340  samba_cv_HAVE_SHARED_MMAP=yes
9341else
9342  echo "configure: failed program was:" >&5
9343  cat conftest.$ac_ext >&5
9344  rm -fr conftest*
9345  samba_cv_HAVE_SHARED_MMAP=no
9346fi
9347rm -fr conftest*
9348fi
9349
9350fi
9351
9352echo "$ac_t""$samba_cv_HAVE_SHARED_MMAP" 1>&6
9353if test x"$samba_cv_HAVE_SHARED_MMAP" = x"yes"; then
9354    cat >> confdefs.h <<\EOF
9355#define HAVE_SHARED_MMAP 1
9356EOF
9357
9358    cat >> confdefs.h <<\EOF
9359#define HAVE_MMAP 1
9360EOF
9361
9362fi
9363
9364echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
9365echo "configure:9366: checking for ftruncate needs root" >&5
9366if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
9367  echo $ac_n "(cached) $ac_c" 1>&6
9368else
9369  
9370if test "$cross_compiling" = yes; then
9371  samba_cv_FTRUNCATE_NEEDS_ROOT=cross
9372else
9373  cat > conftest.$ac_ext <<EOF
9374#line 9375 "configure"
9375#include "confdefs.h"
9376#include "${srcdir-.}/tests/ftruncroot.c"
9377EOF
9378if { (eval echo configure:9379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9379then
9380  samba_cv_FTRUNCATE_NEEDS_ROOT=yes
9381else
9382  echo "configure: failed program was:" >&5
9383  cat conftest.$ac_ext >&5
9384  rm -fr conftest*
9385  samba_cv_FTRUNCATE_NEEDS_ROOT=no
9386fi
9387rm -fr conftest*
9388fi
9389
9390fi
9391
9392echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
9393if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
9394    cat >> confdefs.h <<\EOF
9395#define FTRUNCATE_NEEDS_ROOT 1
9396EOF
9397
9398fi
9399
9400echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
9401echo "configure:9402: checking for fcntl locking" >&5
9402if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
9403  echo $ac_n "(cached) $ac_c" 1>&6
9404else
9405  
9406if test "$cross_compiling" = yes; then
9407  samba_cv_HAVE_FCNTL_LOCK=cross
9408else
9409  cat > conftest.$ac_ext <<EOF
9410#line 9411 "configure"
9411#include "confdefs.h"
9412#include "${srcdir-.}/tests/fcntl_lock.c"
9413EOF
9414if { (eval echo configure:9415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9415then
9416  samba_cv_HAVE_FCNTL_LOCK=yes
9417else
9418  echo "configure: failed program was:" >&5
9419  cat conftest.$ac_ext >&5
9420  rm -fr conftest*
9421  samba_cv_HAVE_FCNTL_LOCK=no
9422fi
9423rm -fr conftest*
9424fi
9425
9426fi
9427
9428echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
9429if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
9430    cat >> confdefs.h <<\EOF
9431#define HAVE_FCNTL_LOCK 1
9432EOF
9433
9434fi
9435
9436echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
9437echo "configure:9438: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
9438if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
9439  echo $ac_n "(cached) $ac_c" 1>&6
9440else
9441  
9442if test "$cross_compiling" = yes; then
9443  samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
9444else
9445  cat > conftest.$ac_ext <<EOF
9446#line 9447 "configure"
9447#include "confdefs.h"
9448#include "${srcdir-.}/tests/fcntl_lock64.c"
9449EOF
9450if { (eval echo configure:9451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9451then
9452  samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
9453else
9454  echo "configure: failed program was:" >&5
9455  cat conftest.$ac_ext >&5
9456  rm -fr conftest*
9457  samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
9458fi
9459rm -fr conftest*
9460fi
9461
9462fi
9463
9464echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
9465if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
9466    cat >> confdefs.h <<\EOF
9467#define HAVE_BROKEN_FCNTL64_LOCKS 1
9468EOF
9469
9470
9471else
9472
9473
9474  echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
9475echo "configure:9476: checking for 64 bit fcntl locking" >&5
9476if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
9477  echo $ac_n "(cached) $ac_c" 1>&6
9478else
9479  
9480  if test "$cross_compiling" = yes; then
9481  samba_cv_HAVE_STRUCT_FLOCK64=cross
9482else
9483  cat > conftest.$ac_ext <<EOF
9484#line 9485 "configure"
9485#include "confdefs.h"
9486
9487#if defined(HAVE_UNISTD_H)
9488#include <unistd.h>
9489#endif
9490#include <stdio.h>
9491#include <stdlib.h>
9492
9493#ifdef HAVE_FCNTL_H
9494#include <fcntl.h>
9495#endif
9496
9497#ifdef HAVE_SYS_FCNTL_H
9498#include <sys/fcntl.h>
9499#endif
9500main() { struct flock64 fl64;
9501#if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
9502exit(0);
9503#else
9504exit(1);
9505#endif
9506}
9507EOF
9508if { (eval echo configure:9509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9509then
9510  samba_cv_HAVE_STRUCT_FLOCK64=yes
9511else
9512  echo "configure: failed program was:" >&5
9513  cat conftest.$ac_ext >&5
9514  rm -fr conftest*
9515  samba_cv_HAVE_STRUCT_FLOCK64=no
9516fi
9517rm -fr conftest*
9518fi
9519
9520fi
9521
9522echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
9523
9524  if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
9525      cat >> confdefs.h <<\EOF
9526#define HAVE_STRUCT_FLOCK64 1
9527EOF
9528
9529  fi
9530fi
9531
9532echo $ac_n "checking for sysv ipc""... $ac_c" 1>&6
9533echo "configure:9534: checking for sysv ipc" >&5
9534if eval "test \"`echo '$''{'samba_cv_HAVE_SYSV_IPC'+set}'`\" = set"; then
9535  echo $ac_n "(cached) $ac_c" 1>&6
9536else
9537  
9538if test "$cross_compiling" = yes; then
9539  samba_cv_HAVE_SYSV_IPC=cross
9540else
9541  cat > conftest.$ac_ext <<EOF
9542#line 9543 "configure"
9543#include "confdefs.h"
9544#include "${srcdir-.}/tests/sysv_ipc.c"
9545EOF
9546if { (eval echo configure:9547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9547then
9548  samba_cv_HAVE_SYSV_IPC=yes
9549else
9550  echo "configure: failed program was:" >&5
9551  cat conftest.$ac_ext >&5
9552  rm -fr conftest*
9553  samba_cv_HAVE_SYSV_IPC=no
9554fi
9555rm -fr conftest*
9556fi
9557
9558fi
9559
9560echo "$ac_t""$samba_cv_HAVE_SYSV_IPC" 1>&6
9561if test x"$samba_cv_HAVE_SYSV_IPC" = x"yes"; then
9562    cat >> confdefs.h <<\EOF
9563#define HAVE_SYSV_IPC 1
9564EOF
9565
9566fi
9567
9568echo $ac_n "checking for IRIX sysv ipc semun problem using gcc""... $ac_c" 1>&6
9569echo "configure:9570: checking for IRIX sysv ipc semun problem using gcc" >&5
9570if eval "test \"`echo '$''{'samba_cv_NEED_SGI_SEMUN_HACK'+set}'`\" = set"; then
9571  echo $ac_n "(cached) $ac_c" 1>&6
9572else
9573  
9574if test "$cross_compiling" = yes; then
9575  samba_cv_NEED_SGI_SEMUN_HACK=cross
9576else
9577  cat > conftest.$ac_ext <<EOF
9578#line 9579 "configure"
9579#include "confdefs.h"
9580#include "${srcdir-.}/tests/sgi_sysv_hack.c"
9581EOF
9582if { (eval echo configure:9583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9583then
9584  samba_cv_NEED_SGI_SEMUN_HACK=yes
9585else
9586  echo "configure: failed program was:" >&5
9587  cat conftest.$ac_ext >&5
9588  rm -fr conftest*
9589  samba_cv_NEED_SGI_SEMUN_HACK=no
9590fi
9591rm -fr conftest*
9592fi
9593
9594fi
9595
9596echo "$ac_t""$samba_cv_NEED_SGI_SEMUN_HACK" 1>&6
9597if test x"$samba_cv_NEED_SGI_SEMUN_HACK" = x"yes"; then
9598    cat >> confdefs.h <<\EOF
9599#define NEED_SGI_SEMUN_HACK 1
9600EOF
9601
9602fi
9603
9604echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
9605echo "configure:9606: checking for a crypt that needs truncated salt" >&5
9606if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
9607  echo $ac_n "(cached) $ac_c" 1>&6
9608else
9609  
9610if test "$cross_compiling" = yes; then
9611  samba_cv_HAVE_TRUNCATED_SALT=cross
9612else
9613  cat > conftest.$ac_ext <<EOF
9614#line 9615 "configure"
9615#include "confdefs.h"
9616#include "${srcdir-.}/tests/crypttest.c"
9617EOF
9618if { (eval echo configure:9619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9619then
9620  samba_cv_HAVE_TRUNCATED_SALT=no
9621else
9622  echo "configure: failed program was:" >&5
9623  cat conftest.$ac_ext >&5
9624  rm -fr conftest*
9625  samba_cv_HAVE_TRUNCATED_SALT=yes
9626fi
9627rm -fr conftest*
9628fi
9629
9630fi
9631
9632echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
9633if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
9634    cat >> confdefs.h <<\EOF
9635#define HAVE_TRUNCATED_SALT 1
9636EOF
9637
9638fi
9639
9640echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
9641echo "configure:9642: checking for broken nisplus include files" >&5
9642if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
9643  echo $ac_n "(cached) $ac_c" 1>&6
9644else
9645  
9646cat > conftest.$ac_ext <<EOF
9647#line 9648 "configure"
9648#include "confdefs.h"
9649#include <sys/acl.h>
9650#if defined(HAVE_RPCSVC_NIS_H)
9651#include <rpcsvc/nis.h>
9652#endif
9653int main() {
9654return 0;
9655; return 0; }
9656EOF
9657if { (eval echo configure:9658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9658  rm -rf conftest*
9659  samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
9660else
9661  echo "configure: failed program was:" >&5
9662  cat conftest.$ac_ext >&5
9663  rm -rf conftest*
9664  samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
9665fi
9666rm -f conftest*
9667fi
9668
9669echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
9670if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
9671    cat >> confdefs.h <<\EOF
9672#define BROKEN_NISPLUS_INCLUDE_FILES 1
9673EOF
9674
9675fi
9676
9677
9678#################################################
9679# check for smbwrapper support
9680echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
9681echo "configure:9682: checking whether to use smbwrapper" >&5
9682# Check whether --with-smbwrapper or --without-smbwrapper was given.
9683if test "${with_smbwrapper+set}" = set; then
9684  withval="$with_smbwrapper"
9685   case "$withval" in
9686  yes)
9687    echo "$ac_t""yes" 1>&6
9688    cat >> confdefs.h <<\EOF
9689#define WITH_SMBWRAPPER 1
9690EOF
9691
9692	WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
9693
9694	if test x$ATTEMPT_WRAP32_BUILD = x; then
9695		WRAP32=""
9696	else
9697			WRAP32=bin/smbwrapper.32.$SHLIBEXT
9698	fi
9699
9700# Conditions under which smbwrapper should not be built.
9701
9702	if test x$PICFLAG = x; then
9703	   echo No support for PIC code - disabling smbwrapper and smbsh
9704	   WRAP=""
9705	   WRAP32=""
9706	elif test x$ac_cv_func_syscall = xno; then
9707	   echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
9708	   WRAP=""
9709	   WRAP32=""
9710	fi
9711    ;;
9712  *)
9713    echo "$ac_t""no" 1>&6
9714    ;;
9715  esac 
9716else
9717  echo "$ac_t""no" 1>&6
9718
9719fi
9720
9721
9722#################################################
9723# check for the AFS filesystem
9724echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
9725echo "configure:9726: checking whether to use AFS" >&5
9726# Check whether --with-afs or --without-afs was given.
9727if test "${with_afs+set}" = set; then
9728  withval="$with_afs"
9729   case "$withval" in
9730  yes)
9731    echo "$ac_t""yes" 1>&6
9732    cat >> confdefs.h <<\EOF
9733#define WITH_AFS 1
9734EOF
9735
9736    ;;
9737  *)
9738    echo "$ac_t""no" 1>&6
9739    ;;
9740  esac 
9741else
9742  echo "$ac_t""no" 1>&6
9743
9744fi
9745
9746
9747
9748#################################################
9749# check for the DFS auth system
9750echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
9751echo "configure:9752: checking whether to use DFS auth" >&5
9752# Check whether --with-dfs or --without-dfs was given.
9753if test "${with_dfs+set}" = set; then
9754  withval="$with_dfs"
9755   case "$withval" in
9756  yes)
9757    echo "$ac_t""yes" 1>&6
9758    cat >> confdefs.h <<\EOF
9759#define WITH_DFS 1
9760EOF
9761
9762    ;;
9763  *)
9764    echo "$ac_t""no" 1>&6
9765    ;;
9766  esac 
9767else
9768  echo "$ac_t""no" 1>&6
9769
9770fi
9771
9772
9773#################################################
9774# check for Kerberos IV auth system
9775echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
9776echo "configure:9777: checking whether to use Kerberos IV" >&5
9777# Check whether --with-krb4 or --without-krb4 was given.
9778if test "${with_krb4+set}" = set; then
9779  withval="$with_krb4"
9780     echo "$ac_t""yes" 1>&6
9781    cat >> confdefs.h <<\EOF
9782#define KRB4_AUTH 1
9783EOF
9784
9785    echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
9786echo "configure:9787: checking for dn_expand in -lresolv" >&5
9787ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
9788if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9789  echo $ac_n "(cached) $ac_c" 1>&6
9790else
9791  ac_save_LIBS="$LIBS"
9792LIBS="-lresolv  $LIBS"
9793cat > conftest.$ac_ext <<EOF
9794#line 9795 "configure"
9795#include "confdefs.h"
9796/* Override any gcc2 internal prototype to avoid an error.  */
9797/* We use char because int might match the return type of a gcc2
9798    builtin and then its argument prototype would still apply.  */
9799char dn_expand();
9800
9801int main() {
9802dn_expand()
9803; return 0; }
9804EOF
9805if { (eval echo configure:9806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9806  rm -rf conftest*
9807  eval "ac_cv_lib_$ac_lib_var=yes"
9808else
9809  echo "configure: failed program was:" >&5
9810  cat conftest.$ac_ext >&5
9811  rm -rf conftest*
9812  eval "ac_cv_lib_$ac_lib_var=no"
9813fi
9814rm -f conftest*
9815LIBS="$ac_save_LIBS"
9816
9817fi
9818if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9819  echo "$ac_t""yes" 1>&6
9820    ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9821    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9822  cat >> confdefs.h <<EOF
9823#define $ac_tr_lib 1
9824EOF
9825
9826  LIBS="-lresolv $LIBS"
9827
9828else
9829  echo "$ac_t""no" 1>&6
9830fi
9831
9832    LIBS="$LIBS -lkrb -ldes"
9833    CFLAGS="$CFLAGS -I$withval/include"
9834    LDFLAGS="$LDFLAGS -L$withval/lib"
9835else
9836  echo "$ac_t""no" 1>&6
9837
9838fi
9839
9840
9841#################################################
9842# check for Kerberos 5 auth system
9843echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6
9844echo "configure:9845: checking whether to use Kerberos 5" >&5
9845# Check whether --with-krb5 or --without-krb5 was given.
9846if test "${with_krb5+set}" = set; then
9847  withval="$with_krb5"
9848     echo "$ac_t""yes" 1>&6
9849    cat >> confdefs.h <<\EOF
9850#define KRB5_AUTH 1
9851EOF
9852
9853    LIBS="$LIBS -ldes425 -lkrb5 -lcrypto -lcom_err"
9854    CFLAGS="$CFLAGS -I$withval/include"
9855    LDFLAGS="$LDFLAGS -L$withval/lib"
9856else
9857  echo "$ac_t""no" 1>&6
9858
9859fi
9860
9861
9862#################################################
9863# check for automount support
9864echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
9865echo "configure:9866: checking whether to use AUTOMOUNT" >&5
9866# Check whether --with-automount or --without-automount was given.
9867if test "${with_automount+set}" = set; then
9868  withval="$with_automount"
9869   case "$withval" in
9870  yes)
9871    echo "$ac_t""yes" 1>&6
9872    cat >> confdefs.h <<\EOF
9873#define WITH_AUTOMOUNT 1
9874EOF
9875
9876    ;;
9877  *)
9878    echo "$ac_t""no" 1>&6
9879    ;;
9880  esac 
9881else
9882  echo "$ac_t""no" 1>&6
9883
9884fi
9885
9886
9887#################################################
9888# check for smbmount support
9889echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
9890echo "configure:9891: checking whether to use SMBMOUNT" >&5
9891# Check whether --with-smbmount or --without-smbmount was given.
9892if test "${with_smbmount+set}" = set; then
9893  withval="$with_smbmount"
9894   case "$withval" in
9895  yes)
9896    echo "$ac_t""yes" 1>&6
9897    cat >> confdefs.h <<\EOF
9898#define WITH_SMBMOUNT 1
9899EOF
9900
9901    MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
9902    ;;
9903  *)
9904    echo "$ac_t""no" 1>&6
9905    MPROGS=
9906    ;;
9907  esac 
9908else
9909  echo "$ac_t""no" 1>&6
9910  MPROGS=
9911
9912fi
9913
9914
9915
9916#################################################
9917# check for a PAM password database
9918echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6
9919echo "configure:9920: checking whether to use PAM password database" >&5
9920# Check whether --with-pam or --without-pam was given.
9921if test "${with_pam+set}" = set; then
9922  withval="$with_pam"
9923   case "$withval" in
9924  yes)
9925    echo "$ac_t""yes" 1>&6
9926    cat >> confdefs.h <<\EOF
9927#define WITH_PAM 1
9928EOF
9929
9930    LIBS="$LIBS -lpam"
9931    ;;
9932  *)
9933    echo "$ac_t""no" 1>&6
9934    ;;
9935  esac 
9936else
9937  echo "$ac_t""no" 1>&6
9938
9939fi
9940
9941
9942
9943#################################################
9944# check for a LDAP password database
9945echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6
9946echo "configure:9947: checking whether to use LDAP password database" >&5
9947# Check whether --with-ldap or --without-ldap was given.
9948if test "${with_ldap+set}" = set; then
9949  withval="$with_ldap"
9950   case "$withval" in
9951  yes)
9952    echo "$ac_t""yes" 1>&6
9953    cat >> confdefs.h <<\EOF
9954#define WITH_LDAP 1
9955EOF
9956
9957    { echo "configure: error: LDAP password database not supported in this version." 1>&2; exit 1; }
9958    ;;
9959  *)
9960    echo "$ac_t""no" 1>&6
9961    ;;
9962  esac 
9963else
9964  echo "$ac_t""no" 1>&6
9965
9966fi
9967
9968
9969#################################################
9970# check for a NISPLUS password database
9971echo $ac_n "checking whether to use NISPLUS password database""... $ac_c" 1>&6
9972echo "configure:9973: checking whether to use NISPLUS password database" >&5
9973# Check whether --with-nisplus or --without-nisplus was given.
9974if test "${with_nisplus+set}" = set; then
9975  withval="$with_nisplus"
9976   case "$withval" in
9977  yes)
9978    echo "$ac_t""yes" 1>&6
9979    cat >> confdefs.h <<\EOF
9980#define WITH_NISPLUS 1
9981EOF
9982
9983    ;;
9984  *)
9985    echo "$ac_t""no" 1>&6
9986    ;;
9987  esac 
9988else
9989  echo "$ac_t""no" 1>&6
9990
9991fi
9992
9993
9994#################################################
9995# check for a NISPLUS_HOME support 
9996echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
9997echo "configure:9998: checking whether to use NISPLUS_HOME" >&5
9998# Check whether --with-nisplus-home or --without-nisplus-home was given.
9999if test "${with_nisplus_home+set}" = set; then
10000  withval="$with_nisplus_home"
10001   case "$withval" in
10002  yes)
10003    echo "$ac_t""yes" 1>&6
10004    cat >> confdefs.h <<\EOF
10005#define WITH_NISPLUS_HOME 1
10006EOF
10007
10008    ;;
10009  *)
10010    echo "$ac_t""no" 1>&6
10011    ;;
10012  esac 
10013else
10014  echo "$ac_t""no" 1>&6
10015
10016fi
10017
10018
10019#################################################
10020# check for the secure socket layer
10021echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
10022echo "configure:10023: checking whether to use SSL" >&5
10023# Check whether --with-ssl or --without-ssl was given.
10024if test "${with_ssl+set}" = set; then
10025  withval="$with_ssl"
10026   case "$withval" in
10027  yes)
10028    echo "$ac_t""yes" 1>&6
10029    cat >> confdefs.h <<\EOF
10030#define WITH_SSL 1
10031EOF
10032
10033    withval="/usr/local/ssl"     # default
10034
10035    if test "${with_sslinc+set}" = set; then
10036
10037	withval="$with_sslinc"
10038	case "$withval" in
10039	yes|no)
10040	  echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
10041	  CFLAGS="-I/usr/local/ssl/include $CFLAGS"
10042	  LIBS="-lssl -lcrypto $LIBS"
10043	  LDFLAGS="=L/usr/local/ssl/lib $LDFLAGS"
10044	;;
10045        * )
10046          CFLAGS="-I${withval}/include $CFLAGS"
10047	  LIBS="-lssl -lcrypto $LIBS"
10048  	  LDFLAGS="-L${withval}/lib $LDFLAGS"
10049	;;
10050	esac
10051
10052    else
10053
10054	CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
10055	LIBS="-lssl -lcrypto $LIBS"
10056	LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
10057
10058    fi
10059
10060    if test ! -d ${withval}; then
10061      echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
10062      exit 1
10063    fi 
10064
10065    CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
10066
10067    ;;
10068  *)
10069    echo "$ac_t""no" 1>&6
10070    ;;
10071  esac 
10072else
10073  echo "$ac_t""no" 1>&6
10074
10075fi
10076
10077
10078#################################################
10079# check for syslog logging
10080echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
10081echo "configure:10082: checking whether to use syslog logging" >&5
10082# Check whether --with-syslog or --without-syslog was given.
10083if test "${with_syslog+set}" = set; then
10084  withval="$with_syslog"
10085   case "$withval" in
10086  yes)
10087    echo "$ac_t""yes" 1>&6
10088    cat >> confdefs.h <<\EOF
10089#define WITH_SYSLOG 1
10090EOF
10091
10092    ;;
10093  *)
10094    echo "$ac_t""no" 1>&6
10095    ;;
10096  esac 
10097else
10098  echo "$ac_t""no" 1>&6
10099
10100fi
10101
10102
10103#################################################
10104# check for a shared memory profiling support
10105echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
10106echo "configure:10107: checking whether to use profiling" >&5
10107# Check whether --with-profile or --without-profile was given.
10108if test "${with_profile+set}" = set; then
10109  withval="$with_profile"
10110   case "$withval" in
10111  yes)
10112    echo "$ac_t""yes" 1>&6
10113    cat >> confdefs.h <<\EOF
10114#define WITH_PROFILE 1
10115EOF
10116
10117    ;;
10118  *)
10119    echo "$ac_t""no" 1>&6
10120    ;;
10121  esac 
10122else
10123  echo "$ac_t""no" 1>&6
10124
10125fi
10126
10127
10128
10129#################################################
10130# check for experimental netatalk resource fork support
10131echo $ac_n "checking whether to support netatalk""... $ac_c" 1>&6
10132echo "configure:10133: checking whether to support netatalk" >&5
10133# Check whether --with-netatalk or --without-netatalk was given.
10134if test "${with_netatalk+set}" = set; then
10135  withval="$with_netatalk"
10136   case "$withval" in
10137  yes)
10138    echo "$ac_t""yes" 1>&6
10139    cat >> confdefs.h <<\EOF
10140#define WITH_NETATALK 1
10141EOF
10142
10143    ;;
10144  *)
10145    echo "$ac_t""no" 1>&6
10146    ;;
10147  esac 
10148else
10149  echo "$ac_t""no" 1>&6
10150
10151fi
10152
10153
10154#################################################
10155# check for experimental disk-quotas support
10156QUOTAOBJS=noquotas.o
10157
10158echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
10159echo "configure:10160: checking whether to support disk-quotas" >&5
10160# Check whether --with-quotas or --without-quotas was given.
10161if test "${with_quotas+set}" = set; then
10162  withval="$with_quotas"
10163   case "$withval" in
10164  yes)
10165    echo "$ac_t""yes" 1>&6
10166    QUOTAOBJS=quotas.o
10167    ;;
10168  *)
10169    echo "$ac_t""no" 1>&6
10170    ;;
10171  esac 
10172else
10173  echo "$ac_t""no" 1>&6
10174
10175fi
10176
10177
10178
10179#################################################
10180# check for experimental utmp accounting
10181
10182echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
10183echo "configure:10184: checking whether to support utmp accounting" >&5
10184# Check whether --with-utmp or --without-utmp was given.
10185if test "${with_utmp+set}" = set; then
10186  withval="$with_utmp"
10187   case "$withval" in
10188  yes)
10189    echo "$ac_t""yes" 1>&6
10190    cat >> confdefs.h <<\EOF
10191#define WITH_UTMP 1
10192EOF
10193
10194    ;;
10195  *)
10196    echo "$ac_t""no" 1>&6
10197    ;;
10198  esac 
10199else
10200  echo "$ac_t""no" 1>&6
10201
10202fi
10203
10204
10205#################################################
10206# set private directory location
10207# Check whether --with-privatedir or --without-privatedir was given.
10208if test "${with_privatedir+set}" = set; then
10209  withval="$with_privatedir"
10210   case "$withval" in
10211  yes|no)
10212  #
10213  # Just in case anybody calls it without argument
10214  #
10215    echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
10216    privatedir='${prefix}/private'
10217  ;;
10218  * )
10219    privatedir="$withval"
10220    ;;
10221  esac
10222  
10223else
10224  privatedir='${prefix}/private'
10225   
10226
10227fi
10228
10229
10230#################################################
10231# set lock directory location
10232# Check whether --with-lockdir or --without-lockdir was given.
10233if test "${with_lockdir+set}" = set; then
10234  withval="$with_lockdir"
10235   case "$withval" in
10236  yes|no)
10237  #
10238  # Just in case anybody calls it without argument
10239  #
10240    echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
10241    lockdir='$(VARDIR)/locks'
10242  ;;
10243  * )
10244    lockdir="$withval"
10245    ;;
10246  esac
10247  
10248else
10249  lockdir='$(VARDIR)/locks'
10250   
10251
10252fi
10253
10254
10255#################################################
10256# set SWAT directory location
10257# Check whether --with-swatdir or --without-swatdir was given.
10258if test "${with_swatdir+set}" = set; then
10259  withval="$with_swatdir"
10260   case "$withval" in
10261  yes|no)
10262  #
10263  # Just in case anybody does it
10264  #
10265    echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
10266    swatdir='${prefix}/swat'
10267  ;;
10268  * )
10269    swatdir="$withval"
10270    ;;
10271  esac
10272  
10273else
10274  swatdir='${prefix}/swat'
10275   
10276
10277fi
10278
10279
10280################################################
10281# include Using Samba O'Reilly book
10282echo $ac_n "checking whether to install Using Samba book""... $ac_c" 1>&6
10283echo "configure:10284: checking whether to install Using Samba book" >&5
10284# Check whether --with-sambabook or --without-sambabook was given.
10285if test "${with_sambabook+set}" = set; then
10286  withval="$with_sambabook"
10287   case "$withval" in
10288  yes)
10289    echo "configure: warning: --with-sambabook called without argument - will use default" 1>&2
10290    sambabook="${prefix}/swat/using_samba"
10291    echo "$ac_t""install in $sambabook" 1>&6
10292  ;;
10293  no)
10294    echo "$ac_t""no" 1>&6
10295  ;;
10296  *)
10297    echo "$ac_t""install in $withval" 1>&6
10298    sambabook="$withval"
10299    ;;
10300  esac
10301  
10302else
10303  sambabook='${prefix}/swat/using_samba'
10304   
10305   echo "$ac_t""$sambabook" 1>&6
10306
10307fi
10308
10309
10310#################################################
10311# these tests are taken from the GNU fileutils package
10312echo "checking how to get filesystem space usage" 1>&6
10313echo "configure:10314: checking how to get filesystem space usage" >&5
10314space=no
10315
10316# Test for statvfs64.
10317if test $space = no; then
10318  # SVR4
10319  echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
10320echo "configure:10321: checking statvfs64 function (SVR4)" >&5
10321if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
10322  echo $ac_n "(cached) $ac_c" 1>&6
10323else
10324  if test "$cross_compiling" = yes; then
10325  fu_cv_sys_stat_statvfs64=cross
10326else
10327  cat > conftest.$ac_ext <<EOF
10328#line 10329 "configure"
10329#include "confdefs.h"
10330
10331#if defined(HAVE_UNISTD_H)
10332#include <unistd.h>
10333#endif
10334#include <sys/types.h>
10335#include <sys/statvfs.h>
10336  main ()
10337  {
10338    struct statvfs64 fsd;
10339    exit (statvfs64 (".", &fsd));
10340  }
10341EOF
10342if { (eval echo configure:10343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10343then
10344  fu_cv_sys_stat_statvfs64=yes
10345else
10346  echo "configure: failed program was:" >&5
10347  cat conftest.$ac_ext >&5
10348  rm -fr conftest*
10349  fu_cv_sys_stat_statvfs64=no
10350fi
10351rm -fr conftest*
10352fi
10353
10354fi
10355
10356echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
10357  if test $fu_cv_sys_stat_statvfs64 = yes; then
10358    space=yes
10359    cat >> confdefs.h <<\EOF
10360#define STAT_STATVFS64 1
10361EOF
10362
10363  fi
10364fi
10365
10366# Perform only the link test since it seems there are no variants of the
10367# statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
10368# because that got a false positive on SCO OSR5.  Adding the declaration
10369# of a `struct statvfs' causes this test to fail (as it should) on such
10370# systems.  That system is reported to work fine with STAT_STATFS4 which
10371# is what it gets when this test fails.
10372if test $space = no; then
10373  # SVR4
10374  echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
10375echo "configure:10376: checking statvfs function (SVR4)" >&5
10376if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
10377  echo $ac_n "(cached) $ac_c" 1>&6
10378else
10379  cat > conftest.$ac_ext <<EOF
10380#line 10381 "configure"
10381#include "confdefs.h"
10382#include <sys/types.h>
10383#include <sys/statvfs.h>
10384int main() {
10385struct statvfs fsd; statvfs (0, &fsd);
10386; return 0; }
10387EOF
10388if { (eval echo configure:10389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10389  rm -rf conftest*
10390  fu_cv_sys_stat_statvfs=yes
10391else
10392  echo "configure: failed program was:" >&5
10393  cat conftest.$ac_ext >&5
10394  rm -rf conftest*
10395  fu_cv_sys_stat_statvfs=no
10396fi
10397rm -f conftest*
10398fi
10399
10400echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
10401  if test $fu_cv_sys_stat_statvfs = yes; then
10402    space=yes
10403    cat >> confdefs.h <<\EOF
10404#define STAT_STATVFS 1
10405EOF
10406
10407  fi
10408fi
10409
10410if test $space = no; then
10411  # DEC Alpha running OSF/1
10412  echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
10413echo "configure:10414: checking for 3-argument statfs function (DEC OSF/1)" >&5
10414  if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
10415  echo $ac_n "(cached) $ac_c" 1>&6
10416else
10417  if test "$cross_compiling" = yes; then
10418  fu_cv_sys_stat_statfs3_osf1=no
10419else
10420  cat > conftest.$ac_ext <<EOF
10421#line 10422 "configure"
10422#include "confdefs.h"
10423
10424#include <sys/param.h>
10425#include <sys/types.h>
10426#include <sys/mount.h>
10427  main ()
10428  {
10429    struct statfs fsd;
10430    fsd.f_fsize = 0;
10431    exit (statfs (".", &fsd, sizeof (struct statfs)));
10432  }
10433EOF
10434if { (eval echo configure:10435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10435then
10436  fu_cv_sys_stat_statfs3_osf1=yes
10437else
10438  echo "configure: failed program was:" >&5
10439  cat conftest.$ac_ext >&5
10440  rm -fr conftest*
10441  fu_cv_sys_stat_statfs3_osf1=no
10442fi
10443rm -fr conftest*
10444fi
10445
10446fi
10447
10448  echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
10449  if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
10450    space=yes
10451    cat >> confdefs.h <<\EOF
10452#define STAT_STATFS3_OSF1 1
10453EOF
10454
10455  fi
10456fi
10457
10458if test $space = no; then
10459# AIX
10460  echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
10461echo "configure:10462: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
10462  if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
10463  echo $ac_n "(cached) $ac_c" 1>&6
10464else
10465  if test "$cross_compiling" = yes; then
10466  fu_cv_sys_stat_statfs2_bsize=no
10467else
10468  cat > conftest.$ac_ext <<EOF
10469#line 10470 "configure"
10470#include "confdefs.h"
10471
10472#ifdef HAVE_SYS_PARAM_H
10473#include <sys/param.h>
10474#endif
10475#ifdef HAVE_SYS_MOUNT_H
10476#include <sys/mount.h>
10477#endif
10478#ifdef HAVE_SYS_VFS_H
10479#include <sys/vfs.h>
10480#endif
10481  main ()
10482  {
10483  struct statfs fsd;
10484  fsd.f_bsize = 0;
10485  exit (statfs (".", &fsd));
10486  }
10487EOF
10488if { (eval echo configure:10489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10489then
10490  fu_cv_sys_stat_statfs2_bsize=yes
10491else
10492  echo "configure: failed program was:" >&5
10493  cat conftest.$ac_ext >&5
10494  rm -fr conftest*
10495  fu_cv_sys_stat_statfs2_bsize=no
10496fi
10497rm -fr conftest*
10498fi
10499
10500fi
10501
10502  echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
10503  if test $fu_cv_sys_stat_statfs2_bsize = yes; then
10504    space=yes
10505    cat >> confdefs.h <<\EOF
10506#define STAT_STATFS2_BSIZE 1
10507EOF
10508
10509  fi
10510fi
10511
10512if test $space = no; then
10513# SVR3
10514  echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
10515echo "configure:10516: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
10516  if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
10517  echo $ac_n "(cached) $ac_c" 1>&6
10518else
10519  if test "$cross_compiling" = yes; then
10520  fu_cv_sys_stat_statfs4=no
10521else
10522  cat > conftest.$ac_ext <<EOF
10523#line 10524 "configure"
10524#include "confdefs.h"
10525#include <sys/types.h>
10526#include <sys/statfs.h>
10527  main ()
10528  {
10529  struct statfs fsd;
10530  exit (statfs (".", &fsd, sizeof fsd, 0));
10531  }
10532EOF
10533if { (eval echo configure:10534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10534then
10535  fu_cv_sys_stat_statfs4=yes
10536else
10537  echo "configure: failed program was:" >&5
10538  cat conftest.$ac_ext >&5
10539  rm -fr conftest*
10540  fu_cv_sys_stat_statfs4=no
10541fi
10542rm -fr conftest*
10543fi
10544
10545fi
10546
10547  echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
10548  if test $fu_cv_sys_stat_statfs4 = yes; then
10549    space=yes
10550    cat >> confdefs.h <<\EOF
10551#define STAT_STATFS4 1
10552EOF
10553
10554  fi
10555fi
10556
10557if test $space = no; then
10558# 4.4BSD and NetBSD
10559  echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
10560echo "configure:10561: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
10561  if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
10562  echo $ac_n "(cached) $ac_c" 1>&6
10563else
10564  if test "$cross_compiling" = yes; then
10565  fu_cv_sys_stat_statfs2_fsize=no
10566else
10567  cat > conftest.$ac_ext <<EOF
10568#line 10569 "configure"
10569#include "confdefs.h"
10570#include <sys/types.h>
10571#ifdef HAVE_SYS_PARAM_H
10572#include <sys/param.h>
10573#endif
10574#ifdef HAVE_SYS_MOUNT_H
10575#include <sys/mount.h>
10576#endif
10577  main ()
10578  {
10579  struct statfs fsd;
10580  fsd.f_fsize = 0;
10581  exit (statfs (".", &fsd));
10582  }
10583EOF
10584if { (eval echo configure:10585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10585then
10586  fu_cv_sys_stat_statfs2_fsize=yes
10587else
10588  echo "configure: failed program was:" >&5
10589  cat conftest.$ac_ext >&5
10590  rm -fr conftest*
10591  fu_cv_sys_stat_statfs2_fsize=no
10592fi
10593rm -fr conftest*
10594fi
10595
10596fi
10597
10598  echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
10599  if test $fu_cv_sys_stat_statfs2_fsize = yes; then
10600    space=yes
10601    cat >> confdefs.h <<\EOF
10602#define STAT_STATFS2_FSIZE 1
10603EOF
10604
10605  fi
10606fi
10607
10608if test $space = no; then
10609  # Ultrix
10610  echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
10611echo "configure:10612: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
10612  if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
10613  echo $ac_n "(cached) $ac_c" 1>&6
10614else
10615  if test "$cross_compiling" = yes; then
10616  fu_cv_sys_stat_fs_data=no
10617else
10618  cat > conftest.$ac_ext <<EOF
10619#line 10620 "configure"
10620#include "confdefs.h"
10621#include <sys/types.h>
10622#ifdef HAVE_SYS_PARAM_H
10623#include <sys/param.h>
10624#endif
10625#ifdef HAVE_SYS_MOUNT_H
10626#include <sys/mount.h>
10627#endif
10628#ifdef HAVE_SYS_FS_TYPES_H
10629#include <sys/fs_types.h>
10630#endif
10631  main ()
10632  {
10633  struct fs_data fsd;
10634  /* Ultrix's statfs returns 1 for success,
10635     0 for not mounted, -1 for failure.  */
10636  exit (statfs (".", &fsd) != 1);
10637  }
10638EOF
10639if { (eval echo configure:10640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10640then
10641  fu_cv_sys_stat_fs_data=yes
10642else
10643  echo "configure: failed program was:" >&5
10644  cat conftest.$ac_ext >&5
10645  rm -fr conftest*
10646  fu_cv_sys_stat_fs_data=no
10647fi
10648rm -fr conftest*
10649fi
10650
10651fi
10652
10653  echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
10654  if test $fu_cv_sys_stat_fs_data = yes; then
10655    space=yes
10656    cat >> confdefs.h <<\EOF
10657#define STAT_STATFS2_FS_DATA 1
10658EOF
10659
10660  fi
10661fi
10662
10663#
10664# As a gating factor for large file support, in order to
10665# use <4GB files we must have the following minimal support
10666# available.
10667# long long, and a 64 bit off_t or off64_t.
10668# If we don't have all of these then disable large
10669# file support.
10670#
10671echo "checking if large file support can be enabled"
10672cat > conftest.$ac_ext <<EOF
10673#line 10674 "configure"
10674#include "confdefs.h"
10675
10676#if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
10677#include <sys/types.h>
10678#else
10679__COMPILE_ERROR_
10680#endif
10681
10682int main() {
10683int i
10684; return 0; }
10685EOF
10686if { (eval echo configure:10687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10687  rm -rf conftest*
10688  samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
10689else
10690  echo "configure: failed program was:" >&5
10691  cat conftest.$ac_ext >&5
10692  rm -rf conftest*
10693  samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
10694fi
10695rm -f conftest*
10696if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
10697    echo "yes"
10698    cat >> confdefs.h <<\EOF
10699#define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
10700EOF
10701
10702else
10703    echo "no"
10704fi
10705
10706echo "checking configure summary"
10707if test "$cross_compiling" = yes; then
10708  :
10709else
10710  cat > conftest.$ac_ext <<EOF
10711#line 10712 "configure"
10712#include "confdefs.h"
10713#include "${srcdir-.}/tests/summary.c"
10714EOF
10715if { (eval echo configure:10716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10716then
10717  echo "configure OK";
10718else
10719  echo "configure: failed program was:" >&5
10720  cat conftest.$ac_ext >&5
10721  rm -fr conftest*
10722  { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
10723fi
10724rm -fr conftest*
10725fi
10726
10727
10728builddir=`pwd`
10729
10730
10731trap '' 1 2 15
10732cat > confcache <<\EOF
10733# This file is a shell script that caches the results of configure
10734# tests run on this system so they can be shared between configure
10735# scripts and configure runs.  It is not useful on other systems.
10736# If it contains results you don't want to keep, you may remove or edit it.
10737#
10738# By default, configure uses ./config.cache as the cache file,
10739# creating it if it does not exist already.  You can give configure
10740# the --cache-file=FILE option to use a different cache file; that is
10741# what configure does when it calls configure scripts in
10742# subdirectories, so they share the cache.
10743# Giving --cache-file=/dev/null disables caching, for debugging configure.
10744# config.status only pays attention to the cache file if you give it the
10745# --recheck option to rerun configure.
10746#
10747EOF
10748# The following way of writing the cache mishandles newlines in values,
10749# but we know of no workaround that is simple, portable, and efficient.
10750# So, don't put newlines in cache variables' values.
10751# Ultrix sh set writes to stderr and can't be redirected directly,
10752# and sets the high bit in the cache file unless we assign to the vars.
10753(set) 2>&1 |
10754  case `(ac_space=' '; set | grep ac_space) 2>&1` in
10755  *ac_space=\ *)
10756    # `set' does not quote correctly, so add quotes (double-quote substitution
10757    # turns \\\\ into \\, and sed turns \\ into \).
10758    sed -n \
10759      -e "s/'/'\\\\''/g" \
10760      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10761    ;;
10762  *)
10763    # `set' quotes correctly as required by POSIX, so do not add quotes.
10764    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10765    ;;
10766  esac >> confcache
10767if cmp -s $cache_file confcache; then
10768  :
10769else
10770  if test -w $cache_file; then
10771    echo "updating cache $cache_file"
10772    cat confcache > $cache_file
10773  else
10774    echo "not updating unwritable cache $cache_file"
10775  fi
10776fi
10777rm -f confcache
10778
10779trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10780
10781test "x$prefix" = xNONE && prefix=$ac_default_prefix
10782# Let make expand exec_prefix.
10783test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10784
10785# Any assignment to VPATH causes Sun make to only execute
10786# the first set of double-colon rules, so remove it if not needed.
10787# If there is a colon in the path, we need to keep it.
10788if test "x$srcdir" = x.; then
10789  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
10790fi
10791
10792trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10793
10794DEFS=-DHAVE_CONFIG_H
10795
10796# Without the "./", some shells look in PATH for config.status.
10797: ${CONFIG_STATUS=./config.status}
10798
10799echo creating $CONFIG_STATUS
10800rm -f $CONFIG_STATUS
10801cat > $CONFIG_STATUS <<EOF
10802#! /bin/sh
10803# Generated automatically by configure.
10804# Run this file to recreate the current configuration.
10805# This directory was configured as follows,
10806# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10807#
10808# $0 $ac_configure_args
10809#
10810# Compiler output produced by configure, useful for debugging
10811# configure, is in ./config.log if it exists.
10812
10813ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10814for ac_option
10815do
10816  case "\$ac_option" in
10817  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10818    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10819    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10820  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10821    echo "$CONFIG_STATUS generated by autoconf version 2.13"
10822    exit 0 ;;
10823  -help | --help | --hel | --he | --h)
10824    echo "\$ac_cs_usage"; exit 0 ;;
10825  *) echo "\$ac_cs_usage"; exit 1 ;;
10826  esac
10827done
10828
10829ac_given_srcdir=$srcdir
10830ac_given_INSTALL="$INSTALL"
10831
10832trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
10833EOF
10834cat >> $CONFIG_STATUS <<EOF
10835
10836# Protect against being on the right side of a sed subst in config.status.
10837sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10838 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10839$ac_vpsub
10840$extrasub
10841s%@SHELL@%$SHELL%g
10842s%@CFLAGS@%$CFLAGS%g
10843s%@CPPFLAGS@%$CPPFLAGS%g
10844s%@CXXFLAGS@%$CXXFLAGS%g
10845s%@FFLAGS@%$FFLAGS%g
10846s%@DEFS@%$DEFS%g
10847s%@LDFLAGS@%$LDFLAGS%g
10848s%@LIBS@%$LIBS%g
10849s%@exec_prefix@%$exec_prefix%g
10850s%@prefix@%$prefix%g
10851s%@program_transform_name@%$program_transform_name%g
10852s%@bindir@%$bindir%g
10853s%@sbindir@%$sbindir%g
10854s%@libexecdir@%$libexecdir%g
10855s%@datadir@%$datadir%g
10856s%@sysconfdir@%$sysconfdir%g
10857s%@sharedstatedir@%$sharedstatedir%g
10858s%@localstatedir@%$localstatedir%g
10859s%@libdir@%$libdir%g
10860s%@includedir@%$includedir%g
10861s%@oldincludedir@%$oldincludedir%g
10862s%@infodir@%$infodir%g
10863s%@mandir@%$mandir%g
10864s%@RUNPROG@%$RUNPROG%g
10865s%@MPROGS@%$MPROGS%g
10866s%@LDSHFLAGS@%$LDSHFLAGS%g
10867s%@HOST_OS@%$HOST_OS%g
10868s%@WRAP@%$WRAP%g
10869s%@WRAP32@%$WRAP32%g
10870s%@PICFLAG@%$PICFLAG%g
10871s%@SHLIBEXT@%$SHLIBEXT%g
10872s%@CC@%$CC%g
10873s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10874s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10875s%@INSTALL_DATA@%$INSTALL_DATA%g
10876s%@AWK@%$AWK%g
10877s%@BROKEN_CC@%$BROKEN_CC%g
10878s%@host@%$host%g
10879s%@host_alias@%$host_alias%g
10880s%@host_cpu@%$host_cpu%g
10881s%@host_vendor@%$host_vendor%g
10882s%@host_os@%$host_os%g
10883s%@target@%$target%g
10884s%@target_alias@%$target_alias%g
10885s%@target_cpu@%$target_cpu%g
10886s%@target_vendor@%$target_vendor%g
10887s%@target_os@%$target_os%g
10888s%@build@%$build%g
10889s%@build_alias@%$build_alias%g
10890s%@build_cpu@%$build_cpu%g
10891s%@build_vendor@%$build_vendor%g
10892s%@build_os@%$build_os%g
10893s%@MAINT@%$MAINT%g
10894s%@AUTOCONF@%$AUTOCONF%g
10895s%@AUTOHEADER@%$AUTOHEADER%g
10896s%@CPP@%$CPP%g
10897s%@LIBOBJS@%$LIBOBJS%g
10898s%@ROFF@%$ROFF%g
10899s%@QUOTAOBJS@%$QUOTAOBJS%g
10900s%@privatedir@%$privatedir%g
10901s%@lockdir@%$lockdir%g
10902s%@swatdir@%$swatdir%g
10903s%@sambabook@%$sambabook%g
10904s%@builddir@%$builddir%g
10905
10906CEOF
10907EOF
10908
10909cat >> $CONFIG_STATUS <<\EOF
10910
10911# Split the substitutions into bite-sized pieces for seds with
10912# small command number limits, like on Digital OSF/1 and HP-UX.
10913ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
10914ac_file=1 # Number of current file.
10915ac_beg=1 # First line for current file.
10916ac_end=$ac_max_sed_cmds # Line after last line for current file.
10917ac_more_lines=:
10918ac_sed_cmds=""
10919while $ac_more_lines; do
10920  if test $ac_beg -gt 1; then
10921    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10922  else
10923    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10924  fi
10925  if test ! -s conftest.s$ac_file; then
10926    ac_more_lines=false
10927    rm -f conftest.s$ac_file
10928  else
10929    if test -z "$ac_sed_cmds"; then
10930      ac_sed_cmds="sed -f conftest.s$ac_file"
10931    else
10932      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10933    fi
10934    ac_file=`expr $ac_file + 1`
10935    ac_beg=$ac_end
10936    ac_end=`expr $ac_end + $ac_max_sed_cmds`
10937  fi
10938done
10939if test -z "$ac_sed_cmds"; then
10940  ac_sed_cmds=cat
10941fi
10942EOF
10943
10944cat >> $CONFIG_STATUS <<EOF
10945
10946CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
10947EOF
10948cat >> $CONFIG_STATUS <<\EOF
10949for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
10950  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10951  case "$ac_file" in
10952  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10953       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10954  *) ac_file_in="${ac_file}.in" ;;
10955  esac
10956
10957  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
10958
10959  # Remove last slash and all that follows it.  Not all systems have dirname.
10960  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10961  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10962    # The file is in a subdirectory.
10963    test ! -d "$ac_dir" && mkdir "$ac_dir"
10964    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
10965    # A "../" for each directory in $ac_dir_suffix.
10966    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
10967  else
10968    ac_dir_suffix= ac_dots=
10969  fi
10970
10971  case "$ac_given_srcdir" in
10972  .)  srcdir=.
10973      if test -z "$ac_dots"; then top_srcdir=.
10974      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
10975  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
10976  *) # Relative path.
10977    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
10978    top_srcdir="$ac_dots$ac_given_srcdir" ;;
10979  esac
10980
10981  case "$ac_given_INSTALL" in
10982  [/$]*) INSTALL="$ac_given_INSTALL" ;;
10983  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10984  esac
10985
10986  echo creating "$ac_file"
10987  rm -f "$ac_file"
10988  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
10989  case "$ac_file" in
10990  *Makefile*) ac_comsub="1i\\
10991# $configure_input" ;;
10992  *) ac_comsub= ;;
10993  esac
10994
10995  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10996  sed -e "$ac_comsub
10997s%@configure_input@%$configure_input%g
10998s%@srcdir@%$srcdir%g
10999s%@top_srcdir@%$top_srcdir%g
11000s%@INSTALL@%$INSTALL%g
11001" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11002fi; done
11003rm -f conftest.s*
11004
11005# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11006# NAME is the cpp macro being defined and VALUE is the value it is being given.
11007#
11008# ac_d sets the value in "#define NAME VALUE" lines.
11009ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
11010ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
11011ac_dC='\3'
11012ac_dD='%g'
11013# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11014ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
11015ac_uB='\([ 	]\)%\1#\2define\3'
11016ac_uC=' '
11017ac_uD='\4%g'
11018# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11019ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
11020ac_eB='$%\1#\2define\3'
11021ac_eC=' '
11022ac_eD='%g'
11023
11024if test "${CONFIG_HEADERS+set}" != set; then
11025EOF
11026cat >> $CONFIG_STATUS <<EOF
11027  CONFIG_HEADERS="include/config.h"
11028EOF
11029cat >> $CONFIG_STATUS <<\EOF
11030fi
11031for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11032  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11033  case "$ac_file" in
11034  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11035       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11036  *) ac_file_in="${ac_file}.in" ;;
11037  esac
11038
11039  echo creating $ac_file
11040
11041  rm -f conftest.frag conftest.in conftest.out
11042  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11043  cat $ac_file_inputs > conftest.in
11044
11045EOF
11046
11047# Transform confdefs.h into a sed script conftest.vals that substitutes
11048# the proper values into config.h.in to produce config.h.  And first:
11049# Protect against being on the right side of a sed subst in config.status.
11050# Protect against being in an unquoted here document in config.status.
11051rm -f conftest.vals
11052cat > conftest.hdr <<\EOF
11053s/[\\&%]/\\&/g
11054s%[\\$`]%\\&%g
11055s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11056s%ac_d%ac_u%gp
11057s%ac_u%ac_e%gp
11058EOF
11059sed -n -f conftest.hdr confdefs.h > conftest.vals
11060rm -f conftest.hdr
11061
11062# This sed command replaces #undef with comments.  This is necessary, for
11063# example, in the case of _POSIX_SOURCE, which is predefined and required
11064# on some systems where configure will not decide to define it.
11065cat >> conftest.vals <<\EOF
11066s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11067EOF
11068
11069# Break up conftest.vals because some shells have a limit on
11070# the size of here documents, and old seds have small limits too.
11071
11072rm -f conftest.tail
11073while :
11074do
11075  ac_lines=`grep -c . conftest.vals`
11076  # grep -c gives empty output for an empty file on some AIX systems.
11077  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11078  # Write a limited-size here document to conftest.frag.
11079  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11080  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11081  echo 'CEOF
11082  sed -f conftest.frag conftest.in > conftest.out
11083  rm -f conftest.in
11084  mv conftest.out conftest.in
11085' >> $CONFIG_STATUS
11086  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11087  rm -f conftest.vals
11088  mv conftest.tail conftest.vals
11089done
11090rm -f conftest.vals
11091
11092cat >> $CONFIG_STATUS <<\EOF
11093  rm -f conftest.frag conftest.h
11094  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
11095  cat conftest.in >> conftest.h
11096  rm -f conftest.in
11097  if cmp -s $ac_file conftest.h 2>/dev/null; then
11098    echo "$ac_file is unchanged"
11099    rm -f conftest.h
11100  else
11101    # Remove last slash and all that follows it.  Not all systems have dirname.
11102      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11103      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11104      # The file is in a subdirectory.
11105      test ! -d "$ac_dir" && mkdir "$ac_dir"
11106    fi
11107    rm -f $ac_file
11108    mv conftest.h $ac_file
11109  fi
11110fi; done
11111
11112EOF
11113cat >> $CONFIG_STATUS <<EOF
11114
11115EOF
11116cat >> $CONFIG_STATUS <<\EOF
11117
11118exit 0
11119EOF
11120chmod +x $CONFIG_STATUS
11121rm -fr confdefs* $ac_clean_files
11122test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11123
11124