merges from 2.2
[ira/wip.git] / source3 / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/samba
15 ac_help="$ac_help
16   --enable-debug        turn on debugging [default=no]"
17 ac_help="$ac_help
18   --with-readline[=DIR]   Look for readline include/libs in DIR (default=auto) "
19 ac_help="$ac_help
20   --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) "
21 ac_help="$ac_help
22   --with-smbwrapper       Include SMB wrapper support (default=no) "
23 ac_help="$ac_help
24   --with-afs              Include AFS support (default=no) "
25 ac_help="$ac_help
26   --with-dce-dfs          Include DCE/DFS support (default=no)"
27 ac_help="$ac_help
28   --with-krb4=base-dir    Include Kerberos IV support (default=no)"
29 ac_help="$ac_help
30   --with-krb5=base-dir    Include Kerberos 5 support (default=no)"
31 ac_help="$ac_help
32   --with-automount        Include AUTOMOUNT support (default=no)"
33 ac_help="$ac_help
34   --with-smbmount         Include SMBMOUNT (Linux only) support (default=no)"
35 ac_help="$ac_help
36   --with-pam              Include PAM password database support (default=no)"
37 ac_help="$ac_help
38   --with-pam_smbpass      Build a PAM module to allow other applications to use our smbpasswd file (default=no)"
39 ac_help="$ac_help
40   --with-tdbsam           Include experimental TDB password database (default=no)"
41 ac_help="$ac_help
42   --with-ldapsam          Include Experimental LDAP-Sam support (default=no)"
43 ac_help="$ac_help
44   --with-nisplus-home     Include NISPLUS_HOME support (default=no)"
45 ac_help="$ac_help
46   --with-ssl              Include SSL support (default=no)
47   --with-sslinc=DIR       Where the SSL includes are (defaults to /usr/local/ssl)"
48 ac_help="$ac_help
49   --with-syslog           Include experimental SYSLOG support (default=no)"
50 ac_help="$ac_help
51   --with-profiling-data   Include gathering source code profile information (default=no)"
52 ac_help="$ac_help
53   --with-quotas           Include experimental disk-quota support (default=no)"
54 ac_help="$ac_help
55   --with-utmp             Include experimental utmp accounting (default=no)"
56 ac_help="$ac_help
57   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
58 ac_help="$ac_help
59   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
60 ac_help="$ac_help
61   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
62 ac_help="$ac_help
63   --with-spinlocks        Use spin locks instead of fcntl locks (default=no) "
64 ac_help="$ac_help
65   --with-acl-support      Include ACL support (default=no)"
66 ac_help="$ac_help
67   --with-winbind          Build winbind (default, if supported by OS)"
68
69 # Initialize some variables set by options.
70 # The variables have the same names as the options, with
71 # dashes changed to underlines.
72 build=NONE
73 cache_file=./config.cache
74 exec_prefix=NONE
75 host=NONE
76 no_create=
77 nonopt=NONE
78 no_recursion=
79 prefix=NONE
80 program_prefix=NONE
81 program_suffix=NONE
82 program_transform_name=s,x,x,
83 silent=
84 site=
85 srcdir=
86 target=NONE
87 verbose=
88 x_includes=NONE
89 x_libraries=NONE
90 bindir='${exec_prefix}/bin'
91 sbindir='${exec_prefix}/sbin'
92 libexecdir='${exec_prefix}/libexec'
93 datadir='${prefix}/share'
94 sysconfdir='${prefix}/etc'
95 sharedstatedir='${prefix}/com'
96 localstatedir='${prefix}/var'
97 libdir='${exec_prefix}/lib'
98 includedir='${prefix}/include'
99 oldincludedir='/usr/include'
100 infodir='${prefix}/info'
101 mandir='${prefix}/man'
102
103 # Initialize some other variables.
104 subdirs=
105 MFLAGS= MAKEFLAGS=
106 SHELL=${CONFIG_SHELL-/bin/sh}
107 # Maximum number of lines to put in a shell here document.
108 ac_max_here_lines=12
109
110 ac_prev=
111 for ac_option
112 do
113
114   # If the previous option needs an argument, assign it.
115   if test -n "$ac_prev"; then
116     eval "$ac_prev=\$ac_option"
117     ac_prev=
118     continue
119   fi
120
121   case "$ac_option" in
122   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
123   *) ac_optarg= ;;
124   esac
125
126   # Accept the important Cygnus configure options, so we can diagnose typos.
127
128   case "$ac_option" in
129
130   -bindir | --bindir | --bindi | --bind | --bin | --bi)
131     ac_prev=bindir ;;
132   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
133     bindir="$ac_optarg" ;;
134
135   -build | --build | --buil | --bui | --bu)
136     ac_prev=build ;;
137   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
138     build="$ac_optarg" ;;
139
140   -cache-file | --cache-file | --cache-fil | --cache-fi \
141   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
142     ac_prev=cache_file ;;
143   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
144   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
145     cache_file="$ac_optarg" ;;
146
147   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
148     ac_prev=datadir ;;
149   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
150   | --da=*)
151     datadir="$ac_optarg" ;;
152
153   -disable-* | --disable-*)
154     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
155     # Reject names that are not valid shell variable names.
156     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
157       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
158     fi
159     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
160     eval "enable_${ac_feature}=no" ;;
161
162   -enable-* | --enable-*)
163     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
164     # Reject names that are not valid shell variable names.
165     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
166       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
167     fi
168     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
169     case "$ac_option" in
170       *=*) ;;
171       *) ac_optarg=yes ;;
172     esac
173     eval "enable_${ac_feature}='$ac_optarg'" ;;
174
175   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
176   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
177   | --exec | --exe | --ex)
178     ac_prev=exec_prefix ;;
179   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
180   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
181   | --exec=* | --exe=* | --ex=*)
182     exec_prefix="$ac_optarg" ;;
183
184   -gas | --gas | --ga | --g)
185     # Obsolete; use --with-gas.
186     with_gas=yes ;;
187
188   -help | --help | --hel | --he)
189     # Omit some internal or obsolete options to make the list less imposing.
190     # This message is too long to be a string in the A/UX 3.1 sh.
191     cat << EOF
192 Usage: configure [options] [host]
193 Options: [defaults in brackets after descriptions]
194 Configuration:
195   --cache-file=FILE       cache test results in FILE
196   --help                  print this message
197   --no-create             do not create output files
198   --quiet, --silent       do not print \`checking...' messages
199   --version               print the version of autoconf that created configure
200 Directory and file names:
201   --prefix=PREFIX         install architecture-independent files in PREFIX
202                           [$ac_default_prefix]
203   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
204                           [same as prefix]
205   --bindir=DIR            user executables in DIR [EPREFIX/bin]
206   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
207   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
208   --datadir=DIR           read-only architecture-independent data in DIR
209                           [PREFIX/share]
210   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
211   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
212                           [PREFIX/com]
213   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
214   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
215   --includedir=DIR        C header files in DIR [PREFIX/include]
216   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
217   --infodir=DIR           info documentation in DIR [PREFIX/info]
218   --mandir=DIR            man documentation in DIR [PREFIX/man]
219   --srcdir=DIR            find the sources in DIR [configure dir or ..]
220   --program-prefix=PREFIX prepend PREFIX to installed program names
221   --program-suffix=SUFFIX append SUFFIX to installed program names
222   --program-transform-name=PROGRAM
223                           run sed PROGRAM on installed program names
224 EOF
225     cat << EOF
226 Host type:
227   --build=BUILD           configure for building on BUILD [BUILD=HOST]
228   --host=HOST             configure for HOST [guessed]
229   --target=TARGET         configure for TARGET [TARGET=HOST]
230 Features and packages:
231   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
232   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
233   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
234   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
235   --x-includes=DIR        X include files are in DIR
236   --x-libraries=DIR       X library files are in DIR
237 EOF
238     if test -n "$ac_help"; then
239       echo "--enable and --with options recognized:$ac_help"
240     fi
241     exit 0 ;;
242
243   -host | --host | --hos | --ho)
244     ac_prev=host ;;
245   -host=* | --host=* | --hos=* | --ho=*)
246     host="$ac_optarg" ;;
247
248   -includedir | --includedir | --includedi | --included | --include \
249   | --includ | --inclu | --incl | --inc)
250     ac_prev=includedir ;;
251   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
252   | --includ=* | --inclu=* | --incl=* | --inc=*)
253     includedir="$ac_optarg" ;;
254
255   -infodir | --infodir | --infodi | --infod | --info | --inf)
256     ac_prev=infodir ;;
257   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
258     infodir="$ac_optarg" ;;
259
260   -libdir | --libdir | --libdi | --libd)
261     ac_prev=libdir ;;
262   -libdir=* | --libdir=* | --libdi=* | --libd=*)
263     libdir="$ac_optarg" ;;
264
265   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
266   | --libexe | --libex | --libe)
267     ac_prev=libexecdir ;;
268   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
269   | --libexe=* | --libex=* | --libe=*)
270     libexecdir="$ac_optarg" ;;
271
272   -localstatedir | --localstatedir | --localstatedi | --localstated \
273   | --localstate | --localstat | --localsta | --localst \
274   | --locals | --local | --loca | --loc | --lo)
275     ac_prev=localstatedir ;;
276   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
277   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
278   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
279     localstatedir="$ac_optarg" ;;
280
281   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
282     ac_prev=mandir ;;
283   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
284     mandir="$ac_optarg" ;;
285
286   -nfp | --nfp | --nf)
287     # Obsolete; use --without-fp.
288     with_fp=no ;;
289
290   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
291   | --no-cr | --no-c)
292     no_create=yes ;;
293
294   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
295   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
296     no_recursion=yes ;;
297
298   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
299   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
300   | --oldin | --oldi | --old | --ol | --o)
301     ac_prev=oldincludedir ;;
302   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
303   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
304   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
305     oldincludedir="$ac_optarg" ;;
306
307   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
308     ac_prev=prefix ;;
309   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
310     prefix="$ac_optarg" ;;
311
312   -program-prefix | --program-prefix | --program-prefi | --program-pref \
313   | --program-pre | --program-pr | --program-p)
314     ac_prev=program_prefix ;;
315   -program-prefix=* | --program-prefix=* | --program-prefi=* \
316   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
317     program_prefix="$ac_optarg" ;;
318
319   -program-suffix | --program-suffix | --program-suffi | --program-suff \
320   | --program-suf | --program-su | --program-s)
321     ac_prev=program_suffix ;;
322   -program-suffix=* | --program-suffix=* | --program-suffi=* \
323   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
324     program_suffix="$ac_optarg" ;;
325
326   -program-transform-name | --program-transform-name \
327   | --program-transform-nam | --program-transform-na \
328   | --program-transform-n | --program-transform- \
329   | --program-transform | --program-transfor \
330   | --program-transfo | --program-transf \
331   | --program-trans | --program-tran \
332   | --progr-tra | --program-tr | --program-t)
333     ac_prev=program_transform_name ;;
334   -program-transform-name=* | --program-transform-name=* \
335   | --program-transform-nam=* | --program-transform-na=* \
336   | --program-transform-n=* | --program-transform-=* \
337   | --program-transform=* | --program-transfor=* \
338   | --program-transfo=* | --program-transf=* \
339   | --program-trans=* | --program-tran=* \
340   | --progr-tra=* | --program-tr=* | --program-t=*)
341     program_transform_name="$ac_optarg" ;;
342
343   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
344   | -silent | --silent | --silen | --sile | --sil)
345     silent=yes ;;
346
347   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
348     ac_prev=sbindir ;;
349   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
350   | --sbi=* | --sb=*)
351     sbindir="$ac_optarg" ;;
352
353   -sharedstatedir | --sharedstatedir | --sharedstatedi \
354   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
355   | --sharedst | --shareds | --shared | --share | --shar \
356   | --sha | --sh)
357     ac_prev=sharedstatedir ;;
358   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
359   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
360   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
361   | --sha=* | --sh=*)
362     sharedstatedir="$ac_optarg" ;;
363
364   -site | --site | --sit)
365     ac_prev=site ;;
366   -site=* | --site=* | --sit=*)
367     site="$ac_optarg" ;;
368
369   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
370     ac_prev=srcdir ;;
371   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
372     srcdir="$ac_optarg" ;;
373
374   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
375   | --syscon | --sysco | --sysc | --sys | --sy)
376     ac_prev=sysconfdir ;;
377   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
378   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
379     sysconfdir="$ac_optarg" ;;
380
381   -target | --target | --targe | --targ | --tar | --ta | --t)
382     ac_prev=target ;;
383   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
384     target="$ac_optarg" ;;
385
386   -v | -verbose | --verbose | --verbos | --verbo | --verb)
387     verbose=yes ;;
388
389   -version | --version | --versio | --versi | --vers)
390     echo "configure generated by autoconf version 2.13"
391     exit 0 ;;
392
393   -with-* | --with-*)
394     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
395     # Reject names that are not valid shell variable names.
396     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
397       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
398     fi
399     ac_package=`echo $ac_package| sed 's/-/_/g'`
400     case "$ac_option" in
401       *=*) ;;
402       *) ac_optarg=yes ;;
403     esac
404     eval "with_${ac_package}='$ac_optarg'" ;;
405
406   -without-* | --without-*)
407     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
408     # Reject names that are not valid shell variable names.
409     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
410       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
411     fi
412     ac_package=`echo $ac_package| sed 's/-/_/g'`
413     eval "with_${ac_package}=no" ;;
414
415   --x)
416     # Obsolete; use --with-x.
417     with_x=yes ;;
418
419   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
420   | --x-incl | --x-inc | --x-in | --x-i)
421     ac_prev=x_includes ;;
422   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
423   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
424     x_includes="$ac_optarg" ;;
425
426   -x-libraries | --x-libraries | --x-librarie | --x-librari \
427   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
428     ac_prev=x_libraries ;;
429   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
430   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
431     x_libraries="$ac_optarg" ;;
432
433   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
434     ;;
435
436   *)
437     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
438       echo "configure: warning: $ac_option: invalid host type" 1>&2
439     fi
440     if test "x$nonopt" != xNONE; then
441       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
442     fi
443     nonopt="$ac_option"
444     ;;
445
446   esac
447 done
448
449 if test -n "$ac_prev"; then
450   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
451 fi
452
453 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
454
455 # File descriptor usage:
456 # 0 standard input
457 # 1 file creation
458 # 2 errors and warnings
459 # 3 some systems may open it to /dev/tty
460 # 4 used on the Kubota Titan
461 # 6 checking for... messages and results
462 # 5 compiler messages saved in config.log
463 if test "$silent" = yes; then
464   exec 6>/dev/null
465 else
466   exec 6>&1
467 fi
468 exec 5>./config.log
469
470 echo "\
471 This file contains any messages produced by compilers while
472 running configure, to aid debugging if configure makes a mistake.
473 " 1>&5
474
475 # Strip out --no-create and --no-recursion so they do not pile up.
476 # Also quote any args containing shell metacharacters.
477 ac_configure_args=
478 for ac_arg
479 do
480   case "$ac_arg" in
481   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
482   | --no-cr | --no-c) ;;
483   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
484   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
485   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
486   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
487   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
488   esac
489 done
490
491 # NLS nuisances.
492 # Only set these to C if already set.  These must not be set unconditionally
493 # because not all systems understand e.g. LANG=C (notably SCO).
494 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
495 # Non-C LC_CTYPE values break the ctype check.
496 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
497 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
498 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
499 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
500
501 # confdefs.h avoids OS command line length limits that DEFS can exceed.
502 rm -rf conftest* confdefs.h
503 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
504 echo > confdefs.h
505
506 # A filename unique to this package, relative to the directory that
507 # configure is in, which we can look for to find out if srcdir is correct.
508 ac_unique_file=include/includes.h
509
510 # Find the source files, if location was not specified.
511 if test -z "$srcdir"; then
512   ac_srcdir_defaulted=yes
513   # Try the directory containing this script, then its parent.
514   ac_prog=$0
515   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
516   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
517   srcdir=$ac_confdir
518   if test ! -r $srcdir/$ac_unique_file; then
519     srcdir=..
520   fi
521 else
522   ac_srcdir_defaulted=no
523 fi
524 if test ! -r $srcdir/$ac_unique_file; then
525   if test "$ac_srcdir_defaulted" = yes; then
526     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
527   else
528     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
529   fi
530 fi
531 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
532
533 # Prefer explicitly selected file to automatically selected ones.
534 if test -z "$CONFIG_SITE"; then
535   if test "x$prefix" != xNONE; then
536     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
537   else
538     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
539   fi
540 fi
541 for ac_site_file in $CONFIG_SITE; do
542   if test -r "$ac_site_file"; then
543     echo "loading site script $ac_site_file"
544     . "$ac_site_file"
545   fi
546 done
547
548 if test -r "$cache_file"; then
549   echo "loading cache $cache_file"
550   . $cache_file
551 else
552   echo "creating cache $cache_file"
553   > $cache_file
554 fi
555
556 ac_ext=c
557 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
558 ac_cpp='$CPP $CPPFLAGS'
559 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
560 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
561 cross_compiling=$ac_cv_prog_cc_cross
562
563 ac_exeext=
564 ac_objext=o
565 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
566   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
567   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
568     ac_n= ac_c='
569 ' ac_t='        '
570   else
571     ac_n=-n ac_c= ac_t=
572   fi
573 else
574   ac_n= ac_c='\c' ac_t=
575 fi
576
577
578
579 # we want to be compatibe with older versions of Samba
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597 # compile with optimisation and without debugging by default
598 CFLAGS="-O ${CFLAGS}"
599
600 # Check whether --enable-debug or --disable-debug was given.
601 if test "${enable_debug+set}" = set; then
602   enableval="$enable_debug"
603   if eval "test x$enable_debug = xyes"; then
604         CFLAGS="${CFLAGS} -g"
605     fi
606 fi
607
608
609
610 # Extract the first word of "gcc", so it can be a program name with args.
611 set dummy gcc; ac_word=$2
612 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
613 echo "configure:614: checking for $ac_word" >&5
614 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
615   echo $ac_n "(cached) $ac_c" 1>&6
616 else
617   if test -n "$CC"; then
618   ac_cv_prog_CC="$CC" # Let the user override the test.
619 else
620   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
621   ac_dummy="$PATH"
622   for ac_dir in $ac_dummy; do
623     test -z "$ac_dir" && ac_dir=.
624     if test -f $ac_dir/$ac_word; then
625       ac_cv_prog_CC="gcc"
626       break
627     fi
628   done
629   IFS="$ac_save_ifs"
630 fi
631 fi
632 CC="$ac_cv_prog_CC"
633 if test -n "$CC"; then
634   echo "$ac_t""$CC" 1>&6
635 else
636   echo "$ac_t""no" 1>&6
637 fi
638
639 if test -z "$CC"; then
640   # Extract the first word of "cc", so it can be a program name with args.
641 set dummy cc; ac_word=$2
642 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
643 echo "configure:644: checking for $ac_word" >&5
644 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
645   echo $ac_n "(cached) $ac_c" 1>&6
646 else
647   if test -n "$CC"; then
648   ac_cv_prog_CC="$CC" # Let the user override the test.
649 else
650   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
651   ac_prog_rejected=no
652   ac_dummy="$PATH"
653   for ac_dir in $ac_dummy; do
654     test -z "$ac_dir" && ac_dir=.
655     if test -f $ac_dir/$ac_word; then
656       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
657         ac_prog_rejected=yes
658         continue
659       fi
660       ac_cv_prog_CC="cc"
661       break
662     fi
663   done
664   IFS="$ac_save_ifs"
665 if test $ac_prog_rejected = yes; then
666   # We found a bogon in the path, so make sure we never use it.
667   set dummy $ac_cv_prog_CC
668   shift
669   if test $# -gt 0; then
670     # We chose a different compiler from the bogus one.
671     # However, it has the same basename, so the bogon will be chosen
672     # first if we set CC to just the basename; use the full file name.
673     shift
674     set dummy "$ac_dir/$ac_word" "$@"
675     shift
676     ac_cv_prog_CC="$@"
677   fi
678 fi
679 fi
680 fi
681 CC="$ac_cv_prog_CC"
682 if test -n "$CC"; then
683   echo "$ac_t""$CC" 1>&6
684 else
685   echo "$ac_t""no" 1>&6
686 fi
687
688   if test -z "$CC"; then
689     case "`uname -s`" in
690     *win32* | *WIN32*)
691       # Extract the first word of "cl", so it can be a program name with args.
692 set dummy cl; ac_word=$2
693 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
694 echo "configure:695: checking for $ac_word" >&5
695 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
696   echo $ac_n "(cached) $ac_c" 1>&6
697 else
698   if test -n "$CC"; then
699   ac_cv_prog_CC="$CC" # Let the user override the test.
700 else
701   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
702   ac_dummy="$PATH"
703   for ac_dir in $ac_dummy; do
704     test -z "$ac_dir" && ac_dir=.
705     if test -f $ac_dir/$ac_word; then
706       ac_cv_prog_CC="cl"
707       break
708     fi
709   done
710   IFS="$ac_save_ifs"
711 fi
712 fi
713 CC="$ac_cv_prog_CC"
714 if test -n "$CC"; then
715   echo "$ac_t""$CC" 1>&6
716 else
717   echo "$ac_t""no" 1>&6
718 fi
719  ;;
720     esac
721   fi
722   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
723 fi
724
725 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
726 echo "configure:727: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
727
728 ac_ext=c
729 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
730 ac_cpp='$CPP $CPPFLAGS'
731 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
732 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
733 cross_compiling=$ac_cv_prog_cc_cross
734
735 cat > conftest.$ac_ext << EOF
736
737 #line 738 "configure"
738 #include "confdefs.h"
739
740 main(){return(0);}
741 EOF
742 if { (eval echo configure:743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
743   ac_cv_prog_cc_works=yes
744   # If we can't run a trivial program, we are probably using a cross compiler.
745   if (./conftest; exit) 2>/dev/null; then
746     ac_cv_prog_cc_cross=no
747   else
748     ac_cv_prog_cc_cross=yes
749   fi
750 else
751   echo "configure: failed program was:" >&5
752   cat conftest.$ac_ext >&5
753   ac_cv_prog_cc_works=no
754 fi
755 rm -fr conftest*
756 ac_ext=c
757 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
758 ac_cpp='$CPP $CPPFLAGS'
759 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
760 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
761 cross_compiling=$ac_cv_prog_cc_cross
762
763 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
764 if test $ac_cv_prog_cc_works = no; then
765   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
766 fi
767 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
768 echo "configure:769: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
769 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
770 cross_compiling=$ac_cv_prog_cc_cross
771
772 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
773 echo "configure:774: checking whether we are using GNU C" >&5
774 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
775   echo $ac_n "(cached) $ac_c" 1>&6
776 else
777   cat > conftest.c <<EOF
778 #ifdef __GNUC__
779   yes;
780 #endif
781 EOF
782 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
783   ac_cv_prog_gcc=yes
784 else
785   ac_cv_prog_gcc=no
786 fi
787 fi
788
789 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
790
791 if test $ac_cv_prog_gcc = yes; then
792   GCC=yes
793 else
794   GCC=
795 fi
796
797 ac_test_CFLAGS="${CFLAGS+set}"
798 ac_save_CFLAGS="$CFLAGS"
799 CFLAGS=
800 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
801 echo "configure:802: checking whether ${CC-cc} accepts -g" >&5
802 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
803   echo $ac_n "(cached) $ac_c" 1>&6
804 else
805   echo 'void f(){}' > conftest.c
806 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
807   ac_cv_prog_cc_g=yes
808 else
809   ac_cv_prog_cc_g=no
810 fi
811 rm -f conftest*
812
813 fi
814
815 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
816 if test "$ac_test_CFLAGS" = set; then
817   CFLAGS="$ac_save_CFLAGS"
818 elif test $ac_cv_prog_cc_g = yes; then
819   if test "$GCC" = yes; then
820     CFLAGS="-g -O2"
821   else
822     CFLAGS="-g"
823   fi
824 else
825   if test "$GCC" = yes; then
826     CFLAGS="-O2"
827   else
828     CFLAGS=
829   fi
830 fi
831
832 ac_aux_dir=
833 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
834   if test -f $ac_dir/install-sh; then
835     ac_aux_dir=$ac_dir
836     ac_install_sh="$ac_aux_dir/install-sh -c"
837     break
838   elif test -f $ac_dir/install.sh; then
839     ac_aux_dir=$ac_dir
840     ac_install_sh="$ac_aux_dir/install.sh -c"
841     break
842   fi
843 done
844 if test -z "$ac_aux_dir"; then
845   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
846 fi
847 ac_config_guess=$ac_aux_dir/config.guess
848 ac_config_sub=$ac_aux_dir/config.sub
849 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
850
851 # Find a good install program.  We prefer a C program (faster),
852 # so one script is as good as another.  But avoid the broken or
853 # incompatible versions:
854 # SysV /etc/install, /usr/sbin/install
855 # SunOS /usr/etc/install
856 # IRIX /sbin/install
857 # AIX /bin/install
858 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
859 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
860 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
861 # ./install, which can be erroneously created by make from ./install.sh.
862 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
863 echo "configure:864: checking for a BSD compatible install" >&5
864 if test -z "$INSTALL"; then
865 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
866   echo $ac_n "(cached) $ac_c" 1>&6
867 else
868     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
869   for ac_dir in $PATH; do
870     # Account for people who put trailing slashes in PATH elements.
871     case "$ac_dir/" in
872     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
873     *)
874       # OSF1 and SCO ODT 3.0 have their own names for install.
875       # Don't use installbsd from OSF since it installs stuff as root
876       # by default.
877       for ac_prog in ginstall scoinst install; do
878         if test -f $ac_dir/$ac_prog; then
879           if test $ac_prog = install &&
880             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
881             # AIX install.  It has an incompatible calling convention.
882             :
883           else
884             ac_cv_path_install="$ac_dir/$ac_prog -c"
885             break 2
886           fi
887         fi
888       done
889       ;;
890     esac
891   done
892   IFS="$ac_save_IFS"
893
894 fi
895   if test "${ac_cv_path_install+set}" = set; then
896     INSTALL="$ac_cv_path_install"
897   else
898     # As a last resort, use the slow shell script.  We don't cache a
899     # path for INSTALL within a source directory, because that will
900     # break other packages using the cache if that directory is
901     # removed, or if the path is relative.
902     INSTALL="$ac_install_sh"
903   fi
904 fi
905 echo "$ac_t""$INSTALL" 1>&6
906
907 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
908 # It thinks the first close brace ends the variable substitution.
909 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
910
911 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
912
913 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
914
915 for ac_prog in mawk gawk nawk awk
916 do
917 # Extract the first word of "$ac_prog", so it can be a program name with args.
918 set dummy $ac_prog; ac_word=$2
919 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
920 echo "configure:921: checking for $ac_word" >&5
921 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
922   echo $ac_n "(cached) $ac_c" 1>&6
923 else
924   if test -n "$AWK"; then
925   ac_cv_prog_AWK="$AWK" # Let the user override the test.
926 else
927   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
928   ac_dummy="$PATH"
929   for ac_dir in $ac_dummy; do
930     test -z "$ac_dir" && ac_dir=.
931     if test -f $ac_dir/$ac_word; then
932       ac_cv_prog_AWK="$ac_prog"
933       break
934     fi
935   done
936   IFS="$ac_save_ifs"
937 fi
938 fi
939 AWK="$ac_cv_prog_AWK"
940 if test -n "$AWK"; then
941   echo "$ac_t""$AWK" 1>&6
942 else
943   echo "$ac_t""no" 1>&6
944 fi
945
946 test -n "$AWK" && break
947 done
948
949
950 if test "x$CC" != xcc; then
951   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
952 echo "configure:953: checking whether $CC and cc understand -c and -o together" >&5
953 else
954   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
955 echo "configure:956: checking whether cc understands -c and -o together" >&5
956 fi
957 set dummy $CC; ac_cc="`echo $2 |
958                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
959 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
960   echo $ac_n "(cached) $ac_c" 1>&6
961 else
962   echo 'foo(){}' > conftest.c
963 # Make sure it works both with $CC and with simple cc.
964 # We do the test twice because some compilers refuse to overwrite an
965 # existing .o file with -o, though they will create one.
966 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
967 if { (eval echo configure:968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
968    test -f conftest.o && { (eval echo configure:969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
969 then
970   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
971   if test "x$CC" != xcc; then
972     # Test first that cc exists at all.
973     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
974       ac_try='cc -c conftest.c -o conftest.o 1>&5'
975       if { (eval echo configure:976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
976          test -f conftest.o && { (eval echo configure:977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
977       then
978         # cc works too.
979         :
980       else
981         # cc exists but doesn't like -o.
982         eval ac_cv_prog_cc_${ac_cc}_c_o=no
983       fi
984     fi
985   fi
986 else
987   eval ac_cv_prog_cc_${ac_cc}_c_o=no
988 fi
989 rm -f conftest*
990
991 fi
992 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
993   echo "$ac_t""yes" 1>&6
994 else
995   echo "$ac_t""no" 1>&6
996   cat >> confdefs.h <<\EOF
997 #define NO_MINUS_C_MINUS_O 1
998 EOF
999
1000 fi
1001
1002 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1003       BROKEN_CC=
1004 else
1005       BROKEN_CC=#
1006 fi
1007
1008
1009 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1010 echo "configure:1011: checking that the C compiler understands volatile" >&5
1011 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1012   echo $ac_n "(cached) $ac_c" 1>&6
1013 else
1014   
1015     cat > conftest.$ac_ext <<EOF
1016 #line 1017 "configure"
1017 #include "confdefs.h"
1018 #include <sys/types.h>
1019 int main() {
1020 volatile int i = 0
1021 ; return 0; }
1022 EOF
1023 if { (eval echo configure:1024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1024   rm -rf conftest*
1025   samba_cv_volatile=yes
1026 else
1027   echo "configure: failed program was:" >&5
1028   cat conftest.$ac_ext >&5
1029   rm -rf conftest*
1030   samba_cv_volatile=no
1031 fi
1032 rm -f conftest*
1033 fi
1034
1035 echo "$ac_t""$samba_cv_volatile" 1>&6
1036 if test x"$samba_cv_volatile" = x"yes"; then
1037    cat >> confdefs.h <<\EOF
1038 #define HAVE_VOLATILE 1
1039 EOF
1040
1041 fi
1042
1043
1044
1045 # Do some error checking and defaulting for the host and target type.
1046 # The inputs are:
1047 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1048 #
1049 # The rules are:
1050 # 1. You are not allowed to specify --host, --target, and nonopt at the
1051 #    same time.
1052 # 2. Host defaults to nonopt.
1053 # 3. If nonopt is not specified, then host defaults to the current host,
1054 #    as determined by config.guess.
1055 # 4. Target and build default to nonopt.
1056 # 5. If nonopt is not specified, then target and build default to host.
1057
1058 # The aliases save the names the user supplied, while $host etc.
1059 # will get canonicalized.
1060 case $host---$target---$nonopt in
1061 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1062 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1063 esac
1064
1065
1066 # Make sure we can run config.sub.
1067 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1068 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1069 fi
1070
1071 echo $ac_n "checking host system type""... $ac_c" 1>&6
1072 echo "configure:1073: checking host system type" >&5
1073
1074 host_alias=$host
1075 case "$host_alias" in
1076 NONE)
1077   case $nonopt in
1078   NONE)
1079     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1080     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1081     fi ;;
1082   *) host_alias=$nonopt ;;
1083   esac ;;
1084 esac
1085
1086 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1087 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1088 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1089 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1090 echo "$ac_t""$host" 1>&6
1091
1092 echo $ac_n "checking target system type""... $ac_c" 1>&6
1093 echo "configure:1094: checking target system type" >&5
1094
1095 target_alias=$target
1096 case "$target_alias" in
1097 NONE)
1098   case $nonopt in
1099   NONE) target_alias=$host_alias ;;
1100   *) target_alias=$nonopt ;;
1101   esac ;;
1102 esac
1103
1104 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1105 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1106 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1107 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1108 echo "$ac_t""$target" 1>&6
1109
1110 echo $ac_n "checking build system type""... $ac_c" 1>&6
1111 echo "configure:1112: checking build system type" >&5
1112
1113 build_alias=$build
1114 case "$build_alias" in
1115 NONE)
1116   case $nonopt in
1117   NONE) build_alias=$host_alias ;;
1118   *) build_alias=$nonopt ;;
1119   esac ;;
1120 esac
1121
1122 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1123 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1124 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1125 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1126 echo "$ac_t""$build" 1>&6
1127
1128 test "$host_alias" != "$target_alias" &&
1129   test "$program_prefix$program_suffix$program_transform_name" = \
1130     NONENONEs,x,x, &&
1131   program_prefix=${target_alias}-
1132
1133
1134   case "$host_os" in
1135         *irix6*) cat >> confdefs.h <<\EOF
1136 #include <standards.h>
1137 EOF
1138
1139         ;;
1140 esac
1141
1142
1143     
1144     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1145 echo "configure:1146: checking config.cache system type" >&5
1146     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1147          test x"$ac_cv_host_system_type" != x"$host"; } ||
1148        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1149          test x"$ac_cv_build_system_type" != x"$build"; } ||
1150        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1151          test x"$ac_cv_target_system_type" != x"$target"; }; then
1152         echo "$ac_t""different" 1>&6
1153         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1154     else
1155         echo "$ac_t""same" 1>&6
1156     fi
1157     ac_cv_host_system_type="$host"
1158     ac_cv_build_system_type="$build"
1159     ac_cv_target_system_type="$target"
1160
1161
1162 #
1163 # Config CPPFLAG settings for strange OS's that must be set
1164 # before other tests.
1165 #
1166 case "$host_os" in
1167 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1168     *hpux*)
1169       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1170 echo "configure:1171: checking whether ${CC-cc} accepts -Ae" >&5
1171 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1172   echo $ac_n "(cached) $ac_c" 1>&6
1173 else
1174   echo 'void f(){}' > conftest.c
1175 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1176   ac_cv_prog_cc_Ae=yes
1177 else
1178   ac_cv_prog_cc_Ae=no
1179 fi
1180 rm -f conftest*
1181
1182 fi
1183
1184 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1185       # mmap on HPUX is completely broken...
1186       cat >> confdefs.h <<\EOF
1187 #define MMAP_BLACKLIST 1
1188 EOF
1189
1190       if test $ac_cv_prog_cc_Ae = yes; then
1191         CPPFLAGS="$CPPFLAGS -Ae"
1192       fi
1193 #
1194 # Defines needed for HPUX support.
1195 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1196 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1197 #
1198       case `uname -r` in
1199                         *9*|*10*)
1200                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
1201                                 cat >> confdefs.h <<\EOF
1202 #define USE_BOTH_CRYPT_CALLS 1
1203 EOF
1204
1205                                 ;;
1206                         *11*)
1207                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
1208                                 cat >> confdefs.h <<\EOF
1209 #define USE_BOTH_CRYPT_CALLS 1
1210 EOF
1211
1212                                 ;;
1213       esac
1214       ;;
1215 #
1216 # AIX4.x doesn't even admit to having large
1217 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1218 #
1219     *aix4*)
1220           echo "$ac_t""enabling large file support" 1>&6
1221       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1222       ;;    
1223 #
1224 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1225 # to the existance of large files..
1226 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1227 # recommendations on large file support, however it makes the
1228 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1229 # recommendation makes the compile fail on gcc2.7. JRA.
1230 #
1231         *solaris*)
1232                 case `uname -r` in
1233                         5.6*|5.7*)
1234                         echo "$ac_t""enabling large file support" 1>&6
1235                         if test "$ac_cv_prog_gcc" = yes; then
1236                                 ${CC-cc} -v >conftest.c 2>&1
1237                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1238                                 rm -fr conftest.c
1239                                 case "$ac_cv_gcc_compiler_version_number" in
1240                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1241                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1242                                                 ;;
1243                                         *)
1244                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1245                                                 ;;
1246                                 esac
1247                         else
1248                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1249                         fi
1250                         ;;
1251                 esac
1252                 ;;
1253 #
1254 # Tests needed for SINIX large file support.
1255 #
1256     *sysv4*)
1257       if test $host = mips-sni-sysv4 ; then
1258         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1259 echo "configure:1260: checking for LFS support" >&5
1260         old_CPPFLAGS="$CPPFLAGS"
1261         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1262         if test "$cross_compiling" = yes; then
1263   SINIX_LFS_SUPPORT=cross
1264 else
1265   cat > conftest.$ac_ext <<EOF
1266 #line 1267 "configure"
1267 #include "confdefs.h"
1268
1269 #include <unistd.h>
1270 main () {
1271 #if _LFS64_LARGEFILE == 1
1272 exit(0);
1273 #else
1274 exit(1);
1275 #endif
1276 }
1277 EOF
1278 if { (eval echo configure:1279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1279 then
1280   SINIX_LFS_SUPPORT=yes
1281 else
1282   echo "configure: failed program was:" >&5
1283   cat conftest.$ac_ext >&5
1284   rm -fr conftest*
1285   SINIX_LFS_SUPPORT=no
1286 fi
1287 rm -fr conftest*
1288 fi
1289
1290         CPPFLAGS="$old_CPPFLAGS"
1291         if test x$SINIX_LFS_SUPPORT = xyes ; then
1292           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1293           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1294           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1295           LIBS="`getconf LFS64_LIBS` $LIBS"
1296         fi
1297       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1298       fi
1299     ;;
1300
1301 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1302 #
1303     *linux*)
1304         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1305 echo "configure:1306: checking for LFS support" >&5
1306         old_CPPFLAGS="$CPPFLAGS"
1307         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1308        if test "$cross_compiling" = yes; then
1309   LINUX_LFS_SUPPORT=cross
1310 else
1311   cat > conftest.$ac_ext <<EOF
1312 #line 1313 "configure"
1313 #include "confdefs.h"
1314
1315 #include <unistd.h>
1316 #include <sys/utsname.h>
1317 main() {
1318 #if _LFS64_LARGEFILE == 1
1319        struct utsname uts;
1320        char *release;
1321        int major, minor;
1322
1323        /* Ensure this is glibc 2.2 or higher */
1324 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1325        int libc_major = __GLIBC__;
1326        int libc_minor = __GLIBC_MINOR__;
1327
1328        if (libc_major < 2)
1329               exit(1);
1330        if (libc_minor < 2)
1331               exit(1);
1332 #endif
1333
1334        /* Ensure this is kernel 2.4 or higher */
1335
1336        uname(&uts);
1337        release = uts.release;
1338        major = atoi(strsep(&release, "."));
1339        minor = atoi(strsep(&release, "."));
1340
1341        if (major > 2 || (major == 2 && minor > 3))
1342                exit(0);
1343        exit(1);
1344 #else
1345        exit(1);
1346 #endif
1347 }
1348
1349 EOF
1350 if { (eval echo configure:1351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1351 then
1352   LINUX_LFS_SUPPORT=yes
1353 else
1354   echo "configure: failed program was:" >&5
1355   cat conftest.$ac_ext >&5
1356   rm -fr conftest*
1357   LINUX_LFS_SUPPORT=no
1358 fi
1359 rm -fr conftest*
1360 fi
1361
1362         CPPFLAGS="$old_CPPFLAGS"
1363         if test x$LINUX_LFS_SUPPORT = xyes ; then
1364           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1365         fi
1366        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1367                 ;;
1368
1369     *hurd*)
1370         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1371 echo "configure:1372: checking for LFS support" >&5
1372         old_CPPFLAGS="$CPPFLAGS"
1373         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1374         if test "$cross_compiling" = yes; then
1375   GLIBC_LFS_SUPPORT=cross
1376 else
1377   cat > conftest.$ac_ext <<EOF
1378 #line 1379 "configure"
1379 #include "confdefs.h"
1380
1381 #include <unistd.h>
1382 main () {
1383 #if _LFS64_LARGEFILE == 1
1384 exit(0);
1385 #else
1386 exit(1);
1387 #endif
1388 }
1389 EOF
1390 if { (eval echo configure:1391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1391 then
1392   GLIBC_LFS_SUPPORT=yes
1393 else
1394   echo "configure: failed program was:" >&5
1395   cat conftest.$ac_ext >&5
1396   rm -fr conftest*
1397   GLIBC_LFS_SUPPORT=no
1398 fi
1399 rm -fr conftest*
1400 fi
1401
1402         CPPFLAGS="$old_CPPFLAGS"
1403         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1404           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1405         fi
1406       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1407     ;;
1408
1409 esac
1410
1411 echo $ac_n "checking for inline""... $ac_c" 1>&6
1412 echo "configure:1413: checking for inline" >&5
1413 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1414   echo $ac_n "(cached) $ac_c" 1>&6
1415 else
1416   ac_cv_c_inline=no
1417 for ac_kw in inline __inline__ __inline; do
1418   cat > conftest.$ac_ext <<EOF
1419 #line 1420 "configure"
1420 #include "confdefs.h"
1421
1422 int main() {
1423 } $ac_kw foo() {
1424 ; return 0; }
1425 EOF
1426 if { (eval echo configure:1427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1427   rm -rf conftest*
1428   ac_cv_c_inline=$ac_kw; break
1429 else
1430   echo "configure: failed program was:" >&5
1431   cat conftest.$ac_ext >&5
1432 fi
1433 rm -f conftest*
1434 done
1435
1436 fi
1437
1438 echo "$ac_t""$ac_cv_c_inline" 1>&6
1439 case "$ac_cv_c_inline" in
1440   inline | yes) ;;
1441   no) cat >> confdefs.h <<\EOF
1442 #define inline 
1443 EOF
1444  ;;
1445   *)  cat >> confdefs.h <<EOF
1446 #define inline $ac_cv_c_inline
1447 EOF
1448  ;;
1449 esac
1450
1451 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1452 echo "configure:1453: checking how to run the C preprocessor" >&5
1453 # On Suns, sometimes $CPP names a directory.
1454 if test -n "$CPP" && test -d "$CPP"; then
1455   CPP=
1456 fi
1457 if test -z "$CPP"; then
1458 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1459   echo $ac_n "(cached) $ac_c" 1>&6
1460 else
1461     # This must be in double quotes, not single quotes, because CPP may get
1462   # substituted into the Makefile and "${CC-cc}" will confuse make.
1463   CPP="${CC-cc} -E"
1464   # On the NeXT, cc -E runs the code through the compiler's parser,
1465   # not just through cpp.
1466   cat > conftest.$ac_ext <<EOF
1467 #line 1468 "configure"
1468 #include "confdefs.h"
1469 #include <assert.h>
1470 Syntax Error
1471 EOF
1472 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1473 { (eval echo configure:1474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1474 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1475 if test -z "$ac_err"; then
1476   :
1477 else
1478   echo "$ac_err" >&5
1479   echo "configure: failed program was:" >&5
1480   cat conftest.$ac_ext >&5
1481   rm -rf conftest*
1482   CPP="${CC-cc} -E -traditional-cpp"
1483   cat > conftest.$ac_ext <<EOF
1484 #line 1485 "configure"
1485 #include "confdefs.h"
1486 #include <assert.h>
1487 Syntax Error
1488 EOF
1489 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1490 { (eval echo configure:1491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1491 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1492 if test -z "$ac_err"; then
1493   :
1494 else
1495   echo "$ac_err" >&5
1496   echo "configure: failed program was:" >&5
1497   cat conftest.$ac_ext >&5
1498   rm -rf conftest*
1499   CPP="${CC-cc} -nologo -E"
1500   cat > conftest.$ac_ext <<EOF
1501 #line 1502 "configure"
1502 #include "confdefs.h"
1503 #include <assert.h>
1504 Syntax Error
1505 EOF
1506 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1507 { (eval echo configure:1508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1508 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1509 if test -z "$ac_err"; then
1510   :
1511 else
1512   echo "$ac_err" >&5
1513   echo "configure: failed program was:" >&5
1514   cat conftest.$ac_ext >&5
1515   rm -rf conftest*
1516   CPP=/lib/cpp
1517 fi
1518 rm -f conftest*
1519 fi
1520 rm -f conftest*
1521 fi
1522 rm -f conftest*
1523   ac_cv_prog_CPP="$CPP"
1524 fi
1525   CPP="$ac_cv_prog_CPP"
1526 else
1527   ac_cv_prog_CPP="$CPP"
1528 fi
1529 echo "$ac_t""$CPP" 1>&6
1530
1531 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1532 echo "configure:1533: checking for ANSI C header files" >&5
1533 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1534   echo $ac_n "(cached) $ac_c" 1>&6
1535 else
1536   cat > conftest.$ac_ext <<EOF
1537 #line 1538 "configure"
1538 #include "confdefs.h"
1539 #include <stdlib.h>
1540 #include <stdarg.h>
1541 #include <string.h>
1542 #include <float.h>
1543 EOF
1544 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1545 { (eval echo configure:1546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1546 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1547 if test -z "$ac_err"; then
1548   rm -rf conftest*
1549   ac_cv_header_stdc=yes
1550 else
1551   echo "$ac_err" >&5
1552   echo "configure: failed program was:" >&5
1553   cat conftest.$ac_ext >&5
1554   rm -rf conftest*
1555   ac_cv_header_stdc=no
1556 fi
1557 rm -f conftest*
1558
1559 if test $ac_cv_header_stdc = yes; then
1560   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1561 cat > conftest.$ac_ext <<EOF
1562 #line 1563 "configure"
1563 #include "confdefs.h"
1564 #include <string.h>
1565 EOF
1566 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1567   egrep "memchr" >/dev/null 2>&1; then
1568   :
1569 else
1570   rm -rf conftest*
1571   ac_cv_header_stdc=no
1572 fi
1573 rm -f conftest*
1574
1575 fi
1576
1577 if test $ac_cv_header_stdc = yes; then
1578   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1579 cat > conftest.$ac_ext <<EOF
1580 #line 1581 "configure"
1581 #include "confdefs.h"
1582 #include <stdlib.h>
1583 EOF
1584 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1585   egrep "free" >/dev/null 2>&1; then
1586   :
1587 else
1588   rm -rf conftest*
1589   ac_cv_header_stdc=no
1590 fi
1591 rm -f conftest*
1592
1593 fi
1594
1595 if test $ac_cv_header_stdc = yes; then
1596   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1597 if test "$cross_compiling" = yes; then
1598   :
1599 else
1600   cat > conftest.$ac_ext <<EOF
1601 #line 1602 "configure"
1602 #include "confdefs.h"
1603 #include <ctype.h>
1604 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1605 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1606 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1607 int main () { int i; for (i = 0; i < 256; i++)
1608 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1609 exit (0); }
1610
1611 EOF
1612 if { (eval echo configure:1613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1613 then
1614   :
1615 else
1616   echo "configure: failed program was:" >&5
1617   cat conftest.$ac_ext >&5
1618   rm -fr conftest*
1619   ac_cv_header_stdc=no
1620 fi
1621 rm -fr conftest*
1622 fi
1623
1624 fi
1625 fi
1626
1627 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1628 if test $ac_cv_header_stdc = yes; then
1629   cat >> confdefs.h <<\EOF
1630 #define STDC_HEADERS 1
1631 EOF
1632
1633 fi
1634
1635 ac_header_dirent=no
1636 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1637 do
1638 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1639 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1640 echo "configure:1641: checking for $ac_hdr that defines DIR" >&5
1641 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1642   echo $ac_n "(cached) $ac_c" 1>&6
1643 else
1644   cat > conftest.$ac_ext <<EOF
1645 #line 1646 "configure"
1646 #include "confdefs.h"
1647 #include <sys/types.h>
1648 #include <$ac_hdr>
1649 int main() {
1650 DIR *dirp = 0;
1651 ; return 0; }
1652 EOF
1653 if { (eval echo configure:1654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1654   rm -rf conftest*
1655   eval "ac_cv_header_dirent_$ac_safe=yes"
1656 else
1657   echo "configure: failed program was:" >&5
1658   cat conftest.$ac_ext >&5
1659   rm -rf conftest*
1660   eval "ac_cv_header_dirent_$ac_safe=no"
1661 fi
1662 rm -f conftest*
1663 fi
1664 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1665   echo "$ac_t""yes" 1>&6
1666     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1667   cat >> confdefs.h <<EOF
1668 #define $ac_tr_hdr 1
1669 EOF
1670  ac_header_dirent=$ac_hdr; break
1671 else
1672   echo "$ac_t""no" 1>&6
1673 fi
1674 done
1675 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1676 if test $ac_header_dirent = dirent.h; then
1677 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1678 echo "configure:1679: checking for opendir in -ldir" >&5
1679 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1680 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1681   echo $ac_n "(cached) $ac_c" 1>&6
1682 else
1683   ac_save_LIBS="$LIBS"
1684 LIBS="-ldir  $LIBS"
1685 cat > conftest.$ac_ext <<EOF
1686 #line 1687 "configure"
1687 #include "confdefs.h"
1688 /* Override any gcc2 internal prototype to avoid an error.  */
1689 /* We use char because int might match the return type of a gcc2
1690     builtin and then its argument prototype would still apply.  */
1691 char opendir();
1692
1693 int main() {
1694 opendir()
1695 ; return 0; }
1696 EOF
1697 if { (eval echo configure:1698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1698   rm -rf conftest*
1699   eval "ac_cv_lib_$ac_lib_var=yes"
1700 else
1701   echo "configure: failed program was:" >&5
1702   cat conftest.$ac_ext >&5
1703   rm -rf conftest*
1704   eval "ac_cv_lib_$ac_lib_var=no"
1705 fi
1706 rm -f conftest*
1707 LIBS="$ac_save_LIBS"
1708
1709 fi
1710 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1711   echo "$ac_t""yes" 1>&6
1712   LIBS="$LIBS -ldir"
1713 else
1714   echo "$ac_t""no" 1>&6
1715 fi
1716
1717 else
1718 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1719 echo "configure:1720: checking for opendir in -lx" >&5
1720 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1721 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1722   echo $ac_n "(cached) $ac_c" 1>&6
1723 else
1724   ac_save_LIBS="$LIBS"
1725 LIBS="-lx  $LIBS"
1726 cat > conftest.$ac_ext <<EOF
1727 #line 1728 "configure"
1728 #include "confdefs.h"
1729 /* Override any gcc2 internal prototype to avoid an error.  */
1730 /* We use char because int might match the return type of a gcc2
1731     builtin and then its argument prototype would still apply.  */
1732 char opendir();
1733
1734 int main() {
1735 opendir()
1736 ; return 0; }
1737 EOF
1738 if { (eval echo configure:1739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1739   rm -rf conftest*
1740   eval "ac_cv_lib_$ac_lib_var=yes"
1741 else
1742   echo "configure: failed program was:" >&5
1743   cat conftest.$ac_ext >&5
1744   rm -rf conftest*
1745   eval "ac_cv_lib_$ac_lib_var=no"
1746 fi
1747 rm -f conftest*
1748 LIBS="$ac_save_LIBS"
1749
1750 fi
1751 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1752   echo "$ac_t""yes" 1>&6
1753   LIBS="$LIBS -lx"
1754 else
1755   echo "$ac_t""no" 1>&6
1756 fi
1757
1758 fi
1759
1760 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1761 echo "configure:1762: checking whether time.h and sys/time.h may both be included" >&5
1762 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1763   echo $ac_n "(cached) $ac_c" 1>&6
1764 else
1765   cat > conftest.$ac_ext <<EOF
1766 #line 1767 "configure"
1767 #include "confdefs.h"
1768 #include <sys/types.h>
1769 #include <sys/time.h>
1770 #include <time.h>
1771 int main() {
1772 struct tm *tp;
1773 ; return 0; }
1774 EOF
1775 if { (eval echo configure:1776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1776   rm -rf conftest*
1777   ac_cv_header_time=yes
1778 else
1779   echo "configure: failed program was:" >&5
1780   cat conftest.$ac_ext >&5
1781   rm -rf conftest*
1782   ac_cv_header_time=no
1783 fi
1784 rm -f conftest*
1785 fi
1786
1787 echo "$ac_t""$ac_cv_header_time" 1>&6
1788 if test $ac_cv_header_time = yes; then
1789   cat >> confdefs.h <<\EOF
1790 #define TIME_WITH_SYS_TIME 1
1791 EOF
1792
1793 fi
1794
1795 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1796 echo "configure:1797: checking for sys/wait.h that is POSIX.1 compatible" >&5
1797 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1798   echo $ac_n "(cached) $ac_c" 1>&6
1799 else
1800   cat > conftest.$ac_ext <<EOF
1801 #line 1802 "configure"
1802 #include "confdefs.h"
1803 #include <sys/types.h>
1804 #include <sys/wait.h>
1805 #ifndef WEXITSTATUS
1806 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1807 #endif
1808 #ifndef WIFEXITED
1809 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1810 #endif
1811 int main() {
1812 int s;
1813 wait (&s);
1814 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1815 ; return 0; }
1816 EOF
1817 if { (eval echo configure:1818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1818   rm -rf conftest*
1819   ac_cv_header_sys_wait_h=yes
1820 else
1821   echo "configure: failed program was:" >&5
1822   cat conftest.$ac_ext >&5
1823   rm -rf conftest*
1824   ac_cv_header_sys_wait_h=no
1825 fi
1826 rm -f conftest*
1827 fi
1828
1829 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1830 if test $ac_cv_header_sys_wait_h = yes; then
1831   cat >> confdefs.h <<\EOF
1832 #define HAVE_SYS_WAIT_H 1
1833 EOF
1834
1835 fi
1836
1837 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1838 do
1839 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1840 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1841 echo "configure:1842: checking for $ac_hdr" >&5
1842 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1843   echo $ac_n "(cached) $ac_c" 1>&6
1844 else
1845   cat > conftest.$ac_ext <<EOF
1846 #line 1847 "configure"
1847 #include "confdefs.h"
1848 #include <$ac_hdr>
1849 EOF
1850 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1851 { (eval echo configure:1852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1852 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1853 if test -z "$ac_err"; then
1854   rm -rf conftest*
1855   eval "ac_cv_header_$ac_safe=yes"
1856 else
1857   echo "$ac_err" >&5
1858   echo "configure: failed program was:" >&5
1859   cat conftest.$ac_ext >&5
1860   rm -rf conftest*
1861   eval "ac_cv_header_$ac_safe=no"
1862 fi
1863 rm -f conftest*
1864 fi
1865 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1866   echo "$ac_t""yes" 1>&6
1867     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1868   cat >> confdefs.h <<EOF
1869 #define $ac_tr_hdr 1
1870 EOF
1871  
1872 else
1873   echo "$ac_t""no" 1>&6
1874 fi
1875 done
1876
1877 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
1878 do
1879 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1880 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1881 echo "configure:1882: checking for $ac_hdr" >&5
1882 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1883   echo $ac_n "(cached) $ac_c" 1>&6
1884 else
1885   cat > conftest.$ac_ext <<EOF
1886 #line 1887 "configure"
1887 #include "confdefs.h"
1888 #include <$ac_hdr>
1889 EOF
1890 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1891 { (eval echo configure:1892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1892 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1893 if test -z "$ac_err"; then
1894   rm -rf conftest*
1895   eval "ac_cv_header_$ac_safe=yes"
1896 else
1897   echo "$ac_err" >&5
1898   echo "configure: failed program was:" >&5
1899   cat conftest.$ac_ext >&5
1900   rm -rf conftest*
1901   eval "ac_cv_header_$ac_safe=no"
1902 fi
1903 rm -f conftest*
1904 fi
1905 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1906   echo "$ac_t""yes" 1>&6
1907     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1908   cat >> confdefs.h <<EOF
1909 #define $ac_tr_hdr 1
1910 EOF
1911  
1912 else
1913   echo "$ac_t""no" 1>&6
1914 fi
1915 done
1916
1917 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
1918 do
1919 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1920 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1921 echo "configure:1922: checking for $ac_hdr" >&5
1922 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1923   echo $ac_n "(cached) $ac_c" 1>&6
1924 else
1925   cat > conftest.$ac_ext <<EOF
1926 #line 1927 "configure"
1927 #include "confdefs.h"
1928 #include <$ac_hdr>
1929 EOF
1930 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1931 { (eval echo configure:1932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1932 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1933 if test -z "$ac_err"; then
1934   rm -rf conftest*
1935   eval "ac_cv_header_$ac_safe=yes"
1936 else
1937   echo "$ac_err" >&5
1938   echo "configure: failed program was:" >&5
1939   cat conftest.$ac_ext >&5
1940   rm -rf conftest*
1941   eval "ac_cv_header_$ac_safe=no"
1942 fi
1943 rm -f conftest*
1944 fi
1945 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1946   echo "$ac_t""yes" 1>&6
1947     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1948   cat >> confdefs.h <<EOF
1949 #define $ac_tr_hdr 1
1950 EOF
1951  
1952 else
1953   echo "$ac_t""no" 1>&6
1954 fi
1955 done
1956
1957 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
1958 do
1959 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1960 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1961 echo "configure:1962: checking for $ac_hdr" >&5
1962 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1963   echo $ac_n "(cached) $ac_c" 1>&6
1964 else
1965   cat > conftest.$ac_ext <<EOF
1966 #line 1967 "configure"
1967 #include "confdefs.h"
1968 #include <$ac_hdr>
1969 EOF
1970 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1971 { (eval echo configure:1972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1972 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1973 if test -z "$ac_err"; then
1974   rm -rf conftest*
1975   eval "ac_cv_header_$ac_safe=yes"
1976 else
1977   echo "$ac_err" >&5
1978   echo "configure: failed program was:" >&5
1979   cat conftest.$ac_ext >&5
1980   rm -rf conftest*
1981   eval "ac_cv_header_$ac_safe=no"
1982 fi
1983 rm -f conftest*
1984 fi
1985 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1986   echo "$ac_t""yes" 1>&6
1987     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1988   cat >> confdefs.h <<EOF
1989 #define $ac_tr_hdr 1
1990 EOF
1991  
1992 else
1993   echo "$ac_t""no" 1>&6
1994 fi
1995 done
1996
1997 for ac_hdr in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h
1998 do
1999 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2000 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2001 echo "configure:2002: checking for $ac_hdr" >&5
2002 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2003   echo $ac_n "(cached) $ac_c" 1>&6
2004 else
2005   cat > conftest.$ac_ext <<EOF
2006 #line 2007 "configure"
2007 #include "confdefs.h"
2008 #include <$ac_hdr>
2009 EOF
2010 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2011 { (eval echo configure:2012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2012 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2013 if test -z "$ac_err"; then
2014   rm -rf conftest*
2015   eval "ac_cv_header_$ac_safe=yes"
2016 else
2017   echo "$ac_err" >&5
2018   echo "configure: failed program was:" >&5
2019   cat conftest.$ac_ext >&5
2020   rm -rf conftest*
2021   eval "ac_cv_header_$ac_safe=no"
2022 fi
2023 rm -f conftest*
2024 fi
2025 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2026   echo "$ac_t""yes" 1>&6
2027     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2028   cat >> confdefs.h <<EOF
2029 #define $ac_tr_hdr 1
2030 EOF
2031  
2032 else
2033   echo "$ac_t""no" 1>&6
2034 fi
2035 done
2036
2037 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2038 do
2039 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2040 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2041 echo "configure:2042: checking for $ac_hdr" >&5
2042 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2043   echo $ac_n "(cached) $ac_c" 1>&6
2044 else
2045   cat > conftest.$ac_ext <<EOF
2046 #line 2047 "configure"
2047 #include "confdefs.h"
2048 #include <$ac_hdr>
2049 EOF
2050 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2051 { (eval echo configure:2052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2052 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2053 if test -z "$ac_err"; then
2054   rm -rf conftest*
2055   eval "ac_cv_header_$ac_safe=yes"
2056 else
2057   echo "$ac_err" >&5
2058   echo "configure: failed program was:" >&5
2059   cat conftest.$ac_ext >&5
2060   rm -rf conftest*
2061   eval "ac_cv_header_$ac_safe=no"
2062 fi
2063 rm -f conftest*
2064 fi
2065 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2066   echo "$ac_t""yes" 1>&6
2067     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2068   cat >> confdefs.h <<EOF
2069 #define $ac_tr_hdr 1
2070 EOF
2071  
2072 else
2073   echo "$ac_t""no" 1>&6
2074 fi
2075 done
2076
2077 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2078 do
2079 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2080 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2081 echo "configure:2082: checking for $ac_hdr" >&5
2082 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2083   echo $ac_n "(cached) $ac_c" 1>&6
2084 else
2085   cat > conftest.$ac_ext <<EOF
2086 #line 2087 "configure"
2087 #include "confdefs.h"
2088 #include <$ac_hdr>
2089 EOF
2090 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2091 { (eval echo configure:2092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2092 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2093 if test -z "$ac_err"; then
2094   rm -rf conftest*
2095   eval "ac_cv_header_$ac_safe=yes"
2096 else
2097   echo "$ac_err" >&5
2098   echo "configure: failed program was:" >&5
2099   cat conftest.$ac_ext >&5
2100   rm -rf conftest*
2101   eval "ac_cv_header_$ac_safe=no"
2102 fi
2103 rm -f conftest*
2104 fi
2105 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2106   echo "$ac_t""yes" 1>&6
2107     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2108   cat >> confdefs.h <<EOF
2109 #define $ac_tr_hdr 1
2110 EOF
2111  
2112 else
2113   echo "$ac_t""no" 1>&6
2114 fi
2115 done
2116
2117 for ac_hdr in security/pam_modules.h security/_pam_macros.h
2118 do
2119 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2120 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2121 echo "configure:2122: checking for $ac_hdr" >&5
2122 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2123   echo $ac_n "(cached) $ac_c" 1>&6
2124 else
2125   cat > conftest.$ac_ext <<EOF
2126 #line 2127 "configure"
2127 #include "confdefs.h"
2128 #include <$ac_hdr>
2129 EOF
2130 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2131 { (eval echo configure:2132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2132 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2133 if test -z "$ac_err"; then
2134   rm -rf conftest*
2135   eval "ac_cv_header_$ac_safe=yes"
2136 else
2137   echo "$ac_err" >&5
2138   echo "configure: failed program was:" >&5
2139   cat conftest.$ac_ext >&5
2140   rm -rf conftest*
2141   eval "ac_cv_header_$ac_safe=no"
2142 fi
2143 rm -f conftest*
2144 fi
2145 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2146   echo "$ac_t""yes" 1>&6
2147     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2148   cat >> confdefs.h <<EOF
2149 #define $ac_tr_hdr 1
2150 EOF
2151  
2152 else
2153   echo "$ac_t""no" 1>&6
2154 fi
2155 done
2156
2157
2158 #
2159 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2160 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2161 #
2162 case "$host_os" in
2163     *hpux*)
2164                 cat > conftest.$ac_ext <<EOF
2165 #line 2166 "configure"
2166 #include "confdefs.h"
2167 #include <shadow.h>
2168 int main() {
2169 struct spwd testme
2170 ; return 0; }
2171 EOF
2172 if { (eval echo configure:2173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2173   rm -rf conftest*
2174   ac_cv_header_shadow_h=yes
2175 else
2176   echo "configure: failed program was:" >&5
2177   cat conftest.$ac_ext >&5
2178   rm -rf conftest*
2179   ac_cv_header_shadow_h=no
2180 fi
2181 rm -f conftest*
2182                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2183                    cat >> confdefs.h <<\EOF
2184 #define HAVE_SHADOW_H 1
2185 EOF
2186
2187                 fi
2188         ;;
2189 esac
2190 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2191 do
2192 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2193 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2194 echo "configure:2195: checking for $ac_hdr" >&5
2195 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2196   echo $ac_n "(cached) $ac_c" 1>&6
2197 else
2198   cat > conftest.$ac_ext <<EOF
2199 #line 2200 "configure"
2200 #include "confdefs.h"
2201 #include <$ac_hdr>
2202 EOF
2203 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2204 { (eval echo configure:2205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2205 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2206 if test -z "$ac_err"; then
2207   rm -rf conftest*
2208   eval "ac_cv_header_$ac_safe=yes"
2209 else
2210   echo "$ac_err" >&5
2211   echo "configure: failed program was:" >&5
2212   cat conftest.$ac_ext >&5
2213   rm -rf conftest*
2214   eval "ac_cv_header_$ac_safe=no"
2215 fi
2216 rm -f conftest*
2217 fi
2218 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2219   echo "$ac_t""yes" 1>&6
2220     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2221   cat >> confdefs.h <<EOF
2222 #define $ac_tr_hdr 1
2223 EOF
2224  
2225 else
2226   echo "$ac_t""no" 1>&6
2227 fi
2228 done
2229
2230 for ac_hdr in nss.h nss_common.h sys/security.h security/pam_appl.h security/pam_modules.h
2231 do
2232 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2233 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2234 echo "configure:2235: checking for $ac_hdr" >&5
2235 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2236   echo $ac_n "(cached) $ac_c" 1>&6
2237 else
2238   cat > conftest.$ac_ext <<EOF
2239 #line 2240 "configure"
2240 #include "confdefs.h"
2241 #include <$ac_hdr>
2242 EOF
2243 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2244 { (eval echo configure:2245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2245 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2246 if test -z "$ac_err"; then
2247   rm -rf conftest*
2248   eval "ac_cv_header_$ac_safe=yes"
2249 else
2250   echo "$ac_err" >&5
2251   echo "configure: failed program was:" >&5
2252   cat conftest.$ac_ext >&5
2253   rm -rf conftest*
2254   eval "ac_cv_header_$ac_safe=no"
2255 fi
2256 rm -f conftest*
2257 fi
2258 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2259   echo "$ac_t""yes" 1>&6
2260     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2261   cat >> confdefs.h <<EOF
2262 #define $ac_tr_hdr 1
2263 EOF
2264  
2265 else
2266   echo "$ac_t""no" 1>&6
2267 fi
2268 done
2269
2270 for ac_hdr in stropts.h poll.h
2271 do
2272 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2273 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2274 echo "configure:2275: checking for $ac_hdr" >&5
2275 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2276   echo $ac_n "(cached) $ac_c" 1>&6
2277 else
2278   cat > conftest.$ac_ext <<EOF
2279 #line 2280 "configure"
2280 #include "confdefs.h"
2281 #include <$ac_hdr>
2282 EOF
2283 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2284 { (eval echo configure:2285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2285 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2286 if test -z "$ac_err"; then
2287   rm -rf conftest*
2288   eval "ac_cv_header_$ac_safe=yes"
2289 else
2290   echo "$ac_err" >&5
2291   echo "configure: failed program was:" >&5
2292   cat conftest.$ac_ext >&5
2293   rm -rf conftest*
2294   eval "ac_cv_header_$ac_safe=no"
2295 fi
2296 rm -f conftest*
2297 fi
2298 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2299   echo "$ac_t""yes" 1>&6
2300     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2301   cat >> confdefs.h <<EOF
2302 #define $ac_tr_hdr 1
2303 EOF
2304  
2305 else
2306   echo "$ac_t""no" 1>&6
2307 fi
2308 done
2309
2310 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2311 do
2312 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2313 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2314 echo "configure:2315: checking for $ac_hdr" >&5
2315 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2316   echo $ac_n "(cached) $ac_c" 1>&6
2317 else
2318   cat > conftest.$ac_ext <<EOF
2319 #line 2320 "configure"
2320 #include "confdefs.h"
2321 #include <$ac_hdr>
2322 EOF
2323 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2324 { (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2325 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2326 if test -z "$ac_err"; then
2327   rm -rf conftest*
2328   eval "ac_cv_header_$ac_safe=yes"
2329 else
2330   echo "$ac_err" >&5
2331   echo "configure: failed program was:" >&5
2332   cat conftest.$ac_ext >&5
2333   rm -rf conftest*
2334   eval "ac_cv_header_$ac_safe=no"
2335 fi
2336 rm -f conftest*
2337 fi
2338 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2339   echo "$ac_t""yes" 1>&6
2340     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2341   cat >> confdefs.h <<EOF
2342 #define $ac_tr_hdr 1
2343 EOF
2344  
2345 else
2346   echo "$ac_t""no" 1>&6
2347 fi
2348 done
2349
2350 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2351 do
2352 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2353 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2354 echo "configure:2355: checking for $ac_hdr" >&5
2355 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2356   echo $ac_n "(cached) $ac_c" 1>&6
2357 else
2358   cat > conftest.$ac_ext <<EOF
2359 #line 2360 "configure"
2360 #include "confdefs.h"
2361 #include <$ac_hdr>
2362 EOF
2363 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2364 { (eval echo configure:2365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2365 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2366 if test -z "$ac_err"; then
2367   rm -rf conftest*
2368   eval "ac_cv_header_$ac_safe=yes"
2369 else
2370   echo "$ac_err" >&5
2371   echo "configure: failed program was:" >&5
2372   cat conftest.$ac_ext >&5
2373   rm -rf conftest*
2374   eval "ac_cv_header_$ac_safe=no"
2375 fi
2376 rm -f conftest*
2377 fi
2378 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2379   echo "$ac_t""yes" 1>&6
2380     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2381   cat >> confdefs.h <<EOF
2382 #define $ac_tr_hdr 1
2383 EOF
2384  
2385 else
2386   echo "$ac_t""no" 1>&6
2387 fi
2388 done
2389
2390
2391 # For experimental utmp support (lastlog on some BSD-like systems)
2392 for ac_hdr in utmp.h utmpx.h lastlog.h
2393 do
2394 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2395 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2396 echo "configure:2397: checking for $ac_hdr" >&5
2397 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2398   echo $ac_n "(cached) $ac_c" 1>&6
2399 else
2400   cat > conftest.$ac_ext <<EOF
2401 #line 2402 "configure"
2402 #include "confdefs.h"
2403 #include <$ac_hdr>
2404 EOF
2405 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2406 { (eval echo configure:2407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2407 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2408 if test -z "$ac_err"; then
2409   rm -rf conftest*
2410   eval "ac_cv_header_$ac_safe=yes"
2411 else
2412   echo "$ac_err" >&5
2413   echo "configure: failed program was:" >&5
2414   cat conftest.$ac_ext >&5
2415   rm -rf conftest*
2416   eval "ac_cv_header_$ac_safe=no"
2417 fi
2418 rm -f conftest*
2419 fi
2420 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2421   echo "$ac_t""yes" 1>&6
2422     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2423   cat >> confdefs.h <<EOF
2424 #define $ac_tr_hdr 1
2425 EOF
2426  
2427 else
2428   echo "$ac_t""no" 1>&6
2429 fi
2430 done
2431
2432  
2433 # For quotas on Veritas VxFS filesystems
2434 for ac_hdr in sys/fs/vx_quota.h
2435 do
2436 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2437 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2438 echo "configure:2439: checking for $ac_hdr" >&5
2439 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2440   echo $ac_n "(cached) $ac_c" 1>&6
2441 else
2442   cat > conftest.$ac_ext <<EOF
2443 #line 2444 "configure"
2444 #include "confdefs.h"
2445 #include <$ac_hdr>
2446 EOF
2447 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2448 { (eval echo configure:2449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2449 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2450 if test -z "$ac_err"; then
2451   rm -rf conftest*
2452   eval "ac_cv_header_$ac_safe=yes"
2453 else
2454   echo "$ac_err" >&5
2455   echo "configure: failed program was:" >&5
2456   cat conftest.$ac_ext >&5
2457   rm -rf conftest*
2458   eval "ac_cv_header_$ac_safe=no"
2459 fi
2460 rm -f conftest*
2461 fi
2462 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2463   echo "$ac_t""yes" 1>&6
2464     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2465   cat >> confdefs.h <<EOF
2466 #define $ac_tr_hdr 1
2467 EOF
2468  
2469 else
2470   echo "$ac_t""no" 1>&6
2471 fi
2472 done
2473
2474
2475 echo $ac_n "checking size of int""... $ac_c" 1>&6
2476 echo "configure:2477: checking size of int" >&5
2477 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2478   echo $ac_n "(cached) $ac_c" 1>&6
2479 else
2480   if test "$cross_compiling" = yes; then
2481   ac_cv_sizeof_int=cross
2482 else
2483   cat > conftest.$ac_ext <<EOF
2484 #line 2485 "configure"
2485 #include "confdefs.h"
2486 #include <stdio.h>
2487 main()
2488 {
2489   FILE *f=fopen("conftestval", "w");
2490   if (!f) exit(1);
2491   fprintf(f, "%d\n", sizeof(int));
2492   exit(0);
2493 }
2494 EOF
2495 if { (eval echo configure:2496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2496 then
2497   ac_cv_sizeof_int=`cat conftestval`
2498 else
2499   echo "configure: failed program was:" >&5
2500   cat conftest.$ac_ext >&5
2501   rm -fr conftest*
2502   ac_cv_sizeof_int=0
2503 fi
2504 rm -fr conftest*
2505 fi
2506
2507 fi
2508 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2509 cat >> confdefs.h <<EOF
2510 #define SIZEOF_INT $ac_cv_sizeof_int
2511 EOF
2512
2513
2514 echo $ac_n "checking size of long""... $ac_c" 1>&6
2515 echo "configure:2516: checking size of long" >&5
2516 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2517   echo $ac_n "(cached) $ac_c" 1>&6
2518 else
2519   if test "$cross_compiling" = yes; then
2520   ac_cv_sizeof_long=cross
2521 else
2522   cat > conftest.$ac_ext <<EOF
2523 #line 2524 "configure"
2524 #include "confdefs.h"
2525 #include <stdio.h>
2526 main()
2527 {
2528   FILE *f=fopen("conftestval", "w");
2529   if (!f) exit(1);
2530   fprintf(f, "%d\n", sizeof(long));
2531   exit(0);
2532 }
2533 EOF
2534 if { (eval echo configure:2535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2535 then
2536   ac_cv_sizeof_long=`cat conftestval`
2537 else
2538   echo "configure: failed program was:" >&5
2539   cat conftest.$ac_ext >&5
2540   rm -fr conftest*
2541   ac_cv_sizeof_long=0
2542 fi
2543 rm -fr conftest*
2544 fi
2545
2546 fi
2547 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2548 cat >> confdefs.h <<EOF
2549 #define SIZEOF_LONG $ac_cv_sizeof_long
2550 EOF
2551
2552
2553 echo $ac_n "checking size of short""... $ac_c" 1>&6
2554 echo "configure:2555: checking size of short" >&5
2555 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2556   echo $ac_n "(cached) $ac_c" 1>&6
2557 else
2558   if test "$cross_compiling" = yes; then
2559   ac_cv_sizeof_short=cross
2560 else
2561   cat > conftest.$ac_ext <<EOF
2562 #line 2563 "configure"
2563 #include "confdefs.h"
2564 #include <stdio.h>
2565 main()
2566 {
2567   FILE *f=fopen("conftestval", "w");
2568   if (!f) exit(1);
2569   fprintf(f, "%d\n", sizeof(short));
2570   exit(0);
2571 }
2572 EOF
2573 if { (eval echo configure:2574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2574 then
2575   ac_cv_sizeof_short=`cat conftestval`
2576 else
2577   echo "configure: failed program was:" >&5
2578   cat conftest.$ac_ext >&5
2579   rm -fr conftest*
2580   ac_cv_sizeof_short=0
2581 fi
2582 rm -fr conftest*
2583 fi
2584
2585 fi
2586 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2587 cat >> confdefs.h <<EOF
2588 #define SIZEOF_SHORT $ac_cv_sizeof_short
2589 EOF
2590
2591
2592
2593 echo $ac_n "checking for working const""... $ac_c" 1>&6
2594 echo "configure:2595: checking for working const" >&5
2595 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2596   echo $ac_n "(cached) $ac_c" 1>&6
2597 else
2598   cat > conftest.$ac_ext <<EOF
2599 #line 2600 "configure"
2600 #include "confdefs.h"
2601
2602 int main() {
2603
2604 /* Ultrix mips cc rejects this.  */
2605 typedef int charset[2]; const charset x;
2606 /* SunOS 4.1.1 cc rejects this.  */
2607 char const *const *ccp;
2608 char **p;
2609 /* NEC SVR4.0.2 mips cc rejects this.  */
2610 struct point {int x, y;};
2611 static struct point const zero = {0,0};
2612 /* AIX XL C 1.02.0.0 rejects this.
2613    It does not let you subtract one const X* pointer from another in an arm
2614    of an if-expression whose if-part is not a constant expression */
2615 const char *g = "string";
2616 ccp = &g + (g ? g-g : 0);
2617 /* HPUX 7.0 cc rejects these. */
2618 ++ccp;
2619 p = (char**) ccp;
2620 ccp = (char const *const *) p;
2621 { /* SCO 3.2v4 cc rejects this.  */
2622   char *t;
2623   char const *s = 0 ? (char *) 0 : (char const *) 0;
2624
2625   *t++ = 0;
2626 }
2627 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2628   int x[] = {25, 17};
2629   const int *foo = &x[0];
2630   ++foo;
2631 }
2632 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2633   typedef const int *iptr;
2634   iptr p = 0;
2635   ++p;
2636 }
2637 { /* AIX XL C 1.02.0.0 rejects this saying
2638      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2639   struct s { int j; const int *ap[3]; };
2640   struct s *b; b->j = 5;
2641 }
2642 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2643   const int foo = 10;
2644 }
2645
2646 ; return 0; }
2647 EOF
2648 if { (eval echo configure:2649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2649   rm -rf conftest*
2650   ac_cv_c_const=yes
2651 else
2652   echo "configure: failed program was:" >&5
2653   cat conftest.$ac_ext >&5
2654   rm -rf conftest*
2655   ac_cv_c_const=no
2656 fi
2657 rm -f conftest*
2658 fi
2659
2660 echo "$ac_t""$ac_cv_c_const" 1>&6
2661 if test $ac_cv_c_const = no; then
2662   cat >> confdefs.h <<\EOF
2663 #define const 
2664 EOF
2665
2666 fi
2667
2668 echo $ac_n "checking for inline""... $ac_c" 1>&6
2669 echo "configure:2670: checking for inline" >&5
2670 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2671   echo $ac_n "(cached) $ac_c" 1>&6
2672 else
2673   ac_cv_c_inline=no
2674 for ac_kw in inline __inline__ __inline; do
2675   cat > conftest.$ac_ext <<EOF
2676 #line 2677 "configure"
2677 #include "confdefs.h"
2678
2679 int main() {
2680 } $ac_kw foo() {
2681 ; return 0; }
2682 EOF
2683 if { (eval echo configure:2684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2684   rm -rf conftest*
2685   ac_cv_c_inline=$ac_kw; break
2686 else
2687   echo "configure: failed program was:" >&5
2688   cat conftest.$ac_ext >&5
2689 fi
2690 rm -f conftest*
2691 done
2692
2693 fi
2694
2695 echo "$ac_t""$ac_cv_c_inline" 1>&6
2696 case "$ac_cv_c_inline" in
2697   inline | yes) ;;
2698   no) cat >> confdefs.h <<\EOF
2699 #define inline 
2700 EOF
2701  ;;
2702   *)  cat >> confdefs.h <<EOF
2703 #define inline $ac_cv_c_inline
2704 EOF
2705  ;;
2706 esac
2707
2708 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2709 echo "configure:2710: checking whether byte ordering is bigendian" >&5
2710 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2711   echo $ac_n "(cached) $ac_c" 1>&6
2712 else
2713   ac_cv_c_bigendian=unknown
2714 # See if sys/param.h defines the BYTE_ORDER macro.
2715 cat > conftest.$ac_ext <<EOF
2716 #line 2717 "configure"
2717 #include "confdefs.h"
2718 #include <sys/types.h>
2719 #include <sys/param.h>
2720 int main() {
2721
2722 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2723  bogus endian macros
2724 #endif
2725 ; return 0; }
2726 EOF
2727 if { (eval echo configure:2728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2728   rm -rf conftest*
2729   # It does; now see whether it defined to BIG_ENDIAN or not.
2730 cat > conftest.$ac_ext <<EOF
2731 #line 2732 "configure"
2732 #include "confdefs.h"
2733 #include <sys/types.h>
2734 #include <sys/param.h>
2735 int main() {
2736
2737 #if BYTE_ORDER != BIG_ENDIAN
2738  not big endian
2739 #endif
2740 ; return 0; }
2741 EOF
2742 if { (eval echo configure:2743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2743   rm -rf conftest*
2744   ac_cv_c_bigendian=yes
2745 else
2746   echo "configure: failed program was:" >&5
2747   cat conftest.$ac_ext >&5
2748   rm -rf conftest*
2749   ac_cv_c_bigendian=no
2750 fi
2751 rm -f conftest*
2752 else
2753   echo "configure: failed program was:" >&5
2754   cat conftest.$ac_ext >&5
2755 fi
2756 rm -f conftest*
2757 if test $ac_cv_c_bigendian = unknown; then
2758 if test "$cross_compiling" = yes; then
2759     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2760 else
2761   cat > conftest.$ac_ext <<EOF
2762 #line 2763 "configure"
2763 #include "confdefs.h"
2764 main () {
2765   /* Are we little or big endian?  From Harbison&Steele.  */
2766   union
2767   {
2768     long l;
2769     char c[sizeof (long)];
2770   } u;
2771   u.l = 1;
2772   exit (u.c[sizeof (long) - 1] == 1);
2773 }
2774 EOF
2775 if { (eval echo configure:2776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2776 then
2777   ac_cv_c_bigendian=no
2778 else
2779   echo "configure: failed program was:" >&5
2780   cat conftest.$ac_ext >&5
2781   rm -fr conftest*
2782   ac_cv_c_bigendian=yes
2783 fi
2784 rm -fr conftest*
2785 fi
2786
2787 fi
2788 fi
2789
2790 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2791 if test $ac_cv_c_bigendian = yes; then
2792   cat >> confdefs.h <<\EOF
2793 #define WORDS_BIGENDIAN 1
2794 EOF
2795
2796 fi
2797
2798 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2799 echo "configure:2800: checking whether char is unsigned" >&5
2800 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2801   echo $ac_n "(cached) $ac_c" 1>&6
2802 else
2803   if test "$GCC" = yes; then
2804   # GCC predefines this symbol on systems where it applies.
2805 cat > conftest.$ac_ext <<EOF
2806 #line 2807 "configure"
2807 #include "confdefs.h"
2808 #ifdef __CHAR_UNSIGNED__
2809   yes
2810 #endif
2811
2812 EOF
2813 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2814   egrep "yes" >/dev/null 2>&1; then
2815   rm -rf conftest*
2816   ac_cv_c_char_unsigned=yes
2817 else
2818   rm -rf conftest*
2819   ac_cv_c_char_unsigned=no
2820 fi
2821 rm -f conftest*
2822
2823 else
2824 if test "$cross_compiling" = yes; then
2825     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2826 else
2827   cat > conftest.$ac_ext <<EOF
2828 #line 2829 "configure"
2829 #include "confdefs.h"
2830 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2831 #if !defined(__STDC__) || __STDC__ != 1
2832 #define volatile
2833 #endif
2834 main() {
2835   volatile char c = 255; exit(c < 0);
2836 }
2837 EOF
2838 if { (eval echo configure:2839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2839 then
2840   ac_cv_c_char_unsigned=yes
2841 else
2842   echo "configure: failed program was:" >&5
2843   cat conftest.$ac_ext >&5
2844   rm -fr conftest*
2845   ac_cv_c_char_unsigned=no
2846 fi
2847 rm -fr conftest*
2848 fi
2849
2850 fi
2851 fi
2852
2853 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2854 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2855   cat >> confdefs.h <<\EOF
2856 #define __CHAR_UNSIGNED__ 1
2857 EOF
2858
2859 fi
2860
2861
2862 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2863 echo "configure:2864: checking return type of signal handlers" >&5
2864 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2865   echo $ac_n "(cached) $ac_c" 1>&6
2866 else
2867   cat > conftest.$ac_ext <<EOF
2868 #line 2869 "configure"
2869 #include "confdefs.h"
2870 #include <sys/types.h>
2871 #include <signal.h>
2872 #ifdef signal
2873 #undef signal
2874 #endif
2875 #ifdef __cplusplus
2876 extern "C" void (*signal (int, void (*)(int)))(int);
2877 #else
2878 void (*signal ()) ();
2879 #endif
2880
2881 int main() {
2882 int i;
2883 ; return 0; }
2884 EOF
2885 if { (eval echo configure:2886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2886   rm -rf conftest*
2887   ac_cv_type_signal=void
2888 else
2889   echo "configure: failed program was:" >&5
2890   cat conftest.$ac_ext >&5
2891   rm -rf conftest*
2892   ac_cv_type_signal=int
2893 fi
2894 rm -f conftest*
2895 fi
2896
2897 echo "$ac_t""$ac_cv_type_signal" 1>&6
2898 cat >> confdefs.h <<EOF
2899 #define RETSIGTYPE $ac_cv_type_signal
2900 EOF
2901
2902
2903 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2904 echo "configure:2905: checking for uid_t in sys/types.h" >&5
2905 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2906   echo $ac_n "(cached) $ac_c" 1>&6
2907 else
2908   cat > conftest.$ac_ext <<EOF
2909 #line 2910 "configure"
2910 #include "confdefs.h"
2911 #include <sys/types.h>
2912 EOF
2913 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2914   egrep "uid_t" >/dev/null 2>&1; then
2915   rm -rf conftest*
2916   ac_cv_type_uid_t=yes
2917 else
2918   rm -rf conftest*
2919   ac_cv_type_uid_t=no
2920 fi
2921 rm -f conftest*
2922
2923 fi
2924
2925 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2926 if test $ac_cv_type_uid_t = no; then
2927   cat >> confdefs.h <<\EOF
2928 #define uid_t int
2929 EOF
2930
2931   cat >> confdefs.h <<\EOF
2932 #define gid_t int
2933 EOF
2934
2935 fi
2936
2937 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2938 echo "configure:2939: checking for mode_t" >&5
2939 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2940   echo $ac_n "(cached) $ac_c" 1>&6
2941 else
2942   cat > conftest.$ac_ext <<EOF
2943 #line 2944 "configure"
2944 #include "confdefs.h"
2945 #include <sys/types.h>
2946 #if STDC_HEADERS
2947 #include <stdlib.h>
2948 #include <stddef.h>
2949 #endif
2950 EOF
2951 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2952   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2953   rm -rf conftest*
2954   ac_cv_type_mode_t=yes
2955 else
2956   rm -rf conftest*
2957   ac_cv_type_mode_t=no
2958 fi
2959 rm -f conftest*
2960
2961 fi
2962 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2963 if test $ac_cv_type_mode_t = no; then
2964   cat >> confdefs.h <<\EOF
2965 #define mode_t int
2966 EOF
2967
2968 fi
2969
2970 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2971 echo "configure:2972: checking for off_t" >&5
2972 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2973   echo $ac_n "(cached) $ac_c" 1>&6
2974 else
2975   cat > conftest.$ac_ext <<EOF
2976 #line 2977 "configure"
2977 #include "confdefs.h"
2978 #include <sys/types.h>
2979 #if STDC_HEADERS
2980 #include <stdlib.h>
2981 #include <stddef.h>
2982 #endif
2983 EOF
2984 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2985   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2986   rm -rf conftest*
2987   ac_cv_type_off_t=yes
2988 else
2989   rm -rf conftest*
2990   ac_cv_type_off_t=no
2991 fi
2992 rm -f conftest*
2993
2994 fi
2995 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2996 if test $ac_cv_type_off_t = no; then
2997   cat >> confdefs.h <<\EOF
2998 #define off_t long
2999 EOF
3000
3001 fi
3002
3003 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3004 echo "configure:3005: checking for size_t" >&5
3005 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3006   echo $ac_n "(cached) $ac_c" 1>&6
3007 else
3008   cat > conftest.$ac_ext <<EOF
3009 #line 3010 "configure"
3010 #include "confdefs.h"
3011 #include <sys/types.h>
3012 #if STDC_HEADERS
3013 #include <stdlib.h>
3014 #include <stddef.h>
3015 #endif
3016 EOF
3017 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3018   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3019   rm -rf conftest*
3020   ac_cv_type_size_t=yes
3021 else
3022   rm -rf conftest*
3023   ac_cv_type_size_t=no
3024 fi
3025 rm -f conftest*
3026
3027 fi
3028 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3029 if test $ac_cv_type_size_t = no; then
3030   cat >> confdefs.h <<\EOF
3031 #define size_t unsigned
3032 EOF
3033
3034 fi
3035
3036 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3037 echo "configure:3038: checking for pid_t" >&5
3038 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3039   echo $ac_n "(cached) $ac_c" 1>&6
3040 else
3041   cat > conftest.$ac_ext <<EOF
3042 #line 3043 "configure"
3043 #include "confdefs.h"
3044 #include <sys/types.h>
3045 #if STDC_HEADERS
3046 #include <stdlib.h>
3047 #include <stddef.h>
3048 #endif
3049 EOF
3050 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3051   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3052   rm -rf conftest*
3053   ac_cv_type_pid_t=yes
3054 else
3055   rm -rf conftest*
3056   ac_cv_type_pid_t=no
3057 fi
3058 rm -f conftest*
3059
3060 fi
3061 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3062 if test $ac_cv_type_pid_t = no; then
3063   cat >> confdefs.h <<\EOF
3064 #define pid_t int
3065 EOF
3066
3067 fi
3068
3069 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3070 echo "configure:3071: checking for st_rdev in struct stat" >&5
3071 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3072   echo $ac_n "(cached) $ac_c" 1>&6
3073 else
3074   cat > conftest.$ac_ext <<EOF
3075 #line 3076 "configure"
3076 #include "confdefs.h"
3077 #include <sys/types.h>
3078 #include <sys/stat.h>
3079 int main() {
3080 struct stat s; s.st_rdev;
3081 ; return 0; }
3082 EOF
3083 if { (eval echo configure:3084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3084   rm -rf conftest*
3085   ac_cv_struct_st_rdev=yes
3086 else
3087   echo "configure: failed program was:" >&5
3088   cat conftest.$ac_ext >&5
3089   rm -rf conftest*
3090   ac_cv_struct_st_rdev=no
3091 fi
3092 rm -f conftest*
3093 fi
3094
3095 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3096 if test $ac_cv_struct_st_rdev = yes; then
3097   cat >> confdefs.h <<\EOF
3098 #define HAVE_ST_RDEV 1
3099 EOF
3100
3101 fi
3102
3103 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3104 echo "configure:3105: checking for d_off in dirent" >&5
3105 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3106   echo $ac_n "(cached) $ac_c" 1>&6
3107 else
3108   cat > conftest.$ac_ext <<EOF
3109 #line 3110 "configure"
3110 #include "confdefs.h"
3111
3112 #include <unistd.h>
3113 #include <sys/types.h>
3114 #include <dirent.h>
3115 int main() {
3116 struct dirent d; d.d_off;
3117 ; return 0; }
3118 EOF
3119 if { (eval echo configure:3120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3120   rm -rf conftest*
3121   ac_cv_dirent_d_off=yes
3122 else
3123   echo "configure: failed program was:" >&5
3124   cat conftest.$ac_ext >&5
3125   rm -rf conftest*
3126   ac_cv_dirent_d_off=no
3127 fi
3128 rm -f conftest*
3129 fi
3130
3131 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3132 if test $ac_cv_dirent_d_off = yes; then
3133   cat >> confdefs.h <<\EOF
3134 #define HAVE_DIRENT_D_OFF 1
3135 EOF
3136
3137 fi
3138
3139 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3140 echo "configure:3141: checking for ino_t" >&5
3141 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3142   echo $ac_n "(cached) $ac_c" 1>&6
3143 else
3144   cat > conftest.$ac_ext <<EOF
3145 #line 3146 "configure"
3146 #include "confdefs.h"
3147 #include <sys/types.h>
3148 #if STDC_HEADERS
3149 #include <stdlib.h>
3150 #include <stddef.h>
3151 #endif
3152 EOF
3153 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3154   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3155   rm -rf conftest*
3156   ac_cv_type_ino_t=yes
3157 else
3158   rm -rf conftest*
3159   ac_cv_type_ino_t=no
3160 fi
3161 rm -f conftest*
3162
3163 fi
3164 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3165 if test $ac_cv_type_ino_t = no; then
3166   cat >> confdefs.h <<\EOF
3167 #define ino_t unsigned
3168 EOF
3169
3170 fi
3171
3172 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3173 echo "configure:3174: checking for loff_t" >&5
3174 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3175   echo $ac_n "(cached) $ac_c" 1>&6
3176 else
3177   cat > conftest.$ac_ext <<EOF
3178 #line 3179 "configure"
3179 #include "confdefs.h"
3180 #include <sys/types.h>
3181 #if STDC_HEADERS
3182 #include <stdlib.h>
3183 #include <stddef.h>
3184 #endif
3185 EOF
3186 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3187   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3188   rm -rf conftest*
3189   ac_cv_type_loff_t=yes
3190 else
3191   rm -rf conftest*
3192   ac_cv_type_loff_t=no
3193 fi
3194 rm -f conftest*
3195
3196 fi
3197 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3198 if test $ac_cv_type_loff_t = no; then
3199   cat >> confdefs.h <<\EOF
3200 #define loff_t off_t
3201 EOF
3202
3203 fi
3204
3205 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3206 echo "configure:3207: checking for offset_t" >&5
3207 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3208   echo $ac_n "(cached) $ac_c" 1>&6
3209 else
3210   cat > conftest.$ac_ext <<EOF
3211 #line 3212 "configure"
3212 #include "confdefs.h"
3213 #include <sys/types.h>
3214 #if STDC_HEADERS
3215 #include <stdlib.h>
3216 #include <stddef.h>
3217 #endif
3218 EOF
3219 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3220   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3221   rm -rf conftest*
3222   ac_cv_type_offset_t=yes
3223 else
3224   rm -rf conftest*
3225   ac_cv_type_offset_t=no
3226 fi
3227 rm -f conftest*
3228
3229 fi
3230 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3231 if test $ac_cv_type_offset_t = no; then
3232   cat >> confdefs.h <<\EOF
3233 #define offset_t loff_t
3234 EOF
3235
3236 fi
3237
3238 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3239 echo "configure:3240: checking for ssize_t" >&5
3240 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3241   echo $ac_n "(cached) $ac_c" 1>&6
3242 else
3243   cat > conftest.$ac_ext <<EOF
3244 #line 3245 "configure"
3245 #include "confdefs.h"
3246 #include <sys/types.h>
3247 #if STDC_HEADERS
3248 #include <stdlib.h>
3249 #include <stddef.h>
3250 #endif
3251 EOF
3252 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3253   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3254   rm -rf conftest*
3255   ac_cv_type_ssize_t=yes
3256 else
3257   rm -rf conftest*
3258   ac_cv_type_ssize_t=no
3259 fi
3260 rm -f conftest*
3261
3262 fi
3263 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3264 if test $ac_cv_type_ssize_t = no; then
3265   cat >> confdefs.h <<\EOF
3266 #define ssize_t int
3267 EOF
3268
3269 fi
3270
3271 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3272 echo "configure:3273: checking for wchar_t" >&5
3273 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3274   echo $ac_n "(cached) $ac_c" 1>&6
3275 else
3276   cat > conftest.$ac_ext <<EOF
3277 #line 3278 "configure"
3278 #include "confdefs.h"
3279 #include <sys/types.h>
3280 #if STDC_HEADERS
3281 #include <stdlib.h>
3282 #include <stddef.h>
3283 #endif
3284 EOF
3285 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3286   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3287   rm -rf conftest*
3288   ac_cv_type_wchar_t=yes
3289 else
3290   rm -rf conftest*
3291   ac_cv_type_wchar_t=no
3292 fi
3293 rm -f conftest*
3294
3295 fi
3296 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3297 if test $ac_cv_type_wchar_t = no; then
3298   cat >> confdefs.h <<\EOF
3299 #define wchar_t unsigned short
3300 EOF
3301
3302 fi
3303
3304
3305 ############################################
3306 # for cups support we need libcups, and a handful of header files
3307
3308 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3309 echo "configure:3310: checking for httpConnect in -lcups" >&5
3310 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3311 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3312   echo $ac_n "(cached) $ac_c" 1>&6
3313 else
3314   ac_save_LIBS="$LIBS"
3315 LIBS="-lcups  $LIBS"
3316 cat > conftest.$ac_ext <<EOF
3317 #line 3318 "configure"
3318 #include "confdefs.h"
3319 /* Override any gcc2 internal prototype to avoid an error.  */
3320 /* We use char because int might match the return type of a gcc2
3321     builtin and then its argument prototype would still apply.  */
3322 char httpConnect();
3323
3324 int main() {
3325 httpConnect()
3326 ; return 0; }
3327 EOF
3328 if { (eval echo configure:3329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3329   rm -rf conftest*
3330   eval "ac_cv_lib_$ac_lib_var=yes"
3331 else
3332   echo "configure: failed program was:" >&5
3333   cat conftest.$ac_ext >&5
3334   rm -rf conftest*
3335   eval "ac_cv_lib_$ac_lib_var=no"
3336 fi
3337 rm -f conftest*
3338 LIBS="$ac_save_LIBS"
3339
3340 fi
3341 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3342   echo "$ac_t""yes" 1>&6
3343     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3344     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3345   cat >> confdefs.h <<EOF
3346 #define $ac_tr_lib 1
3347 EOF
3348
3349   LIBS="-lcups $LIBS"
3350
3351 else
3352   echo "$ac_t""no" 1>&6
3353 fi
3354
3355
3356 # I wonder if there is a nicer way of doing this?
3357
3358 if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
3359         for ac_hdr in cups/cups.h cups/language.h
3360 do
3361 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3362 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3363 echo "configure:3364: checking for $ac_hdr" >&5
3364 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3365   echo $ac_n "(cached) $ac_c" 1>&6
3366 else
3367   cat > conftest.$ac_ext <<EOF
3368 #line 3369 "configure"
3369 #include "confdefs.h"
3370 #include <$ac_hdr>
3371 EOF
3372 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3373 { (eval echo configure:3374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3374 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3375 if test -z "$ac_err"; then
3376   rm -rf conftest*
3377   eval "ac_cv_header_$ac_safe=yes"
3378 else
3379   echo "$ac_err" >&5
3380   echo "configure: failed program was:" >&5
3381   cat conftest.$ac_ext >&5
3382   rm -rf conftest*
3383   eval "ac_cv_header_$ac_safe=no"
3384 fi
3385 rm -f conftest*
3386 fi
3387 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3388   echo "$ac_t""yes" 1>&6
3389     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3390   cat >> confdefs.h <<EOF
3391 #define $ac_tr_hdr 1
3392 EOF
3393  
3394 else
3395   echo "$ac_t""no" 1>&6
3396 fi
3397 done
3398
3399         if x"$ac_cv_header_cups_cups_h" = x"yes"; then
3400                 if x"$ac_cv_header_cups_language_h" = x"yes"; then
3401                         cat >> confdefs.h <<\EOF
3402 #define HAVE_CUPS 1
3403 EOF
3404
3405                 fi
3406         fi
3407 fi
3408
3409 ############################################
3410 # we need libdl for PAM and the new VFS code
3411 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3412 echo "configure:3413: checking for dlopen in -ldl" >&5
3413 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3414 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3415   echo $ac_n "(cached) $ac_c" 1>&6
3416 else
3417   ac_save_LIBS="$LIBS"
3418 LIBS="-ldl  $LIBS"
3419 cat > conftest.$ac_ext <<EOF
3420 #line 3421 "configure"
3421 #include "confdefs.h"
3422 /* Override any gcc2 internal prototype to avoid an error.  */
3423 /* We use char because int might match the return type of a gcc2
3424     builtin and then its argument prototype would still apply.  */
3425 char dlopen();
3426
3427 int main() {
3428 dlopen()
3429 ; return 0; }
3430 EOF
3431 if { (eval echo configure:3432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3432   rm -rf conftest*
3433   eval "ac_cv_lib_$ac_lib_var=yes"
3434 else
3435   echo "configure: failed program was:" >&5
3436   cat conftest.$ac_ext >&5
3437   rm -rf conftest*
3438   eval "ac_cv_lib_$ac_lib_var=no"
3439 fi
3440 rm -f conftest*
3441 LIBS="$ac_save_LIBS"
3442
3443 fi
3444 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3445   echo "$ac_t""yes" 1>&6
3446   LIBS="$LIBS -ldl";
3447         cat >> confdefs.h <<\EOF
3448 #define HAVE_LIBDL 1
3449 EOF
3450
3451 else
3452   echo "$ac_t""no" 1>&6
3453 fi
3454
3455
3456
3457 ############################################
3458 # check if the compiler can do immediate structures
3459 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3460 echo "configure:3461: checking for immediate structures" >&5
3461 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3462   echo $ac_n "(cached) $ac_c" 1>&6
3463 else
3464   
3465     cat > conftest.$ac_ext <<EOF
3466 #line 3467 "configure"
3467 #include "confdefs.h"
3468
3469 #include <stdio.h>
3470 int main() {
3471
3472    #define X_FOOBAR(x) ((FOOBAR) { x })
3473    typedef struct {unsigned x;} FOOBAR;
3474    FOOBAR f = X_FOOBAR(1);   
3475
3476 ; return 0; }
3477 EOF
3478 if { (eval echo configure:3479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3479   rm -rf conftest*
3480   samba_cv_immediate_structures=yes
3481 else
3482   echo "configure: failed program was:" >&5
3483   cat conftest.$ac_ext >&5
3484   rm -rf conftest*
3485   samba_cv_immediate_structures=no
3486 fi
3487 rm -f conftest*
3488 fi
3489
3490 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3491 if test x"$samba_cv_immediate_structures" = x"yes"; then
3492    cat >> confdefs.h <<\EOF
3493 #define HAVE_IMMEDIATE_STRUCTURES 1
3494 EOF
3495
3496 fi
3497
3498 ############################################
3499 # check for unix domain sockets
3500 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3501 echo "configure:3502: checking for unix domain sockets" >&5
3502 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3503   echo $ac_n "(cached) $ac_c" 1>&6
3504 else
3505   
3506     cat > conftest.$ac_ext <<EOF
3507 #line 3508 "configure"
3508 #include "confdefs.h"
3509
3510 #include <sys/types.h>
3511 #include <stdlib.h>
3512 #include <stddef.h>
3513 #include <sys/socket.h>
3514 #include <sys/un.h>
3515 int main() {
3516
3517   struct sockaddr_un sunaddr; 
3518   sunaddr.sun_family = AF_UNIX;
3519
3520 ; return 0; }
3521 EOF
3522 if { (eval echo configure:3523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3523   rm -rf conftest*
3524   samba_cv_unixsocket=yes
3525 else
3526   echo "configure: failed program was:" >&5
3527   cat conftest.$ac_ext >&5
3528   rm -rf conftest*
3529   samba_cv_unixsocket=no
3530 fi
3531 rm -f conftest*
3532 fi
3533
3534 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3535 if test x"$samba_cv_unixsocket" = x"yes"; then
3536    cat >> confdefs.h <<\EOF
3537 #define HAVE_UNIXSOCKET 1
3538 EOF
3539
3540 fi
3541
3542
3543 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3544 echo "configure:3545: checking for socklen_t type" >&5
3545 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3546   echo $ac_n "(cached) $ac_c" 1>&6
3547 else
3548   
3549     cat > conftest.$ac_ext <<EOF
3550 #line 3551 "configure"
3551 #include "confdefs.h"
3552
3553 #include <sys/types.h>
3554 #if STDC_HEADERS
3555 #include <stdlib.h>
3556 #include <stddef.h>
3557 #endif
3558 #include <sys/socket.h>
3559 int main() {
3560 socklen_t i = 0
3561 ; return 0; }
3562 EOF
3563 if { (eval echo configure:3564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3564   rm -rf conftest*
3565   samba_cv_socklen_t=yes
3566 else
3567   echo "configure: failed program was:" >&5
3568   cat conftest.$ac_ext >&5
3569   rm -rf conftest*
3570   samba_cv_socklen_t=no
3571 fi
3572 rm -f conftest*
3573 fi
3574
3575 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3576 if test x"$samba_cv_socklen_t" = x"yes"; then
3577    cat >> confdefs.h <<\EOF
3578 #define HAVE_SOCKLEN_T_TYPE 1
3579 EOF
3580
3581 fi
3582
3583 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3584 echo "configure:3585: checking for sig_atomic_t type" >&5
3585 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3586   echo $ac_n "(cached) $ac_c" 1>&6
3587 else
3588   
3589     cat > conftest.$ac_ext <<EOF
3590 #line 3591 "configure"
3591 #include "confdefs.h"
3592
3593 #include <sys/types.h>
3594 #if STDC_HEADERS
3595 #include <stdlib.h>
3596 #include <stddef.h>
3597 #endif
3598 #include <signal.h>
3599 int main() {
3600 sig_atomic_t i = 0
3601 ; return 0; }
3602 EOF
3603 if { (eval echo configure:3604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3604   rm -rf conftest*
3605   samba_cv_sig_atomic_t=yes
3606 else
3607   echo "configure: failed program was:" >&5
3608   cat conftest.$ac_ext >&5
3609   rm -rf conftest*
3610   samba_cv_sig_atomic_t=no
3611 fi
3612 rm -f conftest*
3613 fi
3614
3615 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3616 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3617    cat >> confdefs.h <<\EOF
3618 #define HAVE_SIG_ATOMIC_T_TYPE 1
3619 EOF
3620
3621 fi
3622
3623 # stupid headers have the functions but no declaration. grrrr.
3624
3625  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
3626 echo "configure:3627: checking for errno declaration" >&5
3627 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
3628   echo $ac_n "(cached) $ac_c" 1>&6
3629 else
3630   
3631     cat > conftest.$ac_ext <<EOF
3632 #line 3633 "configure"
3633 #include "confdefs.h"
3634 #include <errno.h>
3635 int main() {
3636 int i = (int)errno
3637 ; return 0; }
3638 EOF
3639 if { (eval echo configure:3640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3640   rm -rf conftest*
3641   ac_cv_have_errno_decl=yes
3642 else
3643   echo "configure: failed program was:" >&5
3644   cat conftest.$ac_ext >&5
3645   rm -rf conftest*
3646   ac_cv_have_errno_decl=no
3647 fi
3648 rm -f conftest*
3649 fi
3650
3651 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
3652  if test x"$ac_cv_have_errno_decl" = x"yes"; then
3653     cat >> confdefs.h <<\EOF
3654 #define HAVE_ERRNO_DECL 1
3655 EOF
3656
3657  fi
3658
3659
3660  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3661 echo "configure:3662: checking for setresuid declaration" >&5
3662 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
3663   echo $ac_n "(cached) $ac_c" 1>&6
3664 else
3665   
3666     cat > conftest.$ac_ext <<EOF
3667 #line 3668 "configure"
3668 #include "confdefs.h"
3669 #include <unistd.h>
3670 int main() {
3671 int i = (int)setresuid
3672 ; return 0; }
3673 EOF
3674 if { (eval echo configure:3675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3675   rm -rf conftest*
3676   ac_cv_have_setresuid_decl=yes
3677 else
3678   echo "configure: failed program was:" >&5
3679   cat conftest.$ac_ext >&5
3680   rm -rf conftest*
3681   ac_cv_have_setresuid_decl=no
3682 fi
3683 rm -f conftest*
3684 fi
3685
3686 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
3687  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
3688     cat >> confdefs.h <<\EOF
3689 #define HAVE_SETRESUID_DECL 1
3690 EOF
3691
3692  fi
3693
3694
3695  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
3696 echo "configure:3697: checking for setresgid declaration" >&5
3697 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
3698   echo $ac_n "(cached) $ac_c" 1>&6
3699 else
3700   
3701     cat > conftest.$ac_ext <<EOF
3702 #line 3703 "configure"
3703 #include "confdefs.h"
3704 #include <unistd.h>
3705 int main() {
3706 int i = (int)setresgid
3707 ; return 0; }
3708 EOF
3709 if { (eval echo configure:3710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3710   rm -rf conftest*
3711   ac_cv_have_setresgid_decl=yes
3712 else
3713   echo "configure: failed program was:" >&5
3714   cat conftest.$ac_ext >&5
3715   rm -rf conftest*
3716   ac_cv_have_setresgid_decl=no
3717 fi
3718 rm -f conftest*
3719 fi
3720
3721 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
3722  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
3723     cat >> confdefs.h <<\EOF
3724 #define HAVE_SETRESGID_DECL 1
3725 EOF
3726
3727  fi
3728
3729
3730  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
3731 echo "configure:3732: checking for asprintf declaration" >&5
3732 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
3733   echo $ac_n "(cached) $ac_c" 1>&6
3734 else
3735   
3736     cat > conftest.$ac_ext <<EOF
3737 #line 3738 "configure"
3738 #include "confdefs.h"
3739 #include <stdio.h>
3740 int main() {
3741 int i = (int)asprintf
3742 ; return 0; }
3743 EOF
3744 if { (eval echo configure:3745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3745   rm -rf conftest*
3746   ac_cv_have_asprintf_decl=yes
3747 else
3748   echo "configure: failed program was:" >&5
3749   cat conftest.$ac_ext >&5
3750   rm -rf conftest*
3751   ac_cv_have_asprintf_decl=no
3752 fi
3753 rm -f conftest*
3754 fi
3755
3756 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
3757  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
3758     cat >> confdefs.h <<\EOF
3759 #define HAVE_ASPRINTF_DECL 1
3760 EOF
3761
3762  fi
3763
3764
3765  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
3766 echo "configure:3767: checking for vasprintf declaration" >&5
3767 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
3768   echo $ac_n "(cached) $ac_c" 1>&6
3769 else
3770   
3771     cat > conftest.$ac_ext <<EOF
3772 #line 3773 "configure"
3773 #include "confdefs.h"
3774 #include <stdio.h>
3775 int main() {
3776 int i = (int)vasprintf
3777 ; return 0; }
3778 EOF
3779 if { (eval echo configure:3780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3780   rm -rf conftest*
3781   ac_cv_have_vasprintf_decl=yes
3782 else
3783   echo "configure: failed program was:" >&5
3784   cat conftest.$ac_ext >&5
3785   rm -rf conftest*
3786   ac_cv_have_vasprintf_decl=no
3787 fi
3788 rm -f conftest*
3789 fi
3790
3791 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
3792  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
3793     cat >> confdefs.h <<\EOF
3794 #define HAVE_VASPRINTF_DECL 1
3795 EOF
3796
3797  fi
3798
3799
3800  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
3801 echo "configure:3802: checking for vsnprintf declaration" >&5
3802 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
3803   echo $ac_n "(cached) $ac_c" 1>&6
3804 else
3805   
3806     cat > conftest.$ac_ext <<EOF
3807 #line 3808 "configure"
3808 #include "confdefs.h"
3809 #include <stdio.h>
3810 int main() {
3811 int i = (int)vsnprintf
3812 ; return 0; }
3813 EOF
3814 if { (eval echo configure:3815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3815   rm -rf conftest*
3816   ac_cv_have_vsnprintf_decl=yes
3817 else
3818   echo "configure: failed program was:" >&5
3819   cat conftest.$ac_ext >&5
3820   rm -rf conftest*
3821   ac_cv_have_vsnprintf_decl=no
3822 fi
3823 rm -f conftest*
3824 fi
3825
3826 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
3827  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
3828     cat >> confdefs.h <<\EOF
3829 #define HAVE_VSNPRINTF_DECL 1
3830 EOF
3831
3832  fi
3833
3834
3835  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
3836 echo "configure:3837: checking for snprintf declaration" >&5
3837 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
3838   echo $ac_n "(cached) $ac_c" 1>&6
3839 else
3840   
3841     cat > conftest.$ac_ext <<EOF
3842 #line 3843 "configure"
3843 #include "confdefs.h"
3844 #include <stdio.h>
3845 int main() {
3846 int i = (int)snprintf
3847 ; return 0; }
3848 EOF
3849 if { (eval echo configure:3850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3850   rm -rf conftest*
3851   ac_cv_have_snprintf_decl=yes
3852 else
3853   echo "configure: failed program was:" >&5
3854   cat conftest.$ac_ext >&5
3855   rm -rf conftest*
3856   ac_cv_have_snprintf_decl=no
3857 fi
3858 rm -f conftest*
3859 fi
3860
3861 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
3862  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
3863     cat >> confdefs.h <<\EOF
3864 #define HAVE_SNPRINTF_DECL 1
3865 EOF
3866
3867  fi
3868
3869
3870 # and glibc has setresuid under linux but the function does
3871 # nothing until kernel 2.1.44! very dumb.
3872 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
3873 echo "configure:3874: checking for real setresuid" >&5
3874 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
3875   echo $ac_n "(cached) $ac_c" 1>&6
3876 else
3877   
3878     if test "$cross_compiling" = yes; then
3879   samba_cv_have_setresuid=cross
3880 else
3881   cat > conftest.$ac_ext <<EOF
3882 #line 3883 "configure"
3883 #include "confdefs.h"
3884 #include <errno.h>
3885 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
3886 EOF
3887 if { (eval echo configure:3888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3888 then
3889   samba_cv_have_setresuid=yes
3890 else
3891   echo "configure: failed program was:" >&5
3892   cat conftest.$ac_ext >&5
3893   rm -fr conftest*
3894   samba_cv_have_setresuid=no
3895 fi
3896 rm -fr conftest*
3897 fi
3898
3899 fi
3900
3901 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
3902 if test x"$samba_cv_have_setresuid" = x"yes"; then
3903     cat >> confdefs.h <<\EOF
3904 #define HAVE_SETRESUID 1
3905 EOF
3906
3907 fi
3908
3909 # Do the same check for setresguid...
3910 #
3911 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
3912 echo "configure:3913: checking for real setresgid" >&5
3913 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
3914   echo $ac_n "(cached) $ac_c" 1>&6
3915 else
3916   
3917     if test "$cross_compiling" = yes; then
3918   samba_cv_have_setresgid=cross
3919 else
3920   cat > conftest.$ac_ext <<EOF
3921 #line 3922 "configure"
3922 #include "confdefs.h"
3923 #include <unistd.h>
3924 #include <errno.h>
3925 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
3926 EOF
3927 if { (eval echo configure:3928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3928 then
3929   samba_cv_have_setresgid=yes
3930 else
3931   echo "configure: failed program was:" >&5
3932   cat conftest.$ac_ext >&5
3933   rm -fr conftest*
3934   samba_cv_have_setresgid=no
3935 fi
3936 rm -fr conftest*
3937 fi
3938
3939 fi
3940
3941 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
3942 if test x"$samba_cv_have_setresgid" = x"yes"; then
3943     cat >> confdefs.h <<\EOF
3944 #define HAVE_SETRESGID 1
3945 EOF
3946
3947 fi
3948
3949 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
3950 echo "configure:3951: checking for 8-bit clean memcmp" >&5
3951 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
3952   echo $ac_n "(cached) $ac_c" 1>&6
3953 else
3954   if test "$cross_compiling" = yes; then
3955   ac_cv_func_memcmp_clean=no
3956 else
3957   cat > conftest.$ac_ext <<EOF
3958 #line 3959 "configure"
3959 #include "confdefs.h"
3960
3961 main()
3962 {
3963   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
3964   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
3965 }
3966
3967 EOF
3968 if { (eval echo configure:3969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3969 then
3970   ac_cv_func_memcmp_clean=yes
3971 else
3972   echo "configure: failed program was:" >&5
3973   cat conftest.$ac_ext >&5
3974   rm -fr conftest*
3975   ac_cv_func_memcmp_clean=no
3976 fi
3977 rm -fr conftest*
3978 fi
3979
3980 fi
3981
3982 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
3983 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
3984
3985
3986 ###############################################
3987 # test for where we get crypt() from
3988 for ac_func in crypt
3989 do
3990 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3991 echo "configure:3992: checking for $ac_func" >&5
3992 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3993   echo $ac_n "(cached) $ac_c" 1>&6
3994 else
3995   cat > conftest.$ac_ext <<EOF
3996 #line 3997 "configure"
3997 #include "confdefs.h"
3998 /* System header to define __stub macros and hopefully few prototypes,
3999     which can conflict with char $ac_func(); below.  */
4000 #include <assert.h>
4001 /* Override any gcc2 internal prototype to avoid an error.  */
4002 /* We use char because int might match the return type of a gcc2
4003     builtin and then its argument prototype would still apply.  */
4004 char $ac_func();
4005
4006 int main() {
4007
4008 /* The GNU C library defines this for functions which it implements
4009     to always fail with ENOSYS.  Some functions are actually named
4010     something starting with __ and the normal name is an alias.  */
4011 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4012 choke me
4013 #else
4014 $ac_func();
4015 #endif
4016
4017 ; return 0; }
4018 EOF
4019 if { (eval echo configure:4020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4020   rm -rf conftest*
4021   eval "ac_cv_func_$ac_func=yes"
4022 else
4023   echo "configure: failed program was:" >&5
4024   cat conftest.$ac_ext >&5
4025   rm -rf conftest*
4026   eval "ac_cv_func_$ac_func=no"
4027 fi
4028 rm -f conftest*
4029 fi
4030
4031 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4032   echo "$ac_t""yes" 1>&6
4033     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4034   cat >> confdefs.h <<EOF
4035 #define $ac_tr_func 1
4036 EOF
4037  
4038 else
4039   echo "$ac_t""no" 1>&6
4040 fi
4041 done
4042
4043 if test x"$ac_cv_func_crypt" = x"no"; then
4044     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4045 echo "configure:4046: checking for crypt in -lcrypt" >&5
4046 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4047 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4048   echo $ac_n "(cached) $ac_c" 1>&6
4049 else
4050   ac_save_LIBS="$LIBS"
4051 LIBS="-lcrypt  $LIBS"
4052 cat > conftest.$ac_ext <<EOF
4053 #line 4054 "configure"
4054 #include "confdefs.h"
4055 /* Override any gcc2 internal prototype to avoid an error.  */
4056 /* We use char because int might match the return type of a gcc2
4057     builtin and then its argument prototype would still apply.  */
4058 char crypt();
4059
4060 int main() {
4061 crypt()
4062 ; return 0; }
4063 EOF
4064 if { (eval echo configure:4065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4065   rm -rf conftest*
4066   eval "ac_cv_lib_$ac_lib_var=yes"
4067 else
4068   echo "configure: failed program was:" >&5
4069   cat conftest.$ac_ext >&5
4070   rm -rf conftest*
4071   eval "ac_cv_lib_$ac_lib_var=no"
4072 fi
4073 rm -f conftest*
4074 LIBS="$ac_save_LIBS"
4075
4076 fi
4077 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4078   echo "$ac_t""yes" 1>&6
4079   LIBS="$LIBS -lcrypt";
4080         cat >> confdefs.h <<\EOF
4081 #define HAVE_CRYPT 1
4082 EOF
4083
4084 else
4085   echo "$ac_t""no" 1>&6
4086 fi
4087
4088 fi
4089
4090
4091 ###############################################
4092 # Readline included by default unless explicitly asked not to
4093 test "${with_readline+set}" != "set" && with_readline=yes
4094
4095 # test for where we get readline() from
4096 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4097 echo "configure:4098: checking whether to use readline" >&5
4098 # Check whether --with-readline or --without-readline was given.
4099 if test "${with_readline+set}" = set; then
4100   withval="$with_readline"
4101     case "$with_readline" in
4102   yes)
4103     echo "$ac_t""yes" 1>&6
4104
4105     for ac_hdr in readline.h history.h readline/readline.h
4106 do
4107 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4108 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4109 echo "configure:4110: checking for $ac_hdr" >&5
4110 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4111   echo $ac_n "(cached) $ac_c" 1>&6
4112 else
4113   cat > conftest.$ac_ext <<EOF
4114 #line 4115 "configure"
4115 #include "confdefs.h"
4116 #include <$ac_hdr>
4117 EOF
4118 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4119 { (eval echo configure:4120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4120 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4121 if test -z "$ac_err"; then
4122   rm -rf conftest*
4123   eval "ac_cv_header_$ac_safe=yes"
4124 else
4125   echo "$ac_err" >&5
4126   echo "configure: failed program was:" >&5
4127   cat conftest.$ac_ext >&5
4128   rm -rf conftest*
4129   eval "ac_cv_header_$ac_safe=no"
4130 fi
4131 rm -f conftest*
4132 fi
4133 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4134   echo "$ac_t""yes" 1>&6
4135     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4136   cat >> confdefs.h <<EOF
4137 #define $ac_tr_hdr 1
4138 EOF
4139  
4140 else
4141   echo "$ac_t""no" 1>&6
4142 fi
4143 done
4144
4145     for ac_hdr in readline/history.h
4146 do
4147 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4148 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4149 echo "configure:4150: checking for $ac_hdr" >&5
4150 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4151   echo $ac_n "(cached) $ac_c" 1>&6
4152 else
4153   cat > conftest.$ac_ext <<EOF
4154 #line 4155 "configure"
4155 #include "confdefs.h"
4156 #include <$ac_hdr>
4157 EOF
4158 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4159 { (eval echo configure:4160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4160 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4161 if test -z "$ac_err"; then
4162   rm -rf conftest*
4163   eval "ac_cv_header_$ac_safe=yes"
4164 else
4165   echo "$ac_err" >&5
4166   echo "configure: failed program was:" >&5
4167   cat conftest.$ac_ext >&5
4168   rm -rf conftest*
4169   eval "ac_cv_header_$ac_safe=no"
4170 fi
4171 rm -f conftest*
4172 fi
4173 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4174   echo "$ac_t""yes" 1>&6
4175     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4176   cat >> confdefs.h <<EOF
4177 #define $ac_tr_hdr 1
4178 EOF
4179  
4180 else
4181   echo "$ac_t""no" 1>&6
4182 fi
4183 done
4184
4185
4186     for ac_hdr in readline.h readline/readline.h
4187 do
4188 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4189 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4190 echo "configure:4191: checking for $ac_hdr" >&5
4191 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4192   echo $ac_n "(cached) $ac_c" 1>&6
4193 else
4194   cat > conftest.$ac_ext <<EOF
4195 #line 4196 "configure"
4196 #include "confdefs.h"
4197 #include <$ac_hdr>
4198 EOF
4199 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4200 { (eval echo configure:4201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4201 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4202 if test -z "$ac_err"; then
4203   rm -rf conftest*
4204   eval "ac_cv_header_$ac_safe=yes"
4205 else
4206   echo "$ac_err" >&5
4207   echo "configure: failed program was:" >&5
4208   cat conftest.$ac_ext >&5
4209   rm -rf conftest*
4210   eval "ac_cv_header_$ac_safe=no"
4211 fi
4212 rm -f conftest*
4213 fi
4214 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4215   echo "$ac_t""yes" 1>&6
4216     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4217   cat >> confdefs.h <<EOF
4218 #define $ac_tr_hdr 1
4219 EOF
4220  
4221       for termlib in ncurses curses termcap terminfo termlib; do
4222        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4223 echo "configure:4224: checking for tgetent in -l${termlib}" >&5
4224 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4225 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4226   echo $ac_n "(cached) $ac_c" 1>&6
4227 else
4228   ac_save_LIBS="$LIBS"
4229 LIBS="-l${termlib}  $LIBS"
4230 cat > conftest.$ac_ext <<EOF
4231 #line 4232 "configure"
4232 #include "confdefs.h"
4233 /* Override any gcc2 internal prototype to avoid an error.  */
4234 /* We use char because int might match the return type of a gcc2
4235     builtin and then its argument prototype would still apply.  */
4236 char tgetent();
4237
4238 int main() {
4239 tgetent()
4240 ; return 0; }
4241 EOF
4242 if { (eval echo configure:4243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4243   rm -rf conftest*
4244   eval "ac_cv_lib_$ac_lib_var=yes"
4245 else
4246   echo "configure: failed program was:" >&5
4247   cat conftest.$ac_ext >&5
4248   rm -rf conftest*
4249   eval "ac_cv_lib_$ac_lib_var=no"
4250 fi
4251 rm -f conftest*
4252 LIBS="$ac_save_LIBS"
4253
4254 fi
4255 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4256   echo "$ac_t""yes" 1>&6
4257   TERMLIBS="-l${termlib}"; break
4258 else
4259   echo "$ac_t""no" 1>&6
4260 fi
4261
4262       done
4263       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4264 echo "configure:4265: checking for rl_callback_handler_install in -lreadline" >&5
4265 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4266 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4267   echo $ac_n "(cached) $ac_c" 1>&6
4268 else
4269   ac_save_LIBS="$LIBS"
4270 LIBS="-lreadline $TERMLIBS $LIBS"
4271 cat > conftest.$ac_ext <<EOF
4272 #line 4273 "configure"
4273 #include "confdefs.h"
4274 /* Override any gcc2 internal prototype to avoid an error.  */
4275 /* We use char because int might match the return type of a gcc2
4276     builtin and then its argument prototype would still apply.  */
4277 char rl_callback_handler_install();
4278
4279 int main() {
4280 rl_callback_handler_install()
4281 ; return 0; }
4282 EOF
4283 if { (eval echo configure:4284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4284   rm -rf conftest*
4285   eval "ac_cv_lib_$ac_lib_var=yes"
4286 else
4287   echo "configure: failed program was:" >&5
4288   cat conftest.$ac_ext >&5
4289   rm -rf conftest*
4290   eval "ac_cv_lib_$ac_lib_var=no"
4291 fi
4292 rm -f conftest*
4293 LIBS="$ac_save_LIBS"
4294
4295 fi
4296 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4297   echo "$ac_t""yes" 1>&6
4298   TERMLIBS="-lreadline $TERMLIBS"
4299        cat >> confdefs.h <<\EOF
4300 #define HAVE_LIBREADLINE 1
4301 EOF
4302
4303        break
4304 else
4305   echo "$ac_t""no" 1>&6
4306 TERMLIBS=
4307 fi
4308
4309 else
4310   echo "$ac_t""no" 1>&6
4311 fi
4312 done
4313
4314     ;;
4315   no)
4316     echo "$ac_t""no" 1>&6
4317     ;;
4318   *)
4319     echo "$ac_t""yes" 1>&6
4320
4321     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4322     # alternate readline path
4323     _ldflags=${LDFLAGS}
4324     _cppflags=${CPPFLAGS}
4325
4326     # Add additional search path
4327     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4328     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4329
4330     for ac_hdr in readline.h history.h readline/readline.h
4331 do
4332 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4333 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4334 echo "configure:4335: checking for $ac_hdr" >&5
4335 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4336   echo $ac_n "(cached) $ac_c" 1>&6
4337 else
4338   cat > conftest.$ac_ext <<EOF
4339 #line 4340 "configure"
4340 #include "confdefs.h"
4341 #include <$ac_hdr>
4342 EOF
4343 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4344 { (eval echo configure:4345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4345 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4346 if test -z "$ac_err"; then
4347   rm -rf conftest*
4348   eval "ac_cv_header_$ac_safe=yes"
4349 else
4350   echo "$ac_err" >&5
4351   echo "configure: failed program was:" >&5
4352   cat conftest.$ac_ext >&5
4353   rm -rf conftest*
4354   eval "ac_cv_header_$ac_safe=no"
4355 fi
4356 rm -f conftest*
4357 fi
4358 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4359   echo "$ac_t""yes" 1>&6
4360     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4361   cat >> confdefs.h <<EOF
4362 #define $ac_tr_hdr 1
4363 EOF
4364  
4365 else
4366   echo "$ac_t""no" 1>&6
4367 fi
4368 done
4369
4370     for ac_hdr in readline/history.h
4371 do
4372 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4373 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4374 echo "configure:4375: checking for $ac_hdr" >&5
4375 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4376   echo $ac_n "(cached) $ac_c" 1>&6
4377 else
4378   cat > conftest.$ac_ext <<EOF
4379 #line 4380 "configure"
4380 #include "confdefs.h"
4381 #include <$ac_hdr>
4382 EOF
4383 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4384 { (eval echo configure:4385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4385 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4386 if test -z "$ac_err"; then
4387   rm -rf conftest*
4388   eval "ac_cv_header_$ac_safe=yes"
4389 else
4390   echo "$ac_err" >&5
4391   echo "configure: failed program was:" >&5
4392   cat conftest.$ac_ext >&5
4393   rm -rf conftest*
4394   eval "ac_cv_header_$ac_safe=no"
4395 fi
4396 rm -f conftest*
4397 fi
4398 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4399   echo "$ac_t""yes" 1>&6
4400     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4401   cat >> confdefs.h <<EOF
4402 #define $ac_tr_hdr 1
4403 EOF
4404  
4405 else
4406   echo "$ac_t""no" 1>&6
4407 fi
4408 done
4409
4410
4411     for ac_hdr in readline.h readline/readline.h
4412 do
4413 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4414 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4415 echo "configure:4416: checking for $ac_hdr" >&5
4416 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4417   echo $ac_n "(cached) $ac_c" 1>&6
4418 else
4419   cat > conftest.$ac_ext <<EOF
4420 #line 4421 "configure"
4421 #include "confdefs.h"
4422 #include <$ac_hdr>
4423 EOF
4424 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4425 { (eval echo configure:4426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4426 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4427 if test -z "$ac_err"; then
4428   rm -rf conftest*
4429   eval "ac_cv_header_$ac_safe=yes"
4430 else
4431   echo "$ac_err" >&5
4432   echo "configure: failed program was:" >&5
4433   cat conftest.$ac_ext >&5
4434   rm -rf conftest*
4435   eval "ac_cv_header_$ac_safe=no"
4436 fi
4437 rm -f conftest*
4438 fi
4439 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4440   echo "$ac_t""yes" 1>&6
4441     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4442   cat >> confdefs.h <<EOF
4443 #define $ac_tr_hdr 1
4444 EOF
4445  
4446       for termlib in ncurses curses termcap terminfo termlib; do
4447        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4448 echo "configure:4449: checking for tgetent in -l${termlib}" >&5
4449 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4450 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4451   echo $ac_n "(cached) $ac_c" 1>&6
4452 else
4453   ac_save_LIBS="$LIBS"
4454 LIBS="-l${termlib}  $LIBS"
4455 cat > conftest.$ac_ext <<EOF
4456 #line 4457 "configure"
4457 #include "confdefs.h"
4458 /* Override any gcc2 internal prototype to avoid an error.  */
4459 /* We use char because int might match the return type of a gcc2
4460     builtin and then its argument prototype would still apply.  */
4461 char tgetent();
4462
4463 int main() {
4464 tgetent()
4465 ; return 0; }
4466 EOF
4467 if { (eval echo configure:4468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4468   rm -rf conftest*
4469   eval "ac_cv_lib_$ac_lib_var=yes"
4470 else
4471   echo "configure: failed program was:" >&5
4472   cat conftest.$ac_ext >&5
4473   rm -rf conftest*
4474   eval "ac_cv_lib_$ac_lib_var=no"
4475 fi
4476 rm -f conftest*
4477 LIBS="$ac_save_LIBS"
4478
4479 fi
4480 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4481   echo "$ac_t""yes" 1>&6
4482   TERMLIBS="-l${termlib}"; break
4483 else
4484   echo "$ac_t""no" 1>&6
4485 fi
4486
4487       done
4488       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4489 echo "configure:4490: checking for rl_callback_handler_install in -lreadline" >&5
4490 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4491 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4492   echo $ac_n "(cached) $ac_c" 1>&6
4493 else
4494   ac_save_LIBS="$LIBS"
4495 LIBS="-lreadline $TERMLIBS $LIBS"
4496 cat > conftest.$ac_ext <<EOF
4497 #line 4498 "configure"
4498 #include "confdefs.h"
4499 /* Override any gcc2 internal prototype to avoid an error.  */
4500 /* We use char because int might match the return type of a gcc2
4501     builtin and then its argument prototype would still apply.  */
4502 char rl_callback_handler_install();
4503
4504 int main() {
4505 rl_callback_handler_install()
4506 ; return 0; }
4507 EOF
4508 if { (eval echo configure:4509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4509   rm -rf conftest*
4510   eval "ac_cv_lib_$ac_lib_var=yes"
4511 else
4512   echo "configure: failed program was:" >&5
4513   cat conftest.$ac_ext >&5
4514   rm -rf conftest*
4515   eval "ac_cv_lib_$ac_lib_var=no"
4516 fi
4517 rm -f conftest*
4518 LIBS="$ac_save_LIBS"
4519
4520 fi
4521 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4522   echo "$ac_t""yes" 1>&6
4523   TERMLDFLAGS="-L$with_readline/lib"
4524        TERMCPPFLAGS="-I$with_readline/include"
4525        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4526        TERMLIBS="-lreadline $TERMLIBS"
4527        cat >> confdefs.h <<\EOF
4528 #define HAVE_LIBREADLINE 1
4529 EOF
4530
4531        break
4532 else
4533   echo "$ac_t""no" 1>&6
4534 TERMLIBS= CPPFLAGS=$_cppflags
4535 fi
4536
4537 else
4538   echo "$ac_t""no" 1>&6
4539 fi
4540 done
4541
4542
4543     LDFLAGS=$_ldflags
4544     ;;
4545   esac
4546 else
4547   echo "$ac_t""no" 1>&6
4548
4549 fi
4550
4551
4552
4553
4554 # The following test taken from the cvs sources
4555 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4556 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4557 # libsocket.so which has a bad implementation of gethostbyname (it
4558 # only looks in /etc/hosts), so we only look for -lsocket if we need
4559 # it.
4560 for ac_func in connect
4561 do
4562 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4563 echo "configure:4564: checking for $ac_func" >&5
4564 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4565   echo $ac_n "(cached) $ac_c" 1>&6
4566 else
4567   cat > conftest.$ac_ext <<EOF
4568 #line 4569 "configure"
4569 #include "confdefs.h"
4570 /* System header to define __stub macros and hopefully few prototypes,
4571     which can conflict with char $ac_func(); below.  */
4572 #include <assert.h>
4573 /* Override any gcc2 internal prototype to avoid an error.  */
4574 /* We use char because int might match the return type of a gcc2
4575     builtin and then its argument prototype would still apply.  */
4576 char $ac_func();
4577
4578 int main() {
4579
4580 /* The GNU C library defines this for functions which it implements
4581     to always fail with ENOSYS.  Some functions are actually named
4582     something starting with __ and the normal name is an alias.  */
4583 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4584 choke me
4585 #else
4586 $ac_func();
4587 #endif
4588
4589 ; return 0; }
4590 EOF
4591 if { (eval echo configure:4592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4592   rm -rf conftest*
4593   eval "ac_cv_func_$ac_func=yes"
4594 else
4595   echo "configure: failed program was:" >&5
4596   cat conftest.$ac_ext >&5
4597   rm -rf conftest*
4598   eval "ac_cv_func_$ac_func=no"
4599 fi
4600 rm -f conftest*
4601 fi
4602
4603 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4604   echo "$ac_t""yes" 1>&6
4605     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4606   cat >> confdefs.h <<EOF
4607 #define $ac_tr_func 1
4608 EOF
4609  
4610 else
4611   echo "$ac_t""no" 1>&6
4612 fi
4613 done
4614
4615 if test x"$ac_cv_func_connect" = x"no"; then
4616     case "$LIBS" in
4617     *-lnsl*) ;;
4618     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4619 echo "configure:4620: checking for printf in -lnsl_s" >&5
4620 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4621 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4622   echo $ac_n "(cached) $ac_c" 1>&6
4623 else
4624   ac_save_LIBS="$LIBS"
4625 LIBS="-lnsl_s  $LIBS"
4626 cat > conftest.$ac_ext <<EOF
4627 #line 4628 "configure"
4628 #include "confdefs.h"
4629 /* Override any gcc2 internal prototype to avoid an error.  */
4630 /* We use char because int might match the return type of a gcc2
4631     builtin and then its argument prototype would still apply.  */
4632 char printf();
4633
4634 int main() {
4635 printf()
4636 ; return 0; }
4637 EOF
4638 if { (eval echo configure:4639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4639   rm -rf conftest*
4640   eval "ac_cv_lib_$ac_lib_var=yes"
4641 else
4642   echo "configure: failed program was:" >&5
4643   cat conftest.$ac_ext >&5
4644   rm -rf conftest*
4645   eval "ac_cv_lib_$ac_lib_var=no"
4646 fi
4647 rm -f conftest*
4648 LIBS="$ac_save_LIBS"
4649
4650 fi
4651 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4652   echo "$ac_t""yes" 1>&6
4653     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4654     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4655   cat >> confdefs.h <<EOF
4656 #define $ac_tr_lib 1
4657 EOF
4658
4659   LIBS="-lnsl_s $LIBS"
4660
4661 else
4662   echo "$ac_t""no" 1>&6
4663 fi
4664  ;;
4665     esac
4666     case "$LIBS" in
4667     *-lnsl*) ;;
4668     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
4669 echo "configure:4670: checking for printf in -lnsl" >&5
4670 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
4671 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4672   echo $ac_n "(cached) $ac_c" 1>&6
4673 else
4674   ac_save_LIBS="$LIBS"
4675 LIBS="-lnsl  $LIBS"
4676 cat > conftest.$ac_ext <<EOF
4677 #line 4678 "configure"
4678 #include "confdefs.h"
4679 /* Override any gcc2 internal prototype to avoid an error.  */
4680 /* We use char because int might match the return type of a gcc2
4681     builtin and then its argument prototype would still apply.  */
4682 char printf();
4683
4684 int main() {
4685 printf()
4686 ; return 0; }
4687 EOF
4688 if { (eval echo configure:4689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4689   rm -rf conftest*
4690   eval "ac_cv_lib_$ac_lib_var=yes"
4691 else
4692   echo "configure: failed program was:" >&5
4693   cat conftest.$ac_ext >&5
4694   rm -rf conftest*
4695   eval "ac_cv_lib_$ac_lib_var=no"
4696 fi
4697 rm -f conftest*
4698 LIBS="$ac_save_LIBS"
4699
4700 fi
4701 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4702   echo "$ac_t""yes" 1>&6
4703     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4704     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4705   cat >> confdefs.h <<EOF
4706 #define $ac_tr_lib 1
4707 EOF
4708
4709   LIBS="-lnsl $LIBS"
4710
4711 else
4712   echo "$ac_t""no" 1>&6
4713 fi
4714  ;;
4715     esac
4716     case "$LIBS" in
4717     *-lsocket*) ;;
4718     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4719 echo "configure:4720: checking for connect in -lsocket" >&5
4720 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4721 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4722   echo $ac_n "(cached) $ac_c" 1>&6
4723 else
4724   ac_save_LIBS="$LIBS"
4725 LIBS="-lsocket  $LIBS"
4726 cat > conftest.$ac_ext <<EOF
4727 #line 4728 "configure"
4728 #include "confdefs.h"
4729 /* Override any gcc2 internal prototype to avoid an error.  */
4730 /* We use char because int might match the return type of a gcc2
4731     builtin and then its argument prototype would still apply.  */
4732 char connect();
4733
4734 int main() {
4735 connect()
4736 ; return 0; }
4737 EOF
4738 if { (eval echo configure:4739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4739   rm -rf conftest*
4740   eval "ac_cv_lib_$ac_lib_var=yes"
4741 else
4742   echo "configure: failed program was:" >&5
4743   cat conftest.$ac_ext >&5
4744   rm -rf conftest*
4745   eval "ac_cv_lib_$ac_lib_var=no"
4746 fi
4747 rm -f conftest*
4748 LIBS="$ac_save_LIBS"
4749
4750 fi
4751 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4752   echo "$ac_t""yes" 1>&6
4753     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4754     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4755   cat >> confdefs.h <<EOF
4756 #define $ac_tr_lib 1
4757 EOF
4758
4759   LIBS="-lsocket $LIBS"
4760
4761 else
4762   echo "$ac_t""no" 1>&6
4763 fi
4764  ;;
4765     esac
4766     case "$LIBS" in
4767     *-linet*) ;;
4768     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
4769 echo "configure:4770: checking for connect in -linet" >&5
4770 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
4771 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4772   echo $ac_n "(cached) $ac_c" 1>&6
4773 else
4774   ac_save_LIBS="$LIBS"
4775 LIBS="-linet  $LIBS"
4776 cat > conftest.$ac_ext <<EOF
4777 #line 4778 "configure"
4778 #include "confdefs.h"
4779 /* Override any gcc2 internal prototype to avoid an error.  */
4780 /* We use char because int might match the return type of a gcc2
4781     builtin and then its argument prototype would still apply.  */
4782 char connect();
4783
4784 int main() {
4785 connect()
4786 ; return 0; }
4787 EOF
4788 if { (eval echo configure:4789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4789   rm -rf conftest*
4790   eval "ac_cv_lib_$ac_lib_var=yes"
4791 else
4792   echo "configure: failed program was:" >&5
4793   cat conftest.$ac_ext >&5
4794   rm -rf conftest*
4795   eval "ac_cv_lib_$ac_lib_var=no"
4796 fi
4797 rm -f conftest*
4798 LIBS="$ac_save_LIBS"
4799
4800 fi
4801 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4802   echo "$ac_t""yes" 1>&6
4803     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4804     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4805   cat >> confdefs.h <<EOF
4806 #define $ac_tr_lib 1
4807 EOF
4808
4809   LIBS="-linet $LIBS"
4810
4811 else
4812   echo "$ac_t""no" 1>&6
4813 fi
4814  ;;
4815     esac
4816             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
4817        test x"$ac_cv_lib_inet_connect" = x"yes"; then
4818         # ac_cv_func_connect=yes
4819         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
4820         cat >> confdefs.h <<\EOF
4821 #define HAVE_CONNECT 1
4822 EOF
4823
4824     fi
4825 fi
4826
4827 ###############################################
4828 # test for where we get get_yp_default_domain() from
4829 for ac_func in yp_get_default_domain
4830 do
4831 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4832 echo "configure:4833: checking for $ac_func" >&5
4833 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4834   echo $ac_n "(cached) $ac_c" 1>&6
4835 else
4836   cat > conftest.$ac_ext <<EOF
4837 #line 4838 "configure"
4838 #include "confdefs.h"
4839 /* System header to define __stub macros and hopefully few prototypes,
4840     which can conflict with char $ac_func(); below.  */
4841 #include <assert.h>
4842 /* Override any gcc2 internal prototype to avoid an error.  */
4843 /* We use char because int might match the return type of a gcc2
4844     builtin and then its argument prototype would still apply.  */
4845 char $ac_func();
4846
4847 int main() {
4848
4849 /* The GNU C library defines this for functions which it implements
4850     to always fail with ENOSYS.  Some functions are actually named
4851     something starting with __ and the normal name is an alias.  */
4852 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4853 choke me
4854 #else
4855 $ac_func();
4856 #endif
4857
4858 ; return 0; }
4859 EOF
4860 if { (eval echo configure:4861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4861   rm -rf conftest*
4862   eval "ac_cv_func_$ac_func=yes"
4863 else
4864   echo "configure: failed program was:" >&5
4865   cat conftest.$ac_ext >&5
4866   rm -rf conftest*
4867   eval "ac_cv_func_$ac_func=no"
4868 fi
4869 rm -f conftest*
4870 fi
4871
4872 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4873   echo "$ac_t""yes" 1>&6
4874     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4875   cat >> confdefs.h <<EOF
4876 #define $ac_tr_func 1
4877 EOF
4878  
4879 else
4880   echo "$ac_t""no" 1>&6
4881 fi
4882 done
4883
4884 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
4885         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
4886 echo "configure:4887: checking for yp_get_default_domain in -lnsl" >&5
4887 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
4888 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4889   echo $ac_n "(cached) $ac_c" 1>&6
4890 else
4891   ac_save_LIBS="$LIBS"
4892 LIBS="-lnsl  $LIBS"
4893 cat > conftest.$ac_ext <<EOF
4894 #line 4895 "configure"
4895 #include "confdefs.h"
4896 /* Override any gcc2 internal prototype to avoid an error.  */
4897 /* We use char because int might match the return type of a gcc2
4898     builtin and then its argument prototype would still apply.  */
4899 char yp_get_default_domain();
4900
4901 int main() {
4902 yp_get_default_domain()
4903 ; return 0; }
4904 EOF
4905 if { (eval echo configure:4906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4906   rm -rf conftest*
4907   eval "ac_cv_lib_$ac_lib_var=yes"
4908 else
4909   echo "configure: failed program was:" >&5
4910   cat conftest.$ac_ext >&5
4911   rm -rf conftest*
4912   eval "ac_cv_lib_$ac_lib_var=no"
4913 fi
4914 rm -f conftest*
4915 LIBS="$ac_save_LIBS"
4916
4917 fi
4918 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4919   echo "$ac_t""yes" 1>&6
4920   LIBS="$LIBS -lnsl";
4921         cat >> confdefs.h <<\EOF
4922 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
4923 EOF
4924
4925 else
4926   echo "$ac_t""no" 1>&6
4927 fi
4928  
4929 fi
4930
4931 # Check if we have execl, if not we need to compile smbrun.
4932 for ac_func in execl
4933 do
4934 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4935 echo "configure:4936: checking for $ac_func" >&5
4936 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4937   echo $ac_n "(cached) $ac_c" 1>&6
4938 else
4939   cat > conftest.$ac_ext <<EOF
4940 #line 4941 "configure"
4941 #include "confdefs.h"
4942 /* System header to define __stub macros and hopefully few prototypes,
4943     which can conflict with char $ac_func(); below.  */
4944 #include <assert.h>
4945 /* Override any gcc2 internal prototype to avoid an error.  */
4946 /* We use char because int might match the return type of a gcc2
4947     builtin and then its argument prototype would still apply.  */
4948 char $ac_func();
4949
4950 int main() {
4951
4952 /* The GNU C library defines this for functions which it implements
4953     to always fail with ENOSYS.  Some functions are actually named
4954     something starting with __ and the normal name is an alias.  */
4955 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4956 choke me
4957 #else
4958 $ac_func();
4959 #endif
4960
4961 ; return 0; }
4962 EOF
4963 if { (eval echo configure:4964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4964   rm -rf conftest*
4965   eval "ac_cv_func_$ac_func=yes"
4966 else
4967   echo "configure: failed program was:" >&5
4968   cat conftest.$ac_ext >&5
4969   rm -rf conftest*
4970   eval "ac_cv_func_$ac_func=no"
4971 fi
4972 rm -f conftest*
4973 fi
4974
4975 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4976   echo "$ac_t""yes" 1>&6
4977     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4978   cat >> confdefs.h <<EOF
4979 #define $ac_tr_func 1
4980 EOF
4981  
4982 else
4983   echo "$ac_t""no" 1>&6
4984 fi
4985 done
4986
4987 if test x"$ac_cv_func_execl" = x"no"; then
4988     RUNPROG="bin/smbrun"
4989 else
4990     RUNPROG=""
4991 fi
4992
4993 for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot
4994 do
4995 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4996 echo "configure:4997: checking for $ac_func" >&5
4997 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4998   echo $ac_n "(cached) $ac_c" 1>&6
4999 else
5000   cat > conftest.$ac_ext <<EOF
5001 #line 5002 "configure"
5002 #include "confdefs.h"
5003 /* System header to define __stub macros and hopefully few prototypes,
5004     which can conflict with char $ac_func(); below.  */
5005 #include <assert.h>
5006 /* Override any gcc2 internal prototype to avoid an error.  */
5007 /* We use char because int might match the return type of a gcc2
5008     builtin and then its argument prototype would still apply.  */
5009 char $ac_func();
5010
5011 int main() {
5012
5013 /* The GNU C library defines this for functions which it implements
5014     to always fail with ENOSYS.  Some functions are actually named
5015     something starting with __ and the normal name is an alias.  */
5016 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5017 choke me
5018 #else
5019 $ac_func();
5020 #endif
5021
5022 ; return 0; }
5023 EOF
5024 if { (eval echo configure:5025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5025   rm -rf conftest*
5026   eval "ac_cv_func_$ac_func=yes"
5027 else
5028   echo "configure: failed program was:" >&5
5029   cat conftest.$ac_ext >&5
5030   rm -rf conftest*
5031   eval "ac_cv_func_$ac_func=no"
5032 fi
5033 rm -f conftest*
5034 fi
5035
5036 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5037   echo "$ac_t""yes" 1>&6
5038     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5039   cat >> confdefs.h <<EOF
5040 #define $ac_tr_func 1
5041 EOF
5042  
5043 else
5044   echo "$ac_t""no" 1>&6
5045 fi
5046 done
5047
5048 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset
5049 do
5050 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5051 echo "configure:5052: checking for $ac_func" >&5
5052 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5053   echo $ac_n "(cached) $ac_c" 1>&6
5054 else
5055   cat > conftest.$ac_ext <<EOF
5056 #line 5057 "configure"
5057 #include "confdefs.h"
5058 /* System header to define __stub macros and hopefully few prototypes,
5059     which can conflict with char $ac_func(); below.  */
5060 #include <assert.h>
5061 /* Override any gcc2 internal prototype to avoid an error.  */
5062 /* We use char because int might match the return type of a gcc2
5063     builtin and then its argument prototype would still apply.  */
5064 char $ac_func();
5065
5066 int main() {
5067
5068 /* The GNU C library defines this for functions which it implements
5069     to always fail with ENOSYS.  Some functions are actually named
5070     something starting with __ and the normal name is an alias.  */
5071 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5072 choke me
5073 #else
5074 $ac_func();
5075 #endif
5076
5077 ; return 0; }
5078 EOF
5079 if { (eval echo configure:5080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5080   rm -rf conftest*
5081   eval "ac_cv_func_$ac_func=yes"
5082 else
5083   echo "configure: failed program was:" >&5
5084   cat conftest.$ac_ext >&5
5085   rm -rf conftest*
5086   eval "ac_cv_func_$ac_func=no"
5087 fi
5088 rm -f conftest*
5089 fi
5090
5091 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5092   echo "$ac_t""yes" 1>&6
5093     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5094   cat >> confdefs.h <<EOF
5095 #define $ac_tr_func 1
5096 EOF
5097  
5098 else
5099   echo "$ac_t""no" 1>&6
5100 fi
5101 done
5102
5103 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5104 do
5105 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5106 echo "configure:5107: checking for $ac_func" >&5
5107 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5108   echo $ac_n "(cached) $ac_c" 1>&6
5109 else
5110   cat > conftest.$ac_ext <<EOF
5111 #line 5112 "configure"
5112 #include "confdefs.h"
5113 /* System header to define __stub macros and hopefully few prototypes,
5114     which can conflict with char $ac_func(); below.  */
5115 #include <assert.h>
5116 /* Override any gcc2 internal prototype to avoid an error.  */
5117 /* We use char because int might match the return type of a gcc2
5118     builtin and then its argument prototype would still apply.  */
5119 char $ac_func();
5120
5121 int main() {
5122
5123 /* The GNU C library defines this for functions which it implements
5124     to always fail with ENOSYS.  Some functions are actually named
5125     something starting with __ and the normal name is an alias.  */
5126 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5127 choke me
5128 #else
5129 $ac_func();
5130 #endif
5131
5132 ; return 0; }
5133 EOF
5134 if { (eval echo configure:5135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5135   rm -rf conftest*
5136   eval "ac_cv_func_$ac_func=yes"
5137 else
5138   echo "configure: failed program was:" >&5
5139   cat conftest.$ac_ext >&5
5140   rm -rf conftest*
5141   eval "ac_cv_func_$ac_func=no"
5142 fi
5143 rm -f conftest*
5144 fi
5145
5146 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5147   echo "$ac_t""yes" 1>&6
5148     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5149   cat >> confdefs.h <<EOF
5150 #define $ac_tr_func 1
5151 EOF
5152  
5153 else
5154   echo "$ac_t""no" 1>&6
5155 fi
5156 done
5157
5158 for ac_func in strftime sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent
5159 do
5160 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5161 echo "configure:5162: checking for $ac_func" >&5
5162 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5163   echo $ac_n "(cached) $ac_c" 1>&6
5164 else
5165   cat > conftest.$ac_ext <<EOF
5166 #line 5167 "configure"
5167 #include "confdefs.h"
5168 /* System header to define __stub macros and hopefully few prototypes,
5169     which can conflict with char $ac_func(); below.  */
5170 #include <assert.h>
5171 /* Override any gcc2 internal prototype to avoid an error.  */
5172 /* We use char because int might match the return type of a gcc2
5173     builtin and then its argument prototype would still apply.  */
5174 char $ac_func();
5175
5176 int main() {
5177
5178 /* The GNU C library defines this for functions which it implements
5179     to always fail with ENOSYS.  Some functions are actually named
5180     something starting with __ and the normal name is an alias.  */
5181 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5182 choke me
5183 #else
5184 $ac_func();
5185 #endif
5186
5187 ; return 0; }
5188 EOF
5189 if { (eval echo configure:5190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5190   rm -rf conftest*
5191   eval "ac_cv_func_$ac_func=yes"
5192 else
5193   echo "configure: failed program was:" >&5
5194   cat conftest.$ac_ext >&5
5195   rm -rf conftest*
5196   eval "ac_cv_func_$ac_func=no"
5197 fi
5198 rm -f conftest*
5199 fi
5200
5201 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5202   echo "$ac_t""yes" 1>&6
5203     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5204   cat >> confdefs.h <<EOF
5205 #define $ac_tr_func 1
5206 EOF
5207  
5208 else
5209   echo "$ac_t""no" 1>&6
5210 fi
5211 done
5212
5213 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
5214 do
5215 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5216 echo "configure:5217: checking for $ac_func" >&5
5217 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5218   echo $ac_n "(cached) $ac_c" 1>&6
5219 else
5220   cat > conftest.$ac_ext <<EOF
5221 #line 5222 "configure"
5222 #include "confdefs.h"
5223 /* System header to define __stub macros and hopefully few prototypes,
5224     which can conflict with char $ac_func(); below.  */
5225 #include <assert.h>
5226 /* Override any gcc2 internal prototype to avoid an error.  */
5227 /* We use char because int might match the return type of a gcc2
5228     builtin and then its argument prototype would still apply.  */
5229 char $ac_func();
5230
5231 int main() {
5232
5233 /* The GNU C library defines this for functions which it implements
5234     to always fail with ENOSYS.  Some functions are actually named
5235     something starting with __ and the normal name is an alias.  */
5236 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5237 choke me
5238 #else
5239 $ac_func();
5240 #endif
5241
5242 ; return 0; }
5243 EOF
5244 if { (eval echo configure:5245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5245   rm -rf conftest*
5246   eval "ac_cv_func_$ac_func=yes"
5247 else
5248   echo "configure: failed program was:" >&5
5249   cat conftest.$ac_ext >&5
5250   rm -rf conftest*
5251   eval "ac_cv_func_$ac_func=no"
5252 fi
5253 rm -f conftest*
5254 fi
5255
5256 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5257   echo "$ac_t""yes" 1>&6
5258     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5259   cat >> confdefs.h <<EOF
5260 #define $ac_tr_func 1
5261 EOF
5262  
5263 else
5264   echo "$ac_t""no" 1>&6
5265 fi
5266 done
5267
5268 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5269 do
5270 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5271 echo "configure:5272: checking for $ac_func" >&5
5272 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5273   echo $ac_n "(cached) $ac_c" 1>&6
5274 else
5275   cat > conftest.$ac_ext <<EOF
5276 #line 5277 "configure"
5277 #include "confdefs.h"
5278 /* System header to define __stub macros and hopefully few prototypes,
5279     which can conflict with char $ac_func(); below.  */
5280 #include <assert.h>
5281 /* Override any gcc2 internal prototype to avoid an error.  */
5282 /* We use char because int might match the return type of a gcc2
5283     builtin and then its argument prototype would still apply.  */
5284 char $ac_func();
5285
5286 int main() {
5287
5288 /* The GNU C library defines this for functions which it implements
5289     to always fail with ENOSYS.  Some functions are actually named
5290     something starting with __ and the normal name is an alias.  */
5291 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5292 choke me
5293 #else
5294 $ac_func();
5295 #endif
5296
5297 ; return 0; }
5298 EOF
5299 if { (eval echo configure:5300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5300   rm -rf conftest*
5301   eval "ac_cv_func_$ac_func=yes"
5302 else
5303   echo "configure: failed program was:" >&5
5304   cat conftest.$ac_ext >&5
5305   rm -rf conftest*
5306   eval "ac_cv_func_$ac_func=no"
5307 fi
5308 rm -f conftest*
5309 fi
5310
5311 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5312   echo "$ac_t""yes" 1>&6
5313     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5314   cat >> confdefs.h <<EOF
5315 #define $ac_tr_func 1
5316 EOF
5317  
5318 else
5319   echo "$ac_t""no" 1>&6
5320 fi
5321 done
5322
5323 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5324 do
5325 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5326 echo "configure:5327: checking for $ac_func" >&5
5327 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5328   echo $ac_n "(cached) $ac_c" 1>&6
5329 else
5330   cat > conftest.$ac_ext <<EOF
5331 #line 5332 "configure"
5332 #include "confdefs.h"
5333 /* System header to define __stub macros and hopefully few prototypes,
5334     which can conflict with char $ac_func(); below.  */
5335 #include <assert.h>
5336 /* Override any gcc2 internal prototype to avoid an error.  */
5337 /* We use char because int might match the return type of a gcc2
5338     builtin and then its argument prototype would still apply.  */
5339 char $ac_func();
5340
5341 int main() {
5342
5343 /* The GNU C library defines this for functions which it implements
5344     to always fail with ENOSYS.  Some functions are actually named
5345     something starting with __ and the normal name is an alias.  */
5346 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5347 choke me
5348 #else
5349 $ac_func();
5350 #endif
5351
5352 ; return 0; }
5353 EOF
5354 if { (eval echo configure:5355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5355   rm -rf conftest*
5356   eval "ac_cv_func_$ac_func=yes"
5357 else
5358   echo "configure: failed program was:" >&5
5359   cat conftest.$ac_ext >&5
5360   rm -rf conftest*
5361   eval "ac_cv_func_$ac_func=no"
5362 fi
5363 rm -f conftest*
5364 fi
5365
5366 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5367   echo "$ac_t""yes" 1>&6
5368     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5369   cat >> confdefs.h <<EOF
5370 #define $ac_tr_func 1
5371 EOF
5372  
5373 else
5374   echo "$ac_t""no" 1>&6
5375 fi
5376 done
5377
5378 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5379 do
5380 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5381 echo "configure:5382: checking for $ac_func" >&5
5382 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5383   echo $ac_n "(cached) $ac_c" 1>&6
5384 else
5385   cat > conftest.$ac_ext <<EOF
5386 #line 5387 "configure"
5387 #include "confdefs.h"
5388 /* System header to define __stub macros and hopefully few prototypes,
5389     which can conflict with char $ac_func(); below.  */
5390 #include <assert.h>
5391 /* Override any gcc2 internal prototype to avoid an error.  */
5392 /* We use char because int might match the return type of a gcc2
5393     builtin and then its argument prototype would still apply.  */
5394 char $ac_func();
5395
5396 int main() {
5397
5398 /* The GNU C library defines this for functions which it implements
5399     to always fail with ENOSYS.  Some functions are actually named
5400     something starting with __ and the normal name is an alias.  */
5401 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5402 choke me
5403 #else
5404 $ac_func();
5405 #endif
5406
5407 ; return 0; }
5408 EOF
5409 if { (eval echo configure:5410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5410   rm -rf conftest*
5411   eval "ac_cv_func_$ac_func=yes"
5412 else
5413   echo "configure: failed program was:" >&5
5414   cat conftest.$ac_ext >&5
5415   rm -rf conftest*
5416   eval "ac_cv_func_$ac_func=no"
5417 fi
5418 rm -f conftest*
5419 fi
5420
5421 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5422   echo "$ac_t""yes" 1>&6
5423     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5424   cat >> confdefs.h <<EOF
5425 #define $ac_tr_func 1
5426 EOF
5427  
5428 else
5429   echo "$ac_t""no" 1>&6
5430 fi
5431 done
5432
5433 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5434 do
5435 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5436 echo "configure:5437: checking for $ac_func" >&5
5437 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5438   echo $ac_n "(cached) $ac_c" 1>&6
5439 else
5440   cat > conftest.$ac_ext <<EOF
5441 #line 5442 "configure"
5442 #include "confdefs.h"
5443 /* System header to define __stub macros and hopefully few prototypes,
5444     which can conflict with char $ac_func(); below.  */
5445 #include <assert.h>
5446 /* Override any gcc2 internal prototype to avoid an error.  */
5447 /* We use char because int might match the return type of a gcc2
5448     builtin and then its argument prototype would still apply.  */
5449 char $ac_func();
5450
5451 int main() {
5452
5453 /* The GNU C library defines this for functions which it implements
5454     to always fail with ENOSYS.  Some functions are actually named
5455     something starting with __ and the normal name is an alias.  */
5456 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5457 choke me
5458 #else
5459 $ac_func();
5460 #endif
5461
5462 ; return 0; }
5463 EOF
5464 if { (eval echo configure:5465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5465   rm -rf conftest*
5466   eval "ac_cv_func_$ac_func=yes"
5467 else
5468   echo "configure: failed program was:" >&5
5469   cat conftest.$ac_ext >&5
5470   rm -rf conftest*
5471   eval "ac_cv_func_$ac_func=no"
5472 fi
5473 rm -f conftest*
5474 fi
5475
5476 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5477   echo "$ac_t""yes" 1>&6
5478     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5479   cat >> confdefs.h <<EOF
5480 #define $ac_tr_func 1
5481 EOF
5482  
5483 else
5484   echo "$ac_t""no" 1>&6
5485 fi
5486 done
5487
5488 # setbuffer is needed for smbtorture
5489 for ac_func in setbuffer
5490 do
5491 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5492 echo "configure:5493: checking for $ac_func" >&5
5493 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5494   echo $ac_n "(cached) $ac_c" 1>&6
5495 else
5496   cat > conftest.$ac_ext <<EOF
5497 #line 5498 "configure"
5498 #include "confdefs.h"
5499 /* System header to define __stub macros and hopefully few prototypes,
5500     which can conflict with char $ac_func(); below.  */
5501 #include <assert.h>
5502 /* Override any gcc2 internal prototype to avoid an error.  */
5503 /* We use char because int might match the return type of a gcc2
5504     builtin and then its argument prototype would still apply.  */
5505 char $ac_func();
5506
5507 int main() {
5508
5509 /* The GNU C library defines this for functions which it implements
5510     to always fail with ENOSYS.  Some functions are actually named
5511     something starting with __ and the normal name is an alias.  */
5512 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5513 choke me
5514 #else
5515 $ac_func();
5516 #endif
5517
5518 ; return 0; }
5519 EOF
5520 if { (eval echo configure:5521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5521   rm -rf conftest*
5522   eval "ac_cv_func_$ac_func=yes"
5523 else
5524   echo "configure: failed program was:" >&5
5525   cat conftest.$ac_ext >&5
5526   rm -rf conftest*
5527   eval "ac_cv_func_$ac_func=no"
5528 fi
5529 rm -f conftest*
5530 fi
5531
5532 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5533   echo "$ac_t""yes" 1>&6
5534     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5535   cat >> confdefs.h <<EOF
5536 #define $ac_tr_func 1
5537 EOF
5538  
5539 else
5540   echo "$ac_t""no" 1>&6
5541 fi
5542 done
5543
5544
5545 # syscall() is needed for smbwrapper.
5546 for ac_func in syscall
5547 do
5548 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5549 echo "configure:5550: checking for $ac_func" >&5
5550 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5551   echo $ac_n "(cached) $ac_c" 1>&6
5552 else
5553   cat > conftest.$ac_ext <<EOF
5554 #line 5555 "configure"
5555 #include "confdefs.h"
5556 /* System header to define __stub macros and hopefully few prototypes,
5557     which can conflict with char $ac_func(); below.  */
5558 #include <assert.h>
5559 /* Override any gcc2 internal prototype to avoid an error.  */
5560 /* We use char because int might match the return type of a gcc2
5561     builtin and then its argument prototype would still apply.  */
5562 char $ac_func();
5563
5564 int main() {
5565
5566 /* The GNU C library defines this for functions which it implements
5567     to always fail with ENOSYS.  Some functions are actually named
5568     something starting with __ and the normal name is an alias.  */
5569 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5570 choke me
5571 #else
5572 $ac_func();
5573 #endif
5574
5575 ; return 0; }
5576 EOF
5577 if { (eval echo configure:5578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5578   rm -rf conftest*
5579   eval "ac_cv_func_$ac_func=yes"
5580 else
5581   echo "configure: failed program was:" >&5
5582   cat conftest.$ac_ext >&5
5583   rm -rf conftest*
5584   eval "ac_cv_func_$ac_func=no"
5585 fi
5586 rm -f conftest*
5587 fi
5588
5589 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5590   echo "$ac_t""yes" 1>&6
5591     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5592   cat >> confdefs.h <<EOF
5593 #define $ac_tr_func 1
5594 EOF
5595  
5596 else
5597   echo "$ac_t""no" 1>&6
5598 fi
5599 done
5600
5601
5602 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5603 do
5604 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5605 echo "configure:5606: checking for $ac_func" >&5
5606 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5607   echo $ac_n "(cached) $ac_c" 1>&6
5608 else
5609   cat > conftest.$ac_ext <<EOF
5610 #line 5611 "configure"
5611 #include "confdefs.h"
5612 /* System header to define __stub macros and hopefully few prototypes,
5613     which can conflict with char $ac_func(); below.  */
5614 #include <assert.h>
5615 /* Override any gcc2 internal prototype to avoid an error.  */
5616 /* We use char because int might match the return type of a gcc2
5617     builtin and then its argument prototype would still apply.  */
5618 char $ac_func();
5619
5620 int main() {
5621
5622 /* The GNU C library defines this for functions which it implements
5623     to always fail with ENOSYS.  Some functions are actually named
5624     something starting with __ and the normal name is an alias.  */
5625 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5626 choke me
5627 #else
5628 $ac_func();
5629 #endif
5630
5631 ; return 0; }
5632 EOF
5633 if { (eval echo configure:5634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5634   rm -rf conftest*
5635   eval "ac_cv_func_$ac_func=yes"
5636 else
5637   echo "configure: failed program was:" >&5
5638   cat conftest.$ac_ext >&5
5639   rm -rf conftest*
5640   eval "ac_cv_func_$ac_func=no"
5641 fi
5642 rm -f conftest*
5643 fi
5644
5645 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5646   echo "$ac_t""yes" 1>&6
5647     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5648   cat >> confdefs.h <<EOF
5649 #define $ac_tr_func 1
5650 EOF
5651  
5652 else
5653   echo "$ac_t""no" 1>&6
5654 fi
5655 done
5656
5657 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
5658 do
5659 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5660 echo "configure:5661: checking for $ac_func" >&5
5661 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5662   echo $ac_n "(cached) $ac_c" 1>&6
5663 else
5664   cat > conftest.$ac_ext <<EOF
5665 #line 5666 "configure"
5666 #include "confdefs.h"
5667 /* System header to define __stub macros and hopefully few prototypes,
5668     which can conflict with char $ac_func(); below.  */
5669 #include <assert.h>
5670 /* Override any gcc2 internal prototype to avoid an error.  */
5671 /* We use char because int might match the return type of a gcc2
5672     builtin and then its argument prototype would still apply.  */
5673 char $ac_func();
5674
5675 int main() {
5676
5677 /* The GNU C library defines this for functions which it implements
5678     to always fail with ENOSYS.  Some functions are actually named
5679     something starting with __ and the normal name is an alias.  */
5680 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5681 choke me
5682 #else
5683 $ac_func();
5684 #endif
5685
5686 ; return 0; }
5687 EOF
5688 if { (eval echo configure:5689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5689   rm -rf conftest*
5690   eval "ac_cv_func_$ac_func=yes"
5691 else
5692   echo "configure: failed program was:" >&5
5693   cat conftest.$ac_ext >&5
5694   rm -rf conftest*
5695   eval "ac_cv_func_$ac_func=no"
5696 fi
5697 rm -f conftest*
5698 fi
5699
5700 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5701   echo "$ac_t""yes" 1>&6
5702     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5703   cat >> confdefs.h <<EOF
5704 #define $ac_tr_func 1
5705 EOF
5706  
5707 else
5708   echo "$ac_t""no" 1>&6
5709 fi
5710 done
5711
5712 for ac_func in __getcwd _getcwd
5713 do
5714 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5715 echo "configure:5716: checking for $ac_func" >&5
5716 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5717   echo $ac_n "(cached) $ac_c" 1>&6
5718 else
5719   cat > conftest.$ac_ext <<EOF
5720 #line 5721 "configure"
5721 #include "confdefs.h"
5722 /* System header to define __stub macros and hopefully few prototypes,
5723     which can conflict with char $ac_func(); below.  */
5724 #include <assert.h>
5725 /* Override any gcc2 internal prototype to avoid an error.  */
5726 /* We use char because int might match the return type of a gcc2
5727     builtin and then its argument prototype would still apply.  */
5728 char $ac_func();
5729
5730 int main() {
5731
5732 /* The GNU C library defines this for functions which it implements
5733     to always fail with ENOSYS.  Some functions are actually named
5734     something starting with __ and the normal name is an alias.  */
5735 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5736 choke me
5737 #else
5738 $ac_func();
5739 #endif
5740
5741 ; return 0; }
5742 EOF
5743 if { (eval echo configure:5744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5744   rm -rf conftest*
5745   eval "ac_cv_func_$ac_func=yes"
5746 else
5747   echo "configure: failed program was:" >&5
5748   cat conftest.$ac_ext >&5
5749   rm -rf conftest*
5750   eval "ac_cv_func_$ac_func=no"
5751 fi
5752 rm -f conftest*
5753 fi
5754
5755 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5756   echo "$ac_t""yes" 1>&6
5757     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5758   cat >> confdefs.h <<EOF
5759 #define $ac_tr_func 1
5760 EOF
5761  
5762 else
5763   echo "$ac_t""no" 1>&6
5764 fi
5765 done
5766
5767 for ac_func in __xstat __fxstat __lxstat
5768 do
5769 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5770 echo "configure:5771: checking for $ac_func" >&5
5771 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5772   echo $ac_n "(cached) $ac_c" 1>&6
5773 else
5774   cat > conftest.$ac_ext <<EOF
5775 #line 5776 "configure"
5776 #include "confdefs.h"
5777 /* System header to define __stub macros and hopefully few prototypes,
5778     which can conflict with char $ac_func(); below.  */
5779 #include <assert.h>
5780 /* Override any gcc2 internal prototype to avoid an error.  */
5781 /* We use char because int might match the return type of a gcc2
5782     builtin and then its argument prototype would still apply.  */
5783 char $ac_func();
5784
5785 int main() {
5786
5787 /* The GNU C library defines this for functions which it implements
5788     to always fail with ENOSYS.  Some functions are actually named
5789     something starting with __ and the normal name is an alias.  */
5790 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5791 choke me
5792 #else
5793 $ac_func();
5794 #endif
5795
5796 ; return 0; }
5797 EOF
5798 if { (eval echo configure:5799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5799   rm -rf conftest*
5800   eval "ac_cv_func_$ac_func=yes"
5801 else
5802   echo "configure: failed program was:" >&5
5803   cat conftest.$ac_ext >&5
5804   rm -rf conftest*
5805   eval "ac_cv_func_$ac_func=no"
5806 fi
5807 rm -f conftest*
5808 fi
5809
5810 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5811   echo "$ac_t""yes" 1>&6
5812     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5813   cat >> confdefs.h <<EOF
5814 #define $ac_tr_func 1
5815 EOF
5816  
5817 else
5818   echo "$ac_t""no" 1>&6
5819 fi
5820 done
5821
5822 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
5823 do
5824 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5825 echo "configure:5826: checking for $ac_func" >&5
5826 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5827   echo $ac_n "(cached) $ac_c" 1>&6
5828 else
5829   cat > conftest.$ac_ext <<EOF
5830 #line 5831 "configure"
5831 #include "confdefs.h"
5832 /* System header to define __stub macros and hopefully few prototypes,
5833     which can conflict with char $ac_func(); below.  */
5834 #include <assert.h>
5835 /* Override any gcc2 internal prototype to avoid an error.  */
5836 /* We use char because int might match the return type of a gcc2
5837     builtin and then its argument prototype would still apply.  */
5838 char $ac_func();
5839
5840 int main() {
5841
5842 /* The GNU C library defines this for functions which it implements
5843     to always fail with ENOSYS.  Some functions are actually named
5844     something starting with __ and the normal name is an alias.  */
5845 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5846 choke me
5847 #else
5848 $ac_func();
5849 #endif
5850
5851 ; return 0; }
5852 EOF
5853 if { (eval echo configure:5854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5854   rm -rf conftest*
5855   eval "ac_cv_func_$ac_func=yes"
5856 else
5857   echo "configure: failed program was:" >&5
5858   cat conftest.$ac_ext >&5
5859   rm -rf conftest*
5860   eval "ac_cv_func_$ac_func=no"
5861 fi
5862 rm -f conftest*
5863 fi
5864
5865 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5866   echo "$ac_t""yes" 1>&6
5867     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5868   cat >> confdefs.h <<EOF
5869 #define $ac_tr_func 1
5870 EOF
5871  
5872 else
5873   echo "$ac_t""no" 1>&6
5874 fi
5875 done
5876
5877 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
5878 do
5879 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5880 echo "configure:5881: checking for $ac_func" >&5
5881 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5882   echo $ac_n "(cached) $ac_c" 1>&6
5883 else
5884   cat > conftest.$ac_ext <<EOF
5885 #line 5886 "configure"
5886 #include "confdefs.h"
5887 /* System header to define __stub macros and hopefully few prototypes,
5888     which can conflict with char $ac_func(); below.  */
5889 #include <assert.h>
5890 /* Override any gcc2 internal prototype to avoid an error.  */
5891 /* We use char because int might match the return type of a gcc2
5892     builtin and then its argument prototype would still apply.  */
5893 char $ac_func();
5894
5895 int main() {
5896
5897 /* The GNU C library defines this for functions which it implements
5898     to always fail with ENOSYS.  Some functions are actually named
5899     something starting with __ and the normal name is an alias.  */
5900 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5901 choke me
5902 #else
5903 $ac_func();
5904 #endif
5905
5906 ; return 0; }
5907 EOF
5908 if { (eval echo configure:5909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5909   rm -rf conftest*
5910   eval "ac_cv_func_$ac_func=yes"
5911 else
5912   echo "configure: failed program was:" >&5
5913   cat conftest.$ac_ext >&5
5914   rm -rf conftest*
5915   eval "ac_cv_func_$ac_func=no"
5916 fi
5917 rm -f conftest*
5918 fi
5919
5920 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5921   echo "$ac_t""yes" 1>&6
5922     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5923   cat >> confdefs.h <<EOF
5924 #define $ac_tr_func 1
5925 EOF
5926  
5927 else
5928   echo "$ac_t""no" 1>&6
5929 fi
5930 done
5931
5932 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
5933 do
5934 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5935 echo "configure:5936: checking for $ac_func" >&5
5936 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5937   echo $ac_n "(cached) $ac_c" 1>&6
5938 else
5939   cat > conftest.$ac_ext <<EOF
5940 #line 5941 "configure"
5941 #include "confdefs.h"
5942 /* System header to define __stub macros and hopefully few prototypes,
5943     which can conflict with char $ac_func(); below.  */
5944 #include <assert.h>
5945 /* Override any gcc2 internal prototype to avoid an error.  */
5946 /* We use char because int might match the return type of a gcc2
5947     builtin and then its argument prototype would still apply.  */
5948 char $ac_func();
5949
5950 int main() {
5951
5952 /* The GNU C library defines this for functions which it implements
5953     to always fail with ENOSYS.  Some functions are actually named
5954     something starting with __ and the normal name is an alias.  */
5955 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5956 choke me
5957 #else
5958 $ac_func();
5959 #endif
5960
5961 ; return 0; }
5962 EOF
5963 if { (eval echo configure:5964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5964   rm -rf conftest*
5965   eval "ac_cv_func_$ac_func=yes"
5966 else
5967   echo "configure: failed program was:" >&5
5968   cat conftest.$ac_ext >&5
5969   rm -rf conftest*
5970   eval "ac_cv_func_$ac_func=no"
5971 fi
5972 rm -f conftest*
5973 fi
5974
5975 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5976   echo "$ac_t""yes" 1>&6
5977     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5978   cat >> confdefs.h <<EOF
5979 #define $ac_tr_func 1
5980 EOF
5981  
5982 else
5983   echo "$ac_t""no" 1>&6
5984 fi
5985 done
5986
5987 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
5988 do
5989 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5990 echo "configure:5991: checking for $ac_func" >&5
5991 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5992   echo $ac_n "(cached) $ac_c" 1>&6
5993 else
5994   cat > conftest.$ac_ext <<EOF
5995 #line 5996 "configure"
5996 #include "confdefs.h"
5997 /* System header to define __stub macros and hopefully few prototypes,
5998     which can conflict with char $ac_func(); below.  */
5999 #include <assert.h>
6000 /* Override any gcc2 internal prototype to avoid an error.  */
6001 /* We use char because int might match the return type of a gcc2
6002     builtin and then its argument prototype would still apply.  */
6003 char $ac_func();
6004
6005 int main() {
6006
6007 /* The GNU C library defines this for functions which it implements
6008     to always fail with ENOSYS.  Some functions are actually named
6009     something starting with __ and the normal name is an alias.  */
6010 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6011 choke me
6012 #else
6013 $ac_func();
6014 #endif
6015
6016 ; return 0; }
6017 EOF
6018 if { (eval echo configure:6019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6019   rm -rf conftest*
6020   eval "ac_cv_func_$ac_func=yes"
6021 else
6022   echo "configure: failed program was:" >&5
6023   cat conftest.$ac_ext >&5
6024   rm -rf conftest*
6025   eval "ac_cv_func_$ac_func=no"
6026 fi
6027 rm -f conftest*
6028 fi
6029
6030 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6031   echo "$ac_t""yes" 1>&6
6032     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6033   cat >> confdefs.h <<EOF
6034 #define $ac_tr_func 1
6035 EOF
6036  
6037 else
6038   echo "$ac_t""no" 1>&6
6039 fi
6040 done
6041
6042 for ac_func in _write __write _fork __fork
6043 do
6044 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6045 echo "configure:6046: checking for $ac_func" >&5
6046 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6047   echo $ac_n "(cached) $ac_c" 1>&6
6048 else
6049   cat > conftest.$ac_ext <<EOF
6050 #line 6051 "configure"
6051 #include "confdefs.h"
6052 /* System header to define __stub macros and hopefully few prototypes,
6053     which can conflict with char $ac_func(); below.  */
6054 #include <assert.h>
6055 /* Override any gcc2 internal prototype to avoid an error.  */
6056 /* We use char because int might match the return type of a gcc2
6057     builtin and then its argument prototype would still apply.  */
6058 char $ac_func();
6059
6060 int main() {
6061
6062 /* The GNU C library defines this for functions which it implements
6063     to always fail with ENOSYS.  Some functions are actually named
6064     something starting with __ and the normal name is an alias.  */
6065 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6066 choke me
6067 #else
6068 $ac_func();
6069 #endif
6070
6071 ; return 0; }
6072 EOF
6073 if { (eval echo configure:6074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6074   rm -rf conftest*
6075   eval "ac_cv_func_$ac_func=yes"
6076 else
6077   echo "configure: failed program was:" >&5
6078   cat conftest.$ac_ext >&5
6079   rm -rf conftest*
6080   eval "ac_cv_func_$ac_func=no"
6081 fi
6082 rm -f conftest*
6083 fi
6084
6085 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6086   echo "$ac_t""yes" 1>&6
6087     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6088   cat >> confdefs.h <<EOF
6089 #define $ac_tr_func 1
6090 EOF
6091  
6092 else
6093   echo "$ac_t""no" 1>&6
6094 fi
6095 done
6096
6097 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6098 do
6099 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6100 echo "configure:6101: checking for $ac_func" >&5
6101 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6102   echo $ac_n "(cached) $ac_c" 1>&6
6103 else
6104   cat > conftest.$ac_ext <<EOF
6105 #line 6106 "configure"
6106 #include "confdefs.h"
6107 /* System header to define __stub macros and hopefully few prototypes,
6108     which can conflict with char $ac_func(); below.  */
6109 #include <assert.h>
6110 /* Override any gcc2 internal prototype to avoid an error.  */
6111 /* We use char because int might match the return type of a gcc2
6112     builtin and then its argument prototype would still apply.  */
6113 char $ac_func();
6114
6115 int main() {
6116
6117 /* The GNU C library defines this for functions which it implements
6118     to always fail with ENOSYS.  Some functions are actually named
6119     something starting with __ and the normal name is an alias.  */
6120 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6121 choke me
6122 #else
6123 $ac_func();
6124 #endif
6125
6126 ; return 0; }
6127 EOF
6128 if { (eval echo configure:6129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6129   rm -rf conftest*
6130   eval "ac_cv_func_$ac_func=yes"
6131 else
6132   echo "configure: failed program was:" >&5
6133   cat conftest.$ac_ext >&5
6134   rm -rf conftest*
6135   eval "ac_cv_func_$ac_func=no"
6136 fi
6137 rm -f conftest*
6138 fi
6139
6140 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6141   echo "$ac_t""yes" 1>&6
6142     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6143   cat >> confdefs.h <<EOF
6144 #define $ac_tr_func 1
6145 EOF
6146  
6147 else
6148   echo "$ac_t""no" 1>&6
6149 fi
6150 done
6151
6152 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6153 do
6154 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6155 echo "configure:6156: checking for $ac_func" >&5
6156 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6157   echo $ac_n "(cached) $ac_c" 1>&6
6158 else
6159   cat > conftest.$ac_ext <<EOF
6160 #line 6161 "configure"
6161 #include "confdefs.h"
6162 /* System header to define __stub macros and hopefully few prototypes,
6163     which can conflict with char $ac_func(); below.  */
6164 #include <assert.h>
6165 /* Override any gcc2 internal prototype to avoid an error.  */
6166 /* We use char because int might match the return type of a gcc2
6167     builtin and then its argument prototype would still apply.  */
6168 char $ac_func();
6169
6170 int main() {
6171
6172 /* The GNU C library defines this for functions which it implements
6173     to always fail with ENOSYS.  Some functions are actually named
6174     something starting with __ and the normal name is an alias.  */
6175 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6176 choke me
6177 #else
6178 $ac_func();
6179 #endif
6180
6181 ; return 0; }
6182 EOF
6183 if { (eval echo configure:6184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6184   rm -rf conftest*
6185   eval "ac_cv_func_$ac_func=yes"
6186 else
6187   echo "configure: failed program was:" >&5
6188   cat conftest.$ac_ext >&5
6189   rm -rf conftest*
6190   eval "ac_cv_func_$ac_func=no"
6191 fi
6192 rm -f conftest*
6193 fi
6194
6195 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6196   echo "$ac_t""yes" 1>&6
6197     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6198   cat >> confdefs.h <<EOF
6199 #define $ac_tr_func 1
6200 EOF
6201  
6202 else
6203   echo "$ac_t""no" 1>&6
6204 fi
6205 done
6206
6207 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6208 do
6209 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6210 echo "configure:6211: checking for $ac_func" >&5
6211 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6212   echo $ac_n "(cached) $ac_c" 1>&6
6213 else
6214   cat > conftest.$ac_ext <<EOF
6215 #line 6216 "configure"
6216 #include "confdefs.h"
6217 /* System header to define __stub macros and hopefully few prototypes,
6218     which can conflict with char $ac_func(); below.  */
6219 #include <assert.h>
6220 /* Override any gcc2 internal prototype to avoid an error.  */
6221 /* We use char because int might match the return type of a gcc2
6222     builtin and then its argument prototype would still apply.  */
6223 char $ac_func();
6224
6225 int main() {
6226
6227 /* The GNU C library defines this for functions which it implements
6228     to always fail with ENOSYS.  Some functions are actually named
6229     something starting with __ and the normal name is an alias.  */
6230 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6231 choke me
6232 #else
6233 $ac_func();
6234 #endif
6235
6236 ; return 0; }
6237 EOF
6238 if { (eval echo configure:6239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6239   rm -rf conftest*
6240   eval "ac_cv_func_$ac_func=yes"
6241 else
6242   echo "configure: failed program was:" >&5
6243   cat conftest.$ac_ext >&5
6244   rm -rf conftest*
6245   eval "ac_cv_func_$ac_func=no"
6246 fi
6247 rm -f conftest*
6248 fi
6249
6250 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6251   echo "$ac_t""yes" 1>&6
6252     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6253   cat >> confdefs.h <<EOF
6254 #define $ac_tr_func 1
6255 EOF
6256  
6257 else
6258   echo "$ac_t""no" 1>&6
6259 fi
6260 done
6261
6262 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6263 do
6264 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6265 echo "configure:6266: checking for $ac_func" >&5
6266 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6267   echo $ac_n "(cached) $ac_c" 1>&6
6268 else
6269   cat > conftest.$ac_ext <<EOF
6270 #line 6271 "configure"
6271 #include "confdefs.h"
6272 /* System header to define __stub macros and hopefully few prototypes,
6273     which can conflict with char $ac_func(); below.  */
6274 #include <assert.h>
6275 /* Override any gcc2 internal prototype to avoid an error.  */
6276 /* We use char because int might match the return type of a gcc2
6277     builtin and then its argument prototype would still apply.  */
6278 char $ac_func();
6279
6280 int main() {
6281
6282 /* The GNU C library defines this for functions which it implements
6283     to always fail with ENOSYS.  Some functions are actually named
6284     something starting with __ and the normal name is an alias.  */
6285 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6286 choke me
6287 #else
6288 $ac_func();
6289 #endif
6290
6291 ; return 0; }
6292 EOF
6293 if { (eval echo configure:6294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6294   rm -rf conftest*
6295   eval "ac_cv_func_$ac_func=yes"
6296 else
6297   echo "configure: failed program was:" >&5
6298   cat conftest.$ac_ext >&5
6299   rm -rf conftest*
6300   eval "ac_cv_func_$ac_func=no"
6301 fi
6302 rm -f conftest*
6303 fi
6304
6305 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6306   echo "$ac_t""yes" 1>&6
6307     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6308   cat >> confdefs.h <<EOF
6309 #define $ac_tr_func 1
6310 EOF
6311  
6312 else
6313   echo "$ac_t""no" 1>&6
6314 fi
6315 done
6316
6317 for ac_func in open64 _open64 __open64 creat64
6318 do
6319 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6320 echo "configure:6321: checking for $ac_func" >&5
6321 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6322   echo $ac_n "(cached) $ac_c" 1>&6
6323 else
6324   cat > conftest.$ac_ext <<EOF
6325 #line 6326 "configure"
6326 #include "confdefs.h"
6327 /* System header to define __stub macros and hopefully few prototypes,
6328     which can conflict with char $ac_func(); below.  */
6329 #include <assert.h>
6330 /* Override any gcc2 internal prototype to avoid an error.  */
6331 /* We use char because int might match the return type of a gcc2
6332     builtin and then its argument prototype would still apply.  */
6333 char $ac_func();
6334
6335 int main() {
6336
6337 /* The GNU C library defines this for functions which it implements
6338     to always fail with ENOSYS.  Some functions are actually named
6339     something starting with __ and the normal name is an alias.  */
6340 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6341 choke me
6342 #else
6343 $ac_func();
6344 #endif
6345
6346 ; return 0; }
6347 EOF
6348 if { (eval echo configure:6349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6349   rm -rf conftest*
6350   eval "ac_cv_func_$ac_func=yes"
6351 else
6352   echo "configure: failed program was:" >&5
6353   cat conftest.$ac_ext >&5
6354   rm -rf conftest*
6355   eval "ac_cv_func_$ac_func=no"
6356 fi
6357 rm -f conftest*
6358 fi
6359
6360 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6361   echo "$ac_t""yes" 1>&6
6362     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6363   cat >> confdefs.h <<EOF
6364 #define $ac_tr_func 1
6365 EOF
6366  
6367 else
6368   echo "$ac_t""no" 1>&6
6369 fi
6370 done
6371
6372
6373 #
6374 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6375 #
6376
6377 if test x$ac_cv_func_stat64 = xno ; then
6378   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6379 echo "configure:6380: checking for stat64 in <sys/stat.h>" >&5
6380   cat > conftest.$ac_ext <<EOF
6381 #line 6382 "configure"
6382 #include "confdefs.h"
6383
6384 #if defined(HAVE_UNISTD_H)
6385 #include <unistd.h>
6386 #endif
6387 #include <sys/stat.h>
6388
6389 int main() {
6390 struct stat64 st64; exit(stat64(".",&st64));
6391 ; return 0; }
6392 EOF
6393 if { (eval echo configure:6394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6394   rm -rf conftest*
6395   ac_cv_func_stat64=yes
6396 else
6397   echo "configure: failed program was:" >&5
6398   cat conftest.$ac_ext >&5
6399 fi
6400 rm -f conftest*
6401   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6402   if test x$ac_cv_func_stat64 = xyes ; then
6403     cat >> confdefs.h <<\EOF
6404 #define HAVE_STAT64 1
6405 EOF
6406
6407   fi
6408 fi
6409
6410 if test x$ac_cv_func_lstat64 = xno ; then
6411   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6412 echo "configure:6413: checking for lstat64 in <sys/stat.h>" >&5
6413   cat > conftest.$ac_ext <<EOF
6414 #line 6415 "configure"
6415 #include "confdefs.h"
6416
6417 #if defined(HAVE_UNISTD_H)
6418 #include <unistd.h>
6419 #endif
6420 #include <sys/stat.h>
6421
6422 int main() {
6423 struct stat64 st64; exit(lstat64(".",&st64));
6424 ; return 0; }
6425 EOF
6426 if { (eval echo configure:6427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6427   rm -rf conftest*
6428   ac_cv_func_lstat64=yes
6429 else
6430   echo "configure: failed program was:" >&5
6431   cat conftest.$ac_ext >&5
6432 fi
6433 rm -f conftest*
6434   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6435   if test x$ac_cv_func_lstat64 = xyes ; then
6436     cat >> confdefs.h <<\EOF
6437 #define HAVE_LSTAT64 1
6438 EOF
6439
6440   fi
6441 fi
6442
6443 if test x$ac_cv_func_fstat64 = xno ; then
6444   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6445 echo "configure:6446: checking for fstat64 in <sys/stat.h>" >&5
6446   cat > conftest.$ac_ext <<EOF
6447 #line 6448 "configure"
6448 #include "confdefs.h"
6449
6450 #if defined(HAVE_UNISTD_H)
6451 #include <unistd.h>
6452 #endif
6453 #include <sys/stat.h>
6454
6455 int main() {
6456 struct stat64 st64; exit(fstat64(0,&st64));
6457 ; return 0; }
6458 EOF
6459 if { (eval echo configure:6460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6460   rm -rf conftest*
6461   ac_cv_func_fstat64=yes
6462 else
6463   echo "configure: failed program was:" >&5
6464   cat conftest.$ac_ext >&5
6465 fi
6466 rm -f conftest*
6467   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6468   if test x$ac_cv_func_fstat64 = xyes ; then
6469     cat >> confdefs.h <<\EOF
6470 #define HAVE_FSTAT64 1
6471 EOF
6472
6473   fi
6474 fi
6475
6476 #
6477 # If no strcasecmp, check for it in some known places
6478 # It is in -lresolv on ReliantUNIX and UnixWare
6479 #   -lresolve *must* follow -lnsl for name resolution to work properly
6480 #
6481
6482 if test x$ac_cv_func_strcasecmp = xno ; then
6483         echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6
6484 echo "configure:6485: checking for strcasecmp in -lresolv" >&5
6485 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'`
6486 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6487   echo $ac_n "(cached) $ac_c" 1>&6
6488 else
6489   ac_save_LIBS="$LIBS"
6490 LIBS="-lresolv  $LIBS"
6491 cat > conftest.$ac_ext <<EOF
6492 #line 6493 "configure"
6493 #include "confdefs.h"
6494 /* Override any gcc2 internal prototype to avoid an error.  */
6495 /* We use char because int might match the return type of a gcc2
6496     builtin and then its argument prototype would still apply.  */
6497 char strcasecmp();
6498
6499 int main() {
6500 strcasecmp()
6501 ; return 0; }
6502 EOF
6503 if { (eval echo configure:6504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6504   rm -rf conftest*
6505   eval "ac_cv_lib_$ac_lib_var=yes"
6506 else
6507   echo "configure: failed program was:" >&5
6508   cat conftest.$ac_ext >&5
6509   rm -rf conftest*
6510   eval "ac_cv_lib_$ac_lib_var=no"
6511 fi
6512 rm -f conftest*
6513 LIBS="$ac_save_LIBS"
6514
6515 fi
6516 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6517   echo "$ac_t""yes" 1>&6
6518   LIBS="$LIBS -lresolv"
6519                 cat >> confdefs.h <<\EOF
6520 #define HAVE_STRCASECMP 1
6521 EOF
6522
6523 else
6524   echo "$ac_t""no" 1>&6
6525 fi
6526
6527 fi
6528
6529 #
6530 # Check for the functions putprpwnam, set_auth_parameters,
6531 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6532 # Needed for OSF1 and HPUX.
6533 #
6534
6535 case "$LIBS" in
6536   *-lsecurity*) for ac_func in putprpwnam
6537 do
6538 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6539 echo "configure:6540: checking for $ac_func" >&5
6540 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6541   echo $ac_n "(cached) $ac_c" 1>&6
6542 else
6543   cat > conftest.$ac_ext <<EOF
6544 #line 6545 "configure"
6545 #include "confdefs.h"
6546 /* System header to define __stub macros and hopefully few prototypes,
6547     which can conflict with char $ac_func(); below.  */
6548 #include <assert.h>
6549 /* Override any gcc2 internal prototype to avoid an error.  */
6550 /* We use char because int might match the return type of a gcc2
6551     builtin and then its argument prototype would still apply.  */
6552 char $ac_func();
6553
6554 int main() {
6555
6556 /* The GNU C library defines this for functions which it implements
6557     to always fail with ENOSYS.  Some functions are actually named
6558     something starting with __ and the normal name is an alias.  */
6559 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6560 choke me
6561 #else
6562 $ac_func();
6563 #endif
6564
6565 ; return 0; }
6566 EOF
6567 if { (eval echo configure:6568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6568   rm -rf conftest*
6569   eval "ac_cv_func_$ac_func=yes"
6570 else
6571   echo "configure: failed program was:" >&5
6572   cat conftest.$ac_ext >&5
6573   rm -rf conftest*
6574   eval "ac_cv_func_$ac_func=no"
6575 fi
6576 rm -f conftest*
6577 fi
6578
6579 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6580   echo "$ac_t""yes" 1>&6
6581     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6582   cat >> confdefs.h <<EOF
6583 #define $ac_tr_func 1
6584 EOF
6585  
6586 else
6587   echo "$ac_t""no" 1>&6
6588 fi
6589 done
6590  ;;
6591   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6592 echo "configure:6593: checking for putprpwnam in -lsecurity" >&5
6593 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6594 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6595   echo $ac_n "(cached) $ac_c" 1>&6
6596 else
6597   ac_save_LIBS="$LIBS"
6598 LIBS="-lsecurity  $LIBS"
6599 cat > conftest.$ac_ext <<EOF
6600 #line 6601 "configure"
6601 #include "confdefs.h"
6602 /* Override any gcc2 internal prototype to avoid an error.  */
6603 /* We use char because int might match the return type of a gcc2
6604     builtin and then its argument prototype would still apply.  */
6605 char putprpwnam();
6606
6607 int main() {
6608 putprpwnam()
6609 ; return 0; }
6610 EOF
6611 if { (eval echo configure:6612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6612   rm -rf conftest*
6613   eval "ac_cv_lib_$ac_lib_var=yes"
6614 else
6615   echo "configure: failed program was:" >&5
6616   cat conftest.$ac_ext >&5
6617   rm -rf conftest*
6618   eval "ac_cv_lib_$ac_lib_var=no"
6619 fi
6620 rm -f conftest*
6621 LIBS="$ac_save_LIBS"
6622
6623 fi
6624 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6625   echo "$ac_t""yes" 1>&6
6626     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6627     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6628   cat >> confdefs.h <<EOF
6629 #define $ac_tr_lib 1
6630 EOF
6631
6632   LIBS="-lsecurity $LIBS"
6633
6634 else
6635   echo "$ac_t""no" 1>&6
6636 fi
6637  
6638      for ac_func in putprpwnam
6639 do
6640 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6641 echo "configure:6642: checking for $ac_func" >&5
6642 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6643   echo $ac_n "(cached) $ac_c" 1>&6
6644 else
6645   cat > conftest.$ac_ext <<EOF
6646 #line 6647 "configure"
6647 #include "confdefs.h"
6648 /* System header to define __stub macros and hopefully few prototypes,
6649     which can conflict with char $ac_func(); below.  */
6650 #include <assert.h>
6651 /* Override any gcc2 internal prototype to avoid an error.  */
6652 /* We use char because int might match the return type of a gcc2
6653     builtin and then its argument prototype would still apply.  */
6654 char $ac_func();
6655
6656 int main() {
6657
6658 /* The GNU C library defines this for functions which it implements
6659     to always fail with ENOSYS.  Some functions are actually named
6660     something starting with __ and the normal name is an alias.  */
6661 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6662 choke me
6663 #else
6664 $ac_func();
6665 #endif
6666
6667 ; return 0; }
6668 EOF
6669 if { (eval echo configure:6670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6670   rm -rf conftest*
6671   eval "ac_cv_func_$ac_func=yes"
6672 else
6673   echo "configure: failed program was:" >&5
6674   cat conftest.$ac_ext >&5
6675   rm -rf conftest*
6676   eval "ac_cv_func_$ac_func=no"
6677 fi
6678 rm -f conftest*
6679 fi
6680
6681 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6682   echo "$ac_t""yes" 1>&6
6683     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6684   cat >> confdefs.h <<EOF
6685 #define $ac_tr_func 1
6686 EOF
6687  
6688 else
6689   echo "$ac_t""no" 1>&6
6690 fi
6691 done
6692
6693   ;;
6694   esac
6695
6696 case "$LIBS" in
6697   *-lsec*) for ac_func in putprpwnam
6698 do
6699 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6700 echo "configure:6701: checking for $ac_func" >&5
6701 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6702   echo $ac_n "(cached) $ac_c" 1>&6
6703 else
6704   cat > conftest.$ac_ext <<EOF
6705 #line 6706 "configure"
6706 #include "confdefs.h"
6707 /* System header to define __stub macros and hopefully few prototypes,
6708     which can conflict with char $ac_func(); below.  */
6709 #include <assert.h>
6710 /* Override any gcc2 internal prototype to avoid an error.  */
6711 /* We use char because int might match the return type of a gcc2
6712     builtin and then its argument prototype would still apply.  */
6713 char $ac_func();
6714
6715 int main() {
6716
6717 /* The GNU C library defines this for functions which it implements
6718     to always fail with ENOSYS.  Some functions are actually named
6719     something starting with __ and the normal name is an alias.  */
6720 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6721 choke me
6722 #else
6723 $ac_func();
6724 #endif
6725
6726 ; return 0; }
6727 EOF
6728 if { (eval echo configure:6729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6729   rm -rf conftest*
6730   eval "ac_cv_func_$ac_func=yes"
6731 else
6732   echo "configure: failed program was:" >&5
6733   cat conftest.$ac_ext >&5
6734   rm -rf conftest*
6735   eval "ac_cv_func_$ac_func=no"
6736 fi
6737 rm -f conftest*
6738 fi
6739
6740 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6741   echo "$ac_t""yes" 1>&6
6742     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6743   cat >> confdefs.h <<EOF
6744 #define $ac_tr_func 1
6745 EOF
6746  
6747 else
6748   echo "$ac_t""no" 1>&6
6749 fi
6750 done
6751  ;;
6752   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
6753 echo "configure:6754: checking for putprpwnam in -lsec" >&5
6754 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
6755 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6756   echo $ac_n "(cached) $ac_c" 1>&6
6757 else
6758   ac_save_LIBS="$LIBS"
6759 LIBS="-lsec  $LIBS"
6760 cat > conftest.$ac_ext <<EOF
6761 #line 6762 "configure"
6762 #include "confdefs.h"
6763 /* Override any gcc2 internal prototype to avoid an error.  */
6764 /* We use char because int might match the return type of a gcc2
6765     builtin and then its argument prototype would still apply.  */
6766 char putprpwnam();
6767
6768 int main() {
6769 putprpwnam()
6770 ; return 0; }
6771 EOF
6772 if { (eval echo configure:6773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6773   rm -rf conftest*
6774   eval "ac_cv_lib_$ac_lib_var=yes"
6775 else
6776   echo "configure: failed program was:" >&5
6777   cat conftest.$ac_ext >&5
6778   rm -rf conftest*
6779   eval "ac_cv_lib_$ac_lib_var=no"
6780 fi
6781 rm -f conftest*
6782 LIBS="$ac_save_LIBS"
6783
6784 fi
6785 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6786   echo "$ac_t""yes" 1>&6
6787     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6788     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6789   cat >> confdefs.h <<EOF
6790 #define $ac_tr_lib 1
6791 EOF
6792
6793   LIBS="-lsec $LIBS"
6794
6795 else
6796   echo "$ac_t""no" 1>&6
6797 fi
6798  
6799      for ac_func in putprpwnam
6800 do
6801 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6802 echo "configure:6803: checking for $ac_func" >&5
6803 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6804   echo $ac_n "(cached) $ac_c" 1>&6
6805 else
6806   cat > conftest.$ac_ext <<EOF
6807 #line 6808 "configure"
6808 #include "confdefs.h"
6809 /* System header to define __stub macros and hopefully few prototypes,
6810     which can conflict with char $ac_func(); below.  */
6811 #include <assert.h>
6812 /* Override any gcc2 internal prototype to avoid an error.  */
6813 /* We use char because int might match the return type of a gcc2
6814     builtin and then its argument prototype would still apply.  */
6815 char $ac_func();
6816
6817 int main() {
6818
6819 /* The GNU C library defines this for functions which it implements
6820     to always fail with ENOSYS.  Some functions are actually named
6821     something starting with __ and the normal name is an alias.  */
6822 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6823 choke me
6824 #else
6825 $ac_func();
6826 #endif
6827
6828 ; return 0; }
6829 EOF
6830 if { (eval echo configure:6831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6831   rm -rf conftest*
6832   eval "ac_cv_func_$ac_func=yes"
6833 else
6834   echo "configure: failed program was:" >&5
6835   cat conftest.$ac_ext >&5
6836   rm -rf conftest*
6837   eval "ac_cv_func_$ac_func=no"
6838 fi
6839 rm -f conftest*
6840 fi
6841
6842 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6843   echo "$ac_t""yes" 1>&6
6844     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6845   cat >> confdefs.h <<EOF
6846 #define $ac_tr_func 1
6847 EOF
6848  
6849 else
6850   echo "$ac_t""no" 1>&6
6851 fi
6852 done
6853
6854   ;;
6855   esac
6856
6857
6858 case "$LIBS" in
6859   *-lsecurity*) for ac_func in set_auth_parameters
6860 do
6861 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6862 echo "configure:6863: checking for $ac_func" >&5
6863 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6864   echo $ac_n "(cached) $ac_c" 1>&6
6865 else
6866   cat > conftest.$ac_ext <<EOF
6867 #line 6868 "configure"
6868 #include "confdefs.h"
6869 /* System header to define __stub macros and hopefully few prototypes,
6870     which can conflict with char $ac_func(); below.  */
6871 #include <assert.h>
6872 /* Override any gcc2 internal prototype to avoid an error.  */
6873 /* We use char because int might match the return type of a gcc2
6874     builtin and then its argument prototype would still apply.  */
6875 char $ac_func();
6876
6877 int main() {
6878
6879 /* The GNU C library defines this for functions which it implements
6880     to always fail with ENOSYS.  Some functions are actually named
6881     something starting with __ and the normal name is an alias.  */
6882 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6883 choke me
6884 #else
6885 $ac_func();
6886 #endif
6887
6888 ; return 0; }
6889 EOF
6890 if { (eval echo configure:6891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6891   rm -rf conftest*
6892   eval "ac_cv_func_$ac_func=yes"
6893 else
6894   echo "configure: failed program was:" >&5
6895   cat conftest.$ac_ext >&5
6896   rm -rf conftest*
6897   eval "ac_cv_func_$ac_func=no"
6898 fi
6899 rm -f conftest*
6900 fi
6901
6902 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6903   echo "$ac_t""yes" 1>&6
6904     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6905   cat >> confdefs.h <<EOF
6906 #define $ac_tr_func 1
6907 EOF
6908  
6909 else
6910   echo "$ac_t""no" 1>&6
6911 fi
6912 done
6913  ;;
6914   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
6915 echo "configure:6916: checking for set_auth_parameters in -lsecurity" >&5
6916 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
6917 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6918   echo $ac_n "(cached) $ac_c" 1>&6
6919 else
6920   ac_save_LIBS="$LIBS"
6921 LIBS="-lsecurity  $LIBS"
6922 cat > conftest.$ac_ext <<EOF
6923 #line 6924 "configure"
6924 #include "confdefs.h"
6925 /* Override any gcc2 internal prototype to avoid an error.  */
6926 /* We use char because int might match the return type of a gcc2
6927     builtin and then its argument prototype would still apply.  */
6928 char set_auth_parameters();
6929
6930 int main() {
6931 set_auth_parameters()
6932 ; return 0; }
6933 EOF
6934 if { (eval echo configure:6935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6935   rm -rf conftest*
6936   eval "ac_cv_lib_$ac_lib_var=yes"
6937 else
6938   echo "configure: failed program was:" >&5
6939   cat conftest.$ac_ext >&5
6940   rm -rf conftest*
6941   eval "ac_cv_lib_$ac_lib_var=no"
6942 fi
6943 rm -f conftest*
6944 LIBS="$ac_save_LIBS"
6945
6946 fi
6947 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6948   echo "$ac_t""yes" 1>&6
6949     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6950     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6951   cat >> confdefs.h <<EOF
6952 #define $ac_tr_lib 1
6953 EOF
6954
6955   LIBS="-lsecurity $LIBS"
6956
6957 else
6958   echo "$ac_t""no" 1>&6
6959 fi
6960  
6961      for ac_func in set_auth_parameters
6962 do
6963 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6964 echo "configure:6965: checking for $ac_func" >&5
6965 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6966   echo $ac_n "(cached) $ac_c" 1>&6
6967 else
6968   cat > conftest.$ac_ext <<EOF
6969 #line 6970 "configure"
6970 #include "confdefs.h"
6971 /* System header to define __stub macros and hopefully few prototypes,
6972     which can conflict with char $ac_func(); below.  */
6973 #include <assert.h>
6974 /* Override any gcc2 internal prototype to avoid an error.  */
6975 /* We use char because int might match the return type of a gcc2
6976     builtin and then its argument prototype would still apply.  */
6977 char $ac_func();
6978
6979 int main() {
6980
6981 /* The GNU C library defines this for functions which it implements
6982     to always fail with ENOSYS.  Some functions are actually named
6983     something starting with __ and the normal name is an alias.  */
6984 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6985 choke me
6986 #else
6987 $ac_func();
6988 #endif
6989
6990 ; return 0; }
6991 EOF
6992 if { (eval echo configure:6993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6993   rm -rf conftest*
6994   eval "ac_cv_func_$ac_func=yes"
6995 else
6996   echo "configure: failed program was:" >&5
6997   cat conftest.$ac_ext >&5
6998   rm -rf conftest*
6999   eval "ac_cv_func_$ac_func=no"
7000 fi
7001 rm -f conftest*
7002 fi
7003
7004 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7005   echo "$ac_t""yes" 1>&6
7006     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7007   cat >> confdefs.h <<EOF
7008 #define $ac_tr_func 1
7009 EOF
7010  
7011 else
7012   echo "$ac_t""no" 1>&6
7013 fi
7014 done
7015
7016   ;;
7017   esac
7018
7019 case "$LIBS" in
7020   *-lsec*) for ac_func in set_auth_parameters
7021 do
7022 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7023 echo "configure:7024: checking for $ac_func" >&5
7024 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7025   echo $ac_n "(cached) $ac_c" 1>&6
7026 else
7027   cat > conftest.$ac_ext <<EOF
7028 #line 7029 "configure"
7029 #include "confdefs.h"
7030 /* System header to define __stub macros and hopefully few prototypes,
7031     which can conflict with char $ac_func(); below.  */
7032 #include <assert.h>
7033 /* Override any gcc2 internal prototype to avoid an error.  */
7034 /* We use char because int might match the return type of a gcc2
7035     builtin and then its argument prototype would still apply.  */
7036 char $ac_func();
7037
7038 int main() {
7039
7040 /* The GNU C library defines this for functions which it implements
7041     to always fail with ENOSYS.  Some functions are actually named
7042     something starting with __ and the normal name is an alias.  */
7043 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7044 choke me
7045 #else
7046 $ac_func();
7047 #endif
7048
7049 ; return 0; }
7050 EOF
7051 if { (eval echo configure:7052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7052   rm -rf conftest*
7053   eval "ac_cv_func_$ac_func=yes"
7054 else
7055   echo "configure: failed program was:" >&5
7056   cat conftest.$ac_ext >&5
7057   rm -rf conftest*
7058   eval "ac_cv_func_$ac_func=no"
7059 fi
7060 rm -f conftest*
7061 fi
7062
7063 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7064   echo "$ac_t""yes" 1>&6
7065     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7066   cat >> confdefs.h <<EOF
7067 #define $ac_tr_func 1
7068 EOF
7069  
7070 else
7071   echo "$ac_t""no" 1>&6
7072 fi
7073 done
7074  ;;
7075   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7076 echo "configure:7077: checking for set_auth_parameters in -lsec" >&5
7077 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7078 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7079   echo $ac_n "(cached) $ac_c" 1>&6
7080 else
7081   ac_save_LIBS="$LIBS"
7082 LIBS="-lsec  $LIBS"
7083 cat > conftest.$ac_ext <<EOF
7084 #line 7085 "configure"
7085 #include "confdefs.h"
7086 /* Override any gcc2 internal prototype to avoid an error.  */
7087 /* We use char because int might match the return type of a gcc2
7088     builtin and then its argument prototype would still apply.  */
7089 char set_auth_parameters();
7090
7091 int main() {
7092 set_auth_parameters()
7093 ; return 0; }
7094 EOF
7095 if { (eval echo configure:7096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7096   rm -rf conftest*
7097   eval "ac_cv_lib_$ac_lib_var=yes"
7098 else
7099   echo "configure: failed program was:" >&5
7100   cat conftest.$ac_ext >&5
7101   rm -rf conftest*
7102   eval "ac_cv_lib_$ac_lib_var=no"
7103 fi
7104 rm -f conftest*
7105 LIBS="$ac_save_LIBS"
7106
7107 fi
7108 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7109   echo "$ac_t""yes" 1>&6
7110     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7111     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7112   cat >> confdefs.h <<EOF
7113 #define $ac_tr_lib 1
7114 EOF
7115
7116   LIBS="-lsec $LIBS"
7117
7118 else
7119   echo "$ac_t""no" 1>&6
7120 fi
7121  
7122      for ac_func in set_auth_parameters
7123 do
7124 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7125 echo "configure:7126: checking for $ac_func" >&5
7126 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7127   echo $ac_n "(cached) $ac_c" 1>&6
7128 else
7129   cat > conftest.$ac_ext <<EOF
7130 #line 7131 "configure"
7131 #include "confdefs.h"
7132 /* System header to define __stub macros and hopefully few prototypes,
7133     which can conflict with char $ac_func(); below.  */
7134 #include <assert.h>
7135 /* Override any gcc2 internal prototype to avoid an error.  */
7136 /* We use char because int might match the return type of a gcc2
7137     builtin and then its argument prototype would still apply.  */
7138 char $ac_func();
7139
7140 int main() {
7141
7142 /* The GNU C library defines this for functions which it implements
7143     to always fail with ENOSYS.  Some functions are actually named
7144     something starting with __ and the normal name is an alias.  */
7145 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7146 choke me
7147 #else
7148 $ac_func();
7149 #endif
7150
7151 ; return 0; }
7152 EOF
7153 if { (eval echo configure:7154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7154   rm -rf conftest*
7155   eval "ac_cv_func_$ac_func=yes"
7156 else
7157   echo "configure: failed program was:" >&5
7158   cat conftest.$ac_ext >&5
7159   rm -rf conftest*
7160   eval "ac_cv_func_$ac_func=no"
7161 fi
7162 rm -f conftest*
7163 fi
7164
7165 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7166   echo "$ac_t""yes" 1>&6
7167     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7168   cat >> confdefs.h <<EOF
7169 #define $ac_tr_func 1
7170 EOF
7171  
7172 else
7173   echo "$ac_t""no" 1>&6
7174 fi
7175 done
7176
7177   ;;
7178   esac
7179
7180
7181 # UnixWare 7.x has its getspnam in -lgen
7182 case "$LIBS" in
7183   *-lgen*) for ac_func in getspnam
7184 do
7185 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7186 echo "configure:7187: checking for $ac_func" >&5
7187 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7188   echo $ac_n "(cached) $ac_c" 1>&6
7189 else
7190   cat > conftest.$ac_ext <<EOF
7191 #line 7192 "configure"
7192 #include "confdefs.h"
7193 /* System header to define __stub macros and hopefully few prototypes,
7194     which can conflict with char $ac_func(); below.  */
7195 #include <assert.h>
7196 /* Override any gcc2 internal prototype to avoid an error.  */
7197 /* We use char because int might match the return type of a gcc2
7198     builtin and then its argument prototype would still apply.  */
7199 char $ac_func();
7200
7201 int main() {
7202
7203 /* The GNU C library defines this for functions which it implements
7204     to always fail with ENOSYS.  Some functions are actually named
7205     something starting with __ and the normal name is an alias.  */
7206 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7207 choke me
7208 #else
7209 $ac_func();
7210 #endif
7211
7212 ; return 0; }
7213 EOF
7214 if { (eval echo configure:7215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7215   rm -rf conftest*
7216   eval "ac_cv_func_$ac_func=yes"
7217 else
7218   echo "configure: failed program was:" >&5
7219   cat conftest.$ac_ext >&5
7220   rm -rf conftest*
7221   eval "ac_cv_func_$ac_func=no"
7222 fi
7223 rm -f conftest*
7224 fi
7225
7226 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7227   echo "$ac_t""yes" 1>&6
7228     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7229   cat >> confdefs.h <<EOF
7230 #define $ac_tr_func 1
7231 EOF
7232  
7233 else
7234   echo "$ac_t""no" 1>&6
7235 fi
7236 done
7237  ;;
7238   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7239 echo "configure:7240: checking for getspnam in -lgen" >&5
7240 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7241 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7242   echo $ac_n "(cached) $ac_c" 1>&6
7243 else
7244   ac_save_LIBS="$LIBS"
7245 LIBS="-lgen  $LIBS"
7246 cat > conftest.$ac_ext <<EOF
7247 #line 7248 "configure"
7248 #include "confdefs.h"
7249 /* Override any gcc2 internal prototype to avoid an error.  */
7250 /* We use char because int might match the return type of a gcc2
7251     builtin and then its argument prototype would still apply.  */
7252 char getspnam();
7253
7254 int main() {
7255 getspnam()
7256 ; return 0; }
7257 EOF
7258 if { (eval echo configure:7259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7259   rm -rf conftest*
7260   eval "ac_cv_lib_$ac_lib_var=yes"
7261 else
7262   echo "configure: failed program was:" >&5
7263   cat conftest.$ac_ext >&5
7264   rm -rf conftest*
7265   eval "ac_cv_lib_$ac_lib_var=no"
7266 fi
7267 rm -f conftest*
7268 LIBS="$ac_save_LIBS"
7269
7270 fi
7271 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7272   echo "$ac_t""yes" 1>&6
7273     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7274     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7275   cat >> confdefs.h <<EOF
7276 #define $ac_tr_lib 1
7277 EOF
7278
7279   LIBS="-lgen $LIBS"
7280
7281 else
7282   echo "$ac_t""no" 1>&6
7283 fi
7284  
7285      for ac_func in getspnam
7286 do
7287 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7288 echo "configure:7289: checking for $ac_func" >&5
7289 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7290   echo $ac_n "(cached) $ac_c" 1>&6
7291 else
7292   cat > conftest.$ac_ext <<EOF
7293 #line 7294 "configure"
7294 #include "confdefs.h"
7295 /* System header to define __stub macros and hopefully few prototypes,
7296     which can conflict with char $ac_func(); below.  */
7297 #include <assert.h>
7298 /* Override any gcc2 internal prototype to avoid an error.  */
7299 /* We use char because int might match the return type of a gcc2
7300     builtin and then its argument prototype would still apply.  */
7301 char $ac_func();
7302
7303 int main() {
7304
7305 /* The GNU C library defines this for functions which it implements
7306     to always fail with ENOSYS.  Some functions are actually named
7307     something starting with __ and the normal name is an alias.  */
7308 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7309 choke me
7310 #else
7311 $ac_func();
7312 #endif
7313
7314 ; return 0; }
7315 EOF
7316 if { (eval echo configure:7317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7317   rm -rf conftest*
7318   eval "ac_cv_func_$ac_func=yes"
7319 else
7320   echo "configure: failed program was:" >&5
7321   cat conftest.$ac_ext >&5
7322   rm -rf conftest*
7323   eval "ac_cv_func_$ac_func=no"
7324 fi
7325 rm -f conftest*
7326 fi
7327
7328 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7329   echo "$ac_t""yes" 1>&6
7330     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7331   cat >> confdefs.h <<EOF
7332 #define $ac_tr_func 1
7333 EOF
7334  
7335 else
7336   echo "$ac_t""no" 1>&6
7337 fi
7338 done
7339
7340   ;;
7341   esac
7342
7343
7344 case "$LIBS" in
7345   *-lsecurity*) for ac_func in getspnam
7346 do
7347 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7348 echo "configure:7349: checking for $ac_func" >&5
7349 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7350   echo $ac_n "(cached) $ac_c" 1>&6
7351 else
7352   cat > conftest.$ac_ext <<EOF
7353 #line 7354 "configure"
7354 #include "confdefs.h"
7355 /* System header to define __stub macros and hopefully few prototypes,
7356     which can conflict with char $ac_func(); below.  */
7357 #include <assert.h>
7358 /* Override any gcc2 internal prototype to avoid an error.  */
7359 /* We use char because int might match the return type of a gcc2
7360     builtin and then its argument prototype would still apply.  */
7361 char $ac_func();
7362
7363 int main() {
7364
7365 /* The GNU C library defines this for functions which it implements
7366     to always fail with ENOSYS.  Some functions are actually named
7367     something starting with __ and the normal name is an alias.  */
7368 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7369 choke me
7370 #else
7371 $ac_func();
7372 #endif
7373
7374 ; return 0; }
7375 EOF
7376 if { (eval echo configure:7377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7377   rm -rf conftest*
7378   eval "ac_cv_func_$ac_func=yes"
7379 else
7380   echo "configure: failed program was:" >&5
7381   cat conftest.$ac_ext >&5
7382   rm -rf conftest*
7383   eval "ac_cv_func_$ac_func=no"
7384 fi
7385 rm -f conftest*
7386 fi
7387
7388 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7389   echo "$ac_t""yes" 1>&6
7390     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7391   cat >> confdefs.h <<EOF
7392 #define $ac_tr_func 1
7393 EOF
7394  
7395 else
7396   echo "$ac_t""no" 1>&6
7397 fi
7398 done
7399  ;;
7400   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7401 echo "configure:7402: checking for getspnam in -lsecurity" >&5
7402 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7403 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7404   echo $ac_n "(cached) $ac_c" 1>&6
7405 else
7406   ac_save_LIBS="$LIBS"
7407 LIBS="-lsecurity  $LIBS"
7408 cat > conftest.$ac_ext <<EOF
7409 #line 7410 "configure"
7410 #include "confdefs.h"
7411 /* Override any gcc2 internal prototype to avoid an error.  */
7412 /* We use char because int might match the return type of a gcc2
7413     builtin and then its argument prototype would still apply.  */
7414 char getspnam();
7415
7416 int main() {
7417 getspnam()
7418 ; return 0; }
7419 EOF
7420 if { (eval echo configure:7421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7421   rm -rf conftest*
7422   eval "ac_cv_lib_$ac_lib_var=yes"
7423 else
7424   echo "configure: failed program was:" >&5
7425   cat conftest.$ac_ext >&5
7426   rm -rf conftest*
7427   eval "ac_cv_lib_$ac_lib_var=no"
7428 fi
7429 rm -f conftest*
7430 LIBS="$ac_save_LIBS"
7431
7432 fi
7433 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7434   echo "$ac_t""yes" 1>&6
7435     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7436     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7437   cat >> confdefs.h <<EOF
7438 #define $ac_tr_lib 1
7439 EOF
7440
7441   LIBS="-lsecurity $LIBS"
7442
7443 else
7444   echo "$ac_t""no" 1>&6
7445 fi
7446  
7447      for ac_func in getspnam
7448 do
7449 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7450 echo "configure:7451: checking for $ac_func" >&5
7451 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7452   echo $ac_n "(cached) $ac_c" 1>&6
7453 else
7454   cat > conftest.$ac_ext <<EOF
7455 #line 7456 "configure"
7456 #include "confdefs.h"
7457 /* System header to define __stub macros and hopefully few prototypes,
7458     which can conflict with char $ac_func(); below.  */
7459 #include <assert.h>
7460 /* Override any gcc2 internal prototype to avoid an error.  */
7461 /* We use char because int might match the return type of a gcc2
7462     builtin and then its argument prototype would still apply.  */
7463 char $ac_func();
7464
7465 int main() {
7466
7467 /* The GNU C library defines this for functions which it implements
7468     to always fail with ENOSYS.  Some functions are actually named
7469     something starting with __ and the normal name is an alias.  */
7470 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7471 choke me
7472 #else
7473 $ac_func();
7474 #endif
7475
7476 ; return 0; }
7477 EOF
7478 if { (eval echo configure:7479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7479   rm -rf conftest*
7480   eval "ac_cv_func_$ac_func=yes"
7481 else
7482   echo "configure: failed program was:" >&5
7483   cat conftest.$ac_ext >&5
7484   rm -rf conftest*
7485   eval "ac_cv_func_$ac_func=no"
7486 fi
7487 rm -f conftest*
7488 fi
7489
7490 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7491   echo "$ac_t""yes" 1>&6
7492     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7493   cat >> confdefs.h <<EOF
7494 #define $ac_tr_func 1
7495 EOF
7496  
7497 else
7498   echo "$ac_t""no" 1>&6
7499 fi
7500 done
7501
7502   ;;
7503   esac
7504
7505 case "$LIBS" in
7506   *-lsec*) for ac_func in getspnam
7507 do
7508 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7509 echo "configure:7510: checking for $ac_func" >&5
7510 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7511   echo $ac_n "(cached) $ac_c" 1>&6
7512 else
7513   cat > conftest.$ac_ext <<EOF
7514 #line 7515 "configure"
7515 #include "confdefs.h"
7516 /* System header to define __stub macros and hopefully few prototypes,
7517     which can conflict with char $ac_func(); below.  */
7518 #include <assert.h>
7519 /* Override any gcc2 internal prototype to avoid an error.  */
7520 /* We use char because int might match the return type of a gcc2
7521     builtin and then its argument prototype would still apply.  */
7522 char $ac_func();
7523
7524 int main() {
7525
7526 /* The GNU C library defines this for functions which it implements
7527     to always fail with ENOSYS.  Some functions are actually named
7528     something starting with __ and the normal name is an alias.  */
7529 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7530 choke me
7531 #else
7532 $ac_func();
7533 #endif
7534
7535 ; return 0; }
7536 EOF
7537 if { (eval echo configure:7538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7538   rm -rf conftest*
7539   eval "ac_cv_func_$ac_func=yes"
7540 else
7541   echo "configure: failed program was:" >&5
7542   cat conftest.$ac_ext >&5
7543   rm -rf conftest*
7544   eval "ac_cv_func_$ac_func=no"
7545 fi
7546 rm -f conftest*
7547 fi
7548
7549 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7550   echo "$ac_t""yes" 1>&6
7551     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7552   cat >> confdefs.h <<EOF
7553 #define $ac_tr_func 1
7554 EOF
7555  
7556 else
7557   echo "$ac_t""no" 1>&6
7558 fi
7559 done
7560  ;;
7561   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7562 echo "configure:7563: checking for getspnam in -lsec" >&5
7563 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7564 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7565   echo $ac_n "(cached) $ac_c" 1>&6
7566 else
7567   ac_save_LIBS="$LIBS"
7568 LIBS="-lsec  $LIBS"
7569 cat > conftest.$ac_ext <<EOF
7570 #line 7571 "configure"
7571 #include "confdefs.h"
7572 /* Override any gcc2 internal prototype to avoid an error.  */
7573 /* We use char because int might match the return type of a gcc2
7574     builtin and then its argument prototype would still apply.  */
7575 char getspnam();
7576
7577 int main() {
7578 getspnam()
7579 ; return 0; }
7580 EOF
7581 if { (eval echo configure:7582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7582   rm -rf conftest*
7583   eval "ac_cv_lib_$ac_lib_var=yes"
7584 else
7585   echo "configure: failed program was:" >&5
7586   cat conftest.$ac_ext >&5
7587   rm -rf conftest*
7588   eval "ac_cv_lib_$ac_lib_var=no"
7589 fi
7590 rm -f conftest*
7591 LIBS="$ac_save_LIBS"
7592
7593 fi
7594 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7595   echo "$ac_t""yes" 1>&6
7596     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7597     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7598   cat >> confdefs.h <<EOF
7599 #define $ac_tr_lib 1
7600 EOF
7601
7602   LIBS="-lsec $LIBS"
7603
7604 else
7605   echo "$ac_t""no" 1>&6
7606 fi
7607  
7608      for ac_func in getspnam
7609 do
7610 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7611 echo "configure:7612: checking for $ac_func" >&5
7612 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7613   echo $ac_n "(cached) $ac_c" 1>&6
7614 else
7615   cat > conftest.$ac_ext <<EOF
7616 #line 7617 "configure"
7617 #include "confdefs.h"
7618 /* System header to define __stub macros and hopefully few prototypes,
7619     which can conflict with char $ac_func(); below.  */
7620 #include <assert.h>
7621 /* Override any gcc2 internal prototype to avoid an error.  */
7622 /* We use char because int might match the return type of a gcc2
7623     builtin and then its argument prototype would still apply.  */
7624 char $ac_func();
7625
7626 int main() {
7627
7628 /* The GNU C library defines this for functions which it implements
7629     to always fail with ENOSYS.  Some functions are actually named
7630     something starting with __ and the normal name is an alias.  */
7631 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7632 choke me
7633 #else
7634 $ac_func();
7635 #endif
7636
7637 ; return 0; }
7638 EOF
7639 if { (eval echo configure:7640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7640   rm -rf conftest*
7641   eval "ac_cv_func_$ac_func=yes"
7642 else
7643   echo "configure: failed program was:" >&5
7644   cat conftest.$ac_ext >&5
7645   rm -rf conftest*
7646   eval "ac_cv_func_$ac_func=no"
7647 fi
7648 rm -f conftest*
7649 fi
7650
7651 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7652   echo "$ac_t""yes" 1>&6
7653     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7654   cat >> confdefs.h <<EOF
7655 #define $ac_tr_func 1
7656 EOF
7657  
7658 else
7659   echo "$ac_t""no" 1>&6
7660 fi
7661 done
7662
7663   ;;
7664   esac
7665
7666
7667 case "$LIBS" in
7668   *-lsecurity*) for ac_func in bigcrypt
7669 do
7670 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7671 echo "configure:7672: checking for $ac_func" >&5
7672 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7673   echo $ac_n "(cached) $ac_c" 1>&6
7674 else
7675   cat > conftest.$ac_ext <<EOF
7676 #line 7677 "configure"
7677 #include "confdefs.h"
7678 /* System header to define __stub macros and hopefully few prototypes,
7679     which can conflict with char $ac_func(); below.  */
7680 #include <assert.h>
7681 /* Override any gcc2 internal prototype to avoid an error.  */
7682 /* We use char because int might match the return type of a gcc2
7683     builtin and then its argument prototype would still apply.  */
7684 char $ac_func();
7685
7686 int main() {
7687
7688 /* The GNU C library defines this for functions which it implements
7689     to always fail with ENOSYS.  Some functions are actually named
7690     something starting with __ and the normal name is an alias.  */
7691 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7692 choke me
7693 #else
7694 $ac_func();
7695 #endif
7696
7697 ; return 0; }
7698 EOF
7699 if { (eval echo configure:7700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7700   rm -rf conftest*
7701   eval "ac_cv_func_$ac_func=yes"
7702 else
7703   echo "configure: failed program was:" >&5
7704   cat conftest.$ac_ext >&5
7705   rm -rf conftest*
7706   eval "ac_cv_func_$ac_func=no"
7707 fi
7708 rm -f conftest*
7709 fi
7710
7711 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7712   echo "$ac_t""yes" 1>&6
7713     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7714   cat >> confdefs.h <<EOF
7715 #define $ac_tr_func 1
7716 EOF
7717  
7718 else
7719   echo "$ac_t""no" 1>&6
7720 fi
7721 done
7722  ;;
7723   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
7724 echo "configure:7725: checking for bigcrypt in -lsecurity" >&5
7725 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
7726 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7727   echo $ac_n "(cached) $ac_c" 1>&6
7728 else
7729   ac_save_LIBS="$LIBS"
7730 LIBS="-lsecurity  $LIBS"
7731 cat > conftest.$ac_ext <<EOF
7732 #line 7733 "configure"
7733 #include "confdefs.h"
7734 /* Override any gcc2 internal prototype to avoid an error.  */
7735 /* We use char because int might match the return type of a gcc2
7736     builtin and then its argument prototype would still apply.  */
7737 char bigcrypt();
7738
7739 int main() {
7740 bigcrypt()
7741 ; return 0; }
7742 EOF
7743 if { (eval echo configure:7744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7744   rm -rf conftest*
7745   eval "ac_cv_lib_$ac_lib_var=yes"
7746 else
7747   echo "configure: failed program was:" >&5
7748   cat conftest.$ac_ext >&5
7749   rm -rf conftest*
7750   eval "ac_cv_lib_$ac_lib_var=no"
7751 fi
7752 rm -f conftest*
7753 LIBS="$ac_save_LIBS"
7754
7755 fi
7756 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7757   echo "$ac_t""yes" 1>&6
7758     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7759     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7760   cat >> confdefs.h <<EOF
7761 #define $ac_tr_lib 1
7762 EOF
7763
7764   LIBS="-lsecurity $LIBS"
7765
7766 else
7767   echo "$ac_t""no" 1>&6
7768 fi
7769  
7770      for ac_func in bigcrypt
7771 do
7772 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7773 echo "configure:7774: checking for $ac_func" >&5
7774 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7775   echo $ac_n "(cached) $ac_c" 1>&6
7776 else
7777   cat > conftest.$ac_ext <<EOF
7778 #line 7779 "configure"
7779 #include "confdefs.h"
7780 /* System header to define __stub macros and hopefully few prototypes,
7781     which can conflict with char $ac_func(); below.  */
7782 #include <assert.h>
7783 /* Override any gcc2 internal prototype to avoid an error.  */
7784 /* We use char because int might match the return type of a gcc2
7785     builtin and then its argument prototype would still apply.  */
7786 char $ac_func();
7787
7788 int main() {
7789
7790 /* The GNU C library defines this for functions which it implements
7791     to always fail with ENOSYS.  Some functions are actually named
7792     something starting with __ and the normal name is an alias.  */
7793 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7794 choke me
7795 #else
7796 $ac_func();
7797 #endif
7798
7799 ; return 0; }
7800 EOF
7801 if { (eval echo configure:7802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7802   rm -rf conftest*
7803   eval "ac_cv_func_$ac_func=yes"
7804 else
7805   echo "configure: failed program was:" >&5
7806   cat conftest.$ac_ext >&5
7807   rm -rf conftest*
7808   eval "ac_cv_func_$ac_func=no"
7809 fi
7810 rm -f conftest*
7811 fi
7812
7813 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7814   echo "$ac_t""yes" 1>&6
7815     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7816   cat >> confdefs.h <<EOF
7817 #define $ac_tr_func 1
7818 EOF
7819  
7820 else
7821   echo "$ac_t""no" 1>&6
7822 fi
7823 done
7824
7825   ;;
7826   esac
7827
7828 case "$LIBS" in
7829   *-lsec*) for ac_func in bigcrypt
7830 do
7831 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7832 echo "configure:7833: checking for $ac_func" >&5
7833 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7834   echo $ac_n "(cached) $ac_c" 1>&6
7835 else
7836   cat > conftest.$ac_ext <<EOF
7837 #line 7838 "configure"
7838 #include "confdefs.h"
7839 /* System header to define __stub macros and hopefully few prototypes,
7840     which can conflict with char $ac_func(); below.  */
7841 #include <assert.h>
7842 /* Override any gcc2 internal prototype to avoid an error.  */
7843 /* We use char because int might match the return type of a gcc2
7844     builtin and then its argument prototype would still apply.  */
7845 char $ac_func();
7846
7847 int main() {
7848
7849 /* The GNU C library defines this for functions which it implements
7850     to always fail with ENOSYS.  Some functions are actually named
7851     something starting with __ and the normal name is an alias.  */
7852 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7853 choke me
7854 #else
7855 $ac_func();
7856 #endif
7857
7858 ; return 0; }
7859 EOF
7860 if { (eval echo configure:7861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7861   rm -rf conftest*
7862   eval "ac_cv_func_$ac_func=yes"
7863 else
7864   echo "configure: failed program was:" >&5
7865   cat conftest.$ac_ext >&5
7866   rm -rf conftest*
7867   eval "ac_cv_func_$ac_func=no"
7868 fi
7869 rm -f conftest*
7870 fi
7871
7872 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7873   echo "$ac_t""yes" 1>&6
7874     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7875   cat >> confdefs.h <<EOF
7876 #define $ac_tr_func 1
7877 EOF
7878  
7879 else
7880   echo "$ac_t""no" 1>&6
7881 fi
7882 done
7883  ;;
7884   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
7885 echo "configure:7886: checking for bigcrypt in -lsec" >&5
7886 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
7887 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7888   echo $ac_n "(cached) $ac_c" 1>&6
7889 else
7890   ac_save_LIBS="$LIBS"
7891 LIBS="-lsec  $LIBS"
7892 cat > conftest.$ac_ext <<EOF
7893 #line 7894 "configure"
7894 #include "confdefs.h"
7895 /* Override any gcc2 internal prototype to avoid an error.  */
7896 /* We use char because int might match the return type of a gcc2
7897     builtin and then its argument prototype would still apply.  */
7898 char bigcrypt();
7899
7900 int main() {
7901 bigcrypt()
7902 ; return 0; }
7903 EOF
7904 if { (eval echo configure:7905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7905   rm -rf conftest*
7906   eval "ac_cv_lib_$ac_lib_var=yes"
7907 else
7908   echo "configure: failed program was:" >&5
7909   cat conftest.$ac_ext >&5
7910   rm -rf conftest*
7911   eval "ac_cv_lib_$ac_lib_var=no"
7912 fi
7913 rm -f conftest*
7914 LIBS="$ac_save_LIBS"
7915
7916 fi
7917 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7918   echo "$ac_t""yes" 1>&6
7919     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7920     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7921   cat >> confdefs.h <<EOF
7922 #define $ac_tr_lib 1
7923 EOF
7924
7925   LIBS="-lsec $LIBS"
7926
7927 else
7928   echo "$ac_t""no" 1>&6
7929 fi
7930  
7931      for ac_func in bigcrypt
7932 do
7933 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7934 echo "configure:7935: checking for $ac_func" >&5
7935 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7936   echo $ac_n "(cached) $ac_c" 1>&6
7937 else
7938   cat > conftest.$ac_ext <<EOF
7939 #line 7940 "configure"
7940 #include "confdefs.h"
7941 /* System header to define __stub macros and hopefully few prototypes,
7942     which can conflict with char $ac_func(); below.  */
7943 #include <assert.h>
7944 /* Override any gcc2 internal prototype to avoid an error.  */
7945 /* We use char because int might match the return type of a gcc2
7946     builtin and then its argument prototype would still apply.  */
7947 char $ac_func();
7948
7949 int main() {
7950
7951 /* The GNU C library defines this for functions which it implements
7952     to always fail with ENOSYS.  Some functions are actually named
7953     something starting with __ and the normal name is an alias.  */
7954 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7955 choke me
7956 #else
7957 $ac_func();
7958 #endif
7959
7960 ; return 0; }
7961 EOF
7962 if { (eval echo configure:7963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7963   rm -rf conftest*
7964   eval "ac_cv_func_$ac_func=yes"
7965 else
7966   echo "configure: failed program was:" >&5
7967   cat conftest.$ac_ext >&5
7968   rm -rf conftest*
7969   eval "ac_cv_func_$ac_func=no"
7970 fi
7971 rm -f conftest*
7972 fi
7973
7974 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7975   echo "$ac_t""yes" 1>&6
7976     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7977   cat >> confdefs.h <<EOF
7978 #define $ac_tr_func 1
7979 EOF
7980  
7981 else
7982   echo "$ac_t""no" 1>&6
7983 fi
7984 done
7985
7986   ;;
7987   esac
7988
7989
7990 case "$LIBS" in
7991   *-lsecurity*) for ac_func in getprpwnam
7992 do
7993 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7994 echo "configure:7995: checking for $ac_func" >&5
7995 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7996   echo $ac_n "(cached) $ac_c" 1>&6
7997 else
7998   cat > conftest.$ac_ext <<EOF
7999 #line 8000 "configure"
8000 #include "confdefs.h"
8001 /* System header to define __stub macros and hopefully few prototypes,
8002     which can conflict with char $ac_func(); below.  */
8003 #include <assert.h>
8004 /* Override any gcc2 internal prototype to avoid an error.  */
8005 /* We use char because int might match the return type of a gcc2
8006     builtin and then its argument prototype would still apply.  */
8007 char $ac_func();
8008
8009 int main() {
8010
8011 /* The GNU C library defines this for functions which it implements
8012     to always fail with ENOSYS.  Some functions are actually named
8013     something starting with __ and the normal name is an alias.  */
8014 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8015 choke me
8016 #else
8017 $ac_func();
8018 #endif
8019
8020 ; return 0; }
8021 EOF
8022 if { (eval echo configure:8023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8023   rm -rf conftest*
8024   eval "ac_cv_func_$ac_func=yes"
8025 else
8026   echo "configure: failed program was:" >&5
8027   cat conftest.$ac_ext >&5
8028   rm -rf conftest*
8029   eval "ac_cv_func_$ac_func=no"
8030 fi
8031 rm -f conftest*
8032 fi
8033
8034 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8035   echo "$ac_t""yes" 1>&6
8036     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8037   cat >> confdefs.h <<EOF
8038 #define $ac_tr_func 1
8039 EOF
8040  
8041 else
8042   echo "$ac_t""no" 1>&6
8043 fi
8044 done
8045  ;;
8046   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8047 echo "configure:8048: checking for getprpwnam in -lsecurity" >&5
8048 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8049 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8050   echo $ac_n "(cached) $ac_c" 1>&6
8051 else
8052   ac_save_LIBS="$LIBS"
8053 LIBS="-lsecurity  $LIBS"
8054 cat > conftest.$ac_ext <<EOF
8055 #line 8056 "configure"
8056 #include "confdefs.h"
8057 /* Override any gcc2 internal prototype to avoid an error.  */
8058 /* We use char because int might match the return type of a gcc2
8059     builtin and then its argument prototype would still apply.  */
8060 char getprpwnam();
8061
8062 int main() {
8063 getprpwnam()
8064 ; return 0; }
8065 EOF
8066 if { (eval echo configure:8067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8067   rm -rf conftest*
8068   eval "ac_cv_lib_$ac_lib_var=yes"
8069 else
8070   echo "configure: failed program was:" >&5
8071   cat conftest.$ac_ext >&5
8072   rm -rf conftest*
8073   eval "ac_cv_lib_$ac_lib_var=no"
8074 fi
8075 rm -f conftest*
8076 LIBS="$ac_save_LIBS"
8077
8078 fi
8079 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8080   echo "$ac_t""yes" 1>&6
8081     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8082     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8083   cat >> confdefs.h <<EOF
8084 #define $ac_tr_lib 1
8085 EOF
8086
8087   LIBS="-lsecurity $LIBS"
8088
8089 else
8090   echo "$ac_t""no" 1>&6
8091 fi
8092  
8093      for ac_func in getprpwnam
8094 do
8095 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8096 echo "configure:8097: checking for $ac_func" >&5
8097 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8098   echo $ac_n "(cached) $ac_c" 1>&6
8099 else
8100   cat > conftest.$ac_ext <<EOF
8101 #line 8102 "configure"
8102 #include "confdefs.h"
8103 /* System header to define __stub macros and hopefully few prototypes,
8104     which can conflict with char $ac_func(); below.  */
8105 #include <assert.h>
8106 /* Override any gcc2 internal prototype to avoid an error.  */
8107 /* We use char because int might match the return type of a gcc2
8108     builtin and then its argument prototype would still apply.  */
8109 char $ac_func();
8110
8111 int main() {
8112
8113 /* The GNU C library defines this for functions which it implements
8114     to always fail with ENOSYS.  Some functions are actually named
8115     something starting with __ and the normal name is an alias.  */
8116 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8117 choke me
8118 #else
8119 $ac_func();
8120 #endif
8121
8122 ; return 0; }
8123 EOF
8124 if { (eval echo configure:8125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8125   rm -rf conftest*
8126   eval "ac_cv_func_$ac_func=yes"
8127 else
8128   echo "configure: failed program was:" >&5
8129   cat conftest.$ac_ext >&5
8130   rm -rf conftest*
8131   eval "ac_cv_func_$ac_func=no"
8132 fi
8133 rm -f conftest*
8134 fi
8135
8136 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8137   echo "$ac_t""yes" 1>&6
8138     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8139   cat >> confdefs.h <<EOF
8140 #define $ac_tr_func 1
8141 EOF
8142  
8143 else
8144   echo "$ac_t""no" 1>&6
8145 fi
8146 done
8147
8148   ;;
8149   esac
8150
8151 case "$LIBS" in
8152   *-lsec*) for ac_func in getprpwnam
8153 do
8154 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8155 echo "configure:8156: checking for $ac_func" >&5
8156 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8157   echo $ac_n "(cached) $ac_c" 1>&6
8158 else
8159   cat > conftest.$ac_ext <<EOF
8160 #line 8161 "configure"
8161 #include "confdefs.h"
8162 /* System header to define __stub macros and hopefully few prototypes,
8163     which can conflict with char $ac_func(); below.  */
8164 #include <assert.h>
8165 /* Override any gcc2 internal prototype to avoid an error.  */
8166 /* We use char because int might match the return type of a gcc2
8167     builtin and then its argument prototype would still apply.  */
8168 char $ac_func();
8169
8170 int main() {
8171
8172 /* The GNU C library defines this for functions which it implements
8173     to always fail with ENOSYS.  Some functions are actually named
8174     something starting with __ and the normal name is an alias.  */
8175 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8176 choke me
8177 #else
8178 $ac_func();
8179 #endif
8180
8181 ; return 0; }
8182 EOF
8183 if { (eval echo configure:8184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8184   rm -rf conftest*
8185   eval "ac_cv_func_$ac_func=yes"
8186 else
8187   echo "configure: failed program was:" >&5
8188   cat conftest.$ac_ext >&5
8189   rm -rf conftest*
8190   eval "ac_cv_func_$ac_func=no"
8191 fi
8192 rm -f conftest*
8193 fi
8194
8195 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8196   echo "$ac_t""yes" 1>&6
8197     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8198   cat >> confdefs.h <<EOF
8199 #define $ac_tr_func 1
8200 EOF
8201  
8202 else
8203   echo "$ac_t""no" 1>&6
8204 fi
8205 done
8206  ;;
8207   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8208 echo "configure:8209: checking for getprpwnam in -lsec" >&5
8209 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8210 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8211   echo $ac_n "(cached) $ac_c" 1>&6
8212 else
8213   ac_save_LIBS="$LIBS"
8214 LIBS="-lsec  $LIBS"
8215 cat > conftest.$ac_ext <<EOF
8216 #line 8217 "configure"
8217 #include "confdefs.h"
8218 /* Override any gcc2 internal prototype to avoid an error.  */
8219 /* We use char because int might match the return type of a gcc2
8220     builtin and then its argument prototype would still apply.  */
8221 char getprpwnam();
8222
8223 int main() {
8224 getprpwnam()
8225 ; return 0; }
8226 EOF
8227 if { (eval echo configure:8228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8228   rm -rf conftest*
8229   eval "ac_cv_lib_$ac_lib_var=yes"
8230 else
8231   echo "configure: failed program was:" >&5
8232   cat conftest.$ac_ext >&5
8233   rm -rf conftest*
8234   eval "ac_cv_lib_$ac_lib_var=no"
8235 fi
8236 rm -f conftest*
8237 LIBS="$ac_save_LIBS"
8238
8239 fi
8240 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8241   echo "$ac_t""yes" 1>&6
8242     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8243     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8244   cat >> confdefs.h <<EOF
8245 #define $ac_tr_lib 1
8246 EOF
8247
8248   LIBS="-lsec $LIBS"
8249
8250 else
8251   echo "$ac_t""no" 1>&6
8252 fi
8253  
8254      for ac_func in getprpwnam
8255 do
8256 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8257 echo "configure:8258: checking for $ac_func" >&5
8258 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8259   echo $ac_n "(cached) $ac_c" 1>&6
8260 else
8261   cat > conftest.$ac_ext <<EOF
8262 #line 8263 "configure"
8263 #include "confdefs.h"
8264 /* System header to define __stub macros and hopefully few prototypes,
8265     which can conflict with char $ac_func(); below.  */
8266 #include <assert.h>
8267 /* Override any gcc2 internal prototype to avoid an error.  */
8268 /* We use char because int might match the return type of a gcc2
8269     builtin and then its argument prototype would still apply.  */
8270 char $ac_func();
8271
8272 int main() {
8273
8274 /* The GNU C library defines this for functions which it implements
8275     to always fail with ENOSYS.  Some functions are actually named
8276     something starting with __ and the normal name is an alias.  */
8277 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8278 choke me
8279 #else
8280 $ac_func();
8281 #endif
8282
8283 ; return 0; }
8284 EOF
8285 if { (eval echo configure:8286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8286   rm -rf conftest*
8287   eval "ac_cv_func_$ac_func=yes"
8288 else
8289   echo "configure: failed program was:" >&5
8290   cat conftest.$ac_ext >&5
8291   rm -rf conftest*
8292   eval "ac_cv_func_$ac_func=no"
8293 fi
8294 rm -f conftest*
8295 fi
8296
8297 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8298   echo "$ac_t""yes" 1>&6
8299     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8300   cat >> confdefs.h <<EOF
8301 #define $ac_tr_func 1
8302 EOF
8303  
8304 else
8305   echo "$ac_t""no" 1>&6
8306 fi
8307 done
8308
8309   ;;
8310   esac
8311
8312
8313 # this bit needs to be modified for each OS that is suported by
8314 # smbwrapper. You need to specify how to created a shared library and
8315 # how to compile C code to produce PIC object files
8316
8317 # these are the defaults, good for lots of systems
8318 HOST_OS="$host_os"
8319 LDSHFLAGS="-shared"
8320 SHLD="\${CC}"
8321 PICFLAG=""
8322 PICSUFFIX="po"
8323 POBAD_CC="#"
8324 SHLIBEXT="so"
8325 BLDSHARED="false"
8326
8327 # and these are for particular systems
8328 case "$host_os" in
8329                 *linux*)   cat >> confdefs.h <<\EOF
8330 #define LINUX 1
8331 EOF
8332
8333                         BLDSHARED="true"
8334                         LDSHFLAGS="-shared" 
8335                         PICFLAG="-fPIC"
8336                 ;;
8337                 *solaris*) cat >> confdefs.h <<\EOF
8338 #define SUNOS5 1
8339 EOF
8340
8341                         BLDSHARED="true"
8342                         LDSHFLAGS="-Wl,-h,\$@.so -G"
8343                         if test "${ac_cv_prog_CC}" = "gcc"; then
8344                                 PICFLAG="-fPIC"
8345                         else
8346                                 PICFLAG="-KPIC"
8347                                 POBAD_CC=""
8348                                 PICSUFFIX="po.o"
8349                         fi
8350                 ;;
8351                 *sunos*) cat >> confdefs.h <<\EOF
8352 #define SUNOS4 1
8353 EOF
8354
8355                         BLDSHARED="true"
8356                         LDSHFLAGS="-Wl,-h,\$@ -G"
8357                         PICFLAG="-KPIC"   # Is this correct for SunOS
8358                 ;;
8359                 *bsd*)  BLDSHARED="true"
8360                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8361                         PICFLAG="-fPIC"
8362                 ;;
8363                 *irix*) cat >> confdefs.h <<\EOF
8364 #define IRIX 1
8365 EOF
8366
8367                         case "$host_os" in
8368                         *irix6*) cat >> confdefs.h <<\EOF
8369 #define IRIX6 1
8370 EOF
8371
8372                         ;;
8373                         esac
8374                         ATTEMPT_WRAP32_BUILD=yes
8375                         BLDSHARED="true"
8376                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8377                         if test "${ac_cv_prog_CC}" = "gcc"; then
8378                                 PICFLAG="-fPIC"
8379                         else 
8380                                 PICFLAG="-KPIC"
8381                         fi
8382                 ;;
8383                 *aix*) cat >> confdefs.h <<\EOF
8384 #define AIX 1
8385 EOF
8386
8387                         BLDSHARED="true"
8388                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8389                         PICFLAG="-O2 -qmaxmem=6000"
8390                 ;;
8391                 *hpux*) cat >> confdefs.h <<\EOF
8392 #define HPUX 1
8393 EOF
8394
8395                         SHLIBEXT="sl"
8396                         # Use special PIC flags for the native HP-UX compiler.
8397                         if test $ac_cv_prog_cc_Ae = yes; then
8398                                 #BLDSHARED="true"
8399                                 LDSHFLAGS="-b -z +h \$@"
8400                                 PICFLAG="+z"
8401                         fi
8402                 ;;
8403                 *qnx*) cat >> confdefs.h <<\EOF
8404 #define QNX 1
8405 EOF
8406 ;;
8407                 *osf*) cat >> confdefs.h <<\EOF
8408 #define OSF1 1
8409 EOF
8410
8411                         BLDSHARED="true"
8412                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8413                         PICFLAG="-fPIC"
8414                 ;;
8415                 *sco*) cat >> confdefs.h <<\EOF
8416 #define SCO 1
8417 EOF
8418 ;;
8419                 *unixware*) cat >> confdefs.h <<\EOF
8420 #define UNIXWARE 1
8421 EOF
8422
8423                         BLDSHARED="true"
8424                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8425                         PICFLAG="-KPIC"
8426                 ;;
8427                 *next2*) cat >> confdefs.h <<\EOF
8428 #define NEXT2 1
8429 EOF
8430 ;;
8431                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8432 set dummy groff; ac_word=$2
8433 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8434 echo "configure:8435: checking for $ac_word" >&5
8435 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8436   echo $ac_n "(cached) $ac_c" 1>&6
8437 else
8438   if test -n "$ROFF"; then
8439   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8440 else
8441   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8442   ac_dummy="$PATH"
8443   for ac_dir in $ac_dummy; do
8444     test -z "$ac_dir" && ac_dir=.
8445     if test -f $ac_dir/$ac_word; then
8446       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8447       break
8448     fi
8449   done
8450   IFS="$ac_save_ifs"
8451 fi
8452 fi
8453 ROFF="$ac_cv_prog_ROFF"
8454 if test -n "$ROFF"; then
8455   echo "$ac_t""$ROFF" 1>&6
8456 else
8457   echo "$ac_t""no" 1>&6
8458 fi
8459 ;;
8460                 *sysv4*)
8461                         case "$host" in
8462                                 *-univel-*)     if  test "$GCC" != yes ; then
8463                                                                         cat >> confdefs.h <<\EOF
8464 #define HAVE_MEMSET 1
8465 EOF
8466
8467                                                                 fi
8468                                                                 LDSHFLAGS="-G"
8469                                 ;;
8470                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
8471 #define RELIANTUNIX 1
8472 EOF
8473 ;;
8474                         esac
8475                         ;;
8476                 *sysv5*)
8477                         if  test "$GCC" != yes ; then
8478                                 cat >> confdefs.h <<\EOF
8479 #define HAVE_MEMSET 1
8480 EOF
8481
8482                         fi
8483                         LDSHFLAGS="-G"
8484                         ;;
8485 esac
8486
8487 ################
8488
8489 echo $ac_n "checking for long long""... $ac_c" 1>&6
8490 echo "configure:8491: checking for long long" >&5
8491 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8492   echo $ac_n "(cached) $ac_c" 1>&6
8493 else
8494   
8495 if test "$cross_compiling" = yes; then
8496   samba_cv_have_longlong=cross
8497 else
8498   cat > conftest.$ac_ext <<EOF
8499 #line 8500 "configure"
8500 #include "confdefs.h"
8501 #include <stdio.h>
8502 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8503 EOF
8504 if { (eval echo configure:8505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8505 then
8506   samba_cv_have_longlong=yes
8507 else
8508   echo "configure: failed program was:" >&5
8509   cat conftest.$ac_ext >&5
8510   rm -fr conftest*
8511   samba_cv_have_longlong=no
8512 fi
8513 rm -fr conftest*
8514 fi
8515
8516 fi
8517
8518 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8519 if test x"$samba_cv_have_longlong" = x"yes"; then
8520     cat >> confdefs.h <<\EOF
8521 #define HAVE_LONGLONG 1
8522 EOF
8523
8524 fi
8525
8526 #
8527 # Check if the compiler supports the LL prefix on long long integers.
8528 # AIX needs this.
8529
8530 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8531 echo "configure:8532: checking for LL suffix on long long integers" >&5
8532 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8533   echo $ac_n "(cached) $ac_c" 1>&6
8534 else
8535   
8536     cat > conftest.$ac_ext <<EOF
8537 #line 8538 "configure"
8538 #include "confdefs.h"
8539 #include <stdio.h>
8540 int main() {
8541 long long i = 0x8000000000LL
8542 ; return 0; }
8543 EOF
8544 if { (eval echo configure:8545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8545   rm -rf conftest*
8546   samba_cv_compiler_supports_ll=yes
8547 else
8548   echo "configure: failed program was:" >&5
8549   cat conftest.$ac_ext >&5
8550   rm -rf conftest*
8551   samba_cv_compiler_supports_ll=no
8552 fi
8553 rm -f conftest*
8554 fi
8555
8556 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8557 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8558    cat >> confdefs.h <<\EOF
8559 #define COMPILER_SUPPORTS_LL 1
8560 EOF
8561
8562 fi
8563
8564   
8565 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8566 echo "configure:8567: checking for 64 bit off_t" >&5
8567 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8568   echo $ac_n "(cached) $ac_c" 1>&6
8569 else
8570   
8571 if test "$cross_compiling" = yes; then
8572   samba_cv_SIZEOF_OFF_T=cross
8573 else
8574   cat > conftest.$ac_ext <<EOF
8575 #line 8576 "configure"
8576 #include "confdefs.h"
8577 #include <stdio.h>
8578 #include <sys/stat.h>
8579 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8580 EOF
8581 if { (eval echo configure:8582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8582 then
8583   samba_cv_SIZEOF_OFF_T=yes
8584 else
8585   echo "configure: failed program was:" >&5
8586   cat conftest.$ac_ext >&5
8587   rm -fr conftest*
8588   samba_cv_SIZEOF_OFF_T=no
8589 fi
8590 rm -fr conftest*
8591 fi
8592
8593 fi
8594
8595 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8596 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8597     cat >> confdefs.h <<\EOF
8598 #define SIZEOF_OFF_T 8
8599 EOF
8600
8601 fi
8602
8603 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8604 echo "configure:8605: checking for off64_t" >&5
8605 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8606   echo $ac_n "(cached) $ac_c" 1>&6
8607 else
8608   
8609 if test "$cross_compiling" = yes; then
8610   samba_cv_HAVE_OFF64_T=cross
8611 else
8612   cat > conftest.$ac_ext <<EOF
8613 #line 8614 "configure"
8614 #include "confdefs.h"
8615
8616 #if defined(HAVE_UNISTD_H)
8617 #include <unistd.h>
8618 #endif
8619 #include <stdio.h>
8620 #include <sys/stat.h>
8621 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8622 EOF
8623 if { (eval echo configure:8624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8624 then
8625   samba_cv_HAVE_OFF64_T=yes
8626 else
8627   echo "configure: failed program was:" >&5
8628   cat conftest.$ac_ext >&5
8629   rm -fr conftest*
8630   samba_cv_HAVE_OFF64_T=no
8631 fi
8632 rm -fr conftest*
8633 fi
8634
8635 fi
8636
8637 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8638 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8639     cat >> confdefs.h <<\EOF
8640 #define HAVE_OFF64_T 1
8641 EOF
8642
8643 fi
8644
8645 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8646 echo "configure:8647: checking for 64 bit ino_t" >&5
8647 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8648   echo $ac_n "(cached) $ac_c" 1>&6
8649 else
8650   
8651 if test "$cross_compiling" = yes; then
8652   samba_cv_SIZEOF_INO_T=cross
8653 else
8654   cat > conftest.$ac_ext <<EOF
8655 #line 8656 "configure"
8656 #include "confdefs.h"
8657 #include <stdio.h>
8658 #include <sys/stat.h>
8659 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8660 EOF
8661 if { (eval echo configure:8662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8662 then
8663   samba_cv_SIZEOF_INO_T=yes
8664 else
8665   echo "configure: failed program was:" >&5
8666   cat conftest.$ac_ext >&5
8667   rm -fr conftest*
8668   samba_cv_SIZEOF_INO_T=no
8669 fi
8670 rm -fr conftest*
8671 fi
8672
8673 fi
8674
8675 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8676 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8677     cat >> confdefs.h <<\EOF
8678 #define SIZEOF_INO_T 8
8679 EOF
8680
8681 fi
8682
8683 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
8684 echo "configure:8685: checking for ino64_t" >&5
8685 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
8686   echo $ac_n "(cached) $ac_c" 1>&6
8687 else
8688   
8689 if test "$cross_compiling" = yes; then
8690   samba_cv_HAVE_INO64_T=cross
8691 else
8692   cat > conftest.$ac_ext <<EOF
8693 #line 8694 "configure"
8694 #include "confdefs.h"
8695
8696 #if defined(HAVE_UNISTD_H)
8697 #include <unistd.h>
8698 #endif
8699 #include <stdio.h>
8700 #include <sys/stat.h>
8701 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8702 EOF
8703 if { (eval echo configure:8704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8704 then
8705   samba_cv_HAVE_INO64_T=yes
8706 else
8707   echo "configure: failed program was:" >&5
8708   cat conftest.$ac_ext >&5
8709   rm -fr conftest*
8710   samba_cv_HAVE_INO64_T=no
8711 fi
8712 rm -fr conftest*
8713 fi
8714
8715 fi
8716
8717 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
8718 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
8719     cat >> confdefs.h <<\EOF
8720 #define HAVE_INO64_T 1
8721 EOF
8722
8723 fi
8724
8725 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
8726 echo "configure:8727: checking for struct dirent64" >&5
8727 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
8728   echo $ac_n "(cached) $ac_c" 1>&6
8729 else
8730   
8731 cat > conftest.$ac_ext <<EOF
8732 #line 8733 "configure"
8733 #include "confdefs.h"
8734
8735 #if defined(HAVE_UNISTD_H)
8736 #include <unistd.h>
8737 #endif
8738 #include <sys/types.h>
8739 #include <dirent.h>
8740 int main() {
8741 struct dirent64 de;
8742 ; return 0; }
8743 EOF
8744 if { (eval echo configure:8745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8745   rm -rf conftest*
8746   samba_cv_HAVE_STRUCT_DIRENT64=yes
8747 else
8748   echo "configure: failed program was:" >&5
8749   cat conftest.$ac_ext >&5
8750   rm -rf conftest*
8751   samba_cv_HAVE_STRUCT_DIRENT64=no
8752 fi
8753 rm -f conftest*
8754 fi
8755
8756 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
8757 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
8758     cat >> confdefs.h <<\EOF
8759 #define HAVE_STRUCT_DIRENT64 1
8760 EOF
8761
8762 fi
8763
8764 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
8765 echo "configure:8766: checking for unsigned char" >&5
8766 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
8767   echo $ac_n "(cached) $ac_c" 1>&6
8768 else
8769   
8770 if test "$cross_compiling" = yes; then
8771   samba_cv_HAVE_UNSIGNED_CHAR=cross
8772 else
8773   cat > conftest.$ac_ext <<EOF
8774 #line 8775 "configure"
8775 #include "confdefs.h"
8776 #include <stdio.h>
8777 main() { char c; c=250; exit((c > 0)?0:1); }
8778 EOF
8779 if { (eval echo configure:8780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8780 then
8781   samba_cv_HAVE_UNSIGNED_CHAR=yes
8782 else
8783   echo "configure: failed program was:" >&5
8784   cat conftest.$ac_ext >&5
8785   rm -fr conftest*
8786   samba_cv_HAVE_UNSIGNED_CHAR=no
8787 fi
8788 rm -fr conftest*
8789 fi
8790
8791 fi
8792
8793 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
8794 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
8795     cat >> confdefs.h <<\EOF
8796 #define HAVE_UNSIGNED_CHAR 1
8797 EOF
8798
8799 fi
8800
8801 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
8802 echo "configure:8803: checking for sin_len in sock" >&5
8803 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
8804   echo $ac_n "(cached) $ac_c" 1>&6
8805 else
8806   
8807 cat > conftest.$ac_ext <<EOF
8808 #line 8809 "configure"
8809 #include "confdefs.h"
8810 #include <sys/types.h>
8811 #include <sys/socket.h>
8812 #include <netinet/in.h>
8813 int main() {
8814 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
8815 ; return 0; }
8816 EOF
8817 if { (eval echo configure:8818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8818   rm -rf conftest*
8819   samba_cv_HAVE_SOCK_SIN_LEN=yes
8820 else
8821   echo "configure: failed program was:" >&5
8822   cat conftest.$ac_ext >&5
8823   rm -rf conftest*
8824   samba_cv_HAVE_SOCK_SIN_LEN=no
8825 fi
8826 rm -f conftest*
8827 fi
8828
8829 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
8830 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
8831     cat >> confdefs.h <<\EOF
8832 #define HAVE_SOCK_SIN_LEN 1
8833 EOF
8834
8835 fi
8836
8837 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
8838 echo "configure:8839: checking whether seekdir returns void" >&5
8839 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
8840   echo $ac_n "(cached) $ac_c" 1>&6
8841 else
8842   
8843 cat > conftest.$ac_ext <<EOF
8844 #line 8845 "configure"
8845 #include "confdefs.h"
8846 #include <sys/types.h>
8847 #include <dirent.h>
8848 void seekdir(DIR *d, long loc) { return; }
8849 int main() {
8850 return 0;
8851 ; return 0; }
8852 EOF
8853 if { (eval echo configure:8854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8854   rm -rf conftest*
8855   samba_cv_SEEKDIR_RETURNS_VOID=yes
8856 else
8857   echo "configure: failed program was:" >&5
8858   cat conftest.$ac_ext >&5
8859   rm -rf conftest*
8860   samba_cv_SEEKDIR_RETURNS_VOID=no
8861 fi
8862 rm -f conftest*
8863 fi
8864
8865 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
8866 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
8867     cat >> confdefs.h <<\EOF
8868 #define SEEKDIR_RETURNS_VOID 1
8869 EOF
8870
8871 fi
8872
8873 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
8874 echo "configure:8875: checking for __FILE__ macro" >&5
8875 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
8876   echo $ac_n "(cached) $ac_c" 1>&6
8877 else
8878   
8879 cat > conftest.$ac_ext <<EOF
8880 #line 8881 "configure"
8881 #include "confdefs.h"
8882 #include <stdio.h>
8883 int main() {
8884 printf("%s\n", __FILE__);
8885 ; return 0; }
8886 EOF
8887 if { (eval echo configure:8888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8888   rm -rf conftest*
8889   samba_cv_HAVE_FILE_MACRO=yes
8890 else
8891   echo "configure: failed program was:" >&5
8892   cat conftest.$ac_ext >&5
8893   rm -rf conftest*
8894   samba_cv_HAVE_FILE_MACRO=no
8895 fi
8896 rm -f conftest*
8897 fi
8898
8899 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
8900 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
8901     cat >> confdefs.h <<\EOF
8902 #define HAVE_FILE_MACRO 1
8903 EOF
8904
8905 fi
8906
8907 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
8908 echo "configure:8909: checking for __FUNCTION__ macro" >&5
8909 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
8910   echo $ac_n "(cached) $ac_c" 1>&6
8911 else
8912   
8913 cat > conftest.$ac_ext <<EOF
8914 #line 8915 "configure"
8915 #include "confdefs.h"
8916 #include <stdio.h>
8917 int main() {
8918 printf("%s\n", __FUNCTION__);
8919 ; return 0; }
8920 EOF
8921 if { (eval echo configure:8922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8922   rm -rf conftest*
8923   samba_cv_HAVE_FUNCTION_MACRO=yes
8924 else
8925   echo "configure: failed program was:" >&5
8926   cat conftest.$ac_ext >&5
8927   rm -rf conftest*
8928   samba_cv_HAVE_FUNCTION_MACRO=no
8929 fi
8930 rm -f conftest*
8931 fi
8932
8933 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
8934 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
8935     cat >> confdefs.h <<\EOF
8936 #define HAVE_FUNCTION_MACRO 1
8937 EOF
8938
8939 fi
8940
8941 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
8942 echo "configure:8943: checking if gettimeofday takes tz argument" >&5
8943 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
8944   echo $ac_n "(cached) $ac_c" 1>&6
8945 else
8946   
8947 if test "$cross_compiling" = yes; then
8948   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
8949 else
8950   cat > conftest.$ac_ext <<EOF
8951 #line 8952 "configure"
8952 #include "confdefs.h"
8953
8954 #include <sys/time.h>
8955 #include <unistd.h>
8956 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
8957 EOF
8958 if { (eval echo configure:8959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8959 then
8960   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
8961 else
8962   echo "configure: failed program was:" >&5
8963   cat conftest.$ac_ext >&5
8964   rm -fr conftest*
8965   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
8966 fi
8967 rm -fr conftest*
8968 fi
8969
8970 fi
8971
8972 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
8973 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
8974     cat >> confdefs.h <<\EOF
8975 #define HAVE_GETTIMEOFDAY_TZ 1
8976 EOF
8977
8978 fi
8979
8980 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
8981 echo "configure:8982: checking for C99 vsnprintf" >&5
8982 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
8983   echo $ac_n "(cached) $ac_c" 1>&6
8984 else
8985   
8986 if test "$cross_compiling" = yes; then
8987   samba_cv_HAVE_C99_VSNPRINTF=cross
8988 else
8989   cat > conftest.$ac_ext <<EOF
8990 #line 8991 "configure"
8991 #include "confdefs.h"
8992
8993 #include <sys/types.h>
8994 #include <stdarg.h>
8995 void foo(const char *format, ...) { 
8996        va_list ap;
8997        int len;
8998        char buf[5];
8999
9000        va_start(ap, format);
9001        len = vsnprintf(0, 0, format, ap);
9002        va_end(ap);
9003        if (len != 5) exit(1);
9004
9005        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9006
9007        exit(0);
9008 }
9009 main() { foo("hello"); }
9010
9011 EOF
9012 if { (eval echo configure:9013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9013 then
9014   samba_cv_HAVE_C99_VSNPRINTF=yes
9015 else
9016   echo "configure: failed program was:" >&5
9017   cat conftest.$ac_ext >&5
9018   rm -fr conftest*
9019   samba_cv_HAVE_C99_VSNPRINTF=no
9020 fi
9021 rm -fr conftest*
9022 fi
9023
9024 fi
9025
9026 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9027 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9028     cat >> confdefs.h <<\EOF
9029 #define HAVE_C99_VSNPRINTF 1
9030 EOF
9031
9032 fi
9033
9034 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9035 echo "configure:9036: checking for broken readdir" >&5
9036 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9037   echo $ac_n "(cached) $ac_c" 1>&6
9038 else
9039   
9040 if test "$cross_compiling" = yes; then
9041   samba_cv_HAVE_BROKEN_READDIR=cross
9042 else
9043   cat > conftest.$ac_ext <<EOF
9044 #line 9045 "configure"
9045 #include "confdefs.h"
9046 #include <sys/types.h>
9047 #include <dirent.h>
9048 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9049 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9050 di->d_name[0] == 0) exit(0); exit(1);} 
9051 EOF
9052 if { (eval echo configure:9053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9053 then
9054   samba_cv_HAVE_BROKEN_READDIR=yes
9055 else
9056   echo "configure: failed program was:" >&5
9057   cat conftest.$ac_ext >&5
9058   rm -fr conftest*
9059   samba_cv_HAVE_BROKEN_READDIR=no
9060 fi
9061 rm -fr conftest*
9062 fi
9063
9064 fi
9065
9066 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9067 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9068     cat >> confdefs.h <<\EOF
9069 #define HAVE_BROKEN_READDIR 1
9070 EOF
9071
9072 fi
9073
9074 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9075 echo "configure:9076: checking for utimbuf" >&5
9076 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9077   echo $ac_n "(cached) $ac_c" 1>&6
9078 else
9079   
9080 cat > conftest.$ac_ext <<EOF
9081 #line 9082 "configure"
9082 #include "confdefs.h"
9083 #include <sys/types.h>
9084 #include <utime.h>
9085 int main() {
9086 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9087 ; return 0; }
9088 EOF
9089 if { (eval echo configure:9090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9090   rm -rf conftest*
9091   samba_cv_HAVE_UTIMBUF=yes
9092 else
9093   echo "configure: failed program was:" >&5
9094   cat conftest.$ac_ext >&5
9095   rm -rf conftest*
9096   samba_cv_HAVE_UTIMBUF=no
9097 fi
9098 rm -f conftest*
9099 fi
9100
9101 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9102 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9103     cat >> confdefs.h <<\EOF
9104 #define HAVE_UTIMBUF 1
9105 EOF
9106
9107 fi
9108
9109
9110 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9111 do
9112 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9113 echo "configure:9114: checking for $ac_func" >&5
9114 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9115   echo $ac_n "(cached) $ac_c" 1>&6
9116 else
9117   cat > conftest.$ac_ext <<EOF
9118 #line 9119 "configure"
9119 #include "confdefs.h"
9120 /* System header to define __stub macros and hopefully few prototypes,
9121     which can conflict with char $ac_func(); below.  */
9122 #include <assert.h>
9123 /* Override any gcc2 internal prototype to avoid an error.  */
9124 /* We use char because int might match the return type of a gcc2
9125     builtin and then its argument prototype would still apply.  */
9126 char $ac_func();
9127
9128 int main() {
9129
9130 /* The GNU C library defines this for functions which it implements
9131     to always fail with ENOSYS.  Some functions are actually named
9132     something starting with __ and the normal name is an alias.  */
9133 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9134 choke me
9135 #else
9136 $ac_func();
9137 #endif
9138
9139 ; return 0; }
9140 EOF
9141 if { (eval echo configure:9142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9142   rm -rf conftest*
9143   eval "ac_cv_func_$ac_func=yes"
9144 else
9145   echo "configure: failed program was:" >&5
9146   cat conftest.$ac_ext >&5
9147   rm -rf conftest*
9148   eval "ac_cv_func_$ac_func=no"
9149 fi
9150 rm -f conftest*
9151 fi
9152
9153 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9154   echo "$ac_t""yes" 1>&6
9155     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9156   cat >> confdefs.h <<EOF
9157 #define $ac_tr_func 1
9158 EOF
9159  
9160 else
9161   echo "$ac_t""no" 1>&6
9162 fi
9163 done
9164
9165
9166 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9167 echo "configure:9168: checking for ut_name in utmp" >&5
9168 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9169   echo $ac_n "(cached) $ac_c" 1>&6
9170 else
9171   
9172 cat > conftest.$ac_ext <<EOF
9173 #line 9174 "configure"
9174 #include "confdefs.h"
9175 #include <sys/types.h>
9176 #include <utmp.h>
9177 int main() {
9178 struct utmp ut;  ut.ut_name[0] = 'a';
9179 ; return 0; }
9180 EOF
9181 if { (eval echo configure:9182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9182   rm -rf conftest*
9183   samba_cv_HAVE_UT_UT_NAME=yes
9184 else
9185   echo "configure: failed program was:" >&5
9186   cat conftest.$ac_ext >&5
9187   rm -rf conftest*
9188   samba_cv_HAVE_UT_UT_NAME=no
9189 fi
9190 rm -f conftest*
9191 fi
9192
9193 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9194 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9195     cat >> confdefs.h <<\EOF
9196 #define HAVE_UT_UT_NAME 1
9197 EOF
9198
9199 fi 
9200
9201 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9202 echo "configure:9203: checking for ut_user in utmp" >&5
9203 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9204   echo $ac_n "(cached) $ac_c" 1>&6
9205 else
9206   
9207 cat > conftest.$ac_ext <<EOF
9208 #line 9209 "configure"
9209 #include "confdefs.h"
9210 #include <sys/types.h>
9211 #include <utmp.h>
9212 int main() {
9213 struct utmp ut;  ut.ut_user[0] = 'a';
9214 ; return 0; }
9215 EOF
9216 if { (eval echo configure:9217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9217   rm -rf conftest*
9218   samba_cv_HAVE_UT_UT_USER=yes
9219 else
9220   echo "configure: failed program was:" >&5
9221   cat conftest.$ac_ext >&5
9222   rm -rf conftest*
9223   samba_cv_HAVE_UT_UT_USER=no
9224 fi
9225 rm -f conftest*
9226 fi
9227
9228 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9229 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9230     cat >> confdefs.h <<\EOF
9231 #define HAVE_UT_UT_USER 1
9232 EOF
9233
9234 fi 
9235
9236 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9237 echo "configure:9238: checking for ut_id in utmp" >&5
9238 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9239   echo $ac_n "(cached) $ac_c" 1>&6
9240 else
9241   
9242 cat > conftest.$ac_ext <<EOF
9243 #line 9244 "configure"
9244 #include "confdefs.h"
9245 #include <sys/types.h>
9246 #include <utmp.h>
9247 int main() {
9248 struct utmp ut;  ut.ut_id[0] = 'a';
9249 ; return 0; }
9250 EOF
9251 if { (eval echo configure:9252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9252   rm -rf conftest*
9253   samba_cv_HAVE_UT_UT_ID=yes
9254 else
9255   echo "configure: failed program was:" >&5
9256   cat conftest.$ac_ext >&5
9257   rm -rf conftest*
9258   samba_cv_HAVE_UT_UT_ID=no
9259 fi
9260 rm -f conftest*
9261 fi
9262
9263 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9264 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9265     cat >> confdefs.h <<\EOF
9266 #define HAVE_UT_UT_ID 1
9267 EOF
9268
9269 fi 
9270
9271 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9272 echo "configure:9273: checking for ut_host in utmp" >&5
9273 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9274   echo $ac_n "(cached) $ac_c" 1>&6
9275 else
9276   
9277 cat > conftest.$ac_ext <<EOF
9278 #line 9279 "configure"
9279 #include "confdefs.h"
9280 #include <sys/types.h>
9281 #include <utmp.h>
9282 int main() {
9283 struct utmp ut;  ut.ut_host[0] = 'a';
9284 ; return 0; }
9285 EOF
9286 if { (eval echo configure:9287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9287   rm -rf conftest*
9288   samba_cv_HAVE_UT_UT_HOST=yes
9289 else
9290   echo "configure: failed program was:" >&5
9291   cat conftest.$ac_ext >&5
9292   rm -rf conftest*
9293   samba_cv_HAVE_UT_UT_HOST=no
9294 fi
9295 rm -f conftest*
9296 fi
9297
9298 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9299 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9300     cat >> confdefs.h <<\EOF
9301 #define HAVE_UT_UT_HOST 1
9302 EOF
9303
9304 fi 
9305
9306 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9307 echo "configure:9308: checking for ut_time in utmp" >&5
9308 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9309   echo $ac_n "(cached) $ac_c" 1>&6
9310 else
9311   
9312 cat > conftest.$ac_ext <<EOF
9313 #line 9314 "configure"
9314 #include "confdefs.h"
9315 #include <sys/types.h>
9316 #include <utmp.h>
9317 int main() {
9318 struct utmp ut;  time_t t; ut.ut_time = t;
9319 ; return 0; }
9320 EOF
9321 if { (eval echo configure:9322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9322   rm -rf conftest*
9323   samba_cv_HAVE_UT_UT_TIME=yes
9324 else
9325   echo "configure: failed program was:" >&5
9326   cat conftest.$ac_ext >&5
9327   rm -rf conftest*
9328   samba_cv_HAVE_UT_UT_TIME=no
9329 fi
9330 rm -f conftest*
9331 fi
9332
9333 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9334 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9335     cat >> confdefs.h <<\EOF
9336 #define HAVE_UT_UT_TIME 1
9337 EOF
9338
9339 fi 
9340
9341 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9342 echo "configure:9343: checking for ut_tv in utmp" >&5
9343 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9344   echo $ac_n "(cached) $ac_c" 1>&6
9345 else
9346   
9347 cat > conftest.$ac_ext <<EOF
9348 #line 9349 "configure"
9349 #include "confdefs.h"
9350 #include <sys/types.h>
9351 #include <utmp.h>
9352 int main() {
9353 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9354 ; return 0; }
9355 EOF
9356 if { (eval echo configure:9357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9357   rm -rf conftest*
9358   samba_cv_HAVE_UT_UT_TV=yes
9359 else
9360   echo "configure: failed program was:" >&5
9361   cat conftest.$ac_ext >&5
9362   rm -rf conftest*
9363   samba_cv_HAVE_UT_UT_TV=no
9364 fi
9365 rm -f conftest*
9366 fi
9367
9368 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9369 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9370     cat >> confdefs.h <<\EOF
9371 #define HAVE_UT_UT_TV 1
9372 EOF
9373
9374 fi 
9375
9376 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9377 echo "configure:9378: checking for ut_type in utmp" >&5
9378 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9379   echo $ac_n "(cached) $ac_c" 1>&6
9380 else
9381   
9382 cat > conftest.$ac_ext <<EOF
9383 #line 9384 "configure"
9384 #include "confdefs.h"
9385 #include <sys/types.h>
9386 #include <utmp.h>
9387 int main() {
9388 struct utmp ut;  ut.ut_type = 0;
9389 ; return 0; }
9390 EOF
9391 if { (eval echo configure:9392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9392   rm -rf conftest*
9393   samba_cv_HAVE_UT_UT_TYPE=yes
9394 else
9395   echo "configure: failed program was:" >&5
9396   cat conftest.$ac_ext >&5
9397   rm -rf conftest*
9398   samba_cv_HAVE_UT_UT_TYPE=no
9399 fi
9400 rm -f conftest*
9401 fi
9402
9403 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9404 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9405     cat >> confdefs.h <<\EOF
9406 #define HAVE_UT_UT_TYPE 1
9407 EOF
9408
9409 fi 
9410
9411 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9412 echo "configure:9413: checking for ut_pid in utmp" >&5
9413 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9414   echo $ac_n "(cached) $ac_c" 1>&6
9415 else
9416   
9417 cat > conftest.$ac_ext <<EOF
9418 #line 9419 "configure"
9419 #include "confdefs.h"
9420 #include <sys/types.h>
9421 #include <utmp.h>
9422 int main() {
9423 struct utmp ut;  ut.ut_pid = 0;
9424 ; return 0; }
9425 EOF
9426 if { (eval echo configure:9427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9427   rm -rf conftest*
9428   samba_cv_HAVE_UT_UT_PID=yes
9429 else
9430   echo "configure: failed program was:" >&5
9431   cat conftest.$ac_ext >&5
9432   rm -rf conftest*
9433   samba_cv_HAVE_UT_UT_PID=no
9434 fi
9435 rm -f conftest*
9436 fi
9437
9438 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9439 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9440     cat >> confdefs.h <<\EOF
9441 #define HAVE_UT_UT_PID 1
9442 EOF
9443
9444 fi 
9445
9446 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9447 echo "configure:9448: checking for ut_exit in utmp" >&5
9448 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9449   echo $ac_n "(cached) $ac_c" 1>&6
9450 else
9451   
9452 cat > conftest.$ac_ext <<EOF
9453 #line 9454 "configure"
9454 #include "confdefs.h"
9455 #include <sys/types.h>
9456 #include <utmp.h>
9457 int main() {
9458 struct utmp ut;  ut.ut_exit.e_exit = 0;
9459 ; return 0; }
9460 EOF
9461 if { (eval echo configure:9462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9462   rm -rf conftest*
9463   samba_cv_HAVE_UT_UT_EXIT=yes
9464 else
9465   echo "configure: failed program was:" >&5
9466   cat conftest.$ac_ext >&5
9467   rm -rf conftest*
9468   samba_cv_HAVE_UT_UT_EXIT=no
9469 fi
9470 rm -f conftest*
9471 fi
9472
9473 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9474 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9475     cat >> confdefs.h <<\EOF
9476 #define HAVE_UT_UT_EXIT 1
9477 EOF
9478
9479 fi 
9480
9481 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9482 echo "configure:9483: checking for ut_addr in utmp" >&5
9483 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9484   echo $ac_n "(cached) $ac_c" 1>&6
9485 else
9486   
9487 cat > conftest.$ac_ext <<EOF
9488 #line 9489 "configure"
9489 #include "confdefs.h"
9490 #include <sys/types.h>
9491 #include <utmp.h>
9492 int main() {
9493 struct utmp ut;  ut.ut_addr = 0;
9494 ; return 0; }
9495 EOF
9496 if { (eval echo configure:9497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9497   rm -rf conftest*
9498   samba_cv_HAVE_UT_UT_ADDR=yes
9499 else
9500   echo "configure: failed program was:" >&5
9501   cat conftest.$ac_ext >&5
9502   rm -rf conftest*
9503   samba_cv_HAVE_UT_UT_ADDR=no
9504 fi
9505 rm -f conftest*
9506 fi
9507
9508 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9509 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9510     cat >> confdefs.h <<\EOF
9511 #define HAVE_UT_UT_ADDR 1
9512 EOF
9513
9514 fi 
9515
9516 if test x$ac_cv_func_pututline = xyes ; then
9517   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9518 echo "configure:9519: checking whether pututline returns pointer" >&5
9519 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9520   echo $ac_n "(cached) $ac_c" 1>&6
9521 else
9522   
9523   cat > conftest.$ac_ext <<EOF
9524 #line 9525 "configure"
9525 #include "confdefs.h"
9526 #include <sys/types.h>
9527 #include <utmp.h>
9528 int main() {
9529 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9530 ; return 0; }
9531 EOF
9532 if { (eval echo configure:9533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9533   rm -rf conftest*
9534   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9535 else
9536   echo "configure: failed program was:" >&5
9537   cat conftest.$ac_ext >&5
9538   rm -rf conftest*
9539   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9540 fi
9541 rm -f conftest*
9542 fi
9543
9544 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9545   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9546       cat >> confdefs.h <<\EOF
9547 #define PUTUTLINE_RETURNS_UTMP 1
9548 EOF
9549
9550   fi
9551 fi
9552
9553 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9554 echo "configure:9555: checking for ut_syslen in utmpx" >&5
9555 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9556   echo $ac_n "(cached) $ac_c" 1>&6
9557 else
9558   
9559 cat > conftest.$ac_ext <<EOF
9560 #line 9561 "configure"
9561 #include "confdefs.h"
9562 #include <sys/types.h>
9563 #include <utmpx.h>
9564 int main() {
9565 struct utmpx ux;  ux.ut_syslen = 0;
9566 ; return 0; }
9567 EOF
9568 if { (eval echo configure:9569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9569   rm -rf conftest*
9570   samba_cv_HAVE_UX_UT_SYSLEN=yes
9571 else
9572   echo "configure: failed program was:" >&5
9573   cat conftest.$ac_ext >&5
9574   rm -rf conftest*
9575   samba_cv_HAVE_UX_UT_SYSLEN=no
9576 fi
9577 rm -f conftest*
9578 fi
9579
9580 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
9581 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
9582     cat >> confdefs.h <<\EOF
9583 #define HAVE_UX_UT_SYSLEN 1
9584 EOF
9585
9586 fi 
9587
9588
9589 #################################################
9590 # check for libiconv support
9591 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
9592 echo "configure:9593: checking whether to use libiconv" >&5
9593 # Check whether --with-libiconv or --without-libiconv was given.
9594 if test "${with_libiconv+set}" = set; then
9595   withval="$with_libiconv"
9596    case "$withval" in
9597   no)
9598     echo "$ac_t""no" 1>&6
9599     ;;
9600   *)
9601     echo "$ac_t""yes" 1>&6
9602     CFLAGS="$CFLAGS -I$withval/include"
9603     LDFLAGS="$LDFLAGS -L$withval/lib"
9604     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
9605 echo "configure:9606: checking for iconv_open in -liconv" >&5
9606 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
9607 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9608   echo $ac_n "(cached) $ac_c" 1>&6
9609 else
9610   ac_save_LIBS="$LIBS"
9611 LIBS="-liconv  $LIBS"
9612 cat > conftest.$ac_ext <<EOF
9613 #line 9614 "configure"
9614 #include "confdefs.h"
9615 /* Override any gcc2 internal prototype to avoid an error.  */
9616 /* We use char because int might match the return type of a gcc2
9617     builtin and then its argument prototype would still apply.  */
9618 char iconv_open();
9619
9620 int main() {
9621 iconv_open()
9622 ; return 0; }
9623 EOF
9624 if { (eval echo configure:9625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9625   rm -rf conftest*
9626   eval "ac_cv_lib_$ac_lib_var=yes"
9627 else
9628   echo "configure: failed program was:" >&5
9629   cat conftest.$ac_ext >&5
9630   rm -rf conftest*
9631   eval "ac_cv_lib_$ac_lib_var=no"
9632 fi
9633 rm -f conftest*
9634 LIBS="$ac_save_LIBS"
9635
9636 fi
9637 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9638   echo "$ac_t""yes" 1>&6
9639     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9640     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9641   cat >> confdefs.h <<EOF
9642 #define $ac_tr_lib 1
9643 EOF
9644
9645   LIBS="-liconv $LIBS"
9646
9647 else
9648   echo "$ac_t""no" 1>&6
9649 fi
9650
9651     ;;
9652   esac 
9653 else
9654   echo "$ac_t""no" 1>&6
9655
9656 fi
9657
9658
9659
9660 ############
9661 # check for iconv in libc
9662 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
9663 echo "configure:9664: checking for working iconv" >&5
9664 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
9665   echo $ac_n "(cached) $ac_c" 1>&6
9666 else
9667   
9668 if test "$cross_compiling" = yes; then
9669   samba_cv_HAVE_NATIVE_ICONV=cross
9670 else
9671   cat > conftest.$ac_ext <<EOF
9672 #line 9673 "configure"
9673 #include "confdefs.h"
9674
9675 #include <iconv.h>
9676 main() {
9677        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
9678        if (cd == 0 || cd == (iconv_t)-1) return -1;
9679        return 0;
9680 }
9681
9682 EOF
9683 if { (eval echo configure:9684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9684 then
9685   samba_cv_HAVE_NATIVE_ICONV=yes
9686 else
9687   echo "configure: failed program was:" >&5
9688   cat conftest.$ac_ext >&5
9689   rm -fr conftest*
9690   samba_cv_HAVE_NATIVE_ICONV=no
9691 fi
9692 rm -fr conftest*
9693 fi
9694
9695 fi
9696
9697 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
9698 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
9699     cat >> confdefs.h <<\EOF
9700 #define HAVE_NATIVE_ICONV 1
9701 EOF
9702
9703 fi
9704
9705
9706 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
9707 echo "configure:9708: checking for Linux kernel oplocks" >&5
9708 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
9709   echo $ac_n "(cached) $ac_c" 1>&6
9710 else
9711   
9712 if test "$cross_compiling" = yes; then
9713   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
9714 else
9715   cat > conftest.$ac_ext <<EOF
9716 #line 9717 "configure"
9717 #include "confdefs.h"
9718
9719 #include <sys/types.h>
9720 #include <fcntl.h>
9721 #ifndef F_GETLEASE
9722 #define F_GETLEASE      1025
9723 #endif
9724 main() {
9725        int fd = open("/dev/null", O_RDONLY);
9726        return fcntl(fd, F_GETLEASE, 0) == -1;
9727 }
9728
9729 EOF
9730 if { (eval echo configure:9731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9731 then
9732   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
9733 else
9734   echo "configure: failed program was:" >&5
9735   cat conftest.$ac_ext >&5
9736   rm -fr conftest*
9737   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
9738 fi
9739 rm -fr conftest*
9740 fi
9741
9742 fi
9743
9744 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
9745 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
9746     cat >> confdefs.h <<\EOF
9747 #define HAVE_KERNEL_OPLOCKS_LINUX 1
9748 EOF
9749
9750 fi
9751
9752 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
9753 echo "configure:9754: checking for kernel change notify support" >&5
9754 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
9755   echo $ac_n "(cached) $ac_c" 1>&6
9756 else
9757   
9758 if test "$cross_compiling" = yes; then
9759   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
9760 else
9761   cat > conftest.$ac_ext <<EOF
9762 #line 9763 "configure"
9763 #include "confdefs.h"
9764
9765 #include <sys/types.h>
9766 #include <fcntl.h>
9767 #include <signal.h>
9768 #ifndef F_NOTIFY
9769 #define F_NOTIFY 1026
9770 #endif
9771 main() {
9772         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
9773 }
9774
9775 EOF
9776 if { (eval echo configure:9777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9777 then
9778   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
9779 else
9780   echo "configure: failed program was:" >&5
9781   cat conftest.$ac_ext >&5
9782   rm -fr conftest*
9783   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
9784 fi
9785 rm -fr conftest*
9786 fi
9787
9788 fi
9789
9790 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
9791 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
9792     cat >> confdefs.h <<\EOF
9793 #define HAVE_KERNEL_CHANGE_NOTIFY 1
9794 EOF
9795
9796 fi
9797
9798 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
9799 echo "configure:9800: checking for kernel share modes" >&5
9800 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
9801   echo $ac_n "(cached) $ac_c" 1>&6
9802 else
9803   
9804 if test "$cross_compiling" = yes; then
9805   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
9806 else
9807   cat > conftest.$ac_ext <<EOF
9808 #line 9809 "configure"
9809 #include "confdefs.h"
9810
9811 #include <sys/types.h>
9812 #include <fcntl.h>
9813 #include <signal.h>
9814 #include <sys/file.h>
9815 #ifndef LOCK_MAND
9816 #define LOCK_MAND       32
9817 #define LOCK_READ       64
9818 #endif
9819 main() {
9820         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
9821 }
9822
9823 EOF
9824 if { (eval echo configure:9825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9825 then
9826   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
9827 else
9828   echo "configure: failed program was:" >&5
9829   cat conftest.$ac_ext >&5
9830   rm -fr conftest*
9831   samba_cv_HAVE_KERNEL_SHARE_MODES=no
9832 fi
9833 rm -fr conftest*
9834 fi
9835
9836 fi
9837
9838 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
9839 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
9840     cat >> confdefs.h <<\EOF
9841 #define HAVE_KERNEL_SHARE_MODES 1
9842 EOF
9843
9844 fi
9845
9846
9847
9848
9849 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
9850 echo "configure:9851: checking for IRIX kernel oplock type definitions" >&5
9851 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
9852   echo $ac_n "(cached) $ac_c" 1>&6
9853 else
9854   
9855 cat > conftest.$ac_ext <<EOF
9856 #line 9857 "configure"
9857 #include "confdefs.h"
9858 #include <sys/types.h>
9859 #include <fcntl.h>
9860 int main() {
9861 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
9862 ; return 0; }
9863 EOF
9864 if { (eval echo configure:9865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9865   rm -rf conftest*
9866   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
9867 else
9868   echo "configure: failed program was:" >&5
9869   cat conftest.$ac_ext >&5
9870   rm -rf conftest*
9871   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
9872 fi
9873 rm -f conftest*
9874 fi
9875
9876 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
9877 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
9878     cat >> confdefs.h <<\EOF
9879 #define HAVE_KERNEL_OPLOCKS_IRIX 1
9880 EOF
9881
9882 fi
9883
9884 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
9885 echo "configure:9886: checking for irix specific capabilities" >&5
9886 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
9887   echo $ac_n "(cached) $ac_c" 1>&6
9888 else
9889   
9890 if test "$cross_compiling" = yes; then
9891   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
9892 else
9893   cat > conftest.$ac_ext <<EOF
9894 #line 9895 "configure"
9895 #include "confdefs.h"
9896 #include <sys/types.h>
9897 #include <sys/capability.h>
9898 main() {
9899  cap_t cap;
9900  if ((cap = cap_get_proc()) == NULL)
9901    exit(1);
9902  cap->cap_effective |= CAP_NETWORK_MGT;
9903  cap->cap_inheritable |= CAP_NETWORK_MGT;
9904  cap_set_proc(cap);
9905  exit(0);
9906 }
9907
9908 EOF
9909 if { (eval echo configure:9910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9910 then
9911   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
9912 else
9913   echo "configure: failed program was:" >&5
9914   cat conftest.$ac_ext >&5
9915   rm -fr conftest*
9916   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
9917 fi
9918 rm -fr conftest*
9919 fi
9920
9921 fi
9922
9923 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
9924 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
9925     cat >> confdefs.h <<\EOF
9926 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
9927 EOF
9928
9929 fi
9930
9931 #
9932 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
9933 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
9934 #
9935
9936 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9937 echo "configure:9938: checking for int16 typedef included by rpc/rpc.h" >&5
9938 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
9939   echo $ac_n "(cached) $ac_c" 1>&6
9940 else
9941   
9942 cat > conftest.$ac_ext <<EOF
9943 #line 9944 "configure"
9944 #include "confdefs.h"
9945 #include <sys/types.h>
9946 #if defined(HAVE_RPC_RPC_H)
9947 #include <rpc/rpc.h>
9948 #endif
9949 int main() {
9950 int16 testvar;
9951 ; return 0; }
9952 EOF
9953 if { (eval echo configure:9954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9954   rm -rf conftest*
9955   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
9956 else
9957   echo "configure: failed program was:" >&5
9958   cat conftest.$ac_ext >&5
9959   rm -rf conftest*
9960   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
9961 fi
9962 rm -f conftest*
9963 fi
9964
9965 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
9966 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
9967     cat >> confdefs.h <<\EOF
9968 #define HAVE_INT16_FROM_RPC_RPC_H 1
9969 EOF
9970
9971 fi
9972
9973 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9974 echo "configure:9975: checking for uint16 typedef included by rpc/rpc.h" >&5
9975 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
9976   echo $ac_n "(cached) $ac_c" 1>&6
9977 else
9978   
9979 cat > conftest.$ac_ext <<EOF
9980 #line 9981 "configure"
9981 #include "confdefs.h"
9982 #include <sys/types.h>
9983 #if defined(HAVE_RPC_RPC_H)
9984 #include <rpc/rpc.h>
9985 #endif
9986 int main() {
9987 uint16 testvar;
9988 ; return 0; }
9989 EOF
9990 if { (eval echo configure:9991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9991   rm -rf conftest*
9992   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
9993 else
9994   echo "configure: failed program was:" >&5
9995   cat conftest.$ac_ext >&5
9996   rm -rf conftest*
9997   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
9998 fi
9999 rm -f conftest*
10000 fi
10001
10002 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10003 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10004     cat >> confdefs.h <<\EOF
10005 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10006 EOF
10007
10008 fi
10009
10010 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10011 echo "configure:10012: checking for int32 typedef included by rpc/rpc.h" >&5
10012 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10013   echo $ac_n "(cached) $ac_c" 1>&6
10014 else
10015   
10016 cat > conftest.$ac_ext <<EOF
10017 #line 10018 "configure"
10018 #include "confdefs.h"
10019 #include <sys/types.h>
10020 #if defined(HAVE_RPC_RPC_H)
10021 #include <rpc/rpc.h>
10022 #endif
10023 int main() {
10024 int32 testvar;
10025 ; return 0; }
10026 EOF
10027 if { (eval echo configure:10028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10028   rm -rf conftest*
10029   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10030 else
10031   echo "configure: failed program was:" >&5
10032   cat conftest.$ac_ext >&5
10033   rm -rf conftest*
10034   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10035 fi
10036 rm -f conftest*
10037 fi
10038
10039 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10040 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10041     cat >> confdefs.h <<\EOF
10042 #define HAVE_INT32_FROM_RPC_RPC_H 1
10043 EOF
10044
10045 fi
10046
10047 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10048 echo "configure:10049: checking for uint32 typedef included by rpc/rpc.h" >&5
10049 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10050   echo $ac_n "(cached) $ac_c" 1>&6
10051 else
10052   
10053 cat > conftest.$ac_ext <<EOF
10054 #line 10055 "configure"
10055 #include "confdefs.h"
10056 #include <sys/types.h>
10057 #if defined(HAVE_RPC_RPC_H)
10058 #include <rpc/rpc.h>
10059 #endif
10060 int main() {
10061 uint32 testvar;
10062 ; return 0; }
10063 EOF
10064 if { (eval echo configure:10065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10065   rm -rf conftest*
10066   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10067 else
10068   echo "configure: failed program was:" >&5
10069   cat conftest.$ac_ext >&5
10070   rm -rf conftest*
10071   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10072 fi
10073 rm -f conftest*
10074 fi
10075
10076 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10077 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10078     cat >> confdefs.h <<\EOF
10079 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10080 EOF
10081
10082 fi
10083
10084
10085 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10086 echo "configure:10087: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10087 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10088   echo $ac_n "(cached) $ac_c" 1>&6
10089 else
10090   
10091 cat > conftest.$ac_ext <<EOF
10092 #line 10093 "configure"
10093 #include "confdefs.h"
10094 #include <sys/types.h>
10095 #ifdef HAVE_SYS_SECURITY_H
10096 #include <sys/security.h>
10097 #include <prot.h>
10098 #endif  /* HAVE_SYS_SECURITY_H */
10099 #if defined(HAVE_RPC_RPC_H)
10100 #include <rpc/rpc.h>
10101 #endif
10102 int main() {
10103 int testvar;
10104 ; return 0; }
10105 EOF
10106 if { (eval echo configure:10107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10107   rm -rf conftest*
10108   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10109 else
10110   echo "configure: failed program was:" >&5
10111   cat conftest.$ac_ext >&5
10112   rm -rf conftest*
10113   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10114 fi
10115 rm -f conftest*
10116 fi
10117
10118 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10119 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10120     cat >> confdefs.h <<\EOF
10121 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10122 EOF
10123
10124 fi
10125
10126 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10127 echo "configure:10128: checking for test routines" >&5
10128 if test "$cross_compiling" = yes; then
10129   echo "configure: warning: cannot run when cross-compiling" 1>&2
10130 else
10131   cat > conftest.$ac_ext <<EOF
10132 #line 10133 "configure"
10133 #include "confdefs.h"
10134 #include "${srcdir-.}/tests/trivial.c"
10135 EOF
10136 if { (eval echo configure:10137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10137 then
10138   echo "$ac_t""yes" 1>&6
10139 else
10140   echo "configure: failed program was:" >&5
10141   cat conftest.$ac_ext >&5
10142   rm -fr conftest*
10143   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10144 fi
10145 rm -fr conftest*
10146 fi
10147
10148
10149 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10150 echo "configure:10151: checking for ftruncate extend" >&5
10151 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10152   echo $ac_n "(cached) $ac_c" 1>&6
10153 else
10154   
10155 if test "$cross_compiling" = yes; then
10156   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10157 else
10158   cat > conftest.$ac_ext <<EOF
10159 #line 10160 "configure"
10160 #include "confdefs.h"
10161 #include "${srcdir-.}/tests/ftruncate.c"
10162 EOF
10163 if { (eval echo configure:10164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10164 then
10165   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10166 else
10167   echo "configure: failed program was:" >&5
10168   cat conftest.$ac_ext >&5
10169   rm -fr conftest*
10170   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10171 fi
10172 rm -fr conftest*
10173 fi
10174
10175 fi
10176
10177 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10178 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10179     cat >> confdefs.h <<\EOF
10180 #define HAVE_FTRUNCATE_EXTEND 1
10181 EOF
10182
10183 fi
10184
10185 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10186 echo "configure:10187: checking for AF_LOCAL socket support" >&5
10187 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10188   echo $ac_n "(cached) $ac_c" 1>&6
10189 else
10190   
10191 if test "$cross_compiling" = yes; then
10192   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10193 else
10194   cat > conftest.$ac_ext <<EOF
10195 #line 10196 "configure"
10196 #include "confdefs.h"
10197 #include "${srcdir-.}/tests/unixsock.c"
10198 EOF
10199 if { (eval echo configure:10200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10200 then
10201   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10202 else
10203   echo "configure: failed program was:" >&5
10204   cat conftest.$ac_ext >&5
10205   rm -fr conftest*
10206   samba_cv_HAVE_WORKING_AF_LOCAL=no
10207 fi
10208 rm -fr conftest*
10209 fi
10210
10211 fi
10212
10213 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10214 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10215 then
10216     cat >> confdefs.h <<\EOF
10217 #define HAVE_WORKING_AF_LOCAL 1
10218 EOF
10219
10220 fi
10221
10222 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10223 echo "configure:10224: checking for broken getgroups" >&5
10224 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10225   echo $ac_n "(cached) $ac_c" 1>&6
10226 else
10227   
10228 if test "$cross_compiling" = yes; then
10229   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10230 else
10231   cat > conftest.$ac_ext <<EOF
10232 #line 10233 "configure"
10233 #include "confdefs.h"
10234 #include "${srcdir-.}/tests/getgroups.c"
10235 EOF
10236 if { (eval echo configure:10237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10237 then
10238   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10239 else
10240   echo "configure: failed program was:" >&5
10241   cat conftest.$ac_ext >&5
10242   rm -fr conftest*
10243   samba_cv_HAVE_BROKEN_GETGROUPS=no
10244 fi
10245 rm -fr conftest*
10246 fi
10247
10248 fi
10249
10250 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10251 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10252     cat >> confdefs.h <<\EOF
10253 #define HAVE_BROKEN_GETGROUPS 1
10254 EOF
10255
10256 fi
10257
10258 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10259 echo "configure:10260: checking whether getpass should be replaced" >&5
10260 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10261   echo $ac_n "(cached) $ac_c" 1>&6
10262 else
10263   
10264 SAVE_CPPFLAGS="$CPPFLAGS"
10265 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10266 cat > conftest.$ac_ext <<EOF
10267 #line 10268 "configure"
10268 #include "confdefs.h"
10269
10270 #define REPLACE_GETPASS 1
10271 #define NO_CONFIG_H 1
10272 #define main dont_declare_main
10273 #include "${srcdir-.}/lib/getsmbpass.c"
10274 #undef main
10275
10276 int main() {
10277
10278 ; return 0; }
10279 EOF
10280 if { (eval echo configure:10281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10281   rm -rf conftest*
10282   samba_cv_REPLACE_GETPASS=yes
10283 else
10284   echo "configure: failed program was:" >&5
10285   cat conftest.$ac_ext >&5
10286   rm -rf conftest*
10287   samba_cv_REPLACE_GETPASS=no
10288 fi
10289 rm -f conftest*
10290 CPPFLAGS="$SAVE_CPPFLAGS"
10291
10292 fi
10293
10294 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10295 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10296         cat >> confdefs.h <<\EOF
10297 #define REPLACE_GETPASS 1
10298 EOF
10299
10300 fi
10301
10302 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10303 echo "configure:10304: checking for broken inet_ntoa" >&5
10304 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10305   echo $ac_n "(cached) $ac_c" 1>&6
10306 else
10307   
10308 if test "$cross_compiling" = yes; then
10309   samba_cv_REPLACE_INET_NTOA=cross
10310 else
10311   cat > conftest.$ac_ext <<EOF
10312 #line 10313 "configure"
10313 #include "confdefs.h"
10314
10315 #include <stdio.h>
10316 #include <sys/types.h>
10317 #include <netinet/in.h>
10318 #ifdef HAVE_ARPA_INET_H
10319 #include <arpa/inet.h>
10320 #endif
10321 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10322 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10323     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10324 exit(1);}
10325 EOF
10326 if { (eval echo configure:10327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10327 then
10328   samba_cv_REPLACE_INET_NTOA=yes
10329 else
10330   echo "configure: failed program was:" >&5
10331   cat conftest.$ac_ext >&5
10332   rm -fr conftest*
10333   samba_cv_REPLACE_INET_NTOA=no
10334 fi
10335 rm -fr conftest*
10336 fi
10337
10338 fi
10339
10340 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10341 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10342     cat >> confdefs.h <<\EOF
10343 #define REPLACE_INET_NTOA 1
10344 EOF
10345
10346 fi
10347
10348 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10349 echo "configure:10350: checking for secure mkstemp" >&5
10350 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10351   echo $ac_n "(cached) $ac_c" 1>&6
10352 else
10353   
10354 if test "$cross_compiling" = yes; then
10355   samba_cv_HAVE_SECURE_MKSTEMP=cross
10356 else
10357   cat > conftest.$ac_ext <<EOF
10358 #line 10359 "configure"
10359 #include "confdefs.h"
10360 #include <stdlib.h>
10361 #include <sys/types.h>
10362 #include <sys/stat.h>
10363 #include <unistd.h>
10364 main() { 
10365   struct stat st;
10366   char tpl[20]="/tmp/test.XXXXXX"; 
10367   int fd = mkstemp(tpl); 
10368   if (fd == -1) exit(1);
10369   unlink(tpl);
10370   if (fstat(fd, &st) != 0) exit(1);
10371   if ((st.st_mode & 0777) != 0600) exit(1);
10372   exit(0);
10373 }
10374 EOF
10375 if { (eval echo configure:10376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10376 then
10377   samba_cv_HAVE_SECURE_MKSTEMP=yes
10378 else
10379   echo "configure: failed program was:" >&5
10380   cat conftest.$ac_ext >&5
10381   rm -fr conftest*
10382   samba_cv_HAVE_SECURE_MKSTEMP=no
10383 fi
10384 rm -fr conftest*
10385 fi
10386
10387 fi
10388
10389 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10390 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10391     cat >> confdefs.h <<\EOF
10392 #define HAVE_SECURE_MKSTEMP 1
10393 EOF
10394
10395 fi
10396
10397 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10398 echo "configure:10399: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10399 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10400   echo $ac_n "(cached) $ac_c" 1>&6
10401 else
10402   
10403 if test "$cross_compiling" = yes; then
10404   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10405 else
10406   cat > conftest.$ac_ext <<EOF
10407 #line 10408 "configure"
10408 #include "confdefs.h"
10409 #include <unistd.h>
10410 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10411 EOF
10412 if { (eval echo configure:10413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10413 then
10414   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10415 else
10416   echo "configure: failed program was:" >&5
10417   cat conftest.$ac_ext >&5
10418   rm -fr conftest*
10419   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10420 fi
10421 rm -fr conftest*
10422 fi
10423
10424 fi
10425
10426 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10427 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10428     cat >> confdefs.h <<\EOF
10429 #define SYSCONF_SC_NGROUPS_MAX 1
10430 EOF
10431
10432 fi
10433
10434 echo $ac_n "checking for root""... $ac_c" 1>&6
10435 echo "configure:10436: checking for root" >&5
10436 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10437   echo $ac_n "(cached) $ac_c" 1>&6
10438 else
10439   
10440 if test "$cross_compiling" = yes; then
10441   samba_cv_HAVE_ROOT=cross
10442 else
10443   cat > conftest.$ac_ext <<EOF
10444 #line 10445 "configure"
10445 #include "confdefs.h"
10446 main() { exit(getuid() != 0); }
10447 EOF
10448 if { (eval echo configure:10449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10449 then
10450   samba_cv_HAVE_ROOT=yes
10451 else
10452   echo "configure: failed program was:" >&5
10453   cat conftest.$ac_ext >&5
10454   rm -fr conftest*
10455   samba_cv_HAVE_ROOT=no
10456 fi
10457 rm -fr conftest*
10458 fi
10459
10460 fi
10461
10462 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10463 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10464     cat >> confdefs.h <<\EOF
10465 #define HAVE_ROOT 1
10466 EOF
10467
10468 else
10469     echo "configure: warning: running as non-root will disable some tests" 1>&2
10470 fi
10471
10472 ##################
10473 # look for a method of finding the list of network interfaces
10474 iface=no;
10475 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10476 echo "configure:10477: checking for iface AIX" >&5
10477 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10478   echo $ac_n "(cached) $ac_c" 1>&6
10479 else
10480   
10481 if test "$cross_compiling" = yes; then
10482   samba_cv_HAVE_IFACE_AIX=cross
10483 else
10484   cat > conftest.$ac_ext <<EOF
10485 #line 10486 "configure"
10486 #include "confdefs.h"
10487
10488 #define HAVE_IFACE_AIX 1
10489 #define AUTOCONF_TEST 1
10490 #include "confdefs.h"
10491 #include "${srcdir-.}/lib/interfaces.c"
10492 EOF
10493 if { (eval echo configure:10494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10494 then
10495   samba_cv_HAVE_IFACE_AIX=yes
10496 else
10497   echo "configure: failed program was:" >&5
10498   cat conftest.$ac_ext >&5
10499   rm -fr conftest*
10500   samba_cv_HAVE_IFACE_AIX=no
10501 fi
10502 rm -fr conftest*
10503 fi
10504
10505 fi
10506
10507 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10508 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10509     iface=yes;cat >> confdefs.h <<\EOF
10510 #define HAVE_IFACE_AIX 1
10511 EOF
10512
10513 fi
10514
10515 if test $iface = no; then
10516 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10517 echo "configure:10518: checking for iface ifconf" >&5
10518 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10519   echo $ac_n "(cached) $ac_c" 1>&6
10520 else
10521   
10522 if test "$cross_compiling" = yes; then
10523   samba_cv_HAVE_IFACE_IFCONF=cross
10524 else
10525   cat > conftest.$ac_ext <<EOF
10526 #line 10527 "configure"
10527 #include "confdefs.h"
10528
10529 #define HAVE_IFACE_IFCONF 1
10530 #define AUTOCONF_TEST 1
10531 #include "confdefs.h"
10532 #include "${srcdir-.}/lib/interfaces.c"
10533 EOF
10534 if { (eval echo configure:10535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10535 then
10536   samba_cv_HAVE_IFACE_IFCONF=yes
10537 else
10538   echo "configure: failed program was:" >&5
10539   cat conftest.$ac_ext >&5
10540   rm -fr conftest*
10541   samba_cv_HAVE_IFACE_IFCONF=no
10542 fi
10543 rm -fr conftest*
10544 fi
10545
10546 fi
10547
10548 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10549 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10550     iface=yes;cat >> confdefs.h <<\EOF
10551 #define HAVE_IFACE_IFCONF 1
10552 EOF
10553
10554 fi
10555 fi
10556
10557 if test $iface = no; then
10558 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
10559 echo "configure:10560: checking for iface ifreq" >&5
10560 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
10561   echo $ac_n "(cached) $ac_c" 1>&6
10562 else
10563   
10564 if test "$cross_compiling" = yes; then
10565   samba_cv_HAVE_IFACE_IFREQ=cross
10566 else
10567   cat > conftest.$ac_ext <<EOF
10568 #line 10569 "configure"
10569 #include "confdefs.h"
10570
10571 #define HAVE_IFACE_IFREQ 1
10572 #define AUTOCONF_TEST 1
10573 #include "confdefs.h"
10574 #include "${srcdir-.}/lib/interfaces.c"
10575 EOF
10576 if { (eval echo configure:10577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10577 then
10578   samba_cv_HAVE_IFACE_IFREQ=yes
10579 else
10580   echo "configure: failed program was:" >&5
10581   cat conftest.$ac_ext >&5
10582   rm -fr conftest*
10583   samba_cv_HAVE_IFACE_IFREQ=no
10584 fi
10585 rm -fr conftest*
10586 fi
10587
10588 fi
10589
10590 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
10591 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
10592     iface=yes;cat >> confdefs.h <<\EOF
10593 #define HAVE_IFACE_IFREQ 1
10594 EOF
10595
10596 fi
10597 fi
10598
10599
10600 ################################################
10601 # look for a method of setting the effective uid
10602 seteuid=no;
10603 if test $seteuid = no; then
10604 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
10605 echo "configure:10606: checking for setresuid" >&5
10606 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
10607   echo $ac_n "(cached) $ac_c" 1>&6
10608 else
10609   
10610 if test "$cross_compiling" = yes; then
10611   samba_cv_USE_SETRESUID=cross
10612 else
10613   cat > conftest.$ac_ext <<EOF
10614 #line 10615 "configure"
10615 #include "confdefs.h"
10616
10617 #define AUTOCONF_TEST 1
10618 #define USE_SETRESUID 1
10619 #include "confdefs.h"
10620 #include "${srcdir-.}/lib/util_sec.c"
10621 EOF
10622 if { (eval echo configure:10623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10623 then
10624   samba_cv_USE_SETRESUID=yes
10625 else
10626   echo "configure: failed program was:" >&5
10627   cat conftest.$ac_ext >&5
10628   rm -fr conftest*
10629   samba_cv_USE_SETRESUID=no
10630 fi
10631 rm -fr conftest*
10632 fi
10633
10634 fi
10635
10636 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
10637 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
10638     seteuid=yes;cat >> confdefs.h <<\EOF
10639 #define USE_SETRESUID 1
10640 EOF
10641
10642 fi
10643 fi
10644
10645
10646 if test $seteuid = no; then
10647 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
10648 echo "configure:10649: checking for setreuid" >&5
10649 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
10650   echo $ac_n "(cached) $ac_c" 1>&6
10651 else
10652   
10653 if test "$cross_compiling" = yes; then
10654   samba_cv_USE_SETREUID=cross
10655 else
10656   cat > conftest.$ac_ext <<EOF
10657 #line 10658 "configure"
10658 #include "confdefs.h"
10659
10660 #define AUTOCONF_TEST 1
10661 #define USE_SETREUID 1
10662 #include "confdefs.h"
10663 #include "${srcdir-.}/lib/util_sec.c"
10664 EOF
10665 if { (eval echo configure:10666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10666 then
10667   samba_cv_USE_SETREUID=yes
10668 else
10669   echo "configure: failed program was:" >&5
10670   cat conftest.$ac_ext >&5
10671   rm -fr conftest*
10672   samba_cv_USE_SETREUID=no
10673 fi
10674 rm -fr conftest*
10675 fi
10676
10677 fi
10678
10679 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
10680 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
10681     seteuid=yes;cat >> confdefs.h <<\EOF
10682 #define USE_SETREUID 1
10683 EOF
10684
10685 fi
10686 fi
10687
10688 if test $seteuid = no; then
10689 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
10690 echo "configure:10691: checking for seteuid" >&5
10691 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
10692   echo $ac_n "(cached) $ac_c" 1>&6
10693 else
10694   
10695 if test "$cross_compiling" = yes; then
10696   samba_cv_USE_SETEUID=cross
10697 else
10698   cat > conftest.$ac_ext <<EOF
10699 #line 10700 "configure"
10700 #include "confdefs.h"
10701
10702 #define AUTOCONF_TEST 1
10703 #define USE_SETEUID 1
10704 #include "confdefs.h"
10705 #include "${srcdir-.}/lib/util_sec.c"
10706 EOF
10707 if { (eval echo configure:10708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10708 then
10709   samba_cv_USE_SETEUID=yes
10710 else
10711   echo "configure: failed program was:" >&5
10712   cat conftest.$ac_ext >&5
10713   rm -fr conftest*
10714   samba_cv_USE_SETEUID=no
10715 fi
10716 rm -fr conftest*
10717 fi
10718
10719 fi
10720
10721 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
10722 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
10723     seteuid=yes;cat >> confdefs.h <<\EOF
10724 #define USE_SETEUID 1
10725 EOF
10726
10727 fi
10728 fi
10729
10730 if test $seteuid = no; then
10731 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
10732 echo "configure:10733: checking for setuidx" >&5
10733 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
10734   echo $ac_n "(cached) $ac_c" 1>&6
10735 else
10736   
10737 if test "$cross_compiling" = yes; then
10738   samba_cv_USE_SETUIDX=cross
10739 else
10740   cat > conftest.$ac_ext <<EOF
10741 #line 10742 "configure"
10742 #include "confdefs.h"
10743
10744 #define AUTOCONF_TEST 1
10745 #define USE_SETUIDX 1
10746 #include "confdefs.h"
10747 #include "${srcdir-.}/lib/util_sec.c"
10748 EOF
10749 if { (eval echo configure:10750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10750 then
10751   samba_cv_USE_SETUIDX=yes
10752 else
10753   echo "configure: failed program was:" >&5
10754   cat conftest.$ac_ext >&5
10755   rm -fr conftest*
10756   samba_cv_USE_SETUIDX=no
10757 fi
10758 rm -fr conftest*
10759 fi
10760
10761 fi
10762
10763 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
10764 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
10765     seteuid=yes;cat >> confdefs.h <<\EOF
10766 #define USE_SETUIDX 1
10767 EOF
10768
10769 fi
10770 fi
10771
10772
10773 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10774 echo "configure:10775: checking for working mmap" >&5
10775 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
10776   echo $ac_n "(cached) $ac_c" 1>&6
10777 else
10778   
10779 if test "$cross_compiling" = yes; then
10780   samba_cv_HAVE_MMAP=cross
10781 else
10782   cat > conftest.$ac_ext <<EOF
10783 #line 10784 "configure"
10784 #include "confdefs.h"
10785 #include "${srcdir-.}/tests/shared_mmap.c"
10786 EOF
10787 if { (eval echo configure:10788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10788 then
10789   samba_cv_HAVE_MMAP=yes
10790 else
10791   echo "configure: failed program was:" >&5
10792   cat conftest.$ac_ext >&5
10793   rm -fr conftest*
10794   samba_cv_HAVE_MMAP=no
10795 fi
10796 rm -fr conftest*
10797 fi
10798
10799 fi
10800
10801 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
10802 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
10803     cat >> confdefs.h <<\EOF
10804 #define HAVE_MMAP 1
10805 EOF
10806
10807 fi
10808
10809 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
10810 echo "configure:10811: checking for ftruncate needs root" >&5
10811 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
10812   echo $ac_n "(cached) $ac_c" 1>&6
10813 else
10814   
10815 if test "$cross_compiling" = yes; then
10816   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
10817 else
10818   cat > conftest.$ac_ext <<EOF
10819 #line 10820 "configure"
10820 #include "confdefs.h"
10821 #include "${srcdir-.}/tests/ftruncroot.c"
10822 EOF
10823 if { (eval echo configure:10824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10824 then
10825   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
10826 else
10827   echo "configure: failed program was:" >&5
10828   cat conftest.$ac_ext >&5
10829   rm -fr conftest*
10830   samba_cv_FTRUNCATE_NEEDS_ROOT=no
10831 fi
10832 rm -fr conftest*
10833 fi
10834
10835 fi
10836
10837 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
10838 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
10839     cat >> confdefs.h <<\EOF
10840 #define FTRUNCATE_NEEDS_ROOT 1
10841 EOF
10842
10843 fi
10844
10845 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
10846 echo "configure:10847: checking for fcntl locking" >&5
10847 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
10848   echo $ac_n "(cached) $ac_c" 1>&6
10849 else
10850   
10851 if test "$cross_compiling" = yes; then
10852   samba_cv_HAVE_FCNTL_LOCK=cross
10853 else
10854   cat > conftest.$ac_ext <<EOF
10855 #line 10856 "configure"
10856 #include "confdefs.h"
10857 #include "${srcdir-.}/tests/fcntl_lock.c"
10858 EOF
10859 if { (eval echo configure:10860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10860 then
10861   samba_cv_HAVE_FCNTL_LOCK=yes
10862 else
10863   echo "configure: failed program was:" >&5
10864   cat conftest.$ac_ext >&5
10865   rm -fr conftest*
10866   samba_cv_HAVE_FCNTL_LOCK=no
10867 fi
10868 rm -fr conftest*
10869 fi
10870
10871 fi
10872
10873 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
10874 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
10875     cat >> confdefs.h <<\EOF
10876 #define HAVE_FCNTL_LOCK 1
10877 EOF
10878
10879 fi
10880
10881 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
10882 echo "configure:10883: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
10883 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
10884   echo $ac_n "(cached) $ac_c" 1>&6
10885 else
10886   
10887 if test "$cross_compiling" = yes; then
10888   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
10889 else
10890   cat > conftest.$ac_ext <<EOF
10891 #line 10892 "configure"
10892 #include "confdefs.h"
10893 #include "${srcdir-.}/tests/fcntl_lock64.c"
10894 EOF
10895 if { (eval echo configure:10896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10896 then
10897   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
10898 else
10899   echo "configure: failed program was:" >&5
10900   cat conftest.$ac_ext >&5
10901   rm -fr conftest*
10902   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
10903 fi
10904 rm -fr conftest*
10905 fi
10906
10907 fi
10908
10909 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
10910 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
10911     cat >> confdefs.h <<\EOF
10912 #define HAVE_BROKEN_FCNTL64_LOCKS 1
10913 EOF
10914
10915
10916 else
10917
10918
10919   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
10920 echo "configure:10921: checking for 64 bit fcntl locking" >&5
10921 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
10922   echo $ac_n "(cached) $ac_c" 1>&6
10923 else
10924   
10925   if test "$cross_compiling" = yes; then
10926   samba_cv_HAVE_STRUCT_FLOCK64=cross
10927 else
10928   cat > conftest.$ac_ext <<EOF
10929 #line 10930 "configure"
10930 #include "confdefs.h"
10931
10932 #if defined(HAVE_UNISTD_H)
10933 #include <unistd.h>
10934 #endif
10935 #include <stdio.h>
10936 #include <stdlib.h>
10937
10938 #ifdef HAVE_FCNTL_H
10939 #include <fcntl.h>
10940 #endif
10941
10942 #ifdef HAVE_SYS_FCNTL_H
10943 #include <sys/fcntl.h>
10944 #endif
10945 main() { struct flock64 fl64;
10946 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
10947 exit(0);
10948 #else
10949 exit(1);
10950 #endif
10951 }
10952 EOF
10953 if { (eval echo configure:10954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10954 then
10955   samba_cv_HAVE_STRUCT_FLOCK64=yes
10956 else
10957   echo "configure: failed program was:" >&5
10958   cat conftest.$ac_ext >&5
10959   rm -fr conftest*
10960   samba_cv_HAVE_STRUCT_FLOCK64=no
10961 fi
10962 rm -fr conftest*
10963 fi
10964
10965 fi
10966
10967 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
10968
10969   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
10970       cat >> confdefs.h <<\EOF
10971 #define HAVE_STRUCT_FLOCK64 1
10972 EOF
10973
10974   fi
10975 fi
10976
10977 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
10978 echo "configure:10979: checking for broken nisplus include files" >&5
10979 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
10980   echo $ac_n "(cached) $ac_c" 1>&6
10981 else
10982   
10983 cat > conftest.$ac_ext <<EOF
10984 #line 10985 "configure"
10985 #include "confdefs.h"
10986 #include <sys/acl.h>
10987 #if defined(HAVE_RPCSVC_NIS_H)
10988 #include <rpcsvc/nis.h>
10989 #endif
10990 int main() {
10991 return 0;
10992 ; return 0; }
10993 EOF
10994 if { (eval echo configure:10995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10995   rm -rf conftest*
10996   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
10997 else
10998   echo "configure: failed program was:" >&5
10999   cat conftest.$ac_ext >&5
11000   rm -rf conftest*
11001   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11002 fi
11003 rm -f conftest*
11004 fi
11005
11006 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11007 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11008     cat >> confdefs.h <<\EOF
11009 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11010 EOF
11011
11012 fi
11013
11014
11015 #################################################
11016 # check for smbwrapper support
11017 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11018 echo "configure:11019: checking whether to use smbwrapper" >&5
11019 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11020 if test "${with_smbwrapper+set}" = set; then
11021   withval="$with_smbwrapper"
11022    case "$withval" in
11023   yes)
11024     echo "$ac_t""yes" 1>&6
11025     cat >> confdefs.h <<\EOF
11026 #define WITH_SMBWRAPPER 1
11027 EOF
11028
11029         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11030
11031         if test x$ATTEMPT_WRAP32_BUILD = x; then
11032                 WRAP32=""
11033         else
11034                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11035         fi
11036
11037 # Conditions under which smbwrapper should not be built.
11038
11039         if test x$PICFLAG = x; then
11040            echo No support for PIC code - disabling smbwrapper and smbsh
11041            WRAP=""
11042            WRAP32=""
11043         elif test x$ac_cv_func_syscall = xno; then
11044            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11045            WRAP=""
11046            WRAP32=""
11047         fi
11048     ;;
11049   *)
11050     echo "$ac_t""no" 1>&6
11051     ;;
11052   esac 
11053 else
11054   echo "$ac_t""no" 1>&6
11055
11056 fi
11057
11058
11059 #################################################
11060 # check for the AFS filesystem
11061 echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
11062 echo "configure:11063: checking whether to use AFS" >&5
11063 # Check whether --with-afs or --without-afs was given.
11064 if test "${with_afs+set}" = set; then
11065   withval="$with_afs"
11066    case "$withval" in
11067   yes)
11068     echo "$ac_t""yes" 1>&6
11069     cat >> confdefs.h <<\EOF
11070 #define WITH_AFS 1
11071 EOF
11072
11073     ;;
11074   *)
11075     echo "$ac_t""no" 1>&6
11076     ;;
11077   esac 
11078 else
11079   echo "$ac_t""no" 1>&6
11080
11081 fi
11082
11083
11084
11085 #################################################
11086 # check for the DFS auth system
11087 echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
11088 echo "configure:11089: checking whether to use DFS auth" >&5
11089 # Check whether --with-dfs or --without-dfs was given.
11090 if test "${with_dfs+set}" = set; then
11091   withval="$with_dfs"
11092    case "$withval" in
11093   yes)
11094     echo "$ac_t""yes" 1>&6
11095     cat >> confdefs.h <<\EOF
11096 #define WITH_DFS 1
11097 EOF
11098
11099     ;;
11100   *)
11101     echo "$ac_t""no" 1>&6
11102     ;;
11103   esac 
11104 else
11105   echo "$ac_t""no" 1>&6
11106
11107 fi
11108
11109
11110 #################################################
11111 # check for Kerberos IV auth system
11112 echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
11113 echo "configure:11114: checking whether to use Kerberos IV" >&5
11114 # Check whether --with-krb4 or --without-krb4 was given.
11115 if test "${with_krb4+set}" = set; then
11116   withval="$with_krb4"
11117    case "$withval" in
11118   yes)
11119     echo "$ac_t""yes" 1>&6
11120     cat >> confdefs.h <<\EOF
11121 #define KRB4_AUTH 1
11122 EOF
11123
11124     echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
11125 echo "configure:11126: checking for dn_expand in -lresolv" >&5
11126 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
11127 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11128   echo $ac_n "(cached) $ac_c" 1>&6
11129 else
11130   ac_save_LIBS="$LIBS"
11131 LIBS="-lresolv  $LIBS"
11132 cat > conftest.$ac_ext <<EOF
11133 #line 11134 "configure"
11134 #include "confdefs.h"
11135 /* Override any gcc2 internal prototype to avoid an error.  */
11136 /* We use char because int might match the return type of a gcc2
11137     builtin and then its argument prototype would still apply.  */
11138 char dn_expand();
11139
11140 int main() {
11141 dn_expand()
11142 ; return 0; }
11143 EOF
11144 if { (eval echo configure:11145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11145   rm -rf conftest*
11146   eval "ac_cv_lib_$ac_lib_var=yes"
11147 else
11148   echo "configure: failed program was:" >&5
11149   cat conftest.$ac_ext >&5
11150   rm -rf conftest*
11151   eval "ac_cv_lib_$ac_lib_var=no"
11152 fi
11153 rm -f conftest*
11154 LIBS="$ac_save_LIBS"
11155
11156 fi
11157 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11158   echo "$ac_t""yes" 1>&6
11159     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11160     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11161   cat >> confdefs.h <<EOF
11162 #define $ac_tr_lib 1
11163 EOF
11164
11165   LIBS="-lresolv $LIBS"
11166
11167 else
11168   echo "$ac_t""no" 1>&6
11169 fi
11170
11171     LIBS="$LIBS -lkrb -ldes"
11172     CFLAGS="$CFLAGS -I$withval/include"
11173     LDFLAGS="$LDFLAGS -L$withval/lib"
11174     ;;
11175   *)
11176     echo "$ac_t""no" 1>&6
11177     ;;
11178   esac 
11179 else
11180   echo "$ac_t""no" 1>&6
11181
11182 fi
11183
11184
11185 #################################################
11186 # check for Kerberos 5 auth system
11187 echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6
11188 echo "configure:11189: checking whether to use Kerberos 5" >&5
11189 # Check whether --with-krb5 or --without-krb5 was given.
11190 if test "${with_krb5+set}" = set; then
11191   withval="$with_krb5"
11192    case "$withval" in
11193   yes)
11194     echo "$ac_t""yes" 1>&6
11195     cat >> confdefs.h <<\EOF
11196 #define KRB5_AUTH 1
11197 EOF
11198
11199     LIBS="$LIBS -ldes425 -lkrb5 -lcrypto -lcom_err"
11200     CFLAGS="$CFLAGS -I$withval/include"
11201     LDFLAGS="$LDFLAGS -L$withval/lib"
11202     ;;
11203   *)
11204     echo "$ac_t""no" 1>&6
11205     ;;
11206   esac 
11207 else
11208   echo "$ac_t""no" 1>&6
11209
11210 fi
11211
11212
11213 #################################################
11214 # check for automount support
11215 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
11216 echo "configure:11217: checking whether to use AUTOMOUNT" >&5
11217 # Check whether --with-automount or --without-automount was given.
11218 if test "${with_automount+set}" = set; then
11219   withval="$with_automount"
11220    case "$withval" in
11221   yes)
11222     echo "$ac_t""yes" 1>&6
11223     cat >> confdefs.h <<\EOF
11224 #define WITH_AUTOMOUNT 1
11225 EOF
11226
11227     ;;
11228   *)
11229     echo "$ac_t""no" 1>&6
11230     ;;
11231   esac 
11232 else
11233   echo "$ac_t""no" 1>&6
11234
11235 fi
11236
11237
11238 #################################################
11239 # check for smbmount support
11240 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
11241 echo "configure:11242: checking whether to use SMBMOUNT" >&5
11242 # Check whether --with-smbmount or --without-smbmount was given.
11243 if test "${with_smbmount+set}" = set; then
11244   withval="$with_smbmount"
11245    case "$withval" in
11246   yes)
11247     echo "$ac_t""yes" 1>&6
11248     cat >> confdefs.h <<\EOF
11249 #define WITH_SMBMOUNT 1
11250 EOF
11251
11252     MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
11253     ;;
11254   *)
11255     echo "$ac_t""no" 1>&6
11256     MPROGS=
11257     ;;
11258   esac 
11259 else
11260   echo "$ac_t""no" 1>&6
11261   MPROGS=
11262
11263 fi
11264
11265
11266
11267 #################################################
11268 # check for a PAM password database
11269 with_pam_for_crypt=no
11270 echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6
11271 echo "configure:11272: checking whether to use PAM password database" >&5
11272 # Check whether --with-pam or --without-pam was given.
11273 if test "${with_pam+set}" = set; then
11274   withval="$with_pam"
11275    case "$withval" in
11276   yes)
11277     echo "$ac_t""yes" 1>&6
11278     cat >> confdefs.h <<\EOF
11279 #define WITH_PAM 1
11280 EOF
11281
11282     LIBS="$LIBS -lpam"
11283     with_pam_for_crypt=yes
11284     ;;
11285   *)
11286     echo "$ac_t""no" 1>&6
11287     ;;
11288   esac 
11289 else
11290   echo "$ac_t""no" 1>&6
11291
11292 fi
11293
11294
11295 # we can't build a pam module if we don't have pam.
11296 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
11297 echo "configure:11298: checking for pam_get_data in -lpam" >&5
11298 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
11299 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11300   echo $ac_n "(cached) $ac_c" 1>&6
11301 else
11302   ac_save_LIBS="$LIBS"
11303 LIBS="-lpam  $LIBS"
11304 cat > conftest.$ac_ext <<EOF
11305 #line 11306 "configure"
11306 #include "confdefs.h"
11307 /* Override any gcc2 internal prototype to avoid an error.  */
11308 /* We use char because int might match the return type of a gcc2
11309     builtin and then its argument prototype would still apply.  */
11310 char pam_get_data();
11311
11312 int main() {
11313 pam_get_data()
11314 ; return 0; }
11315 EOF
11316 if { (eval echo configure:11317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11317   rm -rf conftest*
11318   eval "ac_cv_lib_$ac_lib_var=yes"
11319 else
11320   echo "configure: failed program was:" >&5
11321   cat conftest.$ac_ext >&5
11322   rm -rf conftest*
11323   eval "ac_cv_lib_$ac_lib_var=no"
11324 fi
11325 rm -f conftest*
11326 LIBS="$ac_save_LIBS"
11327
11328 fi
11329 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11330   echo "$ac_t""yes" 1>&6
11331   cat >> confdefs.h <<\EOF
11332 #define HAVE_LIBPAM 1
11333 EOF
11334
11335 else
11336   echo "$ac_t""no" 1>&6
11337 fi
11338
11339
11340 #################################################
11341 # check for pam_smbpass support
11342 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
11343 echo "configure:11344: checking whether to use pam_smbpass" >&5
11344 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
11345 if test "${with_pam_smbpass+set}" = set; then
11346   withval="$with_pam_smbpass"
11347    case "$withval" in
11348   yes)
11349     echo "$ac_t""yes" 1>&6
11350
11351 # Conditions under which pam_smbpass should not be built.
11352
11353        if test x$PICFLAG = x; then
11354           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
11355           PAM_MOD=""
11356        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
11357           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
11358           PAM_MOD=""
11359        else
11360           PAM_MOD="bin/pam_smbpass.so"
11361        fi
11362     ;;
11363   *)
11364     echo "$ac_t""no" 1>&6
11365     ;;
11366   esac 
11367 else
11368   echo "$ac_t""no" 1>&6
11369
11370 fi
11371
11372
11373
11374 ###############################################
11375 # test for where we get crypt() from, but only
11376 # if not using PAM
11377 if test $with_pam_for_crypt = no; then
11378 for ac_func in crypt
11379 do
11380 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11381 echo "configure:11382: checking for $ac_func" >&5
11382 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11383   echo $ac_n "(cached) $ac_c" 1>&6
11384 else
11385   cat > conftest.$ac_ext <<EOF
11386 #line 11387 "configure"
11387 #include "confdefs.h"
11388 /* System header to define __stub macros and hopefully few prototypes,
11389     which can conflict with char $ac_func(); below.  */
11390 #include <assert.h>
11391 /* Override any gcc2 internal prototype to avoid an error.  */
11392 /* We use char because int might match the return type of a gcc2
11393     builtin and then its argument prototype would still apply.  */
11394 char $ac_func();
11395
11396 int main() {
11397
11398 /* The GNU C library defines this for functions which it implements
11399     to always fail with ENOSYS.  Some functions are actually named
11400     something starting with __ and the normal name is an alias.  */
11401 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11402 choke me
11403 #else
11404 $ac_func();
11405 #endif
11406
11407 ; return 0; }
11408 EOF
11409 if { (eval echo configure:11410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11410   rm -rf conftest*
11411   eval "ac_cv_func_$ac_func=yes"
11412 else
11413   echo "configure: failed program was:" >&5
11414   cat conftest.$ac_ext >&5
11415   rm -rf conftest*
11416   eval "ac_cv_func_$ac_func=no"
11417 fi
11418 rm -f conftest*
11419 fi
11420
11421 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11422   echo "$ac_t""yes" 1>&6
11423     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11424   cat >> confdefs.h <<EOF
11425 #define $ac_tr_func 1
11426 EOF
11427  
11428 else
11429   echo "$ac_t""no" 1>&6
11430 fi
11431 done
11432
11433 if test x"$ac_cv_func_crypt" = x"no"; then
11434     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
11435 echo "configure:11436: checking for crypt in -lcrypt" >&5
11436 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
11437 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11438   echo $ac_n "(cached) $ac_c" 1>&6
11439 else
11440   ac_save_LIBS="$LIBS"
11441 LIBS="-lcrypt  $LIBS"
11442 cat > conftest.$ac_ext <<EOF
11443 #line 11444 "configure"
11444 #include "confdefs.h"
11445 /* Override any gcc2 internal prototype to avoid an error.  */
11446 /* We use char because int might match the return type of a gcc2
11447     builtin and then its argument prototype would still apply.  */
11448 char crypt();
11449
11450 int main() {
11451 crypt()
11452 ; return 0; }
11453 EOF
11454 if { (eval echo configure:11455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11455   rm -rf conftest*
11456   eval "ac_cv_lib_$ac_lib_var=yes"
11457 else
11458   echo "configure: failed program was:" >&5
11459   cat conftest.$ac_ext >&5
11460   rm -rf conftest*
11461   eval "ac_cv_lib_$ac_lib_var=no"
11462 fi
11463 rm -f conftest*
11464 LIBS="$ac_save_LIBS"
11465
11466 fi
11467 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11468   echo "$ac_t""yes" 1>&6
11469   LIBS="$LIBS -lcrypt";
11470         cat >> confdefs.h <<\EOF
11471 #define HAVE_CRYPT 1
11472 EOF
11473
11474 else
11475   echo "$ac_t""no" 1>&6
11476 fi
11477
11478 fi
11479 fi
11480
11481 ##
11482 ## moved after the check for -lcrypt in order to
11483 ## ensure that the necessary libraries are included
11484 ## check checking for truncated salt.  Wrapped by the
11485 ## $with_pam_for_crypt variable as above   --jerry
11486 ##
11487 if test $with_pam_for_crypt = no; then
11488 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
11489 echo "configure:11490: checking for a crypt that needs truncated salt" >&5
11490 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
11491   echo $ac_n "(cached) $ac_c" 1>&6
11492 else
11493   
11494 if test "$cross_compiling" = yes; then
11495   samba_cv_HAVE_TRUNCATED_SALT=cross
11496 else
11497   cat > conftest.$ac_ext <<EOF
11498 #line 11499 "configure"
11499 #include "confdefs.h"
11500 #include "${srcdir-.}/tests/crypttest.c"
11501 EOF
11502 if { (eval echo configure:11503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11503 then
11504   samba_cv_HAVE_TRUNCATED_SALT=no
11505 else
11506   echo "configure: failed program was:" >&5
11507   cat conftest.$ac_ext >&5
11508   rm -fr conftest*
11509   samba_cv_HAVE_TRUNCATED_SALT=yes
11510 fi
11511 rm -fr conftest*
11512 fi
11513
11514 fi
11515
11516 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
11517 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
11518         cat >> confdefs.h <<\EOF
11519 #define HAVE_TRUNCATED_SALT 1
11520 EOF
11521
11522 fi
11523 fi
11524
11525
11526 #################################################
11527 # check for a TDB password database
11528 echo $ac_n "checking whether to use TDB password database""... $ac_c" 1>&6
11529 echo "configure:11530: checking whether to use TDB password database" >&5
11530 # Check whether --with-tdbsam or --without-tdbsam was given.
11531 if test "${with_tdbsam+set}" = set; then
11532   withval="$with_tdbsam"
11533    case "$withval" in
11534   yes)
11535     echo "$ac_t""yes" 1>&6
11536     cat >> confdefs.h <<\EOF
11537 #define WITH_TDBSAM 1
11538 EOF
11539
11540     ;;
11541   *)
11542     echo "$ac_t""no" 1>&6
11543     ;;
11544   esac 
11545 else
11546   echo "$ac_t""no" 1>&6
11547
11548 fi
11549
11550
11551 #################################################
11552 # check for a LDAP password database
11553 echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6
11554 echo "configure:11555: checking whether to use LDAP password database" >&5
11555 # Check whether --with-ldap or --without-ldap was given.
11556 if test "${with_ldap+set}" = set; then
11557   withval="$with_ldap"
11558    case "$withval" in
11559   yes)
11560     echo "$ac_t""yes" 1>&6
11561     cat >> confdefs.h <<\EOF
11562 #define WITH_LDAP 1
11563 EOF
11564
11565     { echo "configure: error: LDAP password database not supported in this version." 1>&2; exit 1; }
11566     ;;
11567   *)
11568     echo "$ac_t""no" 1>&6
11569     ;;
11570   esac 
11571 else
11572   echo "$ac_t""no" 1>&6
11573
11574 fi
11575
11576
11577 #################################################
11578 # commented out by --jerry
11579 # check for a NISPLUS password database
11580 #AC_MSG_CHECKING(whether to use NISPLUS password database)
11581 #AC_ARG_WITH(nisplus,
11582 #[  --with-nisplus     Include NISPLUS password database support
11583 #[ case "$withval" in
11584 #  yes)
11585 #    AC_MSG_RESULT(yes)
11586 #    AC_DEFINE(WITH_NISPLUS)
11587 #    ;;
11588 #  *)
11589 #    AC_MSG_RESULT(no)
11590 #    ;;
11591 #  esac ],
11592 #  AC_MSG_RESULT(no)
11593 #)
11594
11595 #################################################
11596 # check for a NISPLUS_HOME support 
11597 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
11598 echo "configure:11599: checking whether to use NISPLUS_HOME" >&5
11599 # Check whether --with-nisplus-home or --without-nisplus-home was given.
11600 if test "${with_nisplus_home+set}" = set; then
11601   withval="$with_nisplus_home"
11602    case "$withval" in
11603   yes)
11604     echo "$ac_t""yes" 1>&6
11605     cat >> confdefs.h <<\EOF
11606 #define WITH_NISPLUS_HOME 1
11607 EOF
11608
11609     ;;
11610   *)
11611     echo "$ac_t""no" 1>&6
11612     ;;
11613   esac 
11614 else
11615   echo "$ac_t""no" 1>&6
11616
11617 fi
11618
11619
11620 #################################################
11621 # check for the secure socket layer
11622 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
11623 echo "configure:11624: checking whether to use SSL" >&5
11624 # Check whether --with-ssl or --without-ssl was given.
11625 if test "${with_ssl+set}" = set; then
11626   withval="$with_ssl"
11627    case "$withval" in
11628   yes)
11629     echo "$ac_t""yes" 1>&6
11630     cat >> confdefs.h <<\EOF
11631 #define WITH_SSL 1
11632 EOF
11633
11634     withval="/usr/local/ssl"     # default
11635
11636     if test "${with_sslinc+set}" = set; then
11637
11638         withval="$with_sslinc"
11639         case "$withval" in
11640         yes|no)
11641           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
11642           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
11643           LIBS="-lssl -lcrypto $LIBS"
11644           LDFLAGS="=L/usr/local/ssl/lib $LDFLAGS"
11645         ;;
11646         * )
11647           CFLAGS="-I${withval} $CFLAGS"
11648           LIBS="-lssl -lcrypto $LIBS"
11649           LDFLAGS="-L${withval}/lib $LDFLAGS"
11650         ;;
11651         esac
11652
11653     else
11654
11655         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
11656         LIBS="-lssl -lcrypto $LIBS"
11657         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
11658
11659     fi
11660
11661     if test ! -d ${withval}; then
11662       echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
11663       exit 1
11664     fi 
11665
11666     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
11667
11668     ;;
11669   *)
11670     echo "$ac_t""no" 1>&6
11671     ;;
11672   esac 
11673 else
11674   echo "$ac_t""no" 1>&6
11675
11676 fi
11677
11678
11679 #################################################
11680 # check for syslog logging
11681 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
11682 echo "configure:11683: checking whether to use syslog logging" >&5
11683 # Check whether --with-syslog or --without-syslog was given.
11684 if test "${with_syslog+set}" = set; then
11685   withval="$with_syslog"
11686    case "$withval" in
11687   yes)
11688     echo "$ac_t""yes" 1>&6
11689     cat >> confdefs.h <<\EOF
11690 #define WITH_SYSLOG 1
11691 EOF
11692
11693     ;;
11694   *)
11695     echo "$ac_t""no" 1>&6
11696     ;;
11697   esac 
11698 else
11699   echo "$ac_t""no" 1>&6
11700
11701 fi
11702
11703
11704 #################################################
11705 # check for a shared memory profiling support
11706 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
11707 echo "configure:11708: checking whether to use profiling" >&5
11708 # Check whether --with-profiling-data or --without-profiling-data was given.
11709 if test "${with_profiling_data+set}" = set; then
11710   withval="$with_profiling_data"
11711    case "$withval" in
11712   yes)
11713     echo "$ac_t""yes" 1>&6
11714     cat >> confdefs.h <<\EOF
11715 #define WITH_PROFILE 1
11716 EOF
11717
11718     ;;
11719   *)
11720     echo "$ac_t""no" 1>&6
11721     ;;
11722   esac 
11723 else
11724   echo "$ac_t""no" 1>&6
11725
11726 fi
11727
11728
11729
11730 #################################################
11731 # check for experimental disk-quotas support
11732 QUOTAOBJS=smbd/noquotas.o
11733
11734 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
11735 echo "configure:11736: checking whether to support disk-quotas" >&5
11736 # Check whether --with-quotas or --without-quotas was given.
11737 if test "${with_quotas+set}" = set; then
11738   withval="$with_quotas"
11739    case "$withval" in
11740   yes)
11741     echo "$ac_t""yes" 1>&6
11742     QUOTAOBJS=smbd/quotas.o
11743     ;;
11744   *)
11745     echo "$ac_t""no" 1>&6
11746     ;;
11747   esac 
11748 else
11749   echo "$ac_t""no" 1>&6
11750
11751 fi
11752
11753
11754
11755 #################################################
11756 # check for experimental utmp accounting
11757
11758 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
11759 echo "configure:11760: checking whether to support utmp accounting" >&5
11760 # Check whether --with-utmp or --without-utmp was given.
11761 if test "${with_utmp+set}" = set; then
11762   withval="$with_utmp"
11763    case "$withval" in
11764   yes)
11765     echo "$ac_t""yes" 1>&6
11766     cat >> confdefs.h <<\EOF
11767 #define WITH_UTMP 1
11768 EOF
11769
11770     ;;
11771   *)
11772     echo "$ac_t""no" 1>&6
11773     ;;
11774   esac 
11775 else
11776   echo "$ac_t""no" 1>&6
11777
11778 fi
11779
11780
11781 #################################################
11782 # set private directory location
11783 # Check whether --with-privatedir or --without-privatedir was given.
11784 if test "${with_privatedir+set}" = set; then
11785   withval="$with_privatedir"
11786    case "$withval" in
11787   yes|no)
11788   #
11789   # Just in case anybody calls it without argument
11790   #
11791     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
11792     privatedir='${prefix}/private'
11793   ;;
11794   * )
11795     privatedir="$withval"
11796     ;;
11797   esac
11798   
11799 else
11800   privatedir='${prefix}/private'
11801    
11802
11803 fi
11804
11805
11806 #################################################
11807 # set lock directory location
11808 # Check whether --with-lockdir or --without-lockdir was given.
11809 if test "${with_lockdir+set}" = set; then
11810   withval="$with_lockdir"
11811    case "$withval" in
11812   yes|no)
11813   #
11814   # Just in case anybody calls it without argument
11815   #
11816     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
11817     lockdir='$(VARDIR)/locks'
11818   ;;
11819   * )
11820     lockdir="$withval"
11821     ;;
11822   esac
11823   
11824 else
11825   lockdir='$(VARDIR)/locks'
11826    
11827
11828 fi
11829
11830
11831 #################################################
11832 # set SWAT directory location
11833 # Check whether --with-swatdir or --without-swatdir was given.
11834 if test "${with_swatdir+set}" = set; then
11835   withval="$with_swatdir"
11836    case "$withval" in
11837   yes|no)
11838   #
11839   # Just in case anybody does it
11840   #
11841     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
11842     swatdir='${prefix}/swat'
11843   ;;
11844   * )
11845     swatdir="$withval"
11846     ;;
11847   esac
11848   
11849 else
11850   swatdir='${prefix}/swat'
11851    
11852
11853 fi
11854
11855
11856 #################################################
11857 # these tests are taken from the GNU fileutils package
11858 echo "checking how to get filesystem space usage" 1>&6
11859 echo "configure:11860: checking how to get filesystem space usage" >&5
11860 space=no
11861
11862 # Test for statvfs64.
11863 if test $space = no; then
11864   # SVR4
11865   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
11866 echo "configure:11867: checking statvfs64 function (SVR4)" >&5
11867 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
11868   echo $ac_n "(cached) $ac_c" 1>&6
11869 else
11870   if test "$cross_compiling" = yes; then
11871   fu_cv_sys_stat_statvfs64=cross
11872 else
11873   cat > conftest.$ac_ext <<EOF
11874 #line 11875 "configure"
11875 #include "confdefs.h"
11876
11877 #if defined(HAVE_UNISTD_H)
11878 #include <unistd.h>
11879 #endif
11880 #include <sys/types.h>
11881 #include <sys/statvfs.h>
11882   main ()
11883   {
11884     struct statvfs64 fsd;
11885     exit (statvfs64 (".", &fsd));
11886   }
11887 EOF
11888 if { (eval echo configure:11889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11889 then
11890   fu_cv_sys_stat_statvfs64=yes
11891 else
11892   echo "configure: failed program was:" >&5
11893   cat conftest.$ac_ext >&5
11894   rm -fr conftest*
11895   fu_cv_sys_stat_statvfs64=no
11896 fi
11897 rm -fr conftest*
11898 fi
11899
11900 fi
11901
11902 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
11903   if test $fu_cv_sys_stat_statvfs64 = yes; then
11904     space=yes
11905     cat >> confdefs.h <<\EOF
11906 #define STAT_STATVFS64 1
11907 EOF
11908
11909   fi
11910 fi
11911
11912 # Perform only the link test since it seems there are no variants of the
11913 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
11914 # because that got a false positive on SCO OSR5.  Adding the declaration
11915 # of a `struct statvfs' causes this test to fail (as it should) on such
11916 # systems.  That system is reported to work fine with STAT_STATFS4 which
11917 # is what it gets when this test fails.
11918 if test $space = no; then
11919   # SVR4
11920   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
11921 echo "configure:11922: checking statvfs function (SVR4)" >&5
11922 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
11923   echo $ac_n "(cached) $ac_c" 1>&6
11924 else
11925   cat > conftest.$ac_ext <<EOF
11926 #line 11927 "configure"
11927 #include "confdefs.h"
11928 #include <sys/types.h>
11929 #include <sys/statvfs.h>
11930 int main() {
11931 struct statvfs fsd; statvfs (0, &fsd);
11932 ; return 0; }
11933 EOF
11934 if { (eval echo configure:11935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11935   rm -rf conftest*
11936   fu_cv_sys_stat_statvfs=yes
11937 else
11938   echo "configure: failed program was:" >&5
11939   cat conftest.$ac_ext >&5
11940   rm -rf conftest*
11941   fu_cv_sys_stat_statvfs=no
11942 fi
11943 rm -f conftest*
11944 fi
11945
11946 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
11947   if test $fu_cv_sys_stat_statvfs = yes; then
11948     space=yes
11949     cat >> confdefs.h <<\EOF
11950 #define STAT_STATVFS 1
11951 EOF
11952
11953   fi
11954 fi
11955
11956 if test $space = no; then
11957   # DEC Alpha running OSF/1
11958   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
11959 echo "configure:11960: checking for 3-argument statfs function (DEC OSF/1)" >&5
11960   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
11961   echo $ac_n "(cached) $ac_c" 1>&6
11962 else
11963   if test "$cross_compiling" = yes; then
11964   fu_cv_sys_stat_statfs3_osf1=no
11965 else
11966   cat > conftest.$ac_ext <<EOF
11967 #line 11968 "configure"
11968 #include "confdefs.h"
11969
11970 #include <sys/param.h>
11971 #include <sys/types.h>
11972 #include <sys/mount.h>
11973   main ()
11974   {
11975     struct statfs fsd;
11976     fsd.f_fsize = 0;
11977     exit (statfs (".", &fsd, sizeof (struct statfs)));
11978   }
11979 EOF
11980 if { (eval echo configure:11981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11981 then
11982   fu_cv_sys_stat_statfs3_osf1=yes
11983 else
11984   echo "configure: failed program was:" >&5
11985   cat conftest.$ac_ext >&5
11986   rm -fr conftest*
11987   fu_cv_sys_stat_statfs3_osf1=no
11988 fi
11989 rm -fr conftest*
11990 fi
11991
11992 fi
11993
11994   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
11995   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
11996     space=yes
11997     cat >> confdefs.h <<\EOF
11998 #define STAT_STATFS3_OSF1 1
11999 EOF
12000
12001   fi
12002 fi
12003
12004 if test $space = no; then
12005 # AIX
12006   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
12007 echo "configure:12008: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
12008   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
12009   echo $ac_n "(cached) $ac_c" 1>&6
12010 else
12011   if test "$cross_compiling" = yes; then
12012   fu_cv_sys_stat_statfs2_bsize=no
12013 else
12014   cat > conftest.$ac_ext <<EOF
12015 #line 12016 "configure"
12016 #include "confdefs.h"
12017
12018 #ifdef HAVE_SYS_PARAM_H
12019 #include <sys/param.h>
12020 #endif
12021 #ifdef HAVE_SYS_MOUNT_H
12022 #include <sys/mount.h>
12023 #endif
12024 #ifdef HAVE_SYS_VFS_H
12025 #include <sys/vfs.h>
12026 #endif
12027   main ()
12028   {
12029   struct statfs fsd;
12030   fsd.f_bsize = 0;
12031   exit (statfs (".", &fsd));
12032   }
12033 EOF
12034 if { (eval echo configure:12035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12035 then
12036   fu_cv_sys_stat_statfs2_bsize=yes
12037 else
12038   echo "configure: failed program was:" >&5
12039   cat conftest.$ac_ext >&5
12040   rm -fr conftest*
12041   fu_cv_sys_stat_statfs2_bsize=no
12042 fi
12043 rm -fr conftest*
12044 fi
12045
12046 fi
12047
12048   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
12049   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
12050     space=yes
12051     cat >> confdefs.h <<\EOF
12052 #define STAT_STATFS2_BSIZE 1
12053 EOF
12054
12055   fi
12056 fi
12057
12058 if test $space = no; then
12059 # SVR3
12060   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
12061 echo "configure:12062: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
12062   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
12063   echo $ac_n "(cached) $ac_c" 1>&6
12064 else
12065   if test "$cross_compiling" = yes; then
12066   fu_cv_sys_stat_statfs4=no
12067 else
12068   cat > conftest.$ac_ext <<EOF
12069 #line 12070 "configure"
12070 #include "confdefs.h"
12071 #include <sys/types.h>
12072 #include <sys/statfs.h>
12073   main ()
12074   {
12075   struct statfs fsd;
12076   exit (statfs (".", &fsd, sizeof fsd, 0));
12077   }
12078 EOF
12079 if { (eval echo configure:12080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12080 then
12081   fu_cv_sys_stat_statfs4=yes
12082 else
12083   echo "configure: failed program was:" >&5
12084   cat conftest.$ac_ext >&5
12085   rm -fr conftest*
12086   fu_cv_sys_stat_statfs4=no
12087 fi
12088 rm -fr conftest*
12089 fi
12090
12091 fi
12092
12093   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
12094   if test $fu_cv_sys_stat_statfs4 = yes; then
12095     space=yes
12096     cat >> confdefs.h <<\EOF
12097 #define STAT_STATFS4 1
12098 EOF
12099
12100   fi
12101 fi
12102
12103 if test $space = no; then
12104 # 4.4BSD and NetBSD
12105   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
12106 echo "configure:12107: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
12107   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
12108   echo $ac_n "(cached) $ac_c" 1>&6
12109 else
12110   if test "$cross_compiling" = yes; then
12111   fu_cv_sys_stat_statfs2_fsize=no
12112 else
12113   cat > conftest.$ac_ext <<EOF
12114 #line 12115 "configure"
12115 #include "confdefs.h"
12116 #include <sys/types.h>
12117 #ifdef HAVE_SYS_PARAM_H
12118 #include <sys/param.h>
12119 #endif
12120 #ifdef HAVE_SYS_MOUNT_H
12121 #include <sys/mount.h>
12122 #endif
12123   main ()
12124   {
12125   struct statfs fsd;
12126   fsd.f_fsize = 0;
12127   exit (statfs (".", &fsd));
12128   }
12129 EOF
12130 if { (eval echo configure:12131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12131 then
12132   fu_cv_sys_stat_statfs2_fsize=yes
12133 else
12134   echo "configure: failed program was:" >&5
12135   cat conftest.$ac_ext >&5
12136   rm -fr conftest*
12137   fu_cv_sys_stat_statfs2_fsize=no
12138 fi
12139 rm -fr conftest*
12140 fi
12141
12142 fi
12143
12144   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
12145   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
12146     space=yes
12147     cat >> confdefs.h <<\EOF
12148 #define STAT_STATFS2_FSIZE 1
12149 EOF
12150
12151   fi
12152 fi
12153
12154 if test $space = no; then
12155   # Ultrix
12156   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
12157 echo "configure:12158: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
12158   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
12159   echo $ac_n "(cached) $ac_c" 1>&6
12160 else
12161   if test "$cross_compiling" = yes; then
12162   fu_cv_sys_stat_fs_data=no
12163 else
12164   cat > conftest.$ac_ext <<EOF
12165 #line 12166 "configure"
12166 #include "confdefs.h"
12167 #include <sys/types.h>
12168 #ifdef HAVE_SYS_PARAM_H
12169 #include <sys/param.h>
12170 #endif
12171 #ifdef HAVE_SYS_MOUNT_H
12172 #include <sys/mount.h>
12173 #endif
12174 #ifdef HAVE_SYS_FS_TYPES_H
12175 #include <sys/fs_types.h>
12176 #endif
12177   main ()
12178   {
12179   struct fs_data fsd;
12180   /* Ultrix's statfs returns 1 for success,
12181      0 for not mounted, -1 for failure.  */
12182   exit (statfs (".", &fsd) != 1);
12183   }
12184 EOF
12185 if { (eval echo configure:12186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12186 then
12187   fu_cv_sys_stat_fs_data=yes
12188 else
12189   echo "configure: failed program was:" >&5
12190   cat conftest.$ac_ext >&5
12191   rm -fr conftest*
12192   fu_cv_sys_stat_fs_data=no
12193 fi
12194 rm -fr conftest*
12195 fi
12196
12197 fi
12198
12199   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
12200   if test $fu_cv_sys_stat_fs_data = yes; then
12201     space=yes
12202     cat >> confdefs.h <<\EOF
12203 #define STAT_STATFS2_FS_DATA 1
12204 EOF
12205
12206   fi
12207 fi
12208
12209 #
12210 # As a gating factor for large file support, in order to
12211 # use <4GB files we must have the following minimal support
12212 # available.
12213 # long long, and a 64 bit off_t or off64_t.
12214 # If we don't have all of these then disable large
12215 # file support.
12216 #
12217 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
12218 echo "configure:12219: checking if large file support can be enabled" >&5
12219 cat > conftest.$ac_ext <<EOF
12220 #line 12221 "configure"
12221 #include "confdefs.h"
12222
12223 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
12224 #include <sys/types.h>
12225 #else
12226 __COMPILE_ERROR_
12227 #endif
12228
12229 int main() {
12230 int i
12231 ; return 0; }
12232 EOF
12233 if { (eval echo configure:12234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12234   rm -rf conftest*
12235   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
12236 else
12237   echo "configure: failed program was:" >&5
12238   cat conftest.$ac_ext >&5
12239   rm -rf conftest*
12240   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
12241 fi
12242 rm -f conftest*
12243 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
12244     cat >> confdefs.h <<\EOF
12245 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
12246 EOF
12247
12248 fi
12249 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
12250
12251 # Check whether --with-spinlocks or --without-spinlocks was given.
12252 if test "${with_spinlocks+set}" = set; then
12253   withval="$with_spinlocks"
12254   :
12255 fi
12256
12257 if test "x$with_spinlocks" = "xyes"; then
12258     cat >> confdefs.h <<\EOF
12259 #define USE_SPINLOCKS 1
12260 EOF
12261
12262
12263     case "$host_cpu" in
12264         sparc)
12265             cat >> confdefs.h <<\EOF
12266 #define SPARC_SPINLOCKS 1
12267 EOF
12268
12269             ;;
12270
12271         i386|i486|i586|i686)
12272             cat >> confdefs.h <<\EOF
12273 #define INTEL_SPINLOCKS 1
12274 EOF
12275
12276             ;;
12277
12278         mips)
12279             cat >> confdefs.h <<\EOF
12280 #define MIPS_SPINLOCKS 1
12281 EOF
12282
12283             ;;
12284
12285         powerpc)
12286             cat >> confdefs.h <<\EOF
12287 #define POWERPC_SPINLOCKS 1
12288 EOF
12289
12290             ;;
12291     esac
12292 fi
12293
12294 #################################################
12295 # check for ACL support
12296
12297 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
12298 echo "configure:12299: checking whether to support ACLs" >&5
12299 # Check whether --with-acl-support or --without-acl-support was given.
12300 if test "${with_acl_support+set}" = set; then
12301   withval="$with_acl_support"
12302    case "$withval" in
12303   yes)
12304
12305         case "$host_os" in
12306         *sysv5*)
12307             echo "$ac_t""Using UnixWare ACLs" 1>&6
12308             cat >> confdefs.h <<\EOF
12309 #define HAVE_UNIXWARE_ACLS 1
12310 EOF
12311
12312             ;;
12313         *solaris*)
12314             echo "$ac_t""Using solaris ACLs" 1>&6
12315             cat >> confdefs.h <<\EOF
12316 #define HAVE_SOLARIS_ACLS 1
12317 EOF
12318
12319             ;;
12320                 *irix*)
12321                         echo "$ac_t""Using IRIX ACLs" 1>&6
12322                         cat >> confdefs.h <<\EOF
12323 #define HAVE_IRIX_ACLS 1
12324 EOF
12325
12326                         ;;
12327                 *aix*)
12328                         echo "$ac_t""Using AIX ACLs" 1>&6
12329                         cat >> confdefs.h <<\EOF
12330 #define HAVE_AIX_ACLS 1
12331 EOF
12332
12333                         ;;
12334                 *osf*)
12335                         echo "$ac_t""Using Tru64 ACLs" 1>&6
12336                         cat >> confdefs.h <<\EOF
12337 #define HAVE_TRU64_ACLS 1
12338 EOF
12339
12340                         LIBS="$LIBS -lpacl"
12341                         ;;
12342         *)
12343                         echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
12344 echo "configure:12345: checking for acl_get_file in -lacl" >&5
12345 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
12346 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12347   echo $ac_n "(cached) $ac_c" 1>&6
12348 else
12349   ac_save_LIBS="$LIBS"
12350 LIBS="-lacl  $LIBS"
12351 cat > conftest.$ac_ext <<EOF
12352 #line 12353 "configure"
12353 #include "confdefs.h"
12354 /* Override any gcc2 internal prototype to avoid an error.  */
12355 /* We use char because int might match the return type of a gcc2
12356     builtin and then its argument prototype would still apply.  */
12357 char acl_get_file();
12358
12359 int main() {
12360 acl_get_file()
12361 ; return 0; }
12362 EOF
12363 if { (eval echo configure:12364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12364   rm -rf conftest*
12365   eval "ac_cv_lib_$ac_lib_var=yes"
12366 else
12367   echo "configure: failed program was:" >&5
12368   cat conftest.$ac_ext >&5
12369   rm -rf conftest*
12370   eval "ac_cv_lib_$ac_lib_var=no"
12371 fi
12372 rm -f conftest*
12373 LIBS="$ac_save_LIBS"
12374
12375 fi
12376 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12377   echo "$ac_t""yes" 1>&6
12378     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12379     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12380   cat >> confdefs.h <<EOF
12381 #define $ac_tr_lib 1
12382 EOF
12383
12384   LIBS="-lacl $LIBS"
12385
12386 else
12387   echo "$ac_t""no" 1>&6
12388 fi
12389
12390                         echo $ac_n "checking for ACL support""... $ac_c" 1>&6
12391 echo "configure:12392: checking for ACL support" >&5
12392 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
12393   echo $ac_n "(cached) $ac_c" 1>&6
12394 else
12395   
12396                         cat > conftest.$ac_ext <<EOF
12397 #line 12398 "configure"
12398 #include "confdefs.h"
12399 #include <sys/types.h>
12400 #include <sys/acl.h>
12401 int main() {
12402  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
12403 ; return 0; }
12404 EOF
12405 if { (eval echo configure:12406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12406   rm -rf conftest*
12407   samba_cv_HAVE_POSIX_ACLS=yes
12408 else
12409   echo "configure: failed program was:" >&5
12410   cat conftest.$ac_ext >&5
12411   rm -rf conftest*
12412   samba_cv_HAVE_POSIX_ACLS=no
12413 fi
12414 rm -f conftest*
12415 fi
12416
12417 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
12418                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
12419                                 echo "$ac_t""Using posix ACLs" 1>&6
12420                                 cat >> confdefs.h <<\EOF
12421 #define HAVE_POSIX_ACLS 1
12422 EOF
12423
12424                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
12425 echo "configure:12426: checking for acl_get_perm_np" >&5
12426 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
12427   echo $ac_n "(cached) $ac_c" 1>&6
12428 else
12429   
12430                                 cat > conftest.$ac_ext <<EOF
12431 #line 12432 "configure"
12432 #include "confdefs.h"
12433 #include <sys/types.h>
12434 #include <sys/acl.h>
12435 int main() {
12436  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
12437 ; return 0; }
12438 EOF
12439 if { (eval echo configure:12440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12440   rm -rf conftest*
12441   samba_cv_HAVE_ACL_GET_PERM_NP=yes
12442 else
12443   echo "configure: failed program was:" >&5
12444   cat conftest.$ac_ext >&5
12445   rm -rf conftest*
12446   samba_cv_HAVE_ACL_GET_PERM_NP=no
12447 fi
12448 rm -f conftest*
12449 fi
12450
12451 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
12452                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
12453                                         cat >> confdefs.h <<\EOF
12454 #define HAVE_ACL_GET_PERM_NP 1
12455 EOF
12456
12457                                 fi
12458                         fi
12459             ;;
12460         esac
12461         ;;
12462   *)
12463     echo "$ac_t""no" 1>&6
12464     cat >> confdefs.h <<\EOF
12465 #define HAVE_NO_ACLS 1
12466 EOF
12467
12468     ;;
12469   esac 
12470 else
12471   cat >> confdefs.h <<\EOF
12472 #define HAVE_NO_ACLS 1
12473 EOF
12474
12475   echo "$ac_t""no" 1>&6
12476
12477 fi
12478
12479
12480 #################################################
12481 # Check whether winbind is supported on this platform.  If so we need to
12482 # build and install client programs (WINBIND_TARGETS), sbin programs
12483 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
12484
12485 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
12486 echo "configure:12487: checking whether to build winbind" >&5
12487
12488 # Initially, the value of $host_os decides whether winbind is supported
12489
12490 case "$host_os" in 
12491         *linux*|*solaris*)
12492                 HAVE_WINBIND=yes
12493                 ;;
12494         *)
12495                 HAVE_WINBIND=no
12496                 winbind_no_reason=", unsupported on $host_os"
12497                 ;;
12498 esac
12499
12500 # Check the setting of --with-winbindd
12501
12502 # Check whether --with-winbind or --without-winbind was given.
12503 if test "${with_winbind+set}" = set; then
12504   withval="$with_winbind"
12505    
12506   case "$withval" in
12507         yes)
12508                 HAVE_WINBIND=yes
12509                 ;;
12510         no)
12511                 HAVE_WINBIND=no
12512                 winbind_reason=""
12513                 ;;
12514   esac 
12515 fi
12516
12517
12518 # We need unix domain sockets for winbind
12519
12520 if test x"$HAVE_WINBIND" = x"yes"; then
12521         if test x"$samba_cv_unixsocket" = x"no"; then
12522                 winbind_no_reason=", no unix domain socket support on $host_os"
12523                 HAVE_WINBIND=no
12524         fi
12525 fi
12526
12527 # Display test results
12528
12529 if test x"$HAVE_WINBIND" = x"yes"; then
12530
12531         echo "$ac_t""yes" 1>&6
12532
12533         WINBIND_TARGETS="\$(WINBIND_PROGS)"
12534         WINBIND_STARGETS="\$(WINBIND_SPROGS)"
12535         WINBIND_LTARGETS="\$(WINBIND_LPROGS)"
12536
12537         case "$with_pam" in
12538                 yes)
12539                         WINBIND_PAM_PROGS="\$(WINBIND_PAM_PROGS)"
12540                 ;;
12541         esac
12542 else
12543         echo "$ac_t""no$winbind_no_reason" 1>&6
12544
12545         WINBIND_TARGETS=""
12546         WINBIND_STARGETS=""
12547         WINBIND_LTARGETS=""
12548         WINBIND_PAM_PROGS=""
12549 fi
12550
12551 # Substitution time!
12552
12553
12554
12555
12556
12557
12558 #################################################
12559 # final configure stuff
12560
12561 echo "checking configure summary"
12562 if test "$cross_compiling" = yes; then
12563   :
12564 else
12565   cat > conftest.$ac_ext <<EOF
12566 #line 12567 "configure"
12567 #include "confdefs.h"
12568 #include "${srcdir-.}/tests/summary.c"
12569 EOF
12570 if { (eval echo configure:12571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12571 then
12572   echo "configure OK";
12573 else
12574   echo "configure: failed program was:" >&5
12575   cat conftest.$ac_ext >&5
12576   rm -fr conftest*
12577   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
12578 fi
12579 rm -fr conftest*
12580 fi
12581
12582
12583 builddir=`pwd`
12584
12585
12586 trap '' 1 2 15
12587 cat > confcache <<\EOF
12588 # This file is a shell script that caches the results of configure
12589 # tests run on this system so they can be shared between configure
12590 # scripts and configure runs.  It is not useful on other systems.
12591 # If it contains results you don't want to keep, you may remove or edit it.
12592 #
12593 # By default, configure uses ./config.cache as the cache file,
12594 # creating it if it does not exist already.  You can give configure
12595 # the --cache-file=FILE option to use a different cache file; that is
12596 # what configure does when it calls configure scripts in
12597 # subdirectories, so they share the cache.
12598 # Giving --cache-file=/dev/null disables caching, for debugging configure.
12599 # config.status only pays attention to the cache file if you give it the
12600 # --recheck option to rerun configure.
12601 #
12602 EOF
12603 # The following way of writing the cache mishandles newlines in values,
12604 # but we know of no workaround that is simple, portable, and efficient.
12605 # So, don't put newlines in cache variables' values.
12606 # Ultrix sh set writes to stderr and can't be redirected directly,
12607 # and sets the high bit in the cache file unless we assign to the vars.
12608 (set) 2>&1 |
12609   case `(ac_space=' '; set | grep ac_space) 2>&1` in
12610   *ac_space=\ *)
12611     # `set' does not quote correctly, so add quotes (double-quote substitution
12612     # turns \\\\ into \\, and sed turns \\ into \).
12613     sed -n \
12614       -e "s/'/'\\\\''/g" \
12615       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
12616     ;;
12617   *)
12618     # `set' quotes correctly as required by POSIX, so do not add quotes.
12619     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
12620     ;;
12621   esac >> confcache
12622 if cmp -s $cache_file confcache; then
12623   :
12624 else
12625   if test -w $cache_file; then
12626     echo "updating cache $cache_file"
12627     cat confcache > $cache_file
12628   else
12629     echo "not updating unwritable cache $cache_file"
12630   fi
12631 fi
12632 rm -f confcache
12633
12634 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12635
12636 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12637 # Let make expand exec_prefix.
12638 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12639
12640 # Any assignment to VPATH causes Sun make to only execute
12641 # the first set of double-colon rules, so remove it if not needed.
12642 # If there is a colon in the path, we need to keep it.
12643 if test "x$srcdir" = x.; then
12644   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12645 fi
12646
12647 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12648
12649 DEFS=-DHAVE_CONFIG_H
12650
12651 # Without the "./", some shells look in PATH for config.status.
12652 : ${CONFIG_STATUS=./config.status}
12653
12654 echo creating $CONFIG_STATUS
12655 rm -f $CONFIG_STATUS
12656 cat > $CONFIG_STATUS <<EOF
12657 #! /bin/sh
12658 # Generated automatically by configure.
12659 # Run this file to recreate the current configuration.
12660 # This directory was configured as follows,
12661 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12662 #
12663 # $0 $ac_configure_args
12664 #
12665 # Compiler output produced by configure, useful for debugging
12666 # configure, is in ./config.log if it exists.
12667
12668 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12669 for ac_option
12670 do
12671   case "\$ac_option" in
12672   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12673     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12674     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12675   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12676     echo "$CONFIG_STATUS generated by autoconf version 2.13"
12677     exit 0 ;;
12678   -help | --help | --hel | --he | --h)
12679     echo "\$ac_cs_usage"; exit 0 ;;
12680   *) echo "\$ac_cs_usage"; exit 1 ;;
12681   esac
12682 done
12683
12684 ac_given_srcdir=$srcdir
12685 ac_given_INSTALL="$INSTALL"
12686
12687 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12688 EOF
12689 cat >> $CONFIG_STATUS <<EOF
12690
12691 # Protect against being on the right side of a sed subst in config.status.
12692 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12693  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12694 $ac_vpsub
12695 $extrasub
12696 s%@SHELL@%$SHELL%g
12697 s%@CFLAGS@%$CFLAGS%g
12698 s%@CPPFLAGS@%$CPPFLAGS%g
12699 s%@CXXFLAGS@%$CXXFLAGS%g
12700 s%@FFLAGS@%$FFLAGS%g
12701 s%@DEFS@%$DEFS%g
12702 s%@LDFLAGS@%$LDFLAGS%g
12703 s%@LIBS@%$LIBS%g
12704 s%@exec_prefix@%$exec_prefix%g
12705 s%@prefix@%$prefix%g
12706 s%@program_transform_name@%$program_transform_name%g
12707 s%@bindir@%$bindir%g
12708 s%@sbindir@%$sbindir%g
12709 s%@libexecdir@%$libexecdir%g
12710 s%@datadir@%$datadir%g
12711 s%@sysconfdir@%$sysconfdir%g
12712 s%@sharedstatedir@%$sharedstatedir%g
12713 s%@localstatedir@%$localstatedir%g
12714 s%@libdir@%$libdir%g
12715 s%@includedir@%$includedir%g
12716 s%@oldincludedir@%$oldincludedir%g
12717 s%@infodir@%$infodir%g
12718 s%@mandir@%$mandir%g
12719 s%@RUNPROG@%$RUNPROG%g
12720 s%@MPROGS@%$MPROGS%g
12721 s%@LDSHFLAGS@%$LDSHFLAGS%g
12722 s%@SHLD@%$SHLD%g
12723 s%@HOST_OS@%$HOST_OS%g
12724 s%@PAM_MOD@%$PAM_MOD%g
12725 s%@WRAP@%$WRAP%g
12726 s%@WRAP32@%$WRAP32%g
12727 s%@PICFLAG@%$PICFLAG%g
12728 s%@PICSUFFIX@%$PICSUFFIX%g
12729 s%@POBAD_CC@%$POBAD_CC%g
12730 s%@SHLIBEXT@%$SHLIBEXT%g
12731 s%@BLDSHARED@%$BLDSHARED%g
12732 s%@CC@%$CC%g
12733 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12734 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
12735 s%@INSTALL_DATA@%$INSTALL_DATA%g
12736 s%@AWK@%$AWK%g
12737 s%@BROKEN_CC@%$BROKEN_CC%g
12738 s%@host@%$host%g
12739 s%@host_alias@%$host_alias%g
12740 s%@host_cpu@%$host_cpu%g
12741 s%@host_vendor@%$host_vendor%g
12742 s%@host_os@%$host_os%g
12743 s%@target@%$target%g
12744 s%@target_alias@%$target_alias%g
12745 s%@target_cpu@%$target_cpu%g
12746 s%@target_vendor@%$target_vendor%g
12747 s%@target_os@%$target_os%g
12748 s%@build@%$build%g
12749 s%@build_alias@%$build_alias%g
12750 s%@build_cpu@%$build_cpu%g
12751 s%@build_vendor@%$build_vendor%g
12752 s%@build_os@%$build_os%g
12753 s%@CPP@%$CPP%g
12754 s%@LIBOBJS@%$LIBOBJS%g
12755 s%@TERMLIBS@%$TERMLIBS%g
12756 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
12757 s%@ROFF@%$ROFF%g
12758 s%@QUOTAOBJS@%$QUOTAOBJS%g
12759 s%@privatedir@%$privatedir%g
12760 s%@lockdir@%$lockdir%g
12761 s%@swatdir@%$swatdir%g
12762 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
12763 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
12764 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
12765 s%@WINBIND_PAM_PROGS@%$WINBIND_PAM_PROGS%g
12766 s%@builddir@%$builddir%g
12767
12768 CEOF
12769 EOF
12770
12771 cat >> $CONFIG_STATUS <<\EOF
12772
12773 # Split the substitutions into bite-sized pieces for seds with
12774 # small command number limits, like on Digital OSF/1 and HP-UX.
12775 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
12776 ac_file=1 # Number of current file.
12777 ac_beg=1 # First line for current file.
12778 ac_end=$ac_max_sed_cmds # Line after last line for current file.
12779 ac_more_lines=:
12780 ac_sed_cmds=""
12781 while $ac_more_lines; do
12782   if test $ac_beg -gt 1; then
12783     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
12784   else
12785     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
12786   fi
12787   if test ! -s conftest.s$ac_file; then
12788     ac_more_lines=false
12789     rm -f conftest.s$ac_file
12790   else
12791     if test -z "$ac_sed_cmds"; then
12792       ac_sed_cmds="sed -f conftest.s$ac_file"
12793     else
12794       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
12795     fi
12796     ac_file=`expr $ac_file + 1`
12797     ac_beg=$ac_end
12798     ac_end=`expr $ac_end + $ac_max_sed_cmds`
12799   fi
12800 done
12801 if test -z "$ac_sed_cmds"; then
12802   ac_sed_cmds=cat
12803 fi
12804 EOF
12805
12806 cat >> $CONFIG_STATUS <<EOF
12807
12808 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
12809 EOF
12810 cat >> $CONFIG_STATUS <<\EOF
12811 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
12812   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12813   case "$ac_file" in
12814   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12815        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12816   *) ac_file_in="${ac_file}.in" ;;
12817   esac
12818
12819   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
12820
12821   # Remove last slash and all that follows it.  Not all systems have dirname.
12822   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12823   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12824     # The file is in a subdirectory.
12825     test ! -d "$ac_dir" && mkdir "$ac_dir"
12826     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
12827     # A "../" for each directory in $ac_dir_suffix.
12828     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
12829   else
12830     ac_dir_suffix= ac_dots=
12831   fi
12832
12833   case "$ac_given_srcdir" in
12834   .)  srcdir=.
12835       if test -z "$ac_dots"; then top_srcdir=.
12836       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
12837   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
12838   *) # Relative path.
12839     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
12840     top_srcdir="$ac_dots$ac_given_srcdir" ;;
12841   esac
12842
12843   case "$ac_given_INSTALL" in
12844   [/$]*) INSTALL="$ac_given_INSTALL" ;;
12845   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
12846   esac
12847
12848   echo creating "$ac_file"
12849   rm -f "$ac_file"
12850   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
12851   case "$ac_file" in
12852   *Makefile*) ac_comsub="1i\\
12853 # $configure_input" ;;
12854   *) ac_comsub= ;;
12855   esac
12856
12857   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12858   sed -e "$ac_comsub
12859 s%@configure_input@%$configure_input%g
12860 s%@srcdir@%$srcdir%g
12861 s%@top_srcdir@%$top_srcdir%g
12862 s%@INSTALL@%$INSTALL%g
12863 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
12864 fi; done
12865 rm -f conftest.s*
12866
12867 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12868 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12869 #
12870 # ac_d sets the value in "#define NAME VALUE" lines.
12871 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12872 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
12873 ac_dC='\3'
12874 ac_dD='%g'
12875 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12876 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12877 ac_uB='\([      ]\)%\1#\2define\3'
12878 ac_uC=' '
12879 ac_uD='\4%g'
12880 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12881 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12882 ac_eB='$%\1#\2define\3'
12883 ac_eC=' '
12884 ac_eD='%g'
12885
12886 if test "${CONFIG_HEADERS+set}" != set; then
12887 EOF
12888 cat >> $CONFIG_STATUS <<EOF
12889   CONFIG_HEADERS="include/config.h"
12890 EOF
12891 cat >> $CONFIG_STATUS <<\EOF
12892 fi
12893 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
12894   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12895   case "$ac_file" in
12896   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12897        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12898   *) ac_file_in="${ac_file}.in" ;;
12899   esac
12900
12901   echo creating $ac_file
12902
12903   rm -f conftest.frag conftest.in conftest.out
12904   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12905   cat $ac_file_inputs > conftest.in
12906
12907 EOF
12908
12909 # Transform confdefs.h into a sed script conftest.vals that substitutes
12910 # the proper values into config.h.in to produce config.h.  And first:
12911 # Protect against being on the right side of a sed subst in config.status.
12912 # Protect against being in an unquoted here document in config.status.
12913 rm -f conftest.vals
12914 cat > conftest.hdr <<\EOF
12915 s/[\\&%]/\\&/g
12916 s%[\\$`]%\\&%g
12917 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
12918 s%ac_d%ac_u%gp
12919 s%ac_u%ac_e%gp
12920 EOF
12921 sed -n -f conftest.hdr confdefs.h > conftest.vals
12922 rm -f conftest.hdr
12923
12924 # This sed command replaces #undef with comments.  This is necessary, for
12925 # example, in the case of _POSIX_SOURCE, which is predefined and required
12926 # on some systems where configure will not decide to define it.
12927 cat >> conftest.vals <<\EOF
12928 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
12929 EOF
12930
12931 # Break up conftest.vals because some shells have a limit on
12932 # the size of here documents, and old seds have small limits too.
12933
12934 rm -f conftest.tail
12935 while :
12936 do
12937   ac_lines=`grep -c . conftest.vals`
12938   # grep -c gives empty output for an empty file on some AIX systems.
12939   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
12940   # Write a limited-size here document to conftest.frag.
12941   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
12942   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
12943   echo 'CEOF
12944   sed -f conftest.frag conftest.in > conftest.out
12945   rm -f conftest.in
12946   mv conftest.out conftest.in
12947 ' >> $CONFIG_STATUS
12948   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12949   rm -f conftest.vals
12950   mv conftest.tail conftest.vals
12951 done
12952 rm -f conftest.vals
12953
12954 cat >> $CONFIG_STATUS <<\EOF
12955   rm -f conftest.frag conftest.h
12956   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
12957   cat conftest.in >> conftest.h
12958   rm -f conftest.in
12959   if cmp -s $ac_file conftest.h 2>/dev/null; then
12960     echo "$ac_file is unchanged"
12961     rm -f conftest.h
12962   else
12963     # Remove last slash and all that follows it.  Not all systems have dirname.
12964       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12965       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12966       # The file is in a subdirectory.
12967       test ! -d "$ac_dir" && mkdir "$ac_dir"
12968     fi
12969     rm -f $ac_file
12970     mv conftest.h $ac_file
12971   fi
12972 fi; done
12973
12974 EOF
12975 cat >> $CONFIG_STATUS <<EOF
12976
12977 EOF
12978 cat >> $CONFIG_STATUS <<\EOF
12979
12980 exit 0
12981 EOF
12982 chmod +x $CONFIG_STATUS
12983 rm -fr confdefs* $ac_clean_files
12984 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
12985