Change the description on --with-pam_smbpass to make it clearer - some peope
[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-msdfs            Include MS Dfs support (default=no)"
58 ac_help="$ac_help
59   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
60 ac_help="$ac_help
61   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
62 ac_help="$ac_help
63   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
64 ac_help="$ac_help
65   --with-spinlocks        Use spin locks instead of fcntl locks (default=no) "
66 ac_help="$ac_help
67   --with-acl-support      Include ACL support (default=no)"
68 ac_help="$ac_help
69   --with-winbind          Build winbind (default, if supported by OS)"
70
71 # Initialize some variables set by options.
72 # The variables have the same names as the options, with
73 # dashes changed to underlines.
74 build=NONE
75 cache_file=./config.cache
76 exec_prefix=NONE
77 host=NONE
78 no_create=
79 nonopt=NONE
80 no_recursion=
81 prefix=NONE
82 program_prefix=NONE
83 program_suffix=NONE
84 program_transform_name=s,x,x,
85 silent=
86 site=
87 srcdir=
88 target=NONE
89 verbose=
90 x_includes=NONE
91 x_libraries=NONE
92 bindir='${exec_prefix}/bin'
93 sbindir='${exec_prefix}/sbin'
94 libexecdir='${exec_prefix}/libexec'
95 datadir='${prefix}/share'
96 sysconfdir='${prefix}/etc'
97 sharedstatedir='${prefix}/com'
98 localstatedir='${prefix}/var'
99 libdir='${exec_prefix}/lib'
100 includedir='${prefix}/include'
101 oldincludedir='/usr/include'
102 infodir='${prefix}/info'
103 mandir='${prefix}/man'
104
105 # Initialize some other variables.
106 subdirs=
107 MFLAGS= MAKEFLAGS=
108 SHELL=${CONFIG_SHELL-/bin/sh}
109 # Maximum number of lines to put in a shell here document.
110 ac_max_here_lines=12
111
112 ac_prev=
113 for ac_option
114 do
115
116   # If the previous option needs an argument, assign it.
117   if test -n "$ac_prev"; then
118     eval "$ac_prev=\$ac_option"
119     ac_prev=
120     continue
121   fi
122
123   case "$ac_option" in
124   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
125   *) ac_optarg= ;;
126   esac
127
128   # Accept the important Cygnus configure options, so we can diagnose typos.
129
130   case "$ac_option" in
131
132   -bindir | --bindir | --bindi | --bind | --bin | --bi)
133     ac_prev=bindir ;;
134   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
135     bindir="$ac_optarg" ;;
136
137   -build | --build | --buil | --bui | --bu)
138     ac_prev=build ;;
139   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
140     build="$ac_optarg" ;;
141
142   -cache-file | --cache-file | --cache-fil | --cache-fi \
143   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
144     ac_prev=cache_file ;;
145   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
146   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
147     cache_file="$ac_optarg" ;;
148
149   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
150     ac_prev=datadir ;;
151   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
152   | --da=*)
153     datadir="$ac_optarg" ;;
154
155   -disable-* | --disable-*)
156     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
157     # Reject names that are not valid shell variable names.
158     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
159       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
160     fi
161     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
162     eval "enable_${ac_feature}=no" ;;
163
164   -enable-* | --enable-*)
165     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
166     # Reject names that are not valid shell variable names.
167     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
168       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
169     fi
170     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
171     case "$ac_option" in
172       *=*) ;;
173       *) ac_optarg=yes ;;
174     esac
175     eval "enable_${ac_feature}='$ac_optarg'" ;;
176
177   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
178   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
179   | --exec | --exe | --ex)
180     ac_prev=exec_prefix ;;
181   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
182   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
183   | --exec=* | --exe=* | --ex=*)
184     exec_prefix="$ac_optarg" ;;
185
186   -gas | --gas | --ga | --g)
187     # Obsolete; use --with-gas.
188     with_gas=yes ;;
189
190   -help | --help | --hel | --he)
191     # Omit some internal or obsolete options to make the list less imposing.
192     # This message is too long to be a string in the A/UX 3.1 sh.
193     cat << EOF
194 Usage: configure [options] [host]
195 Options: [defaults in brackets after descriptions]
196 Configuration:
197   --cache-file=FILE       cache test results in FILE
198   --help                  print this message
199   --no-create             do not create output files
200   --quiet, --silent       do not print \`checking...' messages
201   --version               print the version of autoconf that created configure
202 Directory and file names:
203   --prefix=PREFIX         install architecture-independent files in PREFIX
204                           [$ac_default_prefix]
205   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
206                           [same as prefix]
207   --bindir=DIR            user executables in DIR [EPREFIX/bin]
208   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
209   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
210   --datadir=DIR           read-only architecture-independent data in DIR
211                           [PREFIX/share]
212   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
213   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
214                           [PREFIX/com]
215   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
216   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
217   --includedir=DIR        C header files in DIR [PREFIX/include]
218   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
219   --infodir=DIR           info documentation in DIR [PREFIX/info]
220   --mandir=DIR            man documentation in DIR [PREFIX/man]
221   --srcdir=DIR            find the sources in DIR [configure dir or ..]
222   --program-prefix=PREFIX prepend PREFIX to installed program names
223   --program-suffix=SUFFIX append SUFFIX to installed program names
224   --program-transform-name=PROGRAM
225                           run sed PROGRAM on installed program names
226 EOF
227     cat << EOF
228 Host type:
229   --build=BUILD           configure for building on BUILD [BUILD=HOST]
230   --host=HOST             configure for HOST [guessed]
231   --target=TARGET         configure for TARGET [TARGET=HOST]
232 Features and packages:
233   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
234   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
235   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
236   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
237   --x-includes=DIR        X include files are in DIR
238   --x-libraries=DIR       X library files are in DIR
239 EOF
240     if test -n "$ac_help"; then
241       echo "--enable and --with options recognized:$ac_help"
242     fi
243     exit 0 ;;
244
245   -host | --host | --hos | --ho)
246     ac_prev=host ;;
247   -host=* | --host=* | --hos=* | --ho=*)
248     host="$ac_optarg" ;;
249
250   -includedir | --includedir | --includedi | --included | --include \
251   | --includ | --inclu | --incl | --inc)
252     ac_prev=includedir ;;
253   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
254   | --includ=* | --inclu=* | --incl=* | --inc=*)
255     includedir="$ac_optarg" ;;
256
257   -infodir | --infodir | --infodi | --infod | --info | --inf)
258     ac_prev=infodir ;;
259   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
260     infodir="$ac_optarg" ;;
261
262   -libdir | --libdir | --libdi | --libd)
263     ac_prev=libdir ;;
264   -libdir=* | --libdir=* | --libdi=* | --libd=*)
265     libdir="$ac_optarg" ;;
266
267   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
268   | --libexe | --libex | --libe)
269     ac_prev=libexecdir ;;
270   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
271   | --libexe=* | --libex=* | --libe=*)
272     libexecdir="$ac_optarg" ;;
273
274   -localstatedir | --localstatedir | --localstatedi | --localstated \
275   | --localstate | --localstat | --localsta | --localst \
276   | --locals | --local | --loca | --loc | --lo)
277     ac_prev=localstatedir ;;
278   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
279   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
280   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
281     localstatedir="$ac_optarg" ;;
282
283   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
284     ac_prev=mandir ;;
285   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
286     mandir="$ac_optarg" ;;
287
288   -nfp | --nfp | --nf)
289     # Obsolete; use --without-fp.
290     with_fp=no ;;
291
292   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
293   | --no-cr | --no-c)
294     no_create=yes ;;
295
296   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
297   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
298     no_recursion=yes ;;
299
300   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
301   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
302   | --oldin | --oldi | --old | --ol | --o)
303     ac_prev=oldincludedir ;;
304   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
305   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
306   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
307     oldincludedir="$ac_optarg" ;;
308
309   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
310     ac_prev=prefix ;;
311   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
312     prefix="$ac_optarg" ;;
313
314   -program-prefix | --program-prefix | --program-prefi | --program-pref \
315   | --program-pre | --program-pr | --program-p)
316     ac_prev=program_prefix ;;
317   -program-prefix=* | --program-prefix=* | --program-prefi=* \
318   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
319     program_prefix="$ac_optarg" ;;
320
321   -program-suffix | --program-suffix | --program-suffi | --program-suff \
322   | --program-suf | --program-su | --program-s)
323     ac_prev=program_suffix ;;
324   -program-suffix=* | --program-suffix=* | --program-suffi=* \
325   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
326     program_suffix="$ac_optarg" ;;
327
328   -program-transform-name | --program-transform-name \
329   | --program-transform-nam | --program-transform-na \
330   | --program-transform-n | --program-transform- \
331   | --program-transform | --program-transfor \
332   | --program-transfo | --program-transf \
333   | --program-trans | --program-tran \
334   | --progr-tra | --program-tr | --program-t)
335     ac_prev=program_transform_name ;;
336   -program-transform-name=* | --program-transform-name=* \
337   | --program-transform-nam=* | --program-transform-na=* \
338   | --program-transform-n=* | --program-transform-=* \
339   | --program-transform=* | --program-transfor=* \
340   | --program-transfo=* | --program-transf=* \
341   | --program-trans=* | --program-tran=* \
342   | --progr-tra=* | --program-tr=* | --program-t=*)
343     program_transform_name="$ac_optarg" ;;
344
345   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
346   | -silent | --silent | --silen | --sile | --sil)
347     silent=yes ;;
348
349   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
350     ac_prev=sbindir ;;
351   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
352   | --sbi=* | --sb=*)
353     sbindir="$ac_optarg" ;;
354
355   -sharedstatedir | --sharedstatedir | --sharedstatedi \
356   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
357   | --sharedst | --shareds | --shared | --share | --shar \
358   | --sha | --sh)
359     ac_prev=sharedstatedir ;;
360   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
361   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
362   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
363   | --sha=* | --sh=*)
364     sharedstatedir="$ac_optarg" ;;
365
366   -site | --site | --sit)
367     ac_prev=site ;;
368   -site=* | --site=* | --sit=*)
369     site="$ac_optarg" ;;
370
371   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
372     ac_prev=srcdir ;;
373   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
374     srcdir="$ac_optarg" ;;
375
376   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
377   | --syscon | --sysco | --sysc | --sys | --sy)
378     ac_prev=sysconfdir ;;
379   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
380   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
381     sysconfdir="$ac_optarg" ;;
382
383   -target | --target | --targe | --targ | --tar | --ta | --t)
384     ac_prev=target ;;
385   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
386     target="$ac_optarg" ;;
387
388   -v | -verbose | --verbose | --verbos | --verbo | --verb)
389     verbose=yes ;;
390
391   -version | --version | --versio | --versi | --vers)
392     echo "configure generated by autoconf version 2.13"
393     exit 0 ;;
394
395   -with-* | --with-*)
396     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
397     # Reject names that are not valid shell variable names.
398     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
399       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
400     fi
401     ac_package=`echo $ac_package| sed 's/-/_/g'`
402     case "$ac_option" in
403       *=*) ;;
404       *) ac_optarg=yes ;;
405     esac
406     eval "with_${ac_package}='$ac_optarg'" ;;
407
408   -without-* | --without-*)
409     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
410     # Reject names that are not valid shell variable names.
411     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
412       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
413     fi
414     ac_package=`echo $ac_package| sed 's/-/_/g'`
415     eval "with_${ac_package}=no" ;;
416
417   --x)
418     # Obsolete; use --with-x.
419     with_x=yes ;;
420
421   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
422   | --x-incl | --x-inc | --x-in | --x-i)
423     ac_prev=x_includes ;;
424   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
425   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
426     x_includes="$ac_optarg" ;;
427
428   -x-libraries | --x-libraries | --x-librarie | --x-librari \
429   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
430     ac_prev=x_libraries ;;
431   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
432   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
433     x_libraries="$ac_optarg" ;;
434
435   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
436     ;;
437
438   *)
439     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
440       echo "configure: warning: $ac_option: invalid host type" 1>&2
441     fi
442     if test "x$nonopt" != xNONE; then
443       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
444     fi
445     nonopt="$ac_option"
446     ;;
447
448   esac
449 done
450
451 if test -n "$ac_prev"; then
452   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
453 fi
454
455 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
456
457 # File descriptor usage:
458 # 0 standard input
459 # 1 file creation
460 # 2 errors and warnings
461 # 3 some systems may open it to /dev/tty
462 # 4 used on the Kubota Titan
463 # 6 checking for... messages and results
464 # 5 compiler messages saved in config.log
465 if test "$silent" = yes; then
466   exec 6>/dev/null
467 else
468   exec 6>&1
469 fi
470 exec 5>./config.log
471
472 echo "\
473 This file contains any messages produced by compilers while
474 running configure, to aid debugging if configure makes a mistake.
475 " 1>&5
476
477 # Strip out --no-create and --no-recursion so they do not pile up.
478 # Also quote any args containing shell metacharacters.
479 ac_configure_args=
480 for ac_arg
481 do
482   case "$ac_arg" in
483   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
484   | --no-cr | --no-c) ;;
485   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
486   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
487   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
488   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
489   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
490   esac
491 done
492
493 # NLS nuisances.
494 # Only set these to C if already set.  These must not be set unconditionally
495 # because not all systems understand e.g. LANG=C (notably SCO).
496 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
497 # Non-C LC_CTYPE values break the ctype check.
498 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
499 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
500 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
501 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
502
503 # confdefs.h avoids OS command line length limits that DEFS can exceed.
504 rm -rf conftest* confdefs.h
505 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
506 echo > confdefs.h
507
508 # A filename unique to this package, relative to the directory that
509 # configure is in, which we can look for to find out if srcdir is correct.
510 ac_unique_file=include/includes.h
511
512 # Find the source files, if location was not specified.
513 if test -z "$srcdir"; then
514   ac_srcdir_defaulted=yes
515   # Try the directory containing this script, then its parent.
516   ac_prog=$0
517   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
518   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
519   srcdir=$ac_confdir
520   if test ! -r $srcdir/$ac_unique_file; then
521     srcdir=..
522   fi
523 else
524   ac_srcdir_defaulted=no
525 fi
526 if test ! -r $srcdir/$ac_unique_file; then
527   if test "$ac_srcdir_defaulted" = yes; then
528     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
529   else
530     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
531   fi
532 fi
533 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
534
535 # Prefer explicitly selected file to automatically selected ones.
536 if test -z "$CONFIG_SITE"; then
537   if test "x$prefix" != xNONE; then
538     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
539   else
540     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
541   fi
542 fi
543 for ac_site_file in $CONFIG_SITE; do
544   if test -r "$ac_site_file"; then
545     echo "loading site script $ac_site_file"
546     . "$ac_site_file"
547   fi
548 done
549
550 if test -r "$cache_file"; then
551   echo "loading cache $cache_file"
552   . $cache_file
553 else
554   echo "creating cache $cache_file"
555   > $cache_file
556 fi
557
558 ac_ext=c
559 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
560 ac_cpp='$CPP $CPPFLAGS'
561 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
562 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
563 cross_compiling=$ac_cv_prog_cc_cross
564
565 ac_exeext=
566 ac_objext=o
567 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
568   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
569   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
570     ac_n= ac_c='
571 ' ac_t='        '
572   else
573     ac_n=-n ac_c= ac_t=
574   fi
575 else
576   ac_n= ac_c='\c' ac_t=
577 fi
578
579
580
581 # we want to be compatibe with older versions of Samba
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599 # compile with optimisation and without debugging by default
600 CFLAGS="-O ${CFLAGS}"
601
602 # Check whether --enable-debug or --disable-debug was given.
603 if test "${enable_debug+set}" = set; then
604   enableval="$enable_debug"
605   if eval "test x$enable_debug = xyes"; then
606         CFLAGS="${CFLAGS} -g"
607     fi
608 fi
609
610
611
612 # Extract the first word of "gcc", so it can be a program name with args.
613 set dummy gcc; ac_word=$2
614 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
615 echo "configure:616: checking for $ac_word" >&5
616 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
617   echo $ac_n "(cached) $ac_c" 1>&6
618 else
619   if test -n "$CC"; then
620   ac_cv_prog_CC="$CC" # Let the user override the test.
621 else
622   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
623   ac_dummy="$PATH"
624   for ac_dir in $ac_dummy; do
625     test -z "$ac_dir" && ac_dir=.
626     if test -f $ac_dir/$ac_word; then
627       ac_cv_prog_CC="gcc"
628       break
629     fi
630   done
631   IFS="$ac_save_ifs"
632 fi
633 fi
634 CC="$ac_cv_prog_CC"
635 if test -n "$CC"; then
636   echo "$ac_t""$CC" 1>&6
637 else
638   echo "$ac_t""no" 1>&6
639 fi
640
641 if test -z "$CC"; then
642   # Extract the first word of "cc", so it can be a program name with args.
643 set dummy cc; ac_word=$2
644 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
645 echo "configure:646: checking for $ac_word" >&5
646 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
647   echo $ac_n "(cached) $ac_c" 1>&6
648 else
649   if test -n "$CC"; then
650   ac_cv_prog_CC="$CC" # Let the user override the test.
651 else
652   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
653   ac_prog_rejected=no
654   ac_dummy="$PATH"
655   for ac_dir in $ac_dummy; do
656     test -z "$ac_dir" && ac_dir=.
657     if test -f $ac_dir/$ac_word; then
658       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
659         ac_prog_rejected=yes
660         continue
661       fi
662       ac_cv_prog_CC="cc"
663       break
664     fi
665   done
666   IFS="$ac_save_ifs"
667 if test $ac_prog_rejected = yes; then
668   # We found a bogon in the path, so make sure we never use it.
669   set dummy $ac_cv_prog_CC
670   shift
671   if test $# -gt 0; then
672     # We chose a different compiler from the bogus one.
673     # However, it has the same basename, so the bogon will be chosen
674     # first if we set CC to just the basename; use the full file name.
675     shift
676     set dummy "$ac_dir/$ac_word" "$@"
677     shift
678     ac_cv_prog_CC="$@"
679   fi
680 fi
681 fi
682 fi
683 CC="$ac_cv_prog_CC"
684 if test -n "$CC"; then
685   echo "$ac_t""$CC" 1>&6
686 else
687   echo "$ac_t""no" 1>&6
688 fi
689
690   if test -z "$CC"; then
691     case "`uname -s`" in
692     *win32* | *WIN32*)
693       # Extract the first word of "cl", so it can be a program name with args.
694 set dummy cl; ac_word=$2
695 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
696 echo "configure:697: checking for $ac_word" >&5
697 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
698   echo $ac_n "(cached) $ac_c" 1>&6
699 else
700   if test -n "$CC"; then
701   ac_cv_prog_CC="$CC" # Let the user override the test.
702 else
703   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
704   ac_dummy="$PATH"
705   for ac_dir in $ac_dummy; do
706     test -z "$ac_dir" && ac_dir=.
707     if test -f $ac_dir/$ac_word; then
708       ac_cv_prog_CC="cl"
709       break
710     fi
711   done
712   IFS="$ac_save_ifs"
713 fi
714 fi
715 CC="$ac_cv_prog_CC"
716 if test -n "$CC"; then
717   echo "$ac_t""$CC" 1>&6
718 else
719   echo "$ac_t""no" 1>&6
720 fi
721  ;;
722     esac
723   fi
724   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
725 fi
726
727 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
728 echo "configure:729: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
729
730 ac_ext=c
731 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
732 ac_cpp='$CPP $CPPFLAGS'
733 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
734 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
735 cross_compiling=$ac_cv_prog_cc_cross
736
737 cat > conftest.$ac_ext << EOF
738
739 #line 740 "configure"
740 #include "confdefs.h"
741
742 main(){return(0);}
743 EOF
744 if { (eval echo configure:745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
745   ac_cv_prog_cc_works=yes
746   # If we can't run a trivial program, we are probably using a cross compiler.
747   if (./conftest; exit) 2>/dev/null; then
748     ac_cv_prog_cc_cross=no
749   else
750     ac_cv_prog_cc_cross=yes
751   fi
752 else
753   echo "configure: failed program was:" >&5
754   cat conftest.$ac_ext >&5
755   ac_cv_prog_cc_works=no
756 fi
757 rm -fr conftest*
758 ac_ext=c
759 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
760 ac_cpp='$CPP $CPPFLAGS'
761 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
762 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
763 cross_compiling=$ac_cv_prog_cc_cross
764
765 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
766 if test $ac_cv_prog_cc_works = no; then
767   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
768 fi
769 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
770 echo "configure:771: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
771 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
772 cross_compiling=$ac_cv_prog_cc_cross
773
774 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
775 echo "configure:776: checking whether we are using GNU C" >&5
776 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
777   echo $ac_n "(cached) $ac_c" 1>&6
778 else
779   cat > conftest.c <<EOF
780 #ifdef __GNUC__
781   yes;
782 #endif
783 EOF
784 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
785   ac_cv_prog_gcc=yes
786 else
787   ac_cv_prog_gcc=no
788 fi
789 fi
790
791 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
792
793 if test $ac_cv_prog_gcc = yes; then
794   GCC=yes
795 else
796   GCC=
797 fi
798
799 ac_test_CFLAGS="${CFLAGS+set}"
800 ac_save_CFLAGS="$CFLAGS"
801 CFLAGS=
802 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
803 echo "configure:804: checking whether ${CC-cc} accepts -g" >&5
804 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
805   echo $ac_n "(cached) $ac_c" 1>&6
806 else
807   echo 'void f(){}' > conftest.c
808 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
809   ac_cv_prog_cc_g=yes
810 else
811   ac_cv_prog_cc_g=no
812 fi
813 rm -f conftest*
814
815 fi
816
817 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
818 if test "$ac_test_CFLAGS" = set; then
819   CFLAGS="$ac_save_CFLAGS"
820 elif test $ac_cv_prog_cc_g = yes; then
821   if test "$GCC" = yes; then
822     CFLAGS="-g -O2"
823   else
824     CFLAGS="-g"
825   fi
826 else
827   if test "$GCC" = yes; then
828     CFLAGS="-O2"
829   else
830     CFLAGS=
831   fi
832 fi
833
834 ac_aux_dir=
835 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
836   if test -f $ac_dir/install-sh; then
837     ac_aux_dir=$ac_dir
838     ac_install_sh="$ac_aux_dir/install-sh -c"
839     break
840   elif test -f $ac_dir/install.sh; then
841     ac_aux_dir=$ac_dir
842     ac_install_sh="$ac_aux_dir/install.sh -c"
843     break
844   fi
845 done
846 if test -z "$ac_aux_dir"; then
847   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
848 fi
849 ac_config_guess=$ac_aux_dir/config.guess
850 ac_config_sub=$ac_aux_dir/config.sub
851 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
852
853 # Find a good install program.  We prefer a C program (faster),
854 # so one script is as good as another.  But avoid the broken or
855 # incompatible versions:
856 # SysV /etc/install, /usr/sbin/install
857 # SunOS /usr/etc/install
858 # IRIX /sbin/install
859 # AIX /bin/install
860 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
861 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
862 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
863 # ./install, which can be erroneously created by make from ./install.sh.
864 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
865 echo "configure:866: checking for a BSD compatible install" >&5
866 if test -z "$INSTALL"; then
867 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
868   echo $ac_n "(cached) $ac_c" 1>&6
869 else
870     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
871   for ac_dir in $PATH; do
872     # Account for people who put trailing slashes in PATH elements.
873     case "$ac_dir/" in
874     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
875     *)
876       # OSF1 and SCO ODT 3.0 have their own names for install.
877       # Don't use installbsd from OSF since it installs stuff as root
878       # by default.
879       for ac_prog in ginstall scoinst install; do
880         if test -f $ac_dir/$ac_prog; then
881           if test $ac_prog = install &&
882             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
883             # AIX install.  It has an incompatible calling convention.
884             :
885           else
886             ac_cv_path_install="$ac_dir/$ac_prog -c"
887             break 2
888           fi
889         fi
890       done
891       ;;
892     esac
893   done
894   IFS="$ac_save_IFS"
895
896 fi
897   if test "${ac_cv_path_install+set}" = set; then
898     INSTALL="$ac_cv_path_install"
899   else
900     # As a last resort, use the slow shell script.  We don't cache a
901     # path for INSTALL within a source directory, because that will
902     # break other packages using the cache if that directory is
903     # removed, or if the path is relative.
904     INSTALL="$ac_install_sh"
905   fi
906 fi
907 echo "$ac_t""$INSTALL" 1>&6
908
909 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
910 # It thinks the first close brace ends the variable substitution.
911 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
912
913 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
914
915 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
916
917 for ac_prog in gawk mawk nawk awk
918 do
919 # Extract the first word of "$ac_prog", so it can be a program name with args.
920 set dummy $ac_prog; ac_word=$2
921 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
922 echo "configure:923: checking for $ac_word" >&5
923 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
924   echo $ac_n "(cached) $ac_c" 1>&6
925 else
926   if test -n "$AWK"; then
927   ac_cv_prog_AWK="$AWK" # Let the user override the test.
928 else
929   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
930   ac_dummy="$PATH"
931   for ac_dir in $ac_dummy; do
932     test -z "$ac_dir" && ac_dir=.
933     if test -f $ac_dir/$ac_word; then
934       ac_cv_prog_AWK="$ac_prog"
935       break
936     fi
937   done
938   IFS="$ac_save_ifs"
939 fi
940 fi
941 AWK="$ac_cv_prog_AWK"
942 if test -n "$AWK"; then
943   echo "$ac_t""$AWK" 1>&6
944 else
945   echo "$ac_t""no" 1>&6
946 fi
947
948 test -n "$AWK" && break
949 done
950
951
952 if test "x$CC" != xcc; then
953   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
954 echo "configure:955: checking whether $CC and cc understand -c and -o together" >&5
955 else
956   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
957 echo "configure:958: checking whether cc understands -c and -o together" >&5
958 fi
959 set dummy $CC; ac_cc="`echo $2 |
960                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
961 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
962   echo $ac_n "(cached) $ac_c" 1>&6
963 else
964   echo 'foo(){}' > conftest.c
965 # Make sure it works both with $CC and with simple cc.
966 # We do the test twice because some compilers refuse to overwrite an
967 # existing .o file with -o, though they will create one.
968 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
969 if { (eval echo configure:970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
970    test -f conftest.o && { (eval echo configure:971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
971 then
972   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
973   if test "x$CC" != xcc; then
974     # Test first that cc exists at all.
975     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
976       ac_try='cc -c conftest.c -o conftest.o 1>&5'
977       if { (eval echo configure:978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
978          test -f conftest.o && { (eval echo configure:979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
979       then
980         # cc works too.
981         :
982       else
983         # cc exists but doesn't like -o.
984         eval ac_cv_prog_cc_${ac_cc}_c_o=no
985       fi
986     fi
987   fi
988 else
989   eval ac_cv_prog_cc_${ac_cc}_c_o=no
990 fi
991 rm -f conftest*
992
993 fi
994 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
995   echo "$ac_t""yes" 1>&6
996 else
997   echo "$ac_t""no" 1>&6
998   cat >> confdefs.h <<\EOF
999 #define NO_MINUS_C_MINUS_O 1
1000 EOF
1001
1002 fi
1003
1004 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1005       BROKEN_CC=
1006 else
1007       BROKEN_CC=#
1008 fi
1009
1010
1011 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1012 echo "configure:1013: checking that the C compiler understands volatile" >&5
1013 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1014   echo $ac_n "(cached) $ac_c" 1>&6
1015 else
1016   
1017     cat > conftest.$ac_ext <<EOF
1018 #line 1019 "configure"
1019 #include "confdefs.h"
1020 #include <sys/types.h>
1021 int main() {
1022 volatile int i = 0
1023 ; return 0; }
1024 EOF
1025 if { (eval echo configure:1026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1026   rm -rf conftest*
1027   samba_cv_volatile=yes
1028 else
1029   echo "configure: failed program was:" >&5
1030   cat conftest.$ac_ext >&5
1031   rm -rf conftest*
1032   samba_cv_volatile=no
1033 fi
1034 rm -f conftest*
1035 fi
1036
1037 echo "$ac_t""$samba_cv_volatile" 1>&6
1038 if test x"$samba_cv_volatile" = x"yes"; then
1039    cat >> confdefs.h <<\EOF
1040 #define HAVE_VOLATILE 1
1041 EOF
1042
1043 fi
1044
1045
1046
1047 # Do some error checking and defaulting for the host and target type.
1048 # The inputs are:
1049 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1050 #
1051 # The rules are:
1052 # 1. You are not allowed to specify --host, --target, and nonopt at the
1053 #    same time.
1054 # 2. Host defaults to nonopt.
1055 # 3. If nonopt is not specified, then host defaults to the current host,
1056 #    as determined by config.guess.
1057 # 4. Target and build default to nonopt.
1058 # 5. If nonopt is not specified, then target and build default to host.
1059
1060 # The aliases save the names the user supplied, while $host etc.
1061 # will get canonicalized.
1062 case $host---$target---$nonopt in
1063 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1064 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1065 esac
1066
1067
1068 # Make sure we can run config.sub.
1069 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1070 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1071 fi
1072
1073 echo $ac_n "checking host system type""... $ac_c" 1>&6
1074 echo "configure:1075: checking host system type" >&5
1075
1076 host_alias=$host
1077 case "$host_alias" in
1078 NONE)
1079   case $nonopt in
1080   NONE)
1081     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1082     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1083     fi ;;
1084   *) host_alias=$nonopt ;;
1085   esac ;;
1086 esac
1087
1088 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1089 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1090 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1091 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1092 echo "$ac_t""$host" 1>&6
1093
1094 echo $ac_n "checking target system type""... $ac_c" 1>&6
1095 echo "configure:1096: checking target system type" >&5
1096
1097 target_alias=$target
1098 case "$target_alias" in
1099 NONE)
1100   case $nonopt in
1101   NONE) target_alias=$host_alias ;;
1102   *) target_alias=$nonopt ;;
1103   esac ;;
1104 esac
1105
1106 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1107 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1108 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1109 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1110 echo "$ac_t""$target" 1>&6
1111
1112 echo $ac_n "checking build system type""... $ac_c" 1>&6
1113 echo "configure:1114: checking build system type" >&5
1114
1115 build_alias=$build
1116 case "$build_alias" in
1117 NONE)
1118   case $nonopt in
1119   NONE) build_alias=$host_alias ;;
1120   *) build_alias=$nonopt ;;
1121   esac ;;
1122 esac
1123
1124 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1125 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1126 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1127 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1128 echo "$ac_t""$build" 1>&6
1129
1130 test "$host_alias" != "$target_alias" &&
1131   test "$program_prefix$program_suffix$program_transform_name" = \
1132     NONENONEs,x,x, &&
1133   program_prefix=${target_alias}-
1134
1135
1136   case "$host_os" in
1137         *irix6*) cat >> confdefs.h <<\EOF
1138 #include <standards.h>
1139 EOF
1140
1141         ;;
1142 esac
1143
1144
1145     
1146     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1147 echo "configure:1148: checking config.cache system type" >&5
1148     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1149          test x"$ac_cv_host_system_type" != x"$host"; } ||
1150        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1151          test x"$ac_cv_build_system_type" != x"$build"; } ||
1152        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1153          test x"$ac_cv_target_system_type" != x"$target"; }; then
1154         echo "$ac_t""different" 1>&6
1155         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1156     else
1157         echo "$ac_t""same" 1>&6
1158     fi
1159     ac_cv_host_system_type="$host"
1160     ac_cv_build_system_type="$build"
1161     ac_cv_target_system_type="$target"
1162
1163
1164 #
1165 # Config CPPFLAG settings for strange OS's that must be set
1166 # before other tests.
1167 #
1168 case "$host_os" in
1169 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1170     *hpux*)
1171       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1172 echo "configure:1173: checking whether ${CC-cc} accepts -Ae" >&5
1173 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1174   echo $ac_n "(cached) $ac_c" 1>&6
1175 else
1176   echo 'void f(){}' > conftest.c
1177 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1178   ac_cv_prog_cc_Ae=yes
1179 else
1180   ac_cv_prog_cc_Ae=no
1181 fi
1182 rm -f conftest*
1183
1184 fi
1185
1186 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1187       # mmap on HPUX is completely broken...
1188       cat >> confdefs.h <<\EOF
1189 #define MMAP_BLACKLIST 1
1190 EOF
1191
1192       if test $ac_cv_prog_cc_Ae = yes; then
1193         CPPFLAGS="$CPPFLAGS -Ae"
1194       fi
1195 #
1196 # Defines needed for HPUX support.
1197 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1198 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1199 #
1200       case `uname -r` in
1201                         *9*|*10*)
1202                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
1203                                 cat >> confdefs.h <<\EOF
1204 #define USE_BOTH_CRYPT_CALLS 1
1205 EOF
1206
1207                                 ;;
1208                         *11*)
1209                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
1210                                 cat >> confdefs.h <<\EOF
1211 #define USE_BOTH_CRYPT_CALLS 1
1212 EOF
1213
1214                                 ;;
1215       esac
1216       ;;
1217 #
1218 # AIX4.x doesn't even admit to having large
1219 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1220 #
1221     *aix4*)
1222           echo "$ac_t""enabling large file support" 1>&6
1223       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1224       ;;    
1225 #
1226 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1227 # to the existance of large files..
1228 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1229 # recommendations on large file support, however it makes the
1230 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1231 # recommendation makes the compile fail on gcc2.7. JRA.
1232 #
1233         *solaris*)
1234                 case `uname -r` in
1235                         5.6*|5.7*)
1236                         echo "$ac_t""enabling large file support" 1>&6
1237                         if test "$ac_cv_prog_gcc" = yes; then
1238                                 ${CC-cc} -v >conftest.c 2>&1
1239                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1240                                 rm -fr conftest.c
1241                                 case "$ac_cv_gcc_compiler_version_number" in
1242                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1243                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1244                                                 ;;
1245                                         *)
1246                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1247                                                 ;;
1248                                 esac
1249                         else
1250                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1251                         fi
1252                         ;;
1253                 esac
1254                 ;;
1255 #
1256 # Tests needed for SINIX large file support.
1257 #
1258     *sysv4*)
1259       if test $host = mips-sni-sysv4 ; then
1260         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1261 echo "configure:1262: checking for LFS support" >&5
1262         old_CPPFLAGS="$CPPFLAGS"
1263         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1264         if test "$cross_compiling" = yes; then
1265   SINIX_LFS_SUPPORT=cross
1266 else
1267   cat > conftest.$ac_ext <<EOF
1268 #line 1269 "configure"
1269 #include "confdefs.h"
1270
1271 #include <unistd.h>
1272 main () {
1273 #if _LFS64_LARGEFILE == 1
1274 exit(0);
1275 #else
1276 exit(1);
1277 #endif
1278 }
1279 EOF
1280 if { (eval echo configure:1281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1281 then
1282   SINIX_LFS_SUPPORT=yes
1283 else
1284   echo "configure: failed program was:" >&5
1285   cat conftest.$ac_ext >&5
1286   rm -fr conftest*
1287   SINIX_LFS_SUPPORT=no
1288 fi
1289 rm -fr conftest*
1290 fi
1291
1292         CPPFLAGS="$old_CPPFLAGS"
1293         if test x$SINIX_LFS_SUPPORT = xyes ; then
1294           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1295           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1296           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1297           LIBS="`getconf LFS64_LIBS` $LIBS"
1298         fi
1299       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1300       fi
1301     ;;
1302
1303 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1304 #
1305     *linux*)
1306         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1307 echo "configure:1308: checking for LFS support" >&5
1308         old_CPPFLAGS="$CPPFLAGS"
1309         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1310        if test "$cross_compiling" = yes; then
1311   LINUX_LFS_SUPPORT=cross
1312 else
1313   cat > conftest.$ac_ext <<EOF
1314 #line 1315 "configure"
1315 #include "confdefs.h"
1316
1317 #include <unistd.h>
1318 #include <sys/utsname.h>
1319 main() {
1320 #if _LFS64_LARGEFILE == 1
1321        struct utsname uts;
1322        char *release;
1323        int major, minor;
1324
1325        /* Ensure this is glibc 2.2 or higher */
1326 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1327        int libc_major = __GLIBC__;
1328        int libc_minor = __GLIBC_MINOR__;
1329
1330        if (libc_major < 2)
1331               exit(1);
1332        if (libc_minor < 2)
1333               exit(1);
1334 #endif
1335
1336        /* Ensure this is kernel 2.4 or higher */
1337
1338        uname(&uts);
1339        release = uts.release;
1340        major = atoi(strsep(&release, "."));
1341        minor = atoi(strsep(&release, "."));
1342
1343        if (major > 2 || (major == 2 && minor > 3))
1344                exit(0);
1345        exit(1);
1346 #else
1347        exit(1);
1348 #endif
1349 }
1350
1351 EOF
1352 if { (eval echo configure:1353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1353 then
1354   LINUX_LFS_SUPPORT=yes
1355 else
1356   echo "configure: failed program was:" >&5
1357   cat conftest.$ac_ext >&5
1358   rm -fr conftest*
1359   LINUX_LFS_SUPPORT=no
1360 fi
1361 rm -fr conftest*
1362 fi
1363
1364         CPPFLAGS="$old_CPPFLAGS"
1365         if test x$LINUX_LFS_SUPPORT = xyes ; then
1366           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1367         fi
1368        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1369                 ;;
1370
1371     *hurd*)
1372         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1373 echo "configure:1374: checking for LFS support" >&5
1374         old_CPPFLAGS="$CPPFLAGS"
1375         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1376         if test "$cross_compiling" = yes; then
1377   GLIBC_LFS_SUPPORT=cross
1378 else
1379   cat > conftest.$ac_ext <<EOF
1380 #line 1381 "configure"
1381 #include "confdefs.h"
1382
1383 #include <unistd.h>
1384 main () {
1385 #if _LFS64_LARGEFILE == 1
1386 exit(0);
1387 #else
1388 exit(1);
1389 #endif
1390 }
1391 EOF
1392 if { (eval echo configure:1393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1393 then
1394   GLIBC_LFS_SUPPORT=yes
1395 else
1396   echo "configure: failed program was:" >&5
1397   cat conftest.$ac_ext >&5
1398   rm -fr conftest*
1399   GLIBC_LFS_SUPPORT=no
1400 fi
1401 rm -fr conftest*
1402 fi
1403
1404         CPPFLAGS="$old_CPPFLAGS"
1405         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1406           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1407         fi
1408       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1409     ;;
1410
1411 esac
1412
1413 echo $ac_n "checking for inline""... $ac_c" 1>&6
1414 echo "configure:1415: checking for inline" >&5
1415 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1416   echo $ac_n "(cached) $ac_c" 1>&6
1417 else
1418   ac_cv_c_inline=no
1419 for ac_kw in inline __inline__ __inline; do
1420   cat > conftest.$ac_ext <<EOF
1421 #line 1422 "configure"
1422 #include "confdefs.h"
1423
1424 int main() {
1425 } $ac_kw foo() {
1426 ; return 0; }
1427 EOF
1428 if { (eval echo configure:1429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1429   rm -rf conftest*
1430   ac_cv_c_inline=$ac_kw; break
1431 else
1432   echo "configure: failed program was:" >&5
1433   cat conftest.$ac_ext >&5
1434 fi
1435 rm -f conftest*
1436 done
1437
1438 fi
1439
1440 echo "$ac_t""$ac_cv_c_inline" 1>&6
1441 case "$ac_cv_c_inline" in
1442   inline | yes) ;;
1443   no) cat >> confdefs.h <<\EOF
1444 #define inline 
1445 EOF
1446  ;;
1447   *)  cat >> confdefs.h <<EOF
1448 #define inline $ac_cv_c_inline
1449 EOF
1450  ;;
1451 esac
1452
1453 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1454 echo "configure:1455: checking how to run the C preprocessor" >&5
1455 # On Suns, sometimes $CPP names a directory.
1456 if test -n "$CPP" && test -d "$CPP"; then
1457   CPP=
1458 fi
1459 if test -z "$CPP"; then
1460 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1461   echo $ac_n "(cached) $ac_c" 1>&6
1462 else
1463     # This must be in double quotes, not single quotes, because CPP may get
1464   # substituted into the Makefile and "${CC-cc}" will confuse make.
1465   CPP="${CC-cc} -E"
1466   # On the NeXT, cc -E runs the code through the compiler's parser,
1467   # not just through cpp.
1468   cat > conftest.$ac_ext <<EOF
1469 #line 1470 "configure"
1470 #include "confdefs.h"
1471 #include <assert.h>
1472 Syntax Error
1473 EOF
1474 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1475 { (eval echo configure:1476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1476 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1477 if test -z "$ac_err"; then
1478   :
1479 else
1480   echo "$ac_err" >&5
1481   echo "configure: failed program was:" >&5
1482   cat conftest.$ac_ext >&5
1483   rm -rf conftest*
1484   CPP="${CC-cc} -E -traditional-cpp"
1485   cat > conftest.$ac_ext <<EOF
1486 #line 1487 "configure"
1487 #include "confdefs.h"
1488 #include <assert.h>
1489 Syntax Error
1490 EOF
1491 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1492 { (eval echo configure:1493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1493 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1494 if test -z "$ac_err"; then
1495   :
1496 else
1497   echo "$ac_err" >&5
1498   echo "configure: failed program was:" >&5
1499   cat conftest.$ac_ext >&5
1500   rm -rf conftest*
1501   CPP="${CC-cc} -nologo -E"
1502   cat > conftest.$ac_ext <<EOF
1503 #line 1504 "configure"
1504 #include "confdefs.h"
1505 #include <assert.h>
1506 Syntax Error
1507 EOF
1508 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1509 { (eval echo configure:1510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1510 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1511 if test -z "$ac_err"; then
1512   :
1513 else
1514   echo "$ac_err" >&5
1515   echo "configure: failed program was:" >&5
1516   cat conftest.$ac_ext >&5
1517   rm -rf conftest*
1518   CPP=/lib/cpp
1519 fi
1520 rm -f conftest*
1521 fi
1522 rm -f conftest*
1523 fi
1524 rm -f conftest*
1525   ac_cv_prog_CPP="$CPP"
1526 fi
1527   CPP="$ac_cv_prog_CPP"
1528 else
1529   ac_cv_prog_CPP="$CPP"
1530 fi
1531 echo "$ac_t""$CPP" 1>&6
1532
1533 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1534 echo "configure:1535: checking for ANSI C header files" >&5
1535 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1536   echo $ac_n "(cached) $ac_c" 1>&6
1537 else
1538   cat > conftest.$ac_ext <<EOF
1539 #line 1540 "configure"
1540 #include "confdefs.h"
1541 #include <stdlib.h>
1542 #include <stdarg.h>
1543 #include <string.h>
1544 #include <float.h>
1545 EOF
1546 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1547 { (eval echo configure:1548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1548 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1549 if test -z "$ac_err"; then
1550   rm -rf conftest*
1551   ac_cv_header_stdc=yes
1552 else
1553   echo "$ac_err" >&5
1554   echo "configure: failed program was:" >&5
1555   cat conftest.$ac_ext >&5
1556   rm -rf conftest*
1557   ac_cv_header_stdc=no
1558 fi
1559 rm -f conftest*
1560
1561 if test $ac_cv_header_stdc = yes; then
1562   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1563 cat > conftest.$ac_ext <<EOF
1564 #line 1565 "configure"
1565 #include "confdefs.h"
1566 #include <string.h>
1567 EOF
1568 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1569   egrep "memchr" >/dev/null 2>&1; then
1570   :
1571 else
1572   rm -rf conftest*
1573   ac_cv_header_stdc=no
1574 fi
1575 rm -f conftest*
1576
1577 fi
1578
1579 if test $ac_cv_header_stdc = yes; then
1580   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1581 cat > conftest.$ac_ext <<EOF
1582 #line 1583 "configure"
1583 #include "confdefs.h"
1584 #include <stdlib.h>
1585 EOF
1586 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1587   egrep "free" >/dev/null 2>&1; then
1588   :
1589 else
1590   rm -rf conftest*
1591   ac_cv_header_stdc=no
1592 fi
1593 rm -f conftest*
1594
1595 fi
1596
1597 if test $ac_cv_header_stdc = yes; then
1598   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1599 if test "$cross_compiling" = yes; then
1600   :
1601 else
1602   cat > conftest.$ac_ext <<EOF
1603 #line 1604 "configure"
1604 #include "confdefs.h"
1605 #include <ctype.h>
1606 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1607 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1608 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1609 int main () { int i; for (i = 0; i < 256; i++)
1610 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1611 exit (0); }
1612
1613 EOF
1614 if { (eval echo configure:1615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1615 then
1616   :
1617 else
1618   echo "configure: failed program was:" >&5
1619   cat conftest.$ac_ext >&5
1620   rm -fr conftest*
1621   ac_cv_header_stdc=no
1622 fi
1623 rm -fr conftest*
1624 fi
1625
1626 fi
1627 fi
1628
1629 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1630 if test $ac_cv_header_stdc = yes; then
1631   cat >> confdefs.h <<\EOF
1632 #define STDC_HEADERS 1
1633 EOF
1634
1635 fi
1636
1637 ac_header_dirent=no
1638 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1639 do
1640 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1641 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1642 echo "configure:1643: checking for $ac_hdr that defines DIR" >&5
1643 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1644   echo $ac_n "(cached) $ac_c" 1>&6
1645 else
1646   cat > conftest.$ac_ext <<EOF
1647 #line 1648 "configure"
1648 #include "confdefs.h"
1649 #include <sys/types.h>
1650 #include <$ac_hdr>
1651 int main() {
1652 DIR *dirp = 0;
1653 ; return 0; }
1654 EOF
1655 if { (eval echo configure:1656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1656   rm -rf conftest*
1657   eval "ac_cv_header_dirent_$ac_safe=yes"
1658 else
1659   echo "configure: failed program was:" >&5
1660   cat conftest.$ac_ext >&5
1661   rm -rf conftest*
1662   eval "ac_cv_header_dirent_$ac_safe=no"
1663 fi
1664 rm -f conftest*
1665 fi
1666 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1667   echo "$ac_t""yes" 1>&6
1668     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1669   cat >> confdefs.h <<EOF
1670 #define $ac_tr_hdr 1
1671 EOF
1672  ac_header_dirent=$ac_hdr; break
1673 else
1674   echo "$ac_t""no" 1>&6
1675 fi
1676 done
1677 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1678 if test $ac_header_dirent = dirent.h; then
1679 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1680 echo "configure:1681: checking for opendir in -ldir" >&5
1681 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1682 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1683   echo $ac_n "(cached) $ac_c" 1>&6
1684 else
1685   ac_save_LIBS="$LIBS"
1686 LIBS="-ldir  $LIBS"
1687 cat > conftest.$ac_ext <<EOF
1688 #line 1689 "configure"
1689 #include "confdefs.h"
1690 /* Override any gcc2 internal prototype to avoid an error.  */
1691 /* We use char because int might match the return type of a gcc2
1692     builtin and then its argument prototype would still apply.  */
1693 char opendir();
1694
1695 int main() {
1696 opendir()
1697 ; return 0; }
1698 EOF
1699 if { (eval echo configure:1700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1700   rm -rf conftest*
1701   eval "ac_cv_lib_$ac_lib_var=yes"
1702 else
1703   echo "configure: failed program was:" >&5
1704   cat conftest.$ac_ext >&5
1705   rm -rf conftest*
1706   eval "ac_cv_lib_$ac_lib_var=no"
1707 fi
1708 rm -f conftest*
1709 LIBS="$ac_save_LIBS"
1710
1711 fi
1712 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1713   echo "$ac_t""yes" 1>&6
1714   LIBS="$LIBS -ldir"
1715 else
1716   echo "$ac_t""no" 1>&6
1717 fi
1718
1719 else
1720 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1721 echo "configure:1722: checking for opendir in -lx" >&5
1722 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1723 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1724   echo $ac_n "(cached) $ac_c" 1>&6
1725 else
1726   ac_save_LIBS="$LIBS"
1727 LIBS="-lx  $LIBS"
1728 cat > conftest.$ac_ext <<EOF
1729 #line 1730 "configure"
1730 #include "confdefs.h"
1731 /* Override any gcc2 internal prototype to avoid an error.  */
1732 /* We use char because int might match the return type of a gcc2
1733     builtin and then its argument prototype would still apply.  */
1734 char opendir();
1735
1736 int main() {
1737 opendir()
1738 ; return 0; }
1739 EOF
1740 if { (eval echo configure:1741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1741   rm -rf conftest*
1742   eval "ac_cv_lib_$ac_lib_var=yes"
1743 else
1744   echo "configure: failed program was:" >&5
1745   cat conftest.$ac_ext >&5
1746   rm -rf conftest*
1747   eval "ac_cv_lib_$ac_lib_var=no"
1748 fi
1749 rm -f conftest*
1750 LIBS="$ac_save_LIBS"
1751
1752 fi
1753 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1754   echo "$ac_t""yes" 1>&6
1755   LIBS="$LIBS -lx"
1756 else
1757   echo "$ac_t""no" 1>&6
1758 fi
1759
1760 fi
1761
1762 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1763 echo "configure:1764: checking whether time.h and sys/time.h may both be included" >&5
1764 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1765   echo $ac_n "(cached) $ac_c" 1>&6
1766 else
1767   cat > conftest.$ac_ext <<EOF
1768 #line 1769 "configure"
1769 #include "confdefs.h"
1770 #include <sys/types.h>
1771 #include <sys/time.h>
1772 #include <time.h>
1773 int main() {
1774 struct tm *tp;
1775 ; return 0; }
1776 EOF
1777 if { (eval echo configure:1778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1778   rm -rf conftest*
1779   ac_cv_header_time=yes
1780 else
1781   echo "configure: failed program was:" >&5
1782   cat conftest.$ac_ext >&5
1783   rm -rf conftest*
1784   ac_cv_header_time=no
1785 fi
1786 rm -f conftest*
1787 fi
1788
1789 echo "$ac_t""$ac_cv_header_time" 1>&6
1790 if test $ac_cv_header_time = yes; then
1791   cat >> confdefs.h <<\EOF
1792 #define TIME_WITH_SYS_TIME 1
1793 EOF
1794
1795 fi
1796
1797 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1798 echo "configure:1799: checking for sys/wait.h that is POSIX.1 compatible" >&5
1799 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1800   echo $ac_n "(cached) $ac_c" 1>&6
1801 else
1802   cat > conftest.$ac_ext <<EOF
1803 #line 1804 "configure"
1804 #include "confdefs.h"
1805 #include <sys/types.h>
1806 #include <sys/wait.h>
1807 #ifndef WEXITSTATUS
1808 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1809 #endif
1810 #ifndef WIFEXITED
1811 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1812 #endif
1813 int main() {
1814 int s;
1815 wait (&s);
1816 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1817 ; return 0; }
1818 EOF
1819 if { (eval echo configure:1820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1820   rm -rf conftest*
1821   ac_cv_header_sys_wait_h=yes
1822 else
1823   echo "configure: failed program was:" >&5
1824   cat conftest.$ac_ext >&5
1825   rm -rf conftest*
1826   ac_cv_header_sys_wait_h=no
1827 fi
1828 rm -f conftest*
1829 fi
1830
1831 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1832 if test $ac_cv_header_sys_wait_h = yes; then
1833   cat >> confdefs.h <<\EOF
1834 #define HAVE_SYS_WAIT_H 1
1835 EOF
1836
1837 fi
1838
1839 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1840 do
1841 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1842 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1843 echo "configure:1844: checking for $ac_hdr" >&5
1844 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1845   echo $ac_n "(cached) $ac_c" 1>&6
1846 else
1847   cat > conftest.$ac_ext <<EOF
1848 #line 1849 "configure"
1849 #include "confdefs.h"
1850 #include <$ac_hdr>
1851 EOF
1852 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1853 { (eval echo configure:1854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1854 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1855 if test -z "$ac_err"; then
1856   rm -rf conftest*
1857   eval "ac_cv_header_$ac_safe=yes"
1858 else
1859   echo "$ac_err" >&5
1860   echo "configure: failed program was:" >&5
1861   cat conftest.$ac_ext >&5
1862   rm -rf conftest*
1863   eval "ac_cv_header_$ac_safe=no"
1864 fi
1865 rm -f conftest*
1866 fi
1867 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1868   echo "$ac_t""yes" 1>&6
1869     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1870   cat >> confdefs.h <<EOF
1871 #define $ac_tr_hdr 1
1872 EOF
1873  
1874 else
1875   echo "$ac_t""no" 1>&6
1876 fi
1877 done
1878
1879 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
1880 do
1881 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1882 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1883 echo "configure:1884: checking for $ac_hdr" >&5
1884 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1885   echo $ac_n "(cached) $ac_c" 1>&6
1886 else
1887   cat > conftest.$ac_ext <<EOF
1888 #line 1889 "configure"
1889 #include "confdefs.h"
1890 #include <$ac_hdr>
1891 EOF
1892 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1893 { (eval echo configure:1894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1894 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1895 if test -z "$ac_err"; then
1896   rm -rf conftest*
1897   eval "ac_cv_header_$ac_safe=yes"
1898 else
1899   echo "$ac_err" >&5
1900   echo "configure: failed program was:" >&5
1901   cat conftest.$ac_ext >&5
1902   rm -rf conftest*
1903   eval "ac_cv_header_$ac_safe=no"
1904 fi
1905 rm -f conftest*
1906 fi
1907 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1908   echo "$ac_t""yes" 1>&6
1909     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1910   cat >> confdefs.h <<EOF
1911 #define $ac_tr_hdr 1
1912 EOF
1913  
1914 else
1915   echo "$ac_t""no" 1>&6
1916 fi
1917 done
1918
1919 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
1920 do
1921 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1922 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1923 echo "configure:1924: checking for $ac_hdr" >&5
1924 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1925   echo $ac_n "(cached) $ac_c" 1>&6
1926 else
1927   cat > conftest.$ac_ext <<EOF
1928 #line 1929 "configure"
1929 #include "confdefs.h"
1930 #include <$ac_hdr>
1931 EOF
1932 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1933 { (eval echo configure:1934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1934 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1935 if test -z "$ac_err"; then
1936   rm -rf conftest*
1937   eval "ac_cv_header_$ac_safe=yes"
1938 else
1939   echo "$ac_err" >&5
1940   echo "configure: failed program was:" >&5
1941   cat conftest.$ac_ext >&5
1942   rm -rf conftest*
1943   eval "ac_cv_header_$ac_safe=no"
1944 fi
1945 rm -f conftest*
1946 fi
1947 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1948   echo "$ac_t""yes" 1>&6
1949     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1950   cat >> confdefs.h <<EOF
1951 #define $ac_tr_hdr 1
1952 EOF
1953  
1954 else
1955   echo "$ac_t""no" 1>&6
1956 fi
1957 done
1958
1959 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
1960 do
1961 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1962 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1963 echo "configure:1964: checking for $ac_hdr" >&5
1964 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1965   echo $ac_n "(cached) $ac_c" 1>&6
1966 else
1967   cat > conftest.$ac_ext <<EOF
1968 #line 1969 "configure"
1969 #include "confdefs.h"
1970 #include <$ac_hdr>
1971 EOF
1972 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1973 { (eval echo configure:1974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1974 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1975 if test -z "$ac_err"; then
1976   rm -rf conftest*
1977   eval "ac_cv_header_$ac_safe=yes"
1978 else
1979   echo "$ac_err" >&5
1980   echo "configure: failed program was:" >&5
1981   cat conftest.$ac_ext >&5
1982   rm -rf conftest*
1983   eval "ac_cv_header_$ac_safe=no"
1984 fi
1985 rm -f conftest*
1986 fi
1987 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1988   echo "$ac_t""yes" 1>&6
1989     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1990   cat >> confdefs.h <<EOF
1991 #define $ac_tr_hdr 1
1992 EOF
1993  
1994 else
1995   echo "$ac_t""no" 1>&6
1996 fi
1997 done
1998
1999 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
2000 do
2001 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2002 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2003 echo "configure:2004: checking for $ac_hdr" >&5
2004 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2005   echo $ac_n "(cached) $ac_c" 1>&6
2006 else
2007   cat > conftest.$ac_ext <<EOF
2008 #line 2009 "configure"
2009 #include "confdefs.h"
2010 #include <$ac_hdr>
2011 EOF
2012 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2013 { (eval echo configure:2014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2014 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2015 if test -z "$ac_err"; then
2016   rm -rf conftest*
2017   eval "ac_cv_header_$ac_safe=yes"
2018 else
2019   echo "$ac_err" >&5
2020   echo "configure: failed program was:" >&5
2021   cat conftest.$ac_ext >&5
2022   rm -rf conftest*
2023   eval "ac_cv_header_$ac_safe=no"
2024 fi
2025 rm -f conftest*
2026 fi
2027 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2028   echo "$ac_t""yes" 1>&6
2029     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2030   cat >> confdefs.h <<EOF
2031 #define $ac_tr_hdr 1
2032 EOF
2033  
2034 else
2035   echo "$ac_t""no" 1>&6
2036 fi
2037 done
2038
2039 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2040 do
2041 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2042 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2043 echo "configure:2044: checking for $ac_hdr" >&5
2044 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2045   echo $ac_n "(cached) $ac_c" 1>&6
2046 else
2047   cat > conftest.$ac_ext <<EOF
2048 #line 2049 "configure"
2049 #include "confdefs.h"
2050 #include <$ac_hdr>
2051 EOF
2052 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2053 { (eval echo configure:2054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2054 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2055 if test -z "$ac_err"; then
2056   rm -rf conftest*
2057   eval "ac_cv_header_$ac_safe=yes"
2058 else
2059   echo "$ac_err" >&5
2060   echo "configure: failed program was:" >&5
2061   cat conftest.$ac_ext >&5
2062   rm -rf conftest*
2063   eval "ac_cv_header_$ac_safe=no"
2064 fi
2065 rm -f conftest*
2066 fi
2067 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2068   echo "$ac_t""yes" 1>&6
2069     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2070   cat >> confdefs.h <<EOF
2071 #define $ac_tr_hdr 1
2072 EOF
2073  
2074 else
2075   echo "$ac_t""no" 1>&6
2076 fi
2077 done
2078
2079 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2080 do
2081 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2082 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2083 echo "configure:2084: checking for $ac_hdr" >&5
2084 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2085   echo $ac_n "(cached) $ac_c" 1>&6
2086 else
2087   cat > conftest.$ac_ext <<EOF
2088 #line 2089 "configure"
2089 #include "confdefs.h"
2090 #include <$ac_hdr>
2091 EOF
2092 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2093 { (eval echo configure:2094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2094 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2095 if test -z "$ac_err"; then
2096   rm -rf conftest*
2097   eval "ac_cv_header_$ac_safe=yes"
2098 else
2099   echo "$ac_err" >&5
2100   echo "configure: failed program was:" >&5
2101   cat conftest.$ac_ext >&5
2102   rm -rf conftest*
2103   eval "ac_cv_header_$ac_safe=no"
2104 fi
2105 rm -f conftest*
2106 fi
2107 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2108   echo "$ac_t""yes" 1>&6
2109     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2110   cat >> confdefs.h <<EOF
2111 #define $ac_tr_hdr 1
2112 EOF
2113  
2114 else
2115   echo "$ac_t""no" 1>&6
2116 fi
2117 done
2118
2119 for ac_hdr in security/pam_modules.h security/_pam_macros.h
2120 do
2121 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2122 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2123 echo "configure:2124: checking for $ac_hdr" >&5
2124 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2125   echo $ac_n "(cached) $ac_c" 1>&6
2126 else
2127   cat > conftest.$ac_ext <<EOF
2128 #line 2129 "configure"
2129 #include "confdefs.h"
2130 #include <$ac_hdr>
2131 EOF
2132 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2133 { (eval echo configure:2134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2134 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2135 if test -z "$ac_err"; then
2136   rm -rf conftest*
2137   eval "ac_cv_header_$ac_safe=yes"
2138 else
2139   echo "$ac_err" >&5
2140   echo "configure: failed program was:" >&5
2141   cat conftest.$ac_ext >&5
2142   rm -rf conftest*
2143   eval "ac_cv_header_$ac_safe=no"
2144 fi
2145 rm -f conftest*
2146 fi
2147 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2148   echo "$ac_t""yes" 1>&6
2149     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2150   cat >> confdefs.h <<EOF
2151 #define $ac_tr_hdr 1
2152 EOF
2153  
2154 else
2155   echo "$ac_t""no" 1>&6
2156 fi
2157 done
2158
2159
2160 #
2161 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2162 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2163 #
2164 case "$host_os" in
2165     *hpux*)
2166                 cat > conftest.$ac_ext <<EOF
2167 #line 2168 "configure"
2168 #include "confdefs.h"
2169 #include <shadow.h>
2170 int main() {
2171 struct spwd testme
2172 ; return 0; }
2173 EOF
2174 if { (eval echo configure:2175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2175   rm -rf conftest*
2176   ac_cv_header_shadow_h=yes
2177 else
2178   echo "configure: failed program was:" >&5
2179   cat conftest.$ac_ext >&5
2180   rm -rf conftest*
2181   ac_cv_header_shadow_h=no
2182 fi
2183 rm -f conftest*
2184                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2185                    cat >> confdefs.h <<\EOF
2186 #define HAVE_SHADOW_H 1
2187 EOF
2188
2189                 fi
2190         ;;
2191 esac
2192 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2193 do
2194 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2195 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2196 echo "configure:2197: checking for $ac_hdr" >&5
2197 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2198   echo $ac_n "(cached) $ac_c" 1>&6
2199 else
2200   cat > conftest.$ac_ext <<EOF
2201 #line 2202 "configure"
2202 #include "confdefs.h"
2203 #include <$ac_hdr>
2204 EOF
2205 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2206 { (eval echo configure:2207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2207 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2208 if test -z "$ac_err"; then
2209   rm -rf conftest*
2210   eval "ac_cv_header_$ac_safe=yes"
2211 else
2212   echo "$ac_err" >&5
2213   echo "configure: failed program was:" >&5
2214   cat conftest.$ac_ext >&5
2215   rm -rf conftest*
2216   eval "ac_cv_header_$ac_safe=no"
2217 fi
2218 rm -f conftest*
2219 fi
2220 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2221   echo "$ac_t""yes" 1>&6
2222     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2223   cat >> confdefs.h <<EOF
2224 #define $ac_tr_hdr 1
2225 EOF
2226  
2227 else
2228   echo "$ac_t""no" 1>&6
2229 fi
2230 done
2231
2232 for ac_hdr in nss.h nss_common.h sys/security.h security/pam_appl.h security/pam_modules.h
2233 do
2234 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2235 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2236 echo "configure:2237: checking for $ac_hdr" >&5
2237 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2238   echo $ac_n "(cached) $ac_c" 1>&6
2239 else
2240   cat > conftest.$ac_ext <<EOF
2241 #line 2242 "configure"
2242 #include "confdefs.h"
2243 #include <$ac_hdr>
2244 EOF
2245 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2246 { (eval echo configure:2247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2247 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2248 if test -z "$ac_err"; then
2249   rm -rf conftest*
2250   eval "ac_cv_header_$ac_safe=yes"
2251 else
2252   echo "$ac_err" >&5
2253   echo "configure: failed program was:" >&5
2254   cat conftest.$ac_ext >&5
2255   rm -rf conftest*
2256   eval "ac_cv_header_$ac_safe=no"
2257 fi
2258 rm -f conftest*
2259 fi
2260 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2261   echo "$ac_t""yes" 1>&6
2262     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2263   cat >> confdefs.h <<EOF
2264 #define $ac_tr_hdr 1
2265 EOF
2266  
2267 else
2268   echo "$ac_t""no" 1>&6
2269 fi
2270 done
2271
2272 for ac_hdr in stropts.h poll.h
2273 do
2274 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2275 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2276 echo "configure:2277: checking for $ac_hdr" >&5
2277 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2278   echo $ac_n "(cached) $ac_c" 1>&6
2279 else
2280   cat > conftest.$ac_ext <<EOF
2281 #line 2282 "configure"
2282 #include "confdefs.h"
2283 #include <$ac_hdr>
2284 EOF
2285 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2286 { (eval echo configure:2287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2287 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2288 if test -z "$ac_err"; then
2289   rm -rf conftest*
2290   eval "ac_cv_header_$ac_safe=yes"
2291 else
2292   echo "$ac_err" >&5
2293   echo "configure: failed program was:" >&5
2294   cat conftest.$ac_ext >&5
2295   rm -rf conftest*
2296   eval "ac_cv_header_$ac_safe=no"
2297 fi
2298 rm -f conftest*
2299 fi
2300 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2301   echo "$ac_t""yes" 1>&6
2302     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2303   cat >> confdefs.h <<EOF
2304 #define $ac_tr_hdr 1
2305 EOF
2306  
2307 else
2308   echo "$ac_t""no" 1>&6
2309 fi
2310 done
2311
2312 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2313 do
2314 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2315 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2316 echo "configure:2317: checking for $ac_hdr" >&5
2317 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2318   echo $ac_n "(cached) $ac_c" 1>&6
2319 else
2320   cat > conftest.$ac_ext <<EOF
2321 #line 2322 "configure"
2322 #include "confdefs.h"
2323 #include <$ac_hdr>
2324 EOF
2325 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2326 { (eval echo configure:2327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2327 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2328 if test -z "$ac_err"; then
2329   rm -rf conftest*
2330   eval "ac_cv_header_$ac_safe=yes"
2331 else
2332   echo "$ac_err" >&5
2333   echo "configure: failed program was:" >&5
2334   cat conftest.$ac_ext >&5
2335   rm -rf conftest*
2336   eval "ac_cv_header_$ac_safe=no"
2337 fi
2338 rm -f conftest*
2339 fi
2340 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2341   echo "$ac_t""yes" 1>&6
2342     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2343   cat >> confdefs.h <<EOF
2344 #define $ac_tr_hdr 1
2345 EOF
2346  
2347 else
2348   echo "$ac_t""no" 1>&6
2349 fi
2350 done
2351
2352 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2353 do
2354 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2355 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2356 echo "configure:2357: checking for $ac_hdr" >&5
2357 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2358   echo $ac_n "(cached) $ac_c" 1>&6
2359 else
2360   cat > conftest.$ac_ext <<EOF
2361 #line 2362 "configure"
2362 #include "confdefs.h"
2363 #include <$ac_hdr>
2364 EOF
2365 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2366 { (eval echo configure:2367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2367 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2368 if test -z "$ac_err"; then
2369   rm -rf conftest*
2370   eval "ac_cv_header_$ac_safe=yes"
2371 else
2372   echo "$ac_err" >&5
2373   echo "configure: failed program was:" >&5
2374   cat conftest.$ac_ext >&5
2375   rm -rf conftest*
2376   eval "ac_cv_header_$ac_safe=no"
2377 fi
2378 rm -f conftest*
2379 fi
2380 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2381   echo "$ac_t""yes" 1>&6
2382     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2383   cat >> confdefs.h <<EOF
2384 #define $ac_tr_hdr 1
2385 EOF
2386  
2387 else
2388   echo "$ac_t""no" 1>&6
2389 fi
2390 done
2391
2392
2393 # For experimental utmp support (lastlog on some BSD-like systems)
2394 for ac_hdr in utmp.h utmpx.h lastlog.h
2395 do
2396 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2397 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2398 echo "configure:2399: checking for $ac_hdr" >&5
2399 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2400   echo $ac_n "(cached) $ac_c" 1>&6
2401 else
2402   cat > conftest.$ac_ext <<EOF
2403 #line 2404 "configure"
2404 #include "confdefs.h"
2405 #include <$ac_hdr>
2406 EOF
2407 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2408 { (eval echo configure:2409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2409 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2410 if test -z "$ac_err"; then
2411   rm -rf conftest*
2412   eval "ac_cv_header_$ac_safe=yes"
2413 else
2414   echo "$ac_err" >&5
2415   echo "configure: failed program was:" >&5
2416   cat conftest.$ac_ext >&5
2417   rm -rf conftest*
2418   eval "ac_cv_header_$ac_safe=no"
2419 fi
2420 rm -f conftest*
2421 fi
2422 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2423   echo "$ac_t""yes" 1>&6
2424     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2425   cat >> confdefs.h <<EOF
2426 #define $ac_tr_hdr 1
2427 EOF
2428  
2429 else
2430   echo "$ac_t""no" 1>&6
2431 fi
2432 done
2433
2434  
2435 # For quotas on Veritas VxFS filesystems
2436 for ac_hdr in sys/fs/vx_quota.h
2437 do
2438 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2439 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2440 echo "configure:2441: checking for $ac_hdr" >&5
2441 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2442   echo $ac_n "(cached) $ac_c" 1>&6
2443 else
2444   cat > conftest.$ac_ext <<EOF
2445 #line 2446 "configure"
2446 #include "confdefs.h"
2447 #include <$ac_hdr>
2448 EOF
2449 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2450 { (eval echo configure:2451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2451 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2452 if test -z "$ac_err"; then
2453   rm -rf conftest*
2454   eval "ac_cv_header_$ac_safe=yes"
2455 else
2456   echo "$ac_err" >&5
2457   echo "configure: failed program was:" >&5
2458   cat conftest.$ac_ext >&5
2459   rm -rf conftest*
2460   eval "ac_cv_header_$ac_safe=no"
2461 fi
2462 rm -f conftest*
2463 fi
2464 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2465   echo "$ac_t""yes" 1>&6
2466     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2467   cat >> confdefs.h <<EOF
2468 #define $ac_tr_hdr 1
2469 EOF
2470  
2471 else
2472   echo "$ac_t""no" 1>&6
2473 fi
2474 done
2475
2476
2477 echo $ac_n "checking size of int""... $ac_c" 1>&6
2478 echo "configure:2479: checking size of int" >&5
2479 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2480   echo $ac_n "(cached) $ac_c" 1>&6
2481 else
2482   if test "$cross_compiling" = yes; then
2483   ac_cv_sizeof_int=cross
2484 else
2485   cat > conftest.$ac_ext <<EOF
2486 #line 2487 "configure"
2487 #include "confdefs.h"
2488 #include <stdio.h>
2489 main()
2490 {
2491   FILE *f=fopen("conftestval", "w");
2492   if (!f) exit(1);
2493   fprintf(f, "%d\n", sizeof(int));
2494   exit(0);
2495 }
2496 EOF
2497 if { (eval echo configure:2498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2498 then
2499   ac_cv_sizeof_int=`cat conftestval`
2500 else
2501   echo "configure: failed program was:" >&5
2502   cat conftest.$ac_ext >&5
2503   rm -fr conftest*
2504   ac_cv_sizeof_int=0
2505 fi
2506 rm -fr conftest*
2507 fi
2508
2509 fi
2510 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2511 cat >> confdefs.h <<EOF
2512 #define SIZEOF_INT $ac_cv_sizeof_int
2513 EOF
2514
2515
2516 echo $ac_n "checking size of long""... $ac_c" 1>&6
2517 echo "configure:2518: checking size of long" >&5
2518 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2519   echo $ac_n "(cached) $ac_c" 1>&6
2520 else
2521   if test "$cross_compiling" = yes; then
2522   ac_cv_sizeof_long=cross
2523 else
2524   cat > conftest.$ac_ext <<EOF
2525 #line 2526 "configure"
2526 #include "confdefs.h"
2527 #include <stdio.h>
2528 main()
2529 {
2530   FILE *f=fopen("conftestval", "w");
2531   if (!f) exit(1);
2532   fprintf(f, "%d\n", sizeof(long));
2533   exit(0);
2534 }
2535 EOF
2536 if { (eval echo configure:2537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2537 then
2538   ac_cv_sizeof_long=`cat conftestval`
2539 else
2540   echo "configure: failed program was:" >&5
2541   cat conftest.$ac_ext >&5
2542   rm -fr conftest*
2543   ac_cv_sizeof_long=0
2544 fi
2545 rm -fr conftest*
2546 fi
2547
2548 fi
2549 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2550 cat >> confdefs.h <<EOF
2551 #define SIZEOF_LONG $ac_cv_sizeof_long
2552 EOF
2553
2554
2555 echo $ac_n "checking size of short""... $ac_c" 1>&6
2556 echo "configure:2557: checking size of short" >&5
2557 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2558   echo $ac_n "(cached) $ac_c" 1>&6
2559 else
2560   if test "$cross_compiling" = yes; then
2561   ac_cv_sizeof_short=cross
2562 else
2563   cat > conftest.$ac_ext <<EOF
2564 #line 2565 "configure"
2565 #include "confdefs.h"
2566 #include <stdio.h>
2567 main()
2568 {
2569   FILE *f=fopen("conftestval", "w");
2570   if (!f) exit(1);
2571   fprintf(f, "%d\n", sizeof(short));
2572   exit(0);
2573 }
2574 EOF
2575 if { (eval echo configure:2576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2576 then
2577   ac_cv_sizeof_short=`cat conftestval`
2578 else
2579   echo "configure: failed program was:" >&5
2580   cat conftest.$ac_ext >&5
2581   rm -fr conftest*
2582   ac_cv_sizeof_short=0
2583 fi
2584 rm -fr conftest*
2585 fi
2586
2587 fi
2588 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2589 cat >> confdefs.h <<EOF
2590 #define SIZEOF_SHORT $ac_cv_sizeof_short
2591 EOF
2592
2593
2594
2595 echo $ac_n "checking for working const""... $ac_c" 1>&6
2596 echo "configure:2597: checking for working const" >&5
2597 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2598   echo $ac_n "(cached) $ac_c" 1>&6
2599 else
2600   cat > conftest.$ac_ext <<EOF
2601 #line 2602 "configure"
2602 #include "confdefs.h"
2603
2604 int main() {
2605
2606 /* Ultrix mips cc rejects this.  */
2607 typedef int charset[2]; const charset x;
2608 /* SunOS 4.1.1 cc rejects this.  */
2609 char const *const *ccp;
2610 char **p;
2611 /* NEC SVR4.0.2 mips cc rejects this.  */
2612 struct point {int x, y;};
2613 static struct point const zero = {0,0};
2614 /* AIX XL C 1.02.0.0 rejects this.
2615    It does not let you subtract one const X* pointer from another in an arm
2616    of an if-expression whose if-part is not a constant expression */
2617 const char *g = "string";
2618 ccp = &g + (g ? g-g : 0);
2619 /* HPUX 7.0 cc rejects these. */
2620 ++ccp;
2621 p = (char**) ccp;
2622 ccp = (char const *const *) p;
2623 { /* SCO 3.2v4 cc rejects this.  */
2624   char *t;
2625   char const *s = 0 ? (char *) 0 : (char const *) 0;
2626
2627   *t++ = 0;
2628 }
2629 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2630   int x[] = {25, 17};
2631   const int *foo = &x[0];
2632   ++foo;
2633 }
2634 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2635   typedef const int *iptr;
2636   iptr p = 0;
2637   ++p;
2638 }
2639 { /* AIX XL C 1.02.0.0 rejects this saying
2640      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2641   struct s { int j; const int *ap[3]; };
2642   struct s *b; b->j = 5;
2643 }
2644 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2645   const int foo = 10;
2646 }
2647
2648 ; return 0; }
2649 EOF
2650 if { (eval echo configure:2651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2651   rm -rf conftest*
2652   ac_cv_c_const=yes
2653 else
2654   echo "configure: failed program was:" >&5
2655   cat conftest.$ac_ext >&5
2656   rm -rf conftest*
2657   ac_cv_c_const=no
2658 fi
2659 rm -f conftest*
2660 fi
2661
2662 echo "$ac_t""$ac_cv_c_const" 1>&6
2663 if test $ac_cv_c_const = no; then
2664   cat >> confdefs.h <<\EOF
2665 #define const 
2666 EOF
2667
2668 fi
2669
2670 echo $ac_n "checking for inline""... $ac_c" 1>&6
2671 echo "configure:2672: checking for inline" >&5
2672 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2673   echo $ac_n "(cached) $ac_c" 1>&6
2674 else
2675   ac_cv_c_inline=no
2676 for ac_kw in inline __inline__ __inline; do
2677   cat > conftest.$ac_ext <<EOF
2678 #line 2679 "configure"
2679 #include "confdefs.h"
2680
2681 int main() {
2682 } $ac_kw foo() {
2683 ; return 0; }
2684 EOF
2685 if { (eval echo configure:2686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2686   rm -rf conftest*
2687   ac_cv_c_inline=$ac_kw; break
2688 else
2689   echo "configure: failed program was:" >&5
2690   cat conftest.$ac_ext >&5
2691 fi
2692 rm -f conftest*
2693 done
2694
2695 fi
2696
2697 echo "$ac_t""$ac_cv_c_inline" 1>&6
2698 case "$ac_cv_c_inline" in
2699   inline | yes) ;;
2700   no) cat >> confdefs.h <<\EOF
2701 #define inline 
2702 EOF
2703  ;;
2704   *)  cat >> confdefs.h <<EOF
2705 #define inline $ac_cv_c_inline
2706 EOF
2707  ;;
2708 esac
2709
2710 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2711 echo "configure:2712: checking whether byte ordering is bigendian" >&5
2712 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2713   echo $ac_n "(cached) $ac_c" 1>&6
2714 else
2715   ac_cv_c_bigendian=unknown
2716 # See if sys/param.h defines the BYTE_ORDER macro.
2717 cat > conftest.$ac_ext <<EOF
2718 #line 2719 "configure"
2719 #include "confdefs.h"
2720 #include <sys/types.h>
2721 #include <sys/param.h>
2722 int main() {
2723
2724 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2725  bogus endian macros
2726 #endif
2727 ; return 0; }
2728 EOF
2729 if { (eval echo configure:2730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2730   rm -rf conftest*
2731   # It does; now see whether it defined to BIG_ENDIAN or not.
2732 cat > conftest.$ac_ext <<EOF
2733 #line 2734 "configure"
2734 #include "confdefs.h"
2735 #include <sys/types.h>
2736 #include <sys/param.h>
2737 int main() {
2738
2739 #if BYTE_ORDER != BIG_ENDIAN
2740  not big endian
2741 #endif
2742 ; return 0; }
2743 EOF
2744 if { (eval echo configure:2745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2745   rm -rf conftest*
2746   ac_cv_c_bigendian=yes
2747 else
2748   echo "configure: failed program was:" >&5
2749   cat conftest.$ac_ext >&5
2750   rm -rf conftest*
2751   ac_cv_c_bigendian=no
2752 fi
2753 rm -f conftest*
2754 else
2755   echo "configure: failed program was:" >&5
2756   cat conftest.$ac_ext >&5
2757 fi
2758 rm -f conftest*
2759 if test $ac_cv_c_bigendian = unknown; then
2760 if test "$cross_compiling" = yes; then
2761     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2762 else
2763   cat > conftest.$ac_ext <<EOF
2764 #line 2765 "configure"
2765 #include "confdefs.h"
2766 main () {
2767   /* Are we little or big endian?  From Harbison&Steele.  */
2768   union
2769   {
2770     long l;
2771     char c[sizeof (long)];
2772   } u;
2773   u.l = 1;
2774   exit (u.c[sizeof (long) - 1] == 1);
2775 }
2776 EOF
2777 if { (eval echo configure:2778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2778 then
2779   ac_cv_c_bigendian=no
2780 else
2781   echo "configure: failed program was:" >&5
2782   cat conftest.$ac_ext >&5
2783   rm -fr conftest*
2784   ac_cv_c_bigendian=yes
2785 fi
2786 rm -fr conftest*
2787 fi
2788
2789 fi
2790 fi
2791
2792 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2793 if test $ac_cv_c_bigendian = yes; then
2794   cat >> confdefs.h <<\EOF
2795 #define WORDS_BIGENDIAN 1
2796 EOF
2797
2798 fi
2799
2800 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2801 echo "configure:2802: checking whether char is unsigned" >&5
2802 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2803   echo $ac_n "(cached) $ac_c" 1>&6
2804 else
2805   if test "$GCC" = yes; then
2806   # GCC predefines this symbol on systems where it applies.
2807 cat > conftest.$ac_ext <<EOF
2808 #line 2809 "configure"
2809 #include "confdefs.h"
2810 #ifdef __CHAR_UNSIGNED__
2811   yes
2812 #endif
2813
2814 EOF
2815 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2816   egrep "yes" >/dev/null 2>&1; then
2817   rm -rf conftest*
2818   ac_cv_c_char_unsigned=yes
2819 else
2820   rm -rf conftest*
2821   ac_cv_c_char_unsigned=no
2822 fi
2823 rm -f conftest*
2824
2825 else
2826 if test "$cross_compiling" = yes; then
2827     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2828 else
2829   cat > conftest.$ac_ext <<EOF
2830 #line 2831 "configure"
2831 #include "confdefs.h"
2832 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2833 #if !defined(__STDC__) || __STDC__ != 1
2834 #define volatile
2835 #endif
2836 main() {
2837   volatile char c = 255; exit(c < 0);
2838 }
2839 EOF
2840 if { (eval echo configure:2841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2841 then
2842   ac_cv_c_char_unsigned=yes
2843 else
2844   echo "configure: failed program was:" >&5
2845   cat conftest.$ac_ext >&5
2846   rm -fr conftest*
2847   ac_cv_c_char_unsigned=no
2848 fi
2849 rm -fr conftest*
2850 fi
2851
2852 fi
2853 fi
2854
2855 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2856 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2857   cat >> confdefs.h <<\EOF
2858 #define __CHAR_UNSIGNED__ 1
2859 EOF
2860
2861 fi
2862
2863
2864 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2865 echo "configure:2866: checking return type of signal handlers" >&5
2866 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2867   echo $ac_n "(cached) $ac_c" 1>&6
2868 else
2869   cat > conftest.$ac_ext <<EOF
2870 #line 2871 "configure"
2871 #include "confdefs.h"
2872 #include <sys/types.h>
2873 #include <signal.h>
2874 #ifdef signal
2875 #undef signal
2876 #endif
2877 #ifdef __cplusplus
2878 extern "C" void (*signal (int, void (*)(int)))(int);
2879 #else
2880 void (*signal ()) ();
2881 #endif
2882
2883 int main() {
2884 int i;
2885 ; return 0; }
2886 EOF
2887 if { (eval echo configure:2888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2888   rm -rf conftest*
2889   ac_cv_type_signal=void
2890 else
2891   echo "configure: failed program was:" >&5
2892   cat conftest.$ac_ext >&5
2893   rm -rf conftest*
2894   ac_cv_type_signal=int
2895 fi
2896 rm -f conftest*
2897 fi
2898
2899 echo "$ac_t""$ac_cv_type_signal" 1>&6
2900 cat >> confdefs.h <<EOF
2901 #define RETSIGTYPE $ac_cv_type_signal
2902 EOF
2903
2904
2905 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2906 echo "configure:2907: checking for uid_t in sys/types.h" >&5
2907 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2908   echo $ac_n "(cached) $ac_c" 1>&6
2909 else
2910   cat > conftest.$ac_ext <<EOF
2911 #line 2912 "configure"
2912 #include "confdefs.h"
2913 #include <sys/types.h>
2914 EOF
2915 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2916   egrep "uid_t" >/dev/null 2>&1; then
2917   rm -rf conftest*
2918   ac_cv_type_uid_t=yes
2919 else
2920   rm -rf conftest*
2921   ac_cv_type_uid_t=no
2922 fi
2923 rm -f conftest*
2924
2925 fi
2926
2927 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2928 if test $ac_cv_type_uid_t = no; then
2929   cat >> confdefs.h <<\EOF
2930 #define uid_t int
2931 EOF
2932
2933   cat >> confdefs.h <<\EOF
2934 #define gid_t int
2935 EOF
2936
2937 fi
2938
2939 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2940 echo "configure:2941: checking for mode_t" >&5
2941 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2942   echo $ac_n "(cached) $ac_c" 1>&6
2943 else
2944   cat > conftest.$ac_ext <<EOF
2945 #line 2946 "configure"
2946 #include "confdefs.h"
2947 #include <sys/types.h>
2948 #if STDC_HEADERS
2949 #include <stdlib.h>
2950 #include <stddef.h>
2951 #endif
2952 EOF
2953 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2954   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2955   rm -rf conftest*
2956   ac_cv_type_mode_t=yes
2957 else
2958   rm -rf conftest*
2959   ac_cv_type_mode_t=no
2960 fi
2961 rm -f conftest*
2962
2963 fi
2964 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2965 if test $ac_cv_type_mode_t = no; then
2966   cat >> confdefs.h <<\EOF
2967 #define mode_t int
2968 EOF
2969
2970 fi
2971
2972 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2973 echo "configure:2974: checking for off_t" >&5
2974 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2975   echo $ac_n "(cached) $ac_c" 1>&6
2976 else
2977   cat > conftest.$ac_ext <<EOF
2978 #line 2979 "configure"
2979 #include "confdefs.h"
2980 #include <sys/types.h>
2981 #if STDC_HEADERS
2982 #include <stdlib.h>
2983 #include <stddef.h>
2984 #endif
2985 EOF
2986 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2987   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2988   rm -rf conftest*
2989   ac_cv_type_off_t=yes
2990 else
2991   rm -rf conftest*
2992   ac_cv_type_off_t=no
2993 fi
2994 rm -f conftest*
2995
2996 fi
2997 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2998 if test $ac_cv_type_off_t = no; then
2999   cat >> confdefs.h <<\EOF
3000 #define off_t long
3001 EOF
3002
3003 fi
3004
3005 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3006 echo "configure:3007: checking for size_t" >&5
3007 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3008   echo $ac_n "(cached) $ac_c" 1>&6
3009 else
3010   cat > conftest.$ac_ext <<EOF
3011 #line 3012 "configure"
3012 #include "confdefs.h"
3013 #include <sys/types.h>
3014 #if STDC_HEADERS
3015 #include <stdlib.h>
3016 #include <stddef.h>
3017 #endif
3018 EOF
3019 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3020   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3021   rm -rf conftest*
3022   ac_cv_type_size_t=yes
3023 else
3024   rm -rf conftest*
3025   ac_cv_type_size_t=no
3026 fi
3027 rm -f conftest*
3028
3029 fi
3030 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3031 if test $ac_cv_type_size_t = no; then
3032   cat >> confdefs.h <<\EOF
3033 #define size_t unsigned
3034 EOF
3035
3036 fi
3037
3038 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3039 echo "configure:3040: checking for pid_t" >&5
3040 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3041   echo $ac_n "(cached) $ac_c" 1>&6
3042 else
3043   cat > conftest.$ac_ext <<EOF
3044 #line 3045 "configure"
3045 #include "confdefs.h"
3046 #include <sys/types.h>
3047 #if STDC_HEADERS
3048 #include <stdlib.h>
3049 #include <stddef.h>
3050 #endif
3051 EOF
3052 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3053   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3054   rm -rf conftest*
3055   ac_cv_type_pid_t=yes
3056 else
3057   rm -rf conftest*
3058   ac_cv_type_pid_t=no
3059 fi
3060 rm -f conftest*
3061
3062 fi
3063 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3064 if test $ac_cv_type_pid_t = no; then
3065   cat >> confdefs.h <<\EOF
3066 #define pid_t int
3067 EOF
3068
3069 fi
3070
3071 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3072 echo "configure:3073: checking for st_rdev in struct stat" >&5
3073 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3074   echo $ac_n "(cached) $ac_c" 1>&6
3075 else
3076   cat > conftest.$ac_ext <<EOF
3077 #line 3078 "configure"
3078 #include "confdefs.h"
3079 #include <sys/types.h>
3080 #include <sys/stat.h>
3081 int main() {
3082 struct stat s; s.st_rdev;
3083 ; return 0; }
3084 EOF
3085 if { (eval echo configure:3086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3086   rm -rf conftest*
3087   ac_cv_struct_st_rdev=yes
3088 else
3089   echo "configure: failed program was:" >&5
3090   cat conftest.$ac_ext >&5
3091   rm -rf conftest*
3092   ac_cv_struct_st_rdev=no
3093 fi
3094 rm -f conftest*
3095 fi
3096
3097 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3098 if test $ac_cv_struct_st_rdev = yes; then
3099   cat >> confdefs.h <<\EOF
3100 #define HAVE_ST_RDEV 1
3101 EOF
3102
3103 fi
3104
3105 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3106 echo "configure:3107: checking for d_off in dirent" >&5
3107 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3108   echo $ac_n "(cached) $ac_c" 1>&6
3109 else
3110   cat > conftest.$ac_ext <<EOF
3111 #line 3112 "configure"
3112 #include "confdefs.h"
3113
3114 #include <unistd.h>
3115 #include <sys/types.h>
3116 #include <dirent.h>
3117 int main() {
3118 struct dirent d; d.d_off;
3119 ; return 0; }
3120 EOF
3121 if { (eval echo configure:3122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3122   rm -rf conftest*
3123   ac_cv_dirent_d_off=yes
3124 else
3125   echo "configure: failed program was:" >&5
3126   cat conftest.$ac_ext >&5
3127   rm -rf conftest*
3128   ac_cv_dirent_d_off=no
3129 fi
3130 rm -f conftest*
3131 fi
3132
3133 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3134 if test $ac_cv_dirent_d_off = yes; then
3135   cat >> confdefs.h <<\EOF
3136 #define HAVE_DIRENT_D_OFF 1
3137 EOF
3138
3139 fi
3140
3141 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3142 echo "configure:3143: checking for ino_t" >&5
3143 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3144   echo $ac_n "(cached) $ac_c" 1>&6
3145 else
3146   cat > conftest.$ac_ext <<EOF
3147 #line 3148 "configure"
3148 #include "confdefs.h"
3149 #include <sys/types.h>
3150 #if STDC_HEADERS
3151 #include <stdlib.h>
3152 #include <stddef.h>
3153 #endif
3154 EOF
3155 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3156   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3157   rm -rf conftest*
3158   ac_cv_type_ino_t=yes
3159 else
3160   rm -rf conftest*
3161   ac_cv_type_ino_t=no
3162 fi
3163 rm -f conftest*
3164
3165 fi
3166 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3167 if test $ac_cv_type_ino_t = no; then
3168   cat >> confdefs.h <<\EOF
3169 #define ino_t unsigned
3170 EOF
3171
3172 fi
3173
3174 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3175 echo "configure:3176: checking for loff_t" >&5
3176 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3177   echo $ac_n "(cached) $ac_c" 1>&6
3178 else
3179   cat > conftest.$ac_ext <<EOF
3180 #line 3181 "configure"
3181 #include "confdefs.h"
3182 #include <sys/types.h>
3183 #if STDC_HEADERS
3184 #include <stdlib.h>
3185 #include <stddef.h>
3186 #endif
3187 EOF
3188 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3189   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3190   rm -rf conftest*
3191   ac_cv_type_loff_t=yes
3192 else
3193   rm -rf conftest*
3194   ac_cv_type_loff_t=no
3195 fi
3196 rm -f conftest*
3197
3198 fi
3199 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3200 if test $ac_cv_type_loff_t = no; then
3201   cat >> confdefs.h <<\EOF
3202 #define loff_t off_t
3203 EOF
3204
3205 fi
3206
3207 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3208 echo "configure:3209: checking for offset_t" >&5
3209 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3210   echo $ac_n "(cached) $ac_c" 1>&6
3211 else
3212   cat > conftest.$ac_ext <<EOF
3213 #line 3214 "configure"
3214 #include "confdefs.h"
3215 #include <sys/types.h>
3216 #if STDC_HEADERS
3217 #include <stdlib.h>
3218 #include <stddef.h>
3219 #endif
3220 EOF
3221 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3222   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3223   rm -rf conftest*
3224   ac_cv_type_offset_t=yes
3225 else
3226   rm -rf conftest*
3227   ac_cv_type_offset_t=no
3228 fi
3229 rm -f conftest*
3230
3231 fi
3232 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3233 if test $ac_cv_type_offset_t = no; then
3234   cat >> confdefs.h <<\EOF
3235 #define offset_t loff_t
3236 EOF
3237
3238 fi
3239
3240 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3241 echo "configure:3242: checking for ssize_t" >&5
3242 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3243   echo $ac_n "(cached) $ac_c" 1>&6
3244 else
3245   cat > conftest.$ac_ext <<EOF
3246 #line 3247 "configure"
3247 #include "confdefs.h"
3248 #include <sys/types.h>
3249 #if STDC_HEADERS
3250 #include <stdlib.h>
3251 #include <stddef.h>
3252 #endif
3253 EOF
3254 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3255   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3256   rm -rf conftest*
3257   ac_cv_type_ssize_t=yes
3258 else
3259   rm -rf conftest*
3260   ac_cv_type_ssize_t=no
3261 fi
3262 rm -f conftest*
3263
3264 fi
3265 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3266 if test $ac_cv_type_ssize_t = no; then
3267   cat >> confdefs.h <<\EOF
3268 #define ssize_t int
3269 EOF
3270
3271 fi
3272
3273 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3274 echo "configure:3275: checking for wchar_t" >&5
3275 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3276   echo $ac_n "(cached) $ac_c" 1>&6
3277 else
3278   cat > conftest.$ac_ext <<EOF
3279 #line 3280 "configure"
3280 #include "confdefs.h"
3281 #include <sys/types.h>
3282 #if STDC_HEADERS
3283 #include <stdlib.h>
3284 #include <stddef.h>
3285 #endif
3286 EOF
3287 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3288   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3289   rm -rf conftest*
3290   ac_cv_type_wchar_t=yes
3291 else
3292   rm -rf conftest*
3293   ac_cv_type_wchar_t=no
3294 fi
3295 rm -f conftest*
3296
3297 fi
3298 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3299 if test $ac_cv_type_wchar_t = no; then
3300   cat >> confdefs.h <<\EOF
3301 #define wchar_t unsigned short
3302 EOF
3303
3304 fi
3305
3306
3307 ############################################
3308 # for cups support we need libcups, and a handful of header files
3309
3310 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3311 echo "configure:3312: checking for httpConnect in -lcups" >&5
3312 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3313 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3314   echo $ac_n "(cached) $ac_c" 1>&6
3315 else
3316   ac_save_LIBS="$LIBS"
3317 LIBS="-lcups  $LIBS"
3318 cat > conftest.$ac_ext <<EOF
3319 #line 3320 "configure"
3320 #include "confdefs.h"
3321 /* Override any gcc2 internal prototype to avoid an error.  */
3322 /* We use char because int might match the return type of a gcc2
3323     builtin and then its argument prototype would still apply.  */
3324 char httpConnect();
3325
3326 int main() {
3327 httpConnect()
3328 ; return 0; }
3329 EOF
3330 if { (eval echo configure:3331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3331   rm -rf conftest*
3332   eval "ac_cv_lib_$ac_lib_var=yes"
3333 else
3334   echo "configure: failed program was:" >&5
3335   cat conftest.$ac_ext >&5
3336   rm -rf conftest*
3337   eval "ac_cv_lib_$ac_lib_var=no"
3338 fi
3339 rm -f conftest*
3340 LIBS="$ac_save_LIBS"
3341
3342 fi
3343 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3344   echo "$ac_t""yes" 1>&6
3345     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3346     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3347   cat >> confdefs.h <<EOF
3348 #define $ac_tr_lib 1
3349 EOF
3350
3351   LIBS="-lcups $LIBS"
3352
3353 else
3354   echo "$ac_t""no" 1>&6
3355 fi
3356
3357
3358 # I wonder if there is a nicer way of doing this?
3359
3360 if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
3361         for ac_hdr in cups/cups.h cups/language.h
3362 do
3363 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3364 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3365 echo "configure:3366: checking for $ac_hdr" >&5
3366 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3367   echo $ac_n "(cached) $ac_c" 1>&6
3368 else
3369   cat > conftest.$ac_ext <<EOF
3370 #line 3371 "configure"
3371 #include "confdefs.h"
3372 #include <$ac_hdr>
3373 EOF
3374 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3375 { (eval echo configure:3376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3376 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3377 if test -z "$ac_err"; then
3378   rm -rf conftest*
3379   eval "ac_cv_header_$ac_safe=yes"
3380 else
3381   echo "$ac_err" >&5
3382   echo "configure: failed program was:" >&5
3383   cat conftest.$ac_ext >&5
3384   rm -rf conftest*
3385   eval "ac_cv_header_$ac_safe=no"
3386 fi
3387 rm -f conftest*
3388 fi
3389 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3390   echo "$ac_t""yes" 1>&6
3391     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3392   cat >> confdefs.h <<EOF
3393 #define $ac_tr_hdr 1
3394 EOF
3395  
3396 else
3397   echo "$ac_t""no" 1>&6
3398 fi
3399 done
3400
3401         if x"$ac_cv_header_cups_cups_h" = x"yes"; then
3402                 if x"$ac_cv_header_cups_language_h" = x"yes"; then
3403                         cat >> confdefs.h <<\EOF
3404 #define HAVE_CUPS 1
3405 EOF
3406
3407                 fi
3408         fi
3409 fi
3410
3411 ############################################
3412 # we need libdl for PAM and the new VFS code
3413 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3414 echo "configure:3415: checking for dlopen in -ldl" >&5
3415 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3416 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3417   echo $ac_n "(cached) $ac_c" 1>&6
3418 else
3419   ac_save_LIBS="$LIBS"
3420 LIBS="-ldl  $LIBS"
3421 cat > conftest.$ac_ext <<EOF
3422 #line 3423 "configure"
3423 #include "confdefs.h"
3424 /* Override any gcc2 internal prototype to avoid an error.  */
3425 /* We use char because int might match the return type of a gcc2
3426     builtin and then its argument prototype would still apply.  */
3427 char dlopen();
3428
3429 int main() {
3430 dlopen()
3431 ; return 0; }
3432 EOF
3433 if { (eval echo configure:3434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3434   rm -rf conftest*
3435   eval "ac_cv_lib_$ac_lib_var=yes"
3436 else
3437   echo "configure: failed program was:" >&5
3438   cat conftest.$ac_ext >&5
3439   rm -rf conftest*
3440   eval "ac_cv_lib_$ac_lib_var=no"
3441 fi
3442 rm -f conftest*
3443 LIBS="$ac_save_LIBS"
3444
3445 fi
3446 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3447   echo "$ac_t""yes" 1>&6
3448   LIBS="$LIBS -ldl";
3449         cat >> confdefs.h <<\EOF
3450 #define HAVE_LIBDL 1
3451 EOF
3452
3453 else
3454   echo "$ac_t""no" 1>&6
3455 fi
3456
3457
3458
3459 ############################################
3460 # check if the compiler can do immediate structures
3461 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3462 echo "configure:3463: checking for immediate structures" >&5
3463 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3464   echo $ac_n "(cached) $ac_c" 1>&6
3465 else
3466   
3467     cat > conftest.$ac_ext <<EOF
3468 #line 3469 "configure"
3469 #include "confdefs.h"
3470
3471 #include <stdio.h>
3472 int main() {
3473
3474    #define X_FOOBAR(x) ((FOOBAR) { x })
3475    typedef struct {unsigned x;} FOOBAR;
3476    FOOBAR f = X_FOOBAR(1);   
3477
3478 ; return 0; }
3479 EOF
3480 if { (eval echo configure:3481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3481   rm -rf conftest*
3482   samba_cv_immediate_structures=yes
3483 else
3484   echo "configure: failed program was:" >&5
3485   cat conftest.$ac_ext >&5
3486   rm -rf conftest*
3487   samba_cv_immediate_structures=no
3488 fi
3489 rm -f conftest*
3490 fi
3491
3492 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3493 if test x"$samba_cv_immediate_structures" = x"yes"; then
3494    cat >> confdefs.h <<\EOF
3495 #define HAVE_IMMEDIATE_STRUCTURES 1
3496 EOF
3497
3498 fi
3499
3500 ############################################
3501 # check for unix domain sockets
3502 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3503 echo "configure:3504: checking for unix domain sockets" >&5
3504 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3505   echo $ac_n "(cached) $ac_c" 1>&6
3506 else
3507   
3508     cat > conftest.$ac_ext <<EOF
3509 #line 3510 "configure"
3510 #include "confdefs.h"
3511
3512 #include <sys/types.h>
3513 #include <stdlib.h>
3514 #include <stddef.h>
3515 #include <sys/socket.h>
3516 #include <sys/un.h>
3517 int main() {
3518
3519   struct sockaddr_un sunaddr; 
3520   sunaddr.sun_family = AF_UNIX;
3521
3522 ; return 0; }
3523 EOF
3524 if { (eval echo configure:3525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3525   rm -rf conftest*
3526   samba_cv_unixsocket=yes
3527 else
3528   echo "configure: failed program was:" >&5
3529   cat conftest.$ac_ext >&5
3530   rm -rf conftest*
3531   samba_cv_unixsocket=no
3532 fi
3533 rm -f conftest*
3534 fi
3535
3536 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3537 if test x"$samba_cv_unixsocket" = x"yes"; then
3538    cat >> confdefs.h <<\EOF
3539 #define HAVE_UNIXSOCKET 1
3540 EOF
3541
3542 fi
3543
3544
3545 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3546 echo "configure:3547: checking for socklen_t type" >&5
3547 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3548   echo $ac_n "(cached) $ac_c" 1>&6
3549 else
3550   
3551     cat > conftest.$ac_ext <<EOF
3552 #line 3553 "configure"
3553 #include "confdefs.h"
3554
3555 #include <sys/types.h>
3556 #if STDC_HEADERS
3557 #include <stdlib.h>
3558 #include <stddef.h>
3559 #endif
3560 #include <sys/socket.h>
3561 int main() {
3562 socklen_t i = 0
3563 ; return 0; }
3564 EOF
3565 if { (eval echo configure:3566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3566   rm -rf conftest*
3567   samba_cv_socklen_t=yes
3568 else
3569   echo "configure: failed program was:" >&5
3570   cat conftest.$ac_ext >&5
3571   rm -rf conftest*
3572   samba_cv_socklen_t=no
3573 fi
3574 rm -f conftest*
3575 fi
3576
3577 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3578 if test x"$samba_cv_socklen_t" = x"yes"; then
3579    cat >> confdefs.h <<\EOF
3580 #define HAVE_SOCKLEN_T_TYPE 1
3581 EOF
3582
3583 fi
3584
3585 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3586 echo "configure:3587: checking for sig_atomic_t type" >&5
3587 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3588   echo $ac_n "(cached) $ac_c" 1>&6
3589 else
3590   
3591     cat > conftest.$ac_ext <<EOF
3592 #line 3593 "configure"
3593 #include "confdefs.h"
3594
3595 #include <sys/types.h>
3596 #if STDC_HEADERS
3597 #include <stdlib.h>
3598 #include <stddef.h>
3599 #endif
3600 #include <signal.h>
3601 int main() {
3602 sig_atomic_t i = 0
3603 ; return 0; }
3604 EOF
3605 if { (eval echo configure:3606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3606   rm -rf conftest*
3607   samba_cv_sig_atomic_t=yes
3608 else
3609   echo "configure: failed program was:" >&5
3610   cat conftest.$ac_ext >&5
3611   rm -rf conftest*
3612   samba_cv_sig_atomic_t=no
3613 fi
3614 rm -f conftest*
3615 fi
3616
3617 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3618 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3619    cat >> confdefs.h <<\EOF
3620 #define HAVE_SIG_ATOMIC_T_TYPE 1
3621 EOF
3622
3623 fi
3624
3625 # stupid headers have the functions but no declaration. grrrr.
3626
3627  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
3628 echo "configure:3629: checking for errno declaration" >&5
3629 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
3630   echo $ac_n "(cached) $ac_c" 1>&6
3631 else
3632   
3633     cat > conftest.$ac_ext <<EOF
3634 #line 3635 "configure"
3635 #include "confdefs.h"
3636 #include <errno.h>
3637 int main() {
3638 int i = (int)errno
3639 ; return 0; }
3640 EOF
3641 if { (eval echo configure:3642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3642   rm -rf conftest*
3643   ac_cv_have_errno_decl=yes
3644 else
3645   echo "configure: failed program was:" >&5
3646   cat conftest.$ac_ext >&5
3647   rm -rf conftest*
3648   ac_cv_have_errno_decl=no
3649 fi
3650 rm -f conftest*
3651 fi
3652
3653 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
3654  if test x"$ac_cv_have_errno_decl" = x"yes"; then
3655     cat >> confdefs.h <<\EOF
3656 #define HAVE_ERRNO_DECL 1
3657 EOF
3658
3659  fi
3660
3661
3662  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3663 echo "configure:3664: checking for setresuid declaration" >&5
3664 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
3665   echo $ac_n "(cached) $ac_c" 1>&6
3666 else
3667   
3668     cat > conftest.$ac_ext <<EOF
3669 #line 3670 "configure"
3670 #include "confdefs.h"
3671 #include <unistd.h>
3672 int main() {
3673 int i = (int)setresuid
3674 ; return 0; }
3675 EOF
3676 if { (eval echo configure:3677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3677   rm -rf conftest*
3678   ac_cv_have_setresuid_decl=yes
3679 else
3680   echo "configure: failed program was:" >&5
3681   cat conftest.$ac_ext >&5
3682   rm -rf conftest*
3683   ac_cv_have_setresuid_decl=no
3684 fi
3685 rm -f conftest*
3686 fi
3687
3688 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
3689  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
3690     cat >> confdefs.h <<\EOF
3691 #define HAVE_SETRESUID_DECL 1
3692 EOF
3693
3694  fi
3695
3696
3697  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
3698 echo "configure:3699: checking for setresgid declaration" >&5
3699 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
3700   echo $ac_n "(cached) $ac_c" 1>&6
3701 else
3702   
3703     cat > conftest.$ac_ext <<EOF
3704 #line 3705 "configure"
3705 #include "confdefs.h"
3706 #include <unistd.h>
3707 int main() {
3708 int i = (int)setresgid
3709 ; return 0; }
3710 EOF
3711 if { (eval echo configure:3712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3712   rm -rf conftest*
3713   ac_cv_have_setresgid_decl=yes
3714 else
3715   echo "configure: failed program was:" >&5
3716   cat conftest.$ac_ext >&5
3717   rm -rf conftest*
3718   ac_cv_have_setresgid_decl=no
3719 fi
3720 rm -f conftest*
3721 fi
3722
3723 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
3724  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
3725     cat >> confdefs.h <<\EOF
3726 #define HAVE_SETRESGID_DECL 1
3727 EOF
3728
3729  fi
3730
3731
3732  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
3733 echo "configure:3734: checking for asprintf declaration" >&5
3734 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
3735   echo $ac_n "(cached) $ac_c" 1>&6
3736 else
3737   
3738     cat > conftest.$ac_ext <<EOF
3739 #line 3740 "configure"
3740 #include "confdefs.h"
3741 #include <stdio.h>
3742 int main() {
3743 int i = (int)asprintf
3744 ; return 0; }
3745 EOF
3746 if { (eval echo configure:3747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3747   rm -rf conftest*
3748   ac_cv_have_asprintf_decl=yes
3749 else
3750   echo "configure: failed program was:" >&5
3751   cat conftest.$ac_ext >&5
3752   rm -rf conftest*
3753   ac_cv_have_asprintf_decl=no
3754 fi
3755 rm -f conftest*
3756 fi
3757
3758 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
3759  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
3760     cat >> confdefs.h <<\EOF
3761 #define HAVE_ASPRINTF_DECL 1
3762 EOF
3763
3764  fi
3765
3766
3767  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
3768 echo "configure:3769: checking for vasprintf declaration" >&5
3769 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
3770   echo $ac_n "(cached) $ac_c" 1>&6
3771 else
3772   
3773     cat > conftest.$ac_ext <<EOF
3774 #line 3775 "configure"
3775 #include "confdefs.h"
3776 #include <stdio.h>
3777 int main() {
3778 int i = (int)vasprintf
3779 ; return 0; }
3780 EOF
3781 if { (eval echo configure:3782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3782   rm -rf conftest*
3783   ac_cv_have_vasprintf_decl=yes
3784 else
3785   echo "configure: failed program was:" >&5
3786   cat conftest.$ac_ext >&5
3787   rm -rf conftest*
3788   ac_cv_have_vasprintf_decl=no
3789 fi
3790 rm -f conftest*
3791 fi
3792
3793 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
3794  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
3795     cat >> confdefs.h <<\EOF
3796 #define HAVE_VASPRINTF_DECL 1
3797 EOF
3798
3799  fi
3800
3801
3802  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
3803 echo "configure:3804: checking for vsnprintf declaration" >&5
3804 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
3805   echo $ac_n "(cached) $ac_c" 1>&6
3806 else
3807   
3808     cat > conftest.$ac_ext <<EOF
3809 #line 3810 "configure"
3810 #include "confdefs.h"
3811 #include <stdio.h>
3812 int main() {
3813 int i = (int)vsnprintf
3814 ; return 0; }
3815 EOF
3816 if { (eval echo configure:3817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3817   rm -rf conftest*
3818   ac_cv_have_vsnprintf_decl=yes
3819 else
3820   echo "configure: failed program was:" >&5
3821   cat conftest.$ac_ext >&5
3822   rm -rf conftest*
3823   ac_cv_have_vsnprintf_decl=no
3824 fi
3825 rm -f conftest*
3826 fi
3827
3828 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
3829  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
3830     cat >> confdefs.h <<\EOF
3831 #define HAVE_VSNPRINTF_DECL 1
3832 EOF
3833
3834  fi
3835
3836
3837  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
3838 echo "configure:3839: checking for snprintf declaration" >&5
3839 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
3840   echo $ac_n "(cached) $ac_c" 1>&6
3841 else
3842   
3843     cat > conftest.$ac_ext <<EOF
3844 #line 3845 "configure"
3845 #include "confdefs.h"
3846 #include <stdio.h>
3847 int main() {
3848 int i = (int)snprintf
3849 ; return 0; }
3850 EOF
3851 if { (eval echo configure:3852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3852   rm -rf conftest*
3853   ac_cv_have_snprintf_decl=yes
3854 else
3855   echo "configure: failed program was:" >&5
3856   cat conftest.$ac_ext >&5
3857   rm -rf conftest*
3858   ac_cv_have_snprintf_decl=no
3859 fi
3860 rm -f conftest*
3861 fi
3862
3863 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
3864  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
3865     cat >> confdefs.h <<\EOF
3866 #define HAVE_SNPRINTF_DECL 1
3867 EOF
3868
3869  fi
3870
3871
3872 # and glibc has setresuid under linux but the function does
3873 # nothing until kernel 2.1.44! very dumb.
3874 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
3875 echo "configure:3876: checking for real setresuid" >&5
3876 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
3877   echo $ac_n "(cached) $ac_c" 1>&6
3878 else
3879   
3880     if test "$cross_compiling" = yes; then
3881   samba_cv_have_setresuid=cross
3882 else
3883   cat > conftest.$ac_ext <<EOF
3884 #line 3885 "configure"
3885 #include "confdefs.h"
3886 #include <errno.h>
3887 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
3888 EOF
3889 if { (eval echo configure:3890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3890 then
3891   samba_cv_have_setresuid=yes
3892 else
3893   echo "configure: failed program was:" >&5
3894   cat conftest.$ac_ext >&5
3895   rm -fr conftest*
3896   samba_cv_have_setresuid=no
3897 fi
3898 rm -fr conftest*
3899 fi
3900
3901 fi
3902
3903 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
3904 if test x"$samba_cv_have_setresuid" = x"yes"; then
3905     cat >> confdefs.h <<\EOF
3906 #define HAVE_SETRESUID 1
3907 EOF
3908
3909 fi
3910
3911 # Do the same check for setresguid...
3912 #
3913 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
3914 echo "configure:3915: checking for real setresgid" >&5
3915 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
3916   echo $ac_n "(cached) $ac_c" 1>&6
3917 else
3918   
3919     if test "$cross_compiling" = yes; then
3920   samba_cv_have_setresgid=cross
3921 else
3922   cat > conftest.$ac_ext <<EOF
3923 #line 3924 "configure"
3924 #include "confdefs.h"
3925 #include <unistd.h>
3926 #include <errno.h>
3927 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
3928 EOF
3929 if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3930 then
3931   samba_cv_have_setresgid=yes
3932 else
3933   echo "configure: failed program was:" >&5
3934   cat conftest.$ac_ext >&5
3935   rm -fr conftest*
3936   samba_cv_have_setresgid=no
3937 fi
3938 rm -fr conftest*
3939 fi
3940
3941 fi
3942
3943 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
3944 if test x"$samba_cv_have_setresgid" = x"yes"; then
3945     cat >> confdefs.h <<\EOF
3946 #define HAVE_SETRESGID 1
3947 EOF
3948
3949 fi
3950
3951 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
3952 echo "configure:3953: checking for 8-bit clean memcmp" >&5
3953 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
3954   echo $ac_n "(cached) $ac_c" 1>&6
3955 else
3956   if test "$cross_compiling" = yes; then
3957   ac_cv_func_memcmp_clean=no
3958 else
3959   cat > conftest.$ac_ext <<EOF
3960 #line 3961 "configure"
3961 #include "confdefs.h"
3962
3963 main()
3964 {
3965   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
3966   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
3967 }
3968
3969 EOF
3970 if { (eval echo configure:3971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3971 then
3972   ac_cv_func_memcmp_clean=yes
3973 else
3974   echo "configure: failed program was:" >&5
3975   cat conftest.$ac_ext >&5
3976   rm -fr conftest*
3977   ac_cv_func_memcmp_clean=no
3978 fi
3979 rm -fr conftest*
3980 fi
3981
3982 fi
3983
3984 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
3985 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
3986
3987
3988 ###############################################
3989 # test for where we get crypt() from
3990 for ac_func in crypt
3991 do
3992 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3993 echo "configure:3994: checking for $ac_func" >&5
3994 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3995   echo $ac_n "(cached) $ac_c" 1>&6
3996 else
3997   cat > conftest.$ac_ext <<EOF
3998 #line 3999 "configure"
3999 #include "confdefs.h"
4000 /* System header to define __stub macros and hopefully few prototypes,
4001     which can conflict with char $ac_func(); below.  */
4002 #include <assert.h>
4003 /* Override any gcc2 internal prototype to avoid an error.  */
4004 /* We use char because int might match the return type of a gcc2
4005     builtin and then its argument prototype would still apply.  */
4006 char $ac_func();
4007
4008 int main() {
4009
4010 /* The GNU C library defines this for functions which it implements
4011     to always fail with ENOSYS.  Some functions are actually named
4012     something starting with __ and the normal name is an alias.  */
4013 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4014 choke me
4015 #else
4016 $ac_func();
4017 #endif
4018
4019 ; return 0; }
4020 EOF
4021 if { (eval echo configure:4022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4022   rm -rf conftest*
4023   eval "ac_cv_func_$ac_func=yes"
4024 else
4025   echo "configure: failed program was:" >&5
4026   cat conftest.$ac_ext >&5
4027   rm -rf conftest*
4028   eval "ac_cv_func_$ac_func=no"
4029 fi
4030 rm -f conftest*
4031 fi
4032
4033 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4034   echo "$ac_t""yes" 1>&6
4035     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4036   cat >> confdefs.h <<EOF
4037 #define $ac_tr_func 1
4038 EOF
4039  
4040 else
4041   echo "$ac_t""no" 1>&6
4042 fi
4043 done
4044
4045 if test x"$ac_cv_func_crypt" = x"no"; then
4046     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4047 echo "configure:4048: checking for crypt in -lcrypt" >&5
4048 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4049 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4050   echo $ac_n "(cached) $ac_c" 1>&6
4051 else
4052   ac_save_LIBS="$LIBS"
4053 LIBS="-lcrypt  $LIBS"
4054 cat > conftest.$ac_ext <<EOF
4055 #line 4056 "configure"
4056 #include "confdefs.h"
4057 /* Override any gcc2 internal prototype to avoid an error.  */
4058 /* We use char because int might match the return type of a gcc2
4059     builtin and then its argument prototype would still apply.  */
4060 char crypt();
4061
4062 int main() {
4063 crypt()
4064 ; return 0; }
4065 EOF
4066 if { (eval echo configure:4067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4067   rm -rf conftest*
4068   eval "ac_cv_lib_$ac_lib_var=yes"
4069 else
4070   echo "configure: failed program was:" >&5
4071   cat conftest.$ac_ext >&5
4072   rm -rf conftest*
4073   eval "ac_cv_lib_$ac_lib_var=no"
4074 fi
4075 rm -f conftest*
4076 LIBS="$ac_save_LIBS"
4077
4078 fi
4079 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4080   echo "$ac_t""yes" 1>&6
4081   LIBS="$LIBS -lcrypt";
4082         cat >> confdefs.h <<\EOF
4083 #define HAVE_CRYPT 1
4084 EOF
4085
4086 else
4087   echo "$ac_t""no" 1>&6
4088 fi
4089
4090 fi
4091
4092
4093 ###############################################
4094 # Readline included by default unless explicitly asked not to
4095 test "${with_readline+set}" != "set" && with_readline=yes
4096
4097 # test for where we get readline() from
4098 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4099 echo "configure:4100: checking whether to use readline" >&5
4100 # Check whether --with-readline or --without-readline was given.
4101 if test "${with_readline+set}" = set; then
4102   withval="$with_readline"
4103     case "$with_readline" in
4104   yes)
4105     echo "$ac_t""yes" 1>&6
4106
4107     for ac_hdr in readline.h history.h readline/readline.h
4108 do
4109 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4110 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4111 echo "configure:4112: checking for $ac_hdr" >&5
4112 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4113   echo $ac_n "(cached) $ac_c" 1>&6
4114 else
4115   cat > conftest.$ac_ext <<EOF
4116 #line 4117 "configure"
4117 #include "confdefs.h"
4118 #include <$ac_hdr>
4119 EOF
4120 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4121 { (eval echo configure:4122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4122 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4123 if test -z "$ac_err"; then
4124   rm -rf conftest*
4125   eval "ac_cv_header_$ac_safe=yes"
4126 else
4127   echo "$ac_err" >&5
4128   echo "configure: failed program was:" >&5
4129   cat conftest.$ac_ext >&5
4130   rm -rf conftest*
4131   eval "ac_cv_header_$ac_safe=no"
4132 fi
4133 rm -f conftest*
4134 fi
4135 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4136   echo "$ac_t""yes" 1>&6
4137     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4138   cat >> confdefs.h <<EOF
4139 #define $ac_tr_hdr 1
4140 EOF
4141  
4142 else
4143   echo "$ac_t""no" 1>&6
4144 fi
4145 done
4146
4147     for ac_hdr in readline/history.h
4148 do
4149 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4150 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4151 echo "configure:4152: checking for $ac_hdr" >&5
4152 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4153   echo $ac_n "(cached) $ac_c" 1>&6
4154 else
4155   cat > conftest.$ac_ext <<EOF
4156 #line 4157 "configure"
4157 #include "confdefs.h"
4158 #include <$ac_hdr>
4159 EOF
4160 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4161 { (eval echo configure:4162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4162 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4163 if test -z "$ac_err"; then
4164   rm -rf conftest*
4165   eval "ac_cv_header_$ac_safe=yes"
4166 else
4167   echo "$ac_err" >&5
4168   echo "configure: failed program was:" >&5
4169   cat conftest.$ac_ext >&5
4170   rm -rf conftest*
4171   eval "ac_cv_header_$ac_safe=no"
4172 fi
4173 rm -f conftest*
4174 fi
4175 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4176   echo "$ac_t""yes" 1>&6
4177     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4178   cat >> confdefs.h <<EOF
4179 #define $ac_tr_hdr 1
4180 EOF
4181  
4182 else
4183   echo "$ac_t""no" 1>&6
4184 fi
4185 done
4186
4187
4188     for ac_hdr in readline.h readline/readline.h
4189 do
4190 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4191 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4192 echo "configure:4193: checking for $ac_hdr" >&5
4193 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4194   echo $ac_n "(cached) $ac_c" 1>&6
4195 else
4196   cat > conftest.$ac_ext <<EOF
4197 #line 4198 "configure"
4198 #include "confdefs.h"
4199 #include <$ac_hdr>
4200 EOF
4201 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4202 { (eval echo configure:4203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4203 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4204 if test -z "$ac_err"; then
4205   rm -rf conftest*
4206   eval "ac_cv_header_$ac_safe=yes"
4207 else
4208   echo "$ac_err" >&5
4209   echo "configure: failed program was:" >&5
4210   cat conftest.$ac_ext >&5
4211   rm -rf conftest*
4212   eval "ac_cv_header_$ac_safe=no"
4213 fi
4214 rm -f conftest*
4215 fi
4216 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4217   echo "$ac_t""yes" 1>&6
4218     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4219   cat >> confdefs.h <<EOF
4220 #define $ac_tr_hdr 1
4221 EOF
4222  
4223       for termlib in ncurses curses termcap terminfo termlib; do
4224        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4225 echo "configure:4226: checking for tgetent in -l${termlib}" >&5
4226 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4227 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4228   echo $ac_n "(cached) $ac_c" 1>&6
4229 else
4230   ac_save_LIBS="$LIBS"
4231 LIBS="-l${termlib}  $LIBS"
4232 cat > conftest.$ac_ext <<EOF
4233 #line 4234 "configure"
4234 #include "confdefs.h"
4235 /* Override any gcc2 internal prototype to avoid an error.  */
4236 /* We use char because int might match the return type of a gcc2
4237     builtin and then its argument prototype would still apply.  */
4238 char tgetent();
4239
4240 int main() {
4241 tgetent()
4242 ; return 0; }
4243 EOF
4244 if { (eval echo configure:4245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4245   rm -rf conftest*
4246   eval "ac_cv_lib_$ac_lib_var=yes"
4247 else
4248   echo "configure: failed program was:" >&5
4249   cat conftest.$ac_ext >&5
4250   rm -rf conftest*
4251   eval "ac_cv_lib_$ac_lib_var=no"
4252 fi
4253 rm -f conftest*
4254 LIBS="$ac_save_LIBS"
4255
4256 fi
4257 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4258   echo "$ac_t""yes" 1>&6
4259   TERMLIBS="-l${termlib}"; break
4260 else
4261   echo "$ac_t""no" 1>&6
4262 fi
4263
4264       done
4265       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4266 echo "configure:4267: checking for rl_callback_handler_install in -lreadline" >&5
4267 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4268 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4269   echo $ac_n "(cached) $ac_c" 1>&6
4270 else
4271   ac_save_LIBS="$LIBS"
4272 LIBS="-lreadline $TERMLIBS $LIBS"
4273 cat > conftest.$ac_ext <<EOF
4274 #line 4275 "configure"
4275 #include "confdefs.h"
4276 /* Override any gcc2 internal prototype to avoid an error.  */
4277 /* We use char because int might match the return type of a gcc2
4278     builtin and then its argument prototype would still apply.  */
4279 char rl_callback_handler_install();
4280
4281 int main() {
4282 rl_callback_handler_install()
4283 ; return 0; }
4284 EOF
4285 if { (eval echo configure:4286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4286   rm -rf conftest*
4287   eval "ac_cv_lib_$ac_lib_var=yes"
4288 else
4289   echo "configure: failed program was:" >&5
4290   cat conftest.$ac_ext >&5
4291   rm -rf conftest*
4292   eval "ac_cv_lib_$ac_lib_var=no"
4293 fi
4294 rm -f conftest*
4295 LIBS="$ac_save_LIBS"
4296
4297 fi
4298 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4299   echo "$ac_t""yes" 1>&6
4300   TERMLIBS="-lreadline $TERMLIBS"
4301        cat >> confdefs.h <<\EOF
4302 #define HAVE_LIBREADLINE 1
4303 EOF
4304
4305        break
4306 else
4307   echo "$ac_t""no" 1>&6
4308 TERMLIBS=
4309 fi
4310
4311 else
4312   echo "$ac_t""no" 1>&6
4313 fi
4314 done
4315
4316     ;;
4317   no)
4318     echo "$ac_t""no" 1>&6
4319     ;;
4320   *)
4321     echo "$ac_t""yes" 1>&6
4322
4323     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4324     # alternate readline path
4325     _ldflags=${LDFLAGS}
4326     _cppflags=${CPPFLAGS}
4327
4328     # Add additional search path
4329     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4330     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4331
4332     for ac_hdr in readline.h history.h readline/readline.h
4333 do
4334 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4335 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4336 echo "configure:4337: checking for $ac_hdr" >&5
4337 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4338   echo $ac_n "(cached) $ac_c" 1>&6
4339 else
4340   cat > conftest.$ac_ext <<EOF
4341 #line 4342 "configure"
4342 #include "confdefs.h"
4343 #include <$ac_hdr>
4344 EOF
4345 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4346 { (eval echo configure:4347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4347 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4348 if test -z "$ac_err"; then
4349   rm -rf conftest*
4350   eval "ac_cv_header_$ac_safe=yes"
4351 else
4352   echo "$ac_err" >&5
4353   echo "configure: failed program was:" >&5
4354   cat conftest.$ac_ext >&5
4355   rm -rf conftest*
4356   eval "ac_cv_header_$ac_safe=no"
4357 fi
4358 rm -f conftest*
4359 fi
4360 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4361   echo "$ac_t""yes" 1>&6
4362     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4363   cat >> confdefs.h <<EOF
4364 #define $ac_tr_hdr 1
4365 EOF
4366  
4367 else
4368   echo "$ac_t""no" 1>&6
4369 fi
4370 done
4371
4372     for ac_hdr in readline/history.h
4373 do
4374 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4375 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4376 echo "configure:4377: checking for $ac_hdr" >&5
4377 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4378   echo $ac_n "(cached) $ac_c" 1>&6
4379 else
4380   cat > conftest.$ac_ext <<EOF
4381 #line 4382 "configure"
4382 #include "confdefs.h"
4383 #include <$ac_hdr>
4384 EOF
4385 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4386 { (eval echo configure:4387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4387 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4388 if test -z "$ac_err"; then
4389   rm -rf conftest*
4390   eval "ac_cv_header_$ac_safe=yes"
4391 else
4392   echo "$ac_err" >&5
4393   echo "configure: failed program was:" >&5
4394   cat conftest.$ac_ext >&5
4395   rm -rf conftest*
4396   eval "ac_cv_header_$ac_safe=no"
4397 fi
4398 rm -f conftest*
4399 fi
4400 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4401   echo "$ac_t""yes" 1>&6
4402     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4403   cat >> confdefs.h <<EOF
4404 #define $ac_tr_hdr 1
4405 EOF
4406  
4407 else
4408   echo "$ac_t""no" 1>&6
4409 fi
4410 done
4411
4412
4413     for ac_hdr in readline.h readline/readline.h
4414 do
4415 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4416 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4417 echo "configure:4418: checking for $ac_hdr" >&5
4418 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4419   echo $ac_n "(cached) $ac_c" 1>&6
4420 else
4421   cat > conftest.$ac_ext <<EOF
4422 #line 4423 "configure"
4423 #include "confdefs.h"
4424 #include <$ac_hdr>
4425 EOF
4426 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4427 { (eval echo configure:4428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4428 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4429 if test -z "$ac_err"; then
4430   rm -rf conftest*
4431   eval "ac_cv_header_$ac_safe=yes"
4432 else
4433   echo "$ac_err" >&5
4434   echo "configure: failed program was:" >&5
4435   cat conftest.$ac_ext >&5
4436   rm -rf conftest*
4437   eval "ac_cv_header_$ac_safe=no"
4438 fi
4439 rm -f conftest*
4440 fi
4441 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4442   echo "$ac_t""yes" 1>&6
4443     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4444   cat >> confdefs.h <<EOF
4445 #define $ac_tr_hdr 1
4446 EOF
4447  
4448       for termlib in ncurses curses termcap terminfo termlib; do
4449        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4450 echo "configure:4451: checking for tgetent in -l${termlib}" >&5
4451 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4452 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4453   echo $ac_n "(cached) $ac_c" 1>&6
4454 else
4455   ac_save_LIBS="$LIBS"
4456 LIBS="-l${termlib}  $LIBS"
4457 cat > conftest.$ac_ext <<EOF
4458 #line 4459 "configure"
4459 #include "confdefs.h"
4460 /* Override any gcc2 internal prototype to avoid an error.  */
4461 /* We use char because int might match the return type of a gcc2
4462     builtin and then its argument prototype would still apply.  */
4463 char tgetent();
4464
4465 int main() {
4466 tgetent()
4467 ; return 0; }
4468 EOF
4469 if { (eval echo configure:4470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4470   rm -rf conftest*
4471   eval "ac_cv_lib_$ac_lib_var=yes"
4472 else
4473   echo "configure: failed program was:" >&5
4474   cat conftest.$ac_ext >&5
4475   rm -rf conftest*
4476   eval "ac_cv_lib_$ac_lib_var=no"
4477 fi
4478 rm -f conftest*
4479 LIBS="$ac_save_LIBS"
4480
4481 fi
4482 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4483   echo "$ac_t""yes" 1>&6
4484   TERMLIBS="-l${termlib}"; break
4485 else
4486   echo "$ac_t""no" 1>&6
4487 fi
4488
4489       done
4490       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4491 echo "configure:4492: checking for rl_callback_handler_install in -lreadline" >&5
4492 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4493 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4494   echo $ac_n "(cached) $ac_c" 1>&6
4495 else
4496   ac_save_LIBS="$LIBS"
4497 LIBS="-lreadline $TERMLIBS $LIBS"
4498 cat > conftest.$ac_ext <<EOF
4499 #line 4500 "configure"
4500 #include "confdefs.h"
4501 /* Override any gcc2 internal prototype to avoid an error.  */
4502 /* We use char because int might match the return type of a gcc2
4503     builtin and then its argument prototype would still apply.  */
4504 char rl_callback_handler_install();
4505
4506 int main() {
4507 rl_callback_handler_install()
4508 ; return 0; }
4509 EOF
4510 if { (eval echo configure:4511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4511   rm -rf conftest*
4512   eval "ac_cv_lib_$ac_lib_var=yes"
4513 else
4514   echo "configure: failed program was:" >&5
4515   cat conftest.$ac_ext >&5
4516   rm -rf conftest*
4517   eval "ac_cv_lib_$ac_lib_var=no"
4518 fi
4519 rm -f conftest*
4520 LIBS="$ac_save_LIBS"
4521
4522 fi
4523 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4524   echo "$ac_t""yes" 1>&6
4525   TERMLDFLAGS="-L$with_readline/lib"
4526        TERMCPPFLAGS="-I$with_readline/include"
4527        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4528        TERMLIBS="-lreadline $TERMLIBS"
4529        cat >> confdefs.h <<\EOF
4530 #define HAVE_LIBREADLINE 1
4531 EOF
4532
4533        break
4534 else
4535   echo "$ac_t""no" 1>&6
4536 TERMLIBS= CPPFLAGS=$_cppflags
4537 fi
4538
4539 else
4540   echo "$ac_t""no" 1>&6
4541 fi
4542 done
4543
4544
4545     LDFLAGS=$_ldflags
4546     ;;
4547   esac
4548 else
4549   echo "$ac_t""no" 1>&6
4550
4551 fi
4552
4553
4554
4555
4556 # The following test taken from the cvs sources
4557 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4558 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4559 # libsocket.so which has a bad implementation of gethostbyname (it
4560 # only looks in /etc/hosts), so we only look for -lsocket if we need
4561 # it.
4562 for ac_func in connect
4563 do
4564 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4565 echo "configure:4566: checking for $ac_func" >&5
4566 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4567   echo $ac_n "(cached) $ac_c" 1>&6
4568 else
4569   cat > conftest.$ac_ext <<EOF
4570 #line 4571 "configure"
4571 #include "confdefs.h"
4572 /* System header to define __stub macros and hopefully few prototypes,
4573     which can conflict with char $ac_func(); below.  */
4574 #include <assert.h>
4575 /* Override any gcc2 internal prototype to avoid an error.  */
4576 /* We use char because int might match the return type of a gcc2
4577     builtin and then its argument prototype would still apply.  */
4578 char $ac_func();
4579
4580 int main() {
4581
4582 /* The GNU C library defines this for functions which it implements
4583     to always fail with ENOSYS.  Some functions are actually named
4584     something starting with __ and the normal name is an alias.  */
4585 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4586 choke me
4587 #else
4588 $ac_func();
4589 #endif
4590
4591 ; return 0; }
4592 EOF
4593 if { (eval echo configure:4594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4594   rm -rf conftest*
4595   eval "ac_cv_func_$ac_func=yes"
4596 else
4597   echo "configure: failed program was:" >&5
4598   cat conftest.$ac_ext >&5
4599   rm -rf conftest*
4600   eval "ac_cv_func_$ac_func=no"
4601 fi
4602 rm -f conftest*
4603 fi
4604
4605 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4606   echo "$ac_t""yes" 1>&6
4607     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4608   cat >> confdefs.h <<EOF
4609 #define $ac_tr_func 1
4610 EOF
4611  
4612 else
4613   echo "$ac_t""no" 1>&6
4614 fi
4615 done
4616
4617 if test x"$ac_cv_func_connect" = x"no"; then
4618     case "$LIBS" in
4619     *-lnsl*) ;;
4620     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4621 echo "configure:4622: checking for printf in -lnsl_s" >&5
4622 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4623 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4624   echo $ac_n "(cached) $ac_c" 1>&6
4625 else
4626   ac_save_LIBS="$LIBS"
4627 LIBS="-lnsl_s  $LIBS"
4628 cat > conftest.$ac_ext <<EOF
4629 #line 4630 "configure"
4630 #include "confdefs.h"
4631 /* Override any gcc2 internal prototype to avoid an error.  */
4632 /* We use char because int might match the return type of a gcc2
4633     builtin and then its argument prototype would still apply.  */
4634 char printf();
4635
4636 int main() {
4637 printf()
4638 ; return 0; }
4639 EOF
4640 if { (eval echo configure:4641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4641   rm -rf conftest*
4642   eval "ac_cv_lib_$ac_lib_var=yes"
4643 else
4644   echo "configure: failed program was:" >&5
4645   cat conftest.$ac_ext >&5
4646   rm -rf conftest*
4647   eval "ac_cv_lib_$ac_lib_var=no"
4648 fi
4649 rm -f conftest*
4650 LIBS="$ac_save_LIBS"
4651
4652 fi
4653 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4654   echo "$ac_t""yes" 1>&6
4655     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4656     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4657   cat >> confdefs.h <<EOF
4658 #define $ac_tr_lib 1
4659 EOF
4660
4661   LIBS="-lnsl_s $LIBS"
4662
4663 else
4664   echo "$ac_t""no" 1>&6
4665 fi
4666  ;;
4667     esac
4668     case "$LIBS" in
4669     *-lnsl*) ;;
4670     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
4671 echo "configure:4672: checking for printf in -lnsl" >&5
4672 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
4673 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4674   echo $ac_n "(cached) $ac_c" 1>&6
4675 else
4676   ac_save_LIBS="$LIBS"
4677 LIBS="-lnsl  $LIBS"
4678 cat > conftest.$ac_ext <<EOF
4679 #line 4680 "configure"
4680 #include "confdefs.h"
4681 /* Override any gcc2 internal prototype to avoid an error.  */
4682 /* We use char because int might match the return type of a gcc2
4683     builtin and then its argument prototype would still apply.  */
4684 char printf();
4685
4686 int main() {
4687 printf()
4688 ; return 0; }
4689 EOF
4690 if { (eval echo configure:4691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4691   rm -rf conftest*
4692   eval "ac_cv_lib_$ac_lib_var=yes"
4693 else
4694   echo "configure: failed program was:" >&5
4695   cat conftest.$ac_ext >&5
4696   rm -rf conftest*
4697   eval "ac_cv_lib_$ac_lib_var=no"
4698 fi
4699 rm -f conftest*
4700 LIBS="$ac_save_LIBS"
4701
4702 fi
4703 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4704   echo "$ac_t""yes" 1>&6
4705     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4706     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4707   cat >> confdefs.h <<EOF
4708 #define $ac_tr_lib 1
4709 EOF
4710
4711   LIBS="-lnsl $LIBS"
4712
4713 else
4714   echo "$ac_t""no" 1>&6
4715 fi
4716  ;;
4717     esac
4718     case "$LIBS" in
4719     *-lsocket*) ;;
4720     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4721 echo "configure:4722: checking for connect in -lsocket" >&5
4722 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4723 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4724   echo $ac_n "(cached) $ac_c" 1>&6
4725 else
4726   ac_save_LIBS="$LIBS"
4727 LIBS="-lsocket  $LIBS"
4728 cat > conftest.$ac_ext <<EOF
4729 #line 4730 "configure"
4730 #include "confdefs.h"
4731 /* Override any gcc2 internal prototype to avoid an error.  */
4732 /* We use char because int might match the return type of a gcc2
4733     builtin and then its argument prototype would still apply.  */
4734 char connect();
4735
4736 int main() {
4737 connect()
4738 ; return 0; }
4739 EOF
4740 if { (eval echo configure:4741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4741   rm -rf conftest*
4742   eval "ac_cv_lib_$ac_lib_var=yes"
4743 else
4744   echo "configure: failed program was:" >&5
4745   cat conftest.$ac_ext >&5
4746   rm -rf conftest*
4747   eval "ac_cv_lib_$ac_lib_var=no"
4748 fi
4749 rm -f conftest*
4750 LIBS="$ac_save_LIBS"
4751
4752 fi
4753 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4754   echo "$ac_t""yes" 1>&6
4755     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4756     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4757   cat >> confdefs.h <<EOF
4758 #define $ac_tr_lib 1
4759 EOF
4760
4761   LIBS="-lsocket $LIBS"
4762
4763 else
4764   echo "$ac_t""no" 1>&6
4765 fi
4766  ;;
4767     esac
4768     case "$LIBS" in
4769     *-linet*) ;;
4770     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
4771 echo "configure:4772: checking for connect in -linet" >&5
4772 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
4773 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4774   echo $ac_n "(cached) $ac_c" 1>&6
4775 else
4776   ac_save_LIBS="$LIBS"
4777 LIBS="-linet  $LIBS"
4778 cat > conftest.$ac_ext <<EOF
4779 #line 4780 "configure"
4780 #include "confdefs.h"
4781 /* Override any gcc2 internal prototype to avoid an error.  */
4782 /* We use char because int might match the return type of a gcc2
4783     builtin and then its argument prototype would still apply.  */
4784 char connect();
4785
4786 int main() {
4787 connect()
4788 ; return 0; }
4789 EOF
4790 if { (eval echo configure:4791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4791   rm -rf conftest*
4792   eval "ac_cv_lib_$ac_lib_var=yes"
4793 else
4794   echo "configure: failed program was:" >&5
4795   cat conftest.$ac_ext >&5
4796   rm -rf conftest*
4797   eval "ac_cv_lib_$ac_lib_var=no"
4798 fi
4799 rm -f conftest*
4800 LIBS="$ac_save_LIBS"
4801
4802 fi
4803 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4804   echo "$ac_t""yes" 1>&6
4805     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4806     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4807   cat >> confdefs.h <<EOF
4808 #define $ac_tr_lib 1
4809 EOF
4810
4811   LIBS="-linet $LIBS"
4812
4813 else
4814   echo "$ac_t""no" 1>&6
4815 fi
4816  ;;
4817     esac
4818             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
4819        test x"$ac_cv_lib_inet_connect" = x"yes"; then
4820         # ac_cv_func_connect=yes
4821         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
4822         cat >> confdefs.h <<\EOF
4823 #define HAVE_CONNECT 1
4824 EOF
4825
4826     fi
4827 fi
4828
4829 ###############################################
4830 # test for where we get get_yp_default_domain() from
4831 for ac_func in yp_get_default_domain
4832 do
4833 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4834 echo "configure:4835: checking for $ac_func" >&5
4835 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4836   echo $ac_n "(cached) $ac_c" 1>&6
4837 else
4838   cat > conftest.$ac_ext <<EOF
4839 #line 4840 "configure"
4840 #include "confdefs.h"
4841 /* System header to define __stub macros and hopefully few prototypes,
4842     which can conflict with char $ac_func(); below.  */
4843 #include <assert.h>
4844 /* Override any gcc2 internal prototype to avoid an error.  */
4845 /* We use char because int might match the return type of a gcc2
4846     builtin and then its argument prototype would still apply.  */
4847 char $ac_func();
4848
4849 int main() {
4850
4851 /* The GNU C library defines this for functions which it implements
4852     to always fail with ENOSYS.  Some functions are actually named
4853     something starting with __ and the normal name is an alias.  */
4854 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4855 choke me
4856 #else
4857 $ac_func();
4858 #endif
4859
4860 ; return 0; }
4861 EOF
4862 if { (eval echo configure:4863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4863   rm -rf conftest*
4864   eval "ac_cv_func_$ac_func=yes"
4865 else
4866   echo "configure: failed program was:" >&5
4867   cat conftest.$ac_ext >&5
4868   rm -rf conftest*
4869   eval "ac_cv_func_$ac_func=no"
4870 fi
4871 rm -f conftest*
4872 fi
4873
4874 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4875   echo "$ac_t""yes" 1>&6
4876     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4877   cat >> confdefs.h <<EOF
4878 #define $ac_tr_func 1
4879 EOF
4880  
4881 else
4882   echo "$ac_t""no" 1>&6
4883 fi
4884 done
4885
4886 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
4887         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
4888 echo "configure:4889: checking for yp_get_default_domain in -lnsl" >&5
4889 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
4890 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4891   echo $ac_n "(cached) $ac_c" 1>&6
4892 else
4893   ac_save_LIBS="$LIBS"
4894 LIBS="-lnsl  $LIBS"
4895 cat > conftest.$ac_ext <<EOF
4896 #line 4897 "configure"
4897 #include "confdefs.h"
4898 /* Override any gcc2 internal prototype to avoid an error.  */
4899 /* We use char because int might match the return type of a gcc2
4900     builtin and then its argument prototype would still apply.  */
4901 char yp_get_default_domain();
4902
4903 int main() {
4904 yp_get_default_domain()
4905 ; return 0; }
4906 EOF
4907 if { (eval echo configure:4908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4908   rm -rf conftest*
4909   eval "ac_cv_lib_$ac_lib_var=yes"
4910 else
4911   echo "configure: failed program was:" >&5
4912   cat conftest.$ac_ext >&5
4913   rm -rf conftest*
4914   eval "ac_cv_lib_$ac_lib_var=no"
4915 fi
4916 rm -f conftest*
4917 LIBS="$ac_save_LIBS"
4918
4919 fi
4920 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4921   echo "$ac_t""yes" 1>&6
4922   LIBS="$LIBS -lnsl";
4923         cat >> confdefs.h <<\EOF
4924 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
4925 EOF
4926
4927 else
4928   echo "$ac_t""no" 1>&6
4929 fi
4930  
4931 fi
4932
4933 # Check if we have execl, if not we need to compile smbrun.
4934 for ac_func in execl
4935 do
4936 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4937 echo "configure:4938: checking for $ac_func" >&5
4938 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4939   echo $ac_n "(cached) $ac_c" 1>&6
4940 else
4941   cat > conftest.$ac_ext <<EOF
4942 #line 4943 "configure"
4943 #include "confdefs.h"
4944 /* System header to define __stub macros and hopefully few prototypes,
4945     which can conflict with char $ac_func(); below.  */
4946 #include <assert.h>
4947 /* Override any gcc2 internal prototype to avoid an error.  */
4948 /* We use char because int might match the return type of a gcc2
4949     builtin and then its argument prototype would still apply.  */
4950 char $ac_func();
4951
4952 int main() {
4953
4954 /* The GNU C library defines this for functions which it implements
4955     to always fail with ENOSYS.  Some functions are actually named
4956     something starting with __ and the normal name is an alias.  */
4957 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4958 choke me
4959 #else
4960 $ac_func();
4961 #endif
4962
4963 ; return 0; }
4964 EOF
4965 if { (eval echo configure:4966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4966   rm -rf conftest*
4967   eval "ac_cv_func_$ac_func=yes"
4968 else
4969   echo "configure: failed program was:" >&5
4970   cat conftest.$ac_ext >&5
4971   rm -rf conftest*
4972   eval "ac_cv_func_$ac_func=no"
4973 fi
4974 rm -f conftest*
4975 fi
4976
4977 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4978   echo "$ac_t""yes" 1>&6
4979     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4980   cat >> confdefs.h <<EOF
4981 #define $ac_tr_func 1
4982 EOF
4983  
4984 else
4985   echo "$ac_t""no" 1>&6
4986 fi
4987 done
4988
4989 if test x"$ac_cv_func_execl" = x"no"; then
4990     RUNPROG="bin/smbrun"
4991 else
4992     RUNPROG=""
4993 fi
4994
4995 for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot
4996 do
4997 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4998 echo "configure:4999: checking for $ac_func" >&5
4999 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5000   echo $ac_n "(cached) $ac_c" 1>&6
5001 else
5002   cat > conftest.$ac_ext <<EOF
5003 #line 5004 "configure"
5004 #include "confdefs.h"
5005 /* System header to define __stub macros and hopefully few prototypes,
5006     which can conflict with char $ac_func(); below.  */
5007 #include <assert.h>
5008 /* Override any gcc2 internal prototype to avoid an error.  */
5009 /* We use char because int might match the return type of a gcc2
5010     builtin and then its argument prototype would still apply.  */
5011 char $ac_func();
5012
5013 int main() {
5014
5015 /* The GNU C library defines this for functions which it implements
5016     to always fail with ENOSYS.  Some functions are actually named
5017     something starting with __ and the normal name is an alias.  */
5018 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5019 choke me
5020 #else
5021 $ac_func();
5022 #endif
5023
5024 ; return 0; }
5025 EOF
5026 if { (eval echo configure:5027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5027   rm -rf conftest*
5028   eval "ac_cv_func_$ac_func=yes"
5029 else
5030   echo "configure: failed program was:" >&5
5031   cat conftest.$ac_ext >&5
5032   rm -rf conftest*
5033   eval "ac_cv_func_$ac_func=no"
5034 fi
5035 rm -f conftest*
5036 fi
5037
5038 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5039   echo "$ac_t""yes" 1>&6
5040     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5041   cat >> confdefs.h <<EOF
5042 #define $ac_tr_func 1
5043 EOF
5044  
5045 else
5046   echo "$ac_t""no" 1>&6
5047 fi
5048 done
5049
5050 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset
5051 do
5052 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5053 echo "configure:5054: checking for $ac_func" >&5
5054 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5055   echo $ac_n "(cached) $ac_c" 1>&6
5056 else
5057   cat > conftest.$ac_ext <<EOF
5058 #line 5059 "configure"
5059 #include "confdefs.h"
5060 /* System header to define __stub macros and hopefully few prototypes,
5061     which can conflict with char $ac_func(); below.  */
5062 #include <assert.h>
5063 /* Override any gcc2 internal prototype to avoid an error.  */
5064 /* We use char because int might match the return type of a gcc2
5065     builtin and then its argument prototype would still apply.  */
5066 char $ac_func();
5067
5068 int main() {
5069
5070 /* The GNU C library defines this for functions which it implements
5071     to always fail with ENOSYS.  Some functions are actually named
5072     something starting with __ and the normal name is an alias.  */
5073 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5074 choke me
5075 #else
5076 $ac_func();
5077 #endif
5078
5079 ; return 0; }
5080 EOF
5081 if { (eval echo configure:5082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5082   rm -rf conftest*
5083   eval "ac_cv_func_$ac_func=yes"
5084 else
5085   echo "configure: failed program was:" >&5
5086   cat conftest.$ac_ext >&5
5087   rm -rf conftest*
5088   eval "ac_cv_func_$ac_func=no"
5089 fi
5090 rm -f conftest*
5091 fi
5092
5093 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5094   echo "$ac_t""yes" 1>&6
5095     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5096   cat >> confdefs.h <<EOF
5097 #define $ac_tr_func 1
5098 EOF
5099  
5100 else
5101   echo "$ac_t""no" 1>&6
5102 fi
5103 done
5104
5105 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5106 do
5107 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5108 echo "configure:5109: checking for $ac_func" >&5
5109 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5110   echo $ac_n "(cached) $ac_c" 1>&6
5111 else
5112   cat > conftest.$ac_ext <<EOF
5113 #line 5114 "configure"
5114 #include "confdefs.h"
5115 /* System header to define __stub macros and hopefully few prototypes,
5116     which can conflict with char $ac_func(); below.  */
5117 #include <assert.h>
5118 /* Override any gcc2 internal prototype to avoid an error.  */
5119 /* We use char because int might match the return type of a gcc2
5120     builtin and then its argument prototype would still apply.  */
5121 char $ac_func();
5122
5123 int main() {
5124
5125 /* The GNU C library defines this for functions which it implements
5126     to always fail with ENOSYS.  Some functions are actually named
5127     something starting with __ and the normal name is an alias.  */
5128 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5129 choke me
5130 #else
5131 $ac_func();
5132 #endif
5133
5134 ; return 0; }
5135 EOF
5136 if { (eval echo configure:5137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5137   rm -rf conftest*
5138   eval "ac_cv_func_$ac_func=yes"
5139 else
5140   echo "configure: failed program was:" >&5
5141   cat conftest.$ac_ext >&5
5142   rm -rf conftest*
5143   eval "ac_cv_func_$ac_func=no"
5144 fi
5145 rm -f conftest*
5146 fi
5147
5148 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5149   echo "$ac_t""yes" 1>&6
5150     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5151   cat >> confdefs.h <<EOF
5152 #define $ac_tr_func 1
5153 EOF
5154  
5155 else
5156   echo "$ac_t""no" 1>&6
5157 fi
5158 done
5159
5160 for ac_func in strftime sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent
5161 do
5162 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5163 echo "configure:5164: checking for $ac_func" >&5
5164 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5165   echo $ac_n "(cached) $ac_c" 1>&6
5166 else
5167   cat > conftest.$ac_ext <<EOF
5168 #line 5169 "configure"
5169 #include "confdefs.h"
5170 /* System header to define __stub macros and hopefully few prototypes,
5171     which can conflict with char $ac_func(); below.  */
5172 #include <assert.h>
5173 /* Override any gcc2 internal prototype to avoid an error.  */
5174 /* We use char because int might match the return type of a gcc2
5175     builtin and then its argument prototype would still apply.  */
5176 char $ac_func();
5177
5178 int main() {
5179
5180 /* The GNU C library defines this for functions which it implements
5181     to always fail with ENOSYS.  Some functions are actually named
5182     something starting with __ and the normal name is an alias.  */
5183 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5184 choke me
5185 #else
5186 $ac_func();
5187 #endif
5188
5189 ; return 0; }
5190 EOF
5191 if { (eval echo configure:5192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5192   rm -rf conftest*
5193   eval "ac_cv_func_$ac_func=yes"
5194 else
5195   echo "configure: failed program was:" >&5
5196   cat conftest.$ac_ext >&5
5197   rm -rf conftest*
5198   eval "ac_cv_func_$ac_func=no"
5199 fi
5200 rm -f conftest*
5201 fi
5202
5203 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5204   echo "$ac_t""yes" 1>&6
5205     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5206   cat >> confdefs.h <<EOF
5207 #define $ac_tr_func 1
5208 EOF
5209  
5210 else
5211   echo "$ac_t""no" 1>&6
5212 fi
5213 done
5214
5215 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
5216 do
5217 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5218 echo "configure:5219: checking for $ac_func" >&5
5219 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5220   echo $ac_n "(cached) $ac_c" 1>&6
5221 else
5222   cat > conftest.$ac_ext <<EOF
5223 #line 5224 "configure"
5224 #include "confdefs.h"
5225 /* System header to define __stub macros and hopefully few prototypes,
5226     which can conflict with char $ac_func(); below.  */
5227 #include <assert.h>
5228 /* Override any gcc2 internal prototype to avoid an error.  */
5229 /* We use char because int might match the return type of a gcc2
5230     builtin and then its argument prototype would still apply.  */
5231 char $ac_func();
5232
5233 int main() {
5234
5235 /* The GNU C library defines this for functions which it implements
5236     to always fail with ENOSYS.  Some functions are actually named
5237     something starting with __ and the normal name is an alias.  */
5238 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5239 choke me
5240 #else
5241 $ac_func();
5242 #endif
5243
5244 ; return 0; }
5245 EOF
5246 if { (eval echo configure:5247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5247   rm -rf conftest*
5248   eval "ac_cv_func_$ac_func=yes"
5249 else
5250   echo "configure: failed program was:" >&5
5251   cat conftest.$ac_ext >&5
5252   rm -rf conftest*
5253   eval "ac_cv_func_$ac_func=no"
5254 fi
5255 rm -f conftest*
5256 fi
5257
5258 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5259   echo "$ac_t""yes" 1>&6
5260     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5261   cat >> confdefs.h <<EOF
5262 #define $ac_tr_func 1
5263 EOF
5264  
5265 else
5266   echo "$ac_t""no" 1>&6
5267 fi
5268 done
5269
5270 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5271 do
5272 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5273 echo "configure:5274: checking for $ac_func" >&5
5274 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5275   echo $ac_n "(cached) $ac_c" 1>&6
5276 else
5277   cat > conftest.$ac_ext <<EOF
5278 #line 5279 "configure"
5279 #include "confdefs.h"
5280 /* System header to define __stub macros and hopefully few prototypes,
5281     which can conflict with char $ac_func(); below.  */
5282 #include <assert.h>
5283 /* Override any gcc2 internal prototype to avoid an error.  */
5284 /* We use char because int might match the return type of a gcc2
5285     builtin and then its argument prototype would still apply.  */
5286 char $ac_func();
5287
5288 int main() {
5289
5290 /* The GNU C library defines this for functions which it implements
5291     to always fail with ENOSYS.  Some functions are actually named
5292     something starting with __ and the normal name is an alias.  */
5293 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5294 choke me
5295 #else
5296 $ac_func();
5297 #endif
5298
5299 ; return 0; }
5300 EOF
5301 if { (eval echo configure:5302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5302   rm -rf conftest*
5303   eval "ac_cv_func_$ac_func=yes"
5304 else
5305   echo "configure: failed program was:" >&5
5306   cat conftest.$ac_ext >&5
5307   rm -rf conftest*
5308   eval "ac_cv_func_$ac_func=no"
5309 fi
5310 rm -f conftest*
5311 fi
5312
5313 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5314   echo "$ac_t""yes" 1>&6
5315     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5316   cat >> confdefs.h <<EOF
5317 #define $ac_tr_func 1
5318 EOF
5319  
5320 else
5321   echo "$ac_t""no" 1>&6
5322 fi
5323 done
5324
5325 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5326 do
5327 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5328 echo "configure:5329: checking for $ac_func" >&5
5329 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5330   echo $ac_n "(cached) $ac_c" 1>&6
5331 else
5332   cat > conftest.$ac_ext <<EOF
5333 #line 5334 "configure"
5334 #include "confdefs.h"
5335 /* System header to define __stub macros and hopefully few prototypes,
5336     which can conflict with char $ac_func(); below.  */
5337 #include <assert.h>
5338 /* Override any gcc2 internal prototype to avoid an error.  */
5339 /* We use char because int might match the return type of a gcc2
5340     builtin and then its argument prototype would still apply.  */
5341 char $ac_func();
5342
5343 int main() {
5344
5345 /* The GNU C library defines this for functions which it implements
5346     to always fail with ENOSYS.  Some functions are actually named
5347     something starting with __ and the normal name is an alias.  */
5348 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5349 choke me
5350 #else
5351 $ac_func();
5352 #endif
5353
5354 ; return 0; }
5355 EOF
5356 if { (eval echo configure:5357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5357   rm -rf conftest*
5358   eval "ac_cv_func_$ac_func=yes"
5359 else
5360   echo "configure: failed program was:" >&5
5361   cat conftest.$ac_ext >&5
5362   rm -rf conftest*
5363   eval "ac_cv_func_$ac_func=no"
5364 fi
5365 rm -f conftest*
5366 fi
5367
5368 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5369   echo "$ac_t""yes" 1>&6
5370     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5371   cat >> confdefs.h <<EOF
5372 #define $ac_tr_func 1
5373 EOF
5374  
5375 else
5376   echo "$ac_t""no" 1>&6
5377 fi
5378 done
5379
5380 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5381 do
5382 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5383 echo "configure:5384: checking for $ac_func" >&5
5384 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5385   echo $ac_n "(cached) $ac_c" 1>&6
5386 else
5387   cat > conftest.$ac_ext <<EOF
5388 #line 5389 "configure"
5389 #include "confdefs.h"
5390 /* System header to define __stub macros and hopefully few prototypes,
5391     which can conflict with char $ac_func(); below.  */
5392 #include <assert.h>
5393 /* Override any gcc2 internal prototype to avoid an error.  */
5394 /* We use char because int might match the return type of a gcc2
5395     builtin and then its argument prototype would still apply.  */
5396 char $ac_func();
5397
5398 int main() {
5399
5400 /* The GNU C library defines this for functions which it implements
5401     to always fail with ENOSYS.  Some functions are actually named
5402     something starting with __ and the normal name is an alias.  */
5403 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5404 choke me
5405 #else
5406 $ac_func();
5407 #endif
5408
5409 ; return 0; }
5410 EOF
5411 if { (eval echo configure:5412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5412   rm -rf conftest*
5413   eval "ac_cv_func_$ac_func=yes"
5414 else
5415   echo "configure: failed program was:" >&5
5416   cat conftest.$ac_ext >&5
5417   rm -rf conftest*
5418   eval "ac_cv_func_$ac_func=no"
5419 fi
5420 rm -f conftest*
5421 fi
5422
5423 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5424   echo "$ac_t""yes" 1>&6
5425     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5426   cat >> confdefs.h <<EOF
5427 #define $ac_tr_func 1
5428 EOF
5429  
5430 else
5431   echo "$ac_t""no" 1>&6
5432 fi
5433 done
5434
5435 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5436 do
5437 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5438 echo "configure:5439: checking for $ac_func" >&5
5439 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5440   echo $ac_n "(cached) $ac_c" 1>&6
5441 else
5442   cat > conftest.$ac_ext <<EOF
5443 #line 5444 "configure"
5444 #include "confdefs.h"
5445 /* System header to define __stub macros and hopefully few prototypes,
5446     which can conflict with char $ac_func(); below.  */
5447 #include <assert.h>
5448 /* Override any gcc2 internal prototype to avoid an error.  */
5449 /* We use char because int might match the return type of a gcc2
5450     builtin and then its argument prototype would still apply.  */
5451 char $ac_func();
5452
5453 int main() {
5454
5455 /* The GNU C library defines this for functions which it implements
5456     to always fail with ENOSYS.  Some functions are actually named
5457     something starting with __ and the normal name is an alias.  */
5458 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5459 choke me
5460 #else
5461 $ac_func();
5462 #endif
5463
5464 ; return 0; }
5465 EOF
5466 if { (eval echo configure:5467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5467   rm -rf conftest*
5468   eval "ac_cv_func_$ac_func=yes"
5469 else
5470   echo "configure: failed program was:" >&5
5471   cat conftest.$ac_ext >&5
5472   rm -rf conftest*
5473   eval "ac_cv_func_$ac_func=no"
5474 fi
5475 rm -f conftest*
5476 fi
5477
5478 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5479   echo "$ac_t""yes" 1>&6
5480     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5481   cat >> confdefs.h <<EOF
5482 #define $ac_tr_func 1
5483 EOF
5484  
5485 else
5486   echo "$ac_t""no" 1>&6
5487 fi
5488 done
5489
5490 # setbuffer is needed for smbtorture
5491 for ac_func in setbuffer
5492 do
5493 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5494 echo "configure:5495: checking for $ac_func" >&5
5495 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5496   echo $ac_n "(cached) $ac_c" 1>&6
5497 else
5498   cat > conftest.$ac_ext <<EOF
5499 #line 5500 "configure"
5500 #include "confdefs.h"
5501 /* System header to define __stub macros and hopefully few prototypes,
5502     which can conflict with char $ac_func(); below.  */
5503 #include <assert.h>
5504 /* Override any gcc2 internal prototype to avoid an error.  */
5505 /* We use char because int might match the return type of a gcc2
5506     builtin and then its argument prototype would still apply.  */
5507 char $ac_func();
5508
5509 int main() {
5510
5511 /* The GNU C library defines this for functions which it implements
5512     to always fail with ENOSYS.  Some functions are actually named
5513     something starting with __ and the normal name is an alias.  */
5514 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5515 choke me
5516 #else
5517 $ac_func();
5518 #endif
5519
5520 ; return 0; }
5521 EOF
5522 if { (eval echo configure:5523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5523   rm -rf conftest*
5524   eval "ac_cv_func_$ac_func=yes"
5525 else
5526   echo "configure: failed program was:" >&5
5527   cat conftest.$ac_ext >&5
5528   rm -rf conftest*
5529   eval "ac_cv_func_$ac_func=no"
5530 fi
5531 rm -f conftest*
5532 fi
5533
5534 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5535   echo "$ac_t""yes" 1>&6
5536     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5537   cat >> confdefs.h <<EOF
5538 #define $ac_tr_func 1
5539 EOF
5540  
5541 else
5542   echo "$ac_t""no" 1>&6
5543 fi
5544 done
5545
5546
5547 # syscall() is needed for smbwrapper.
5548 for ac_func in syscall
5549 do
5550 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5551 echo "configure:5552: checking for $ac_func" >&5
5552 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5553   echo $ac_n "(cached) $ac_c" 1>&6
5554 else
5555   cat > conftest.$ac_ext <<EOF
5556 #line 5557 "configure"
5557 #include "confdefs.h"
5558 /* System header to define __stub macros and hopefully few prototypes,
5559     which can conflict with char $ac_func(); below.  */
5560 #include <assert.h>
5561 /* Override any gcc2 internal prototype to avoid an error.  */
5562 /* We use char because int might match the return type of a gcc2
5563     builtin and then its argument prototype would still apply.  */
5564 char $ac_func();
5565
5566 int main() {
5567
5568 /* The GNU C library defines this for functions which it implements
5569     to always fail with ENOSYS.  Some functions are actually named
5570     something starting with __ and the normal name is an alias.  */
5571 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5572 choke me
5573 #else
5574 $ac_func();
5575 #endif
5576
5577 ; return 0; }
5578 EOF
5579 if { (eval echo configure:5580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5580   rm -rf conftest*
5581   eval "ac_cv_func_$ac_func=yes"
5582 else
5583   echo "configure: failed program was:" >&5
5584   cat conftest.$ac_ext >&5
5585   rm -rf conftest*
5586   eval "ac_cv_func_$ac_func=no"
5587 fi
5588 rm -f conftest*
5589 fi
5590
5591 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5592   echo "$ac_t""yes" 1>&6
5593     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5594   cat >> confdefs.h <<EOF
5595 #define $ac_tr_func 1
5596 EOF
5597  
5598 else
5599   echo "$ac_t""no" 1>&6
5600 fi
5601 done
5602
5603
5604 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5605 do
5606 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5607 echo "configure:5608: checking for $ac_func" >&5
5608 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5609   echo $ac_n "(cached) $ac_c" 1>&6
5610 else
5611   cat > conftest.$ac_ext <<EOF
5612 #line 5613 "configure"
5613 #include "confdefs.h"
5614 /* System header to define __stub macros and hopefully few prototypes,
5615     which can conflict with char $ac_func(); below.  */
5616 #include <assert.h>
5617 /* Override any gcc2 internal prototype to avoid an error.  */
5618 /* We use char because int might match the return type of a gcc2
5619     builtin and then its argument prototype would still apply.  */
5620 char $ac_func();
5621
5622 int main() {
5623
5624 /* The GNU C library defines this for functions which it implements
5625     to always fail with ENOSYS.  Some functions are actually named
5626     something starting with __ and the normal name is an alias.  */
5627 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5628 choke me
5629 #else
5630 $ac_func();
5631 #endif
5632
5633 ; return 0; }
5634 EOF
5635 if { (eval echo configure:5636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5636   rm -rf conftest*
5637   eval "ac_cv_func_$ac_func=yes"
5638 else
5639   echo "configure: failed program was:" >&5
5640   cat conftest.$ac_ext >&5
5641   rm -rf conftest*
5642   eval "ac_cv_func_$ac_func=no"
5643 fi
5644 rm -f conftest*
5645 fi
5646
5647 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5648   echo "$ac_t""yes" 1>&6
5649     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5650   cat >> confdefs.h <<EOF
5651 #define $ac_tr_func 1
5652 EOF
5653  
5654 else
5655   echo "$ac_t""no" 1>&6
5656 fi
5657 done
5658
5659 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
5660 do
5661 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5662 echo "configure:5663: checking for $ac_func" >&5
5663 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5664   echo $ac_n "(cached) $ac_c" 1>&6
5665 else
5666   cat > conftest.$ac_ext <<EOF
5667 #line 5668 "configure"
5668 #include "confdefs.h"
5669 /* System header to define __stub macros and hopefully few prototypes,
5670     which can conflict with char $ac_func(); below.  */
5671 #include <assert.h>
5672 /* Override any gcc2 internal prototype to avoid an error.  */
5673 /* We use char because int might match the return type of a gcc2
5674     builtin and then its argument prototype would still apply.  */
5675 char $ac_func();
5676
5677 int main() {
5678
5679 /* The GNU C library defines this for functions which it implements
5680     to always fail with ENOSYS.  Some functions are actually named
5681     something starting with __ and the normal name is an alias.  */
5682 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5683 choke me
5684 #else
5685 $ac_func();
5686 #endif
5687
5688 ; return 0; }
5689 EOF
5690 if { (eval echo configure:5691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5691   rm -rf conftest*
5692   eval "ac_cv_func_$ac_func=yes"
5693 else
5694   echo "configure: failed program was:" >&5
5695   cat conftest.$ac_ext >&5
5696   rm -rf conftest*
5697   eval "ac_cv_func_$ac_func=no"
5698 fi
5699 rm -f conftest*
5700 fi
5701
5702 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5703   echo "$ac_t""yes" 1>&6
5704     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5705   cat >> confdefs.h <<EOF
5706 #define $ac_tr_func 1
5707 EOF
5708  
5709 else
5710   echo "$ac_t""no" 1>&6
5711 fi
5712 done
5713
5714 for ac_func in __getcwd _getcwd
5715 do
5716 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5717 echo "configure:5718: checking for $ac_func" >&5
5718 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5719   echo $ac_n "(cached) $ac_c" 1>&6
5720 else
5721   cat > conftest.$ac_ext <<EOF
5722 #line 5723 "configure"
5723 #include "confdefs.h"
5724 /* System header to define __stub macros and hopefully few prototypes,
5725     which can conflict with char $ac_func(); below.  */
5726 #include <assert.h>
5727 /* Override any gcc2 internal prototype to avoid an error.  */
5728 /* We use char because int might match the return type of a gcc2
5729     builtin and then its argument prototype would still apply.  */
5730 char $ac_func();
5731
5732 int main() {
5733
5734 /* The GNU C library defines this for functions which it implements
5735     to always fail with ENOSYS.  Some functions are actually named
5736     something starting with __ and the normal name is an alias.  */
5737 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5738 choke me
5739 #else
5740 $ac_func();
5741 #endif
5742
5743 ; return 0; }
5744 EOF
5745 if { (eval echo configure:5746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5746   rm -rf conftest*
5747   eval "ac_cv_func_$ac_func=yes"
5748 else
5749   echo "configure: failed program was:" >&5
5750   cat conftest.$ac_ext >&5
5751   rm -rf conftest*
5752   eval "ac_cv_func_$ac_func=no"
5753 fi
5754 rm -f conftest*
5755 fi
5756
5757 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5758   echo "$ac_t""yes" 1>&6
5759     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5760   cat >> confdefs.h <<EOF
5761 #define $ac_tr_func 1
5762 EOF
5763  
5764 else
5765   echo "$ac_t""no" 1>&6
5766 fi
5767 done
5768
5769 for ac_func in __xstat __fxstat __lxstat
5770 do
5771 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5772 echo "configure:5773: checking for $ac_func" >&5
5773 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5774   echo $ac_n "(cached) $ac_c" 1>&6
5775 else
5776   cat > conftest.$ac_ext <<EOF
5777 #line 5778 "configure"
5778 #include "confdefs.h"
5779 /* System header to define __stub macros and hopefully few prototypes,
5780     which can conflict with char $ac_func(); below.  */
5781 #include <assert.h>
5782 /* Override any gcc2 internal prototype to avoid an error.  */
5783 /* We use char because int might match the return type of a gcc2
5784     builtin and then its argument prototype would still apply.  */
5785 char $ac_func();
5786
5787 int main() {
5788
5789 /* The GNU C library defines this for functions which it implements
5790     to always fail with ENOSYS.  Some functions are actually named
5791     something starting with __ and the normal name is an alias.  */
5792 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5793 choke me
5794 #else
5795 $ac_func();
5796 #endif
5797
5798 ; return 0; }
5799 EOF
5800 if { (eval echo configure:5801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5801   rm -rf conftest*
5802   eval "ac_cv_func_$ac_func=yes"
5803 else
5804   echo "configure: failed program was:" >&5
5805   cat conftest.$ac_ext >&5
5806   rm -rf conftest*
5807   eval "ac_cv_func_$ac_func=no"
5808 fi
5809 rm -f conftest*
5810 fi
5811
5812 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5813   echo "$ac_t""yes" 1>&6
5814     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5815   cat >> confdefs.h <<EOF
5816 #define $ac_tr_func 1
5817 EOF
5818  
5819 else
5820   echo "$ac_t""no" 1>&6
5821 fi
5822 done
5823
5824 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
5825 do
5826 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5827 echo "configure:5828: checking for $ac_func" >&5
5828 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5829   echo $ac_n "(cached) $ac_c" 1>&6
5830 else
5831   cat > conftest.$ac_ext <<EOF
5832 #line 5833 "configure"
5833 #include "confdefs.h"
5834 /* System header to define __stub macros and hopefully few prototypes,
5835     which can conflict with char $ac_func(); below.  */
5836 #include <assert.h>
5837 /* Override any gcc2 internal prototype to avoid an error.  */
5838 /* We use char because int might match the return type of a gcc2
5839     builtin and then its argument prototype would still apply.  */
5840 char $ac_func();
5841
5842 int main() {
5843
5844 /* The GNU C library defines this for functions which it implements
5845     to always fail with ENOSYS.  Some functions are actually named
5846     something starting with __ and the normal name is an alias.  */
5847 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5848 choke me
5849 #else
5850 $ac_func();
5851 #endif
5852
5853 ; return 0; }
5854 EOF
5855 if { (eval echo configure:5856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5856   rm -rf conftest*
5857   eval "ac_cv_func_$ac_func=yes"
5858 else
5859   echo "configure: failed program was:" >&5
5860   cat conftest.$ac_ext >&5
5861   rm -rf conftest*
5862   eval "ac_cv_func_$ac_func=no"
5863 fi
5864 rm -f conftest*
5865 fi
5866
5867 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5868   echo "$ac_t""yes" 1>&6
5869     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5870   cat >> confdefs.h <<EOF
5871 #define $ac_tr_func 1
5872 EOF
5873  
5874 else
5875   echo "$ac_t""no" 1>&6
5876 fi
5877 done
5878
5879 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
5880 do
5881 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5882 echo "configure:5883: checking for $ac_func" >&5
5883 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5884   echo $ac_n "(cached) $ac_c" 1>&6
5885 else
5886   cat > conftest.$ac_ext <<EOF
5887 #line 5888 "configure"
5888 #include "confdefs.h"
5889 /* System header to define __stub macros and hopefully few prototypes,
5890     which can conflict with char $ac_func(); below.  */
5891 #include <assert.h>
5892 /* Override any gcc2 internal prototype to avoid an error.  */
5893 /* We use char because int might match the return type of a gcc2
5894     builtin and then its argument prototype would still apply.  */
5895 char $ac_func();
5896
5897 int main() {
5898
5899 /* The GNU C library defines this for functions which it implements
5900     to always fail with ENOSYS.  Some functions are actually named
5901     something starting with __ and the normal name is an alias.  */
5902 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5903 choke me
5904 #else
5905 $ac_func();
5906 #endif
5907
5908 ; return 0; }
5909 EOF
5910 if { (eval echo configure:5911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5911   rm -rf conftest*
5912   eval "ac_cv_func_$ac_func=yes"
5913 else
5914   echo "configure: failed program was:" >&5
5915   cat conftest.$ac_ext >&5
5916   rm -rf conftest*
5917   eval "ac_cv_func_$ac_func=no"
5918 fi
5919 rm -f conftest*
5920 fi
5921
5922 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5923   echo "$ac_t""yes" 1>&6
5924     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5925   cat >> confdefs.h <<EOF
5926 #define $ac_tr_func 1
5927 EOF
5928  
5929 else
5930   echo "$ac_t""no" 1>&6
5931 fi
5932 done
5933
5934 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
5935 do
5936 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5937 echo "configure:5938: checking for $ac_func" >&5
5938 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5939   echo $ac_n "(cached) $ac_c" 1>&6
5940 else
5941   cat > conftest.$ac_ext <<EOF
5942 #line 5943 "configure"
5943 #include "confdefs.h"
5944 /* System header to define __stub macros and hopefully few prototypes,
5945     which can conflict with char $ac_func(); below.  */
5946 #include <assert.h>
5947 /* Override any gcc2 internal prototype to avoid an error.  */
5948 /* We use char because int might match the return type of a gcc2
5949     builtin and then its argument prototype would still apply.  */
5950 char $ac_func();
5951
5952 int main() {
5953
5954 /* The GNU C library defines this for functions which it implements
5955     to always fail with ENOSYS.  Some functions are actually named
5956     something starting with __ and the normal name is an alias.  */
5957 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5958 choke me
5959 #else
5960 $ac_func();
5961 #endif
5962
5963 ; return 0; }
5964 EOF
5965 if { (eval echo configure:5966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5966   rm -rf conftest*
5967   eval "ac_cv_func_$ac_func=yes"
5968 else
5969   echo "configure: failed program was:" >&5
5970   cat conftest.$ac_ext >&5
5971   rm -rf conftest*
5972   eval "ac_cv_func_$ac_func=no"
5973 fi
5974 rm -f conftest*
5975 fi
5976
5977 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5978   echo "$ac_t""yes" 1>&6
5979     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5980   cat >> confdefs.h <<EOF
5981 #define $ac_tr_func 1
5982 EOF
5983  
5984 else
5985   echo "$ac_t""no" 1>&6
5986 fi
5987 done
5988
5989 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
5990 do
5991 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5992 echo "configure:5993: checking for $ac_func" >&5
5993 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5994   echo $ac_n "(cached) $ac_c" 1>&6
5995 else
5996   cat > conftest.$ac_ext <<EOF
5997 #line 5998 "configure"
5998 #include "confdefs.h"
5999 /* System header to define __stub macros and hopefully few prototypes,
6000     which can conflict with char $ac_func(); below.  */
6001 #include <assert.h>
6002 /* Override any gcc2 internal prototype to avoid an error.  */
6003 /* We use char because int might match the return type of a gcc2
6004     builtin and then its argument prototype would still apply.  */
6005 char $ac_func();
6006
6007 int main() {
6008
6009 /* The GNU C library defines this for functions which it implements
6010     to always fail with ENOSYS.  Some functions are actually named
6011     something starting with __ and the normal name is an alias.  */
6012 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6013 choke me
6014 #else
6015 $ac_func();
6016 #endif
6017
6018 ; return 0; }
6019 EOF
6020 if { (eval echo configure:6021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6021   rm -rf conftest*
6022   eval "ac_cv_func_$ac_func=yes"
6023 else
6024   echo "configure: failed program was:" >&5
6025   cat conftest.$ac_ext >&5
6026   rm -rf conftest*
6027   eval "ac_cv_func_$ac_func=no"
6028 fi
6029 rm -f conftest*
6030 fi
6031
6032 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6033   echo "$ac_t""yes" 1>&6
6034     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6035   cat >> confdefs.h <<EOF
6036 #define $ac_tr_func 1
6037 EOF
6038  
6039 else
6040   echo "$ac_t""no" 1>&6
6041 fi
6042 done
6043
6044 for ac_func in _write __write _fork __fork
6045 do
6046 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6047 echo "configure:6048: checking for $ac_func" >&5
6048 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6049   echo $ac_n "(cached) $ac_c" 1>&6
6050 else
6051   cat > conftest.$ac_ext <<EOF
6052 #line 6053 "configure"
6053 #include "confdefs.h"
6054 /* System header to define __stub macros and hopefully few prototypes,
6055     which can conflict with char $ac_func(); below.  */
6056 #include <assert.h>
6057 /* Override any gcc2 internal prototype to avoid an error.  */
6058 /* We use char because int might match the return type of a gcc2
6059     builtin and then its argument prototype would still apply.  */
6060 char $ac_func();
6061
6062 int main() {
6063
6064 /* The GNU C library defines this for functions which it implements
6065     to always fail with ENOSYS.  Some functions are actually named
6066     something starting with __ and the normal name is an alias.  */
6067 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6068 choke me
6069 #else
6070 $ac_func();
6071 #endif
6072
6073 ; return 0; }
6074 EOF
6075 if { (eval echo configure:6076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6076   rm -rf conftest*
6077   eval "ac_cv_func_$ac_func=yes"
6078 else
6079   echo "configure: failed program was:" >&5
6080   cat conftest.$ac_ext >&5
6081   rm -rf conftest*
6082   eval "ac_cv_func_$ac_func=no"
6083 fi
6084 rm -f conftest*
6085 fi
6086
6087 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6088   echo "$ac_t""yes" 1>&6
6089     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6090   cat >> confdefs.h <<EOF
6091 #define $ac_tr_func 1
6092 EOF
6093  
6094 else
6095   echo "$ac_t""no" 1>&6
6096 fi
6097 done
6098
6099 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6100 do
6101 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6102 echo "configure:6103: checking for $ac_func" >&5
6103 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6104   echo $ac_n "(cached) $ac_c" 1>&6
6105 else
6106   cat > conftest.$ac_ext <<EOF
6107 #line 6108 "configure"
6108 #include "confdefs.h"
6109 /* System header to define __stub macros and hopefully few prototypes,
6110     which can conflict with char $ac_func(); below.  */
6111 #include <assert.h>
6112 /* Override any gcc2 internal prototype to avoid an error.  */
6113 /* We use char because int might match the return type of a gcc2
6114     builtin and then its argument prototype would still apply.  */
6115 char $ac_func();
6116
6117 int main() {
6118
6119 /* The GNU C library defines this for functions which it implements
6120     to always fail with ENOSYS.  Some functions are actually named
6121     something starting with __ and the normal name is an alias.  */
6122 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6123 choke me
6124 #else
6125 $ac_func();
6126 #endif
6127
6128 ; return 0; }
6129 EOF
6130 if { (eval echo configure:6131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6131   rm -rf conftest*
6132   eval "ac_cv_func_$ac_func=yes"
6133 else
6134   echo "configure: failed program was:" >&5
6135   cat conftest.$ac_ext >&5
6136   rm -rf conftest*
6137   eval "ac_cv_func_$ac_func=no"
6138 fi
6139 rm -f conftest*
6140 fi
6141
6142 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6143   echo "$ac_t""yes" 1>&6
6144     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6145   cat >> confdefs.h <<EOF
6146 #define $ac_tr_func 1
6147 EOF
6148  
6149 else
6150   echo "$ac_t""no" 1>&6
6151 fi
6152 done
6153
6154 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6155 do
6156 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6157 echo "configure:6158: checking for $ac_func" >&5
6158 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6159   echo $ac_n "(cached) $ac_c" 1>&6
6160 else
6161   cat > conftest.$ac_ext <<EOF
6162 #line 6163 "configure"
6163 #include "confdefs.h"
6164 /* System header to define __stub macros and hopefully few prototypes,
6165     which can conflict with char $ac_func(); below.  */
6166 #include <assert.h>
6167 /* Override any gcc2 internal prototype to avoid an error.  */
6168 /* We use char because int might match the return type of a gcc2
6169     builtin and then its argument prototype would still apply.  */
6170 char $ac_func();
6171
6172 int main() {
6173
6174 /* The GNU C library defines this for functions which it implements
6175     to always fail with ENOSYS.  Some functions are actually named
6176     something starting with __ and the normal name is an alias.  */
6177 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6178 choke me
6179 #else
6180 $ac_func();
6181 #endif
6182
6183 ; return 0; }
6184 EOF
6185 if { (eval echo configure:6186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6186   rm -rf conftest*
6187   eval "ac_cv_func_$ac_func=yes"
6188 else
6189   echo "configure: failed program was:" >&5
6190   cat conftest.$ac_ext >&5
6191   rm -rf conftest*
6192   eval "ac_cv_func_$ac_func=no"
6193 fi
6194 rm -f conftest*
6195 fi
6196
6197 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6198   echo "$ac_t""yes" 1>&6
6199     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6200   cat >> confdefs.h <<EOF
6201 #define $ac_tr_func 1
6202 EOF
6203  
6204 else
6205   echo "$ac_t""no" 1>&6
6206 fi
6207 done
6208
6209 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6210 do
6211 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6212 echo "configure:6213: checking for $ac_func" >&5
6213 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6214   echo $ac_n "(cached) $ac_c" 1>&6
6215 else
6216   cat > conftest.$ac_ext <<EOF
6217 #line 6218 "configure"
6218 #include "confdefs.h"
6219 /* System header to define __stub macros and hopefully few prototypes,
6220     which can conflict with char $ac_func(); below.  */
6221 #include <assert.h>
6222 /* Override any gcc2 internal prototype to avoid an error.  */
6223 /* We use char because int might match the return type of a gcc2
6224     builtin and then its argument prototype would still apply.  */
6225 char $ac_func();
6226
6227 int main() {
6228
6229 /* The GNU C library defines this for functions which it implements
6230     to always fail with ENOSYS.  Some functions are actually named
6231     something starting with __ and the normal name is an alias.  */
6232 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6233 choke me
6234 #else
6235 $ac_func();
6236 #endif
6237
6238 ; return 0; }
6239 EOF
6240 if { (eval echo configure:6241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6241   rm -rf conftest*
6242   eval "ac_cv_func_$ac_func=yes"
6243 else
6244   echo "configure: failed program was:" >&5
6245   cat conftest.$ac_ext >&5
6246   rm -rf conftest*
6247   eval "ac_cv_func_$ac_func=no"
6248 fi
6249 rm -f conftest*
6250 fi
6251
6252 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6253   echo "$ac_t""yes" 1>&6
6254     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6255   cat >> confdefs.h <<EOF
6256 #define $ac_tr_func 1
6257 EOF
6258  
6259 else
6260   echo "$ac_t""no" 1>&6
6261 fi
6262 done
6263
6264 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6265 do
6266 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6267 echo "configure:6268: checking for $ac_func" >&5
6268 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6269   echo $ac_n "(cached) $ac_c" 1>&6
6270 else
6271   cat > conftest.$ac_ext <<EOF
6272 #line 6273 "configure"
6273 #include "confdefs.h"
6274 /* System header to define __stub macros and hopefully few prototypes,
6275     which can conflict with char $ac_func(); below.  */
6276 #include <assert.h>
6277 /* Override any gcc2 internal prototype to avoid an error.  */
6278 /* We use char because int might match the return type of a gcc2
6279     builtin and then its argument prototype would still apply.  */
6280 char $ac_func();
6281
6282 int main() {
6283
6284 /* The GNU C library defines this for functions which it implements
6285     to always fail with ENOSYS.  Some functions are actually named
6286     something starting with __ and the normal name is an alias.  */
6287 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6288 choke me
6289 #else
6290 $ac_func();
6291 #endif
6292
6293 ; return 0; }
6294 EOF
6295 if { (eval echo configure:6296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6296   rm -rf conftest*
6297   eval "ac_cv_func_$ac_func=yes"
6298 else
6299   echo "configure: failed program was:" >&5
6300   cat conftest.$ac_ext >&5
6301   rm -rf conftest*
6302   eval "ac_cv_func_$ac_func=no"
6303 fi
6304 rm -f conftest*
6305 fi
6306
6307 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6308   echo "$ac_t""yes" 1>&6
6309     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6310   cat >> confdefs.h <<EOF
6311 #define $ac_tr_func 1
6312 EOF
6313  
6314 else
6315   echo "$ac_t""no" 1>&6
6316 fi
6317 done
6318
6319 for ac_func in open64 _open64 __open64 creat64
6320 do
6321 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6322 echo "configure:6323: checking for $ac_func" >&5
6323 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6324   echo $ac_n "(cached) $ac_c" 1>&6
6325 else
6326   cat > conftest.$ac_ext <<EOF
6327 #line 6328 "configure"
6328 #include "confdefs.h"
6329 /* System header to define __stub macros and hopefully few prototypes,
6330     which can conflict with char $ac_func(); below.  */
6331 #include <assert.h>
6332 /* Override any gcc2 internal prototype to avoid an error.  */
6333 /* We use char because int might match the return type of a gcc2
6334     builtin and then its argument prototype would still apply.  */
6335 char $ac_func();
6336
6337 int main() {
6338
6339 /* The GNU C library defines this for functions which it implements
6340     to always fail with ENOSYS.  Some functions are actually named
6341     something starting with __ and the normal name is an alias.  */
6342 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6343 choke me
6344 #else
6345 $ac_func();
6346 #endif
6347
6348 ; return 0; }
6349 EOF
6350 if { (eval echo configure:6351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6351   rm -rf conftest*
6352   eval "ac_cv_func_$ac_func=yes"
6353 else
6354   echo "configure: failed program was:" >&5
6355   cat conftest.$ac_ext >&5
6356   rm -rf conftest*
6357   eval "ac_cv_func_$ac_func=no"
6358 fi
6359 rm -f conftest*
6360 fi
6361
6362 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6363   echo "$ac_t""yes" 1>&6
6364     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6365   cat >> confdefs.h <<EOF
6366 #define $ac_tr_func 1
6367 EOF
6368  
6369 else
6370   echo "$ac_t""no" 1>&6
6371 fi
6372 done
6373
6374
6375 #
6376 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6377 #
6378
6379 if test x$ac_cv_func_stat64 = xno ; then
6380   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6381 echo "configure:6382: checking for stat64 in <sys/stat.h>" >&5
6382   cat > conftest.$ac_ext <<EOF
6383 #line 6384 "configure"
6384 #include "confdefs.h"
6385
6386 #if defined(HAVE_UNISTD_H)
6387 #include <unistd.h>
6388 #endif
6389 #include <sys/stat.h>
6390
6391 int main() {
6392 struct stat64 st64; exit(stat64(".",&st64));
6393 ; return 0; }
6394 EOF
6395 if { (eval echo configure:6396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6396   rm -rf conftest*
6397   ac_cv_func_stat64=yes
6398 else
6399   echo "configure: failed program was:" >&5
6400   cat conftest.$ac_ext >&5
6401 fi
6402 rm -f conftest*
6403   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6404   if test x$ac_cv_func_stat64 = xyes ; then
6405     cat >> confdefs.h <<\EOF
6406 #define HAVE_STAT64 1
6407 EOF
6408
6409   fi
6410 fi
6411
6412 if test x$ac_cv_func_lstat64 = xno ; then
6413   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6414 echo "configure:6415: checking for lstat64 in <sys/stat.h>" >&5
6415   cat > conftest.$ac_ext <<EOF
6416 #line 6417 "configure"
6417 #include "confdefs.h"
6418
6419 #if defined(HAVE_UNISTD_H)
6420 #include <unistd.h>
6421 #endif
6422 #include <sys/stat.h>
6423
6424 int main() {
6425 struct stat64 st64; exit(lstat64(".",&st64));
6426 ; return 0; }
6427 EOF
6428 if { (eval echo configure:6429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6429   rm -rf conftest*
6430   ac_cv_func_lstat64=yes
6431 else
6432   echo "configure: failed program was:" >&5
6433   cat conftest.$ac_ext >&5
6434 fi
6435 rm -f conftest*
6436   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6437   if test x$ac_cv_func_lstat64 = xyes ; then
6438     cat >> confdefs.h <<\EOF
6439 #define HAVE_LSTAT64 1
6440 EOF
6441
6442   fi
6443 fi
6444
6445 if test x$ac_cv_func_fstat64 = xno ; then
6446   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6447 echo "configure:6448: checking for fstat64 in <sys/stat.h>" >&5
6448   cat > conftest.$ac_ext <<EOF
6449 #line 6450 "configure"
6450 #include "confdefs.h"
6451
6452 #if defined(HAVE_UNISTD_H)
6453 #include <unistd.h>
6454 #endif
6455 #include <sys/stat.h>
6456
6457 int main() {
6458 struct stat64 st64; exit(fstat64(0,&st64));
6459 ; return 0; }
6460 EOF
6461 if { (eval echo configure:6462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6462   rm -rf conftest*
6463   ac_cv_func_fstat64=yes
6464 else
6465   echo "configure: failed program was:" >&5
6466   cat conftest.$ac_ext >&5
6467 fi
6468 rm -f conftest*
6469   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6470   if test x$ac_cv_func_fstat64 = xyes ; then
6471     cat >> confdefs.h <<\EOF
6472 #define HAVE_FSTAT64 1
6473 EOF
6474
6475   fi
6476 fi
6477
6478 #
6479 # If no strcasecmp, check for it in some known places
6480 # It is in -lresolv on ReliantUNIX and UnixWare
6481 #   -lresolve *must* follow -lnsl for name resolution to work properly
6482 #
6483
6484 if test x$ac_cv_func_strcasecmp = xno ; then
6485         echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6
6486 echo "configure:6487: checking for strcasecmp in -lresolv" >&5
6487 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'`
6488 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6489   echo $ac_n "(cached) $ac_c" 1>&6
6490 else
6491   ac_save_LIBS="$LIBS"
6492 LIBS="-lresolv  $LIBS"
6493 cat > conftest.$ac_ext <<EOF
6494 #line 6495 "configure"
6495 #include "confdefs.h"
6496 /* Override any gcc2 internal prototype to avoid an error.  */
6497 /* We use char because int might match the return type of a gcc2
6498     builtin and then its argument prototype would still apply.  */
6499 char strcasecmp();
6500
6501 int main() {
6502 strcasecmp()
6503 ; return 0; }
6504 EOF
6505 if { (eval echo configure:6506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6506   rm -rf conftest*
6507   eval "ac_cv_lib_$ac_lib_var=yes"
6508 else
6509   echo "configure: failed program was:" >&5
6510   cat conftest.$ac_ext >&5
6511   rm -rf conftest*
6512   eval "ac_cv_lib_$ac_lib_var=no"
6513 fi
6514 rm -f conftest*
6515 LIBS="$ac_save_LIBS"
6516
6517 fi
6518 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6519   echo "$ac_t""yes" 1>&6
6520   LIBS="$LIBS -lresolv"
6521                 cat >> confdefs.h <<\EOF
6522 #define HAVE_STRCASECMP 1
6523 EOF
6524
6525 else
6526   echo "$ac_t""no" 1>&6
6527 fi
6528
6529 fi
6530
6531 #
6532 # Check for the functions putprpwnam, set_auth_parameters,
6533 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6534 # Needed for OSF1 and HPUX.
6535 #
6536
6537 case "$LIBS" in
6538   *-lsecurity*) for ac_func in putprpwnam
6539 do
6540 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6541 echo "configure:6542: checking for $ac_func" >&5
6542 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6543   echo $ac_n "(cached) $ac_c" 1>&6
6544 else
6545   cat > conftest.$ac_ext <<EOF
6546 #line 6547 "configure"
6547 #include "confdefs.h"
6548 /* System header to define __stub macros and hopefully few prototypes,
6549     which can conflict with char $ac_func(); below.  */
6550 #include <assert.h>
6551 /* Override any gcc2 internal prototype to avoid an error.  */
6552 /* We use char because int might match the return type of a gcc2
6553     builtin and then its argument prototype would still apply.  */
6554 char $ac_func();
6555
6556 int main() {
6557
6558 /* The GNU C library defines this for functions which it implements
6559     to always fail with ENOSYS.  Some functions are actually named
6560     something starting with __ and the normal name is an alias.  */
6561 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6562 choke me
6563 #else
6564 $ac_func();
6565 #endif
6566
6567 ; return 0; }
6568 EOF
6569 if { (eval echo configure:6570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6570   rm -rf conftest*
6571   eval "ac_cv_func_$ac_func=yes"
6572 else
6573   echo "configure: failed program was:" >&5
6574   cat conftest.$ac_ext >&5
6575   rm -rf conftest*
6576   eval "ac_cv_func_$ac_func=no"
6577 fi
6578 rm -f conftest*
6579 fi
6580
6581 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6582   echo "$ac_t""yes" 1>&6
6583     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6584   cat >> confdefs.h <<EOF
6585 #define $ac_tr_func 1
6586 EOF
6587  
6588 else
6589   echo "$ac_t""no" 1>&6
6590 fi
6591 done
6592  ;;
6593   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6594 echo "configure:6595: checking for putprpwnam in -lsecurity" >&5
6595 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6596 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6597   echo $ac_n "(cached) $ac_c" 1>&6
6598 else
6599   ac_save_LIBS="$LIBS"
6600 LIBS="-lsecurity  $LIBS"
6601 cat > conftest.$ac_ext <<EOF
6602 #line 6603 "configure"
6603 #include "confdefs.h"
6604 /* Override any gcc2 internal prototype to avoid an error.  */
6605 /* We use char because int might match the return type of a gcc2
6606     builtin and then its argument prototype would still apply.  */
6607 char putprpwnam();
6608
6609 int main() {
6610 putprpwnam()
6611 ; return 0; }
6612 EOF
6613 if { (eval echo configure:6614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6614   rm -rf conftest*
6615   eval "ac_cv_lib_$ac_lib_var=yes"
6616 else
6617   echo "configure: failed program was:" >&5
6618   cat conftest.$ac_ext >&5
6619   rm -rf conftest*
6620   eval "ac_cv_lib_$ac_lib_var=no"
6621 fi
6622 rm -f conftest*
6623 LIBS="$ac_save_LIBS"
6624
6625 fi
6626 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6627   echo "$ac_t""yes" 1>&6
6628     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6629     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6630   cat >> confdefs.h <<EOF
6631 #define $ac_tr_lib 1
6632 EOF
6633
6634   LIBS="-lsecurity $LIBS"
6635
6636 else
6637   echo "$ac_t""no" 1>&6
6638 fi
6639  
6640      for ac_func in putprpwnam
6641 do
6642 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6643 echo "configure:6644: checking for $ac_func" >&5
6644 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6645   echo $ac_n "(cached) $ac_c" 1>&6
6646 else
6647   cat > conftest.$ac_ext <<EOF
6648 #line 6649 "configure"
6649 #include "confdefs.h"
6650 /* System header to define __stub macros and hopefully few prototypes,
6651     which can conflict with char $ac_func(); below.  */
6652 #include <assert.h>
6653 /* Override any gcc2 internal prototype to avoid an error.  */
6654 /* We use char because int might match the return type of a gcc2
6655     builtin and then its argument prototype would still apply.  */
6656 char $ac_func();
6657
6658 int main() {
6659
6660 /* The GNU C library defines this for functions which it implements
6661     to always fail with ENOSYS.  Some functions are actually named
6662     something starting with __ and the normal name is an alias.  */
6663 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6664 choke me
6665 #else
6666 $ac_func();
6667 #endif
6668
6669 ; return 0; }
6670 EOF
6671 if { (eval echo configure:6672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6672   rm -rf conftest*
6673   eval "ac_cv_func_$ac_func=yes"
6674 else
6675   echo "configure: failed program was:" >&5
6676   cat conftest.$ac_ext >&5
6677   rm -rf conftest*
6678   eval "ac_cv_func_$ac_func=no"
6679 fi
6680 rm -f conftest*
6681 fi
6682
6683 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6684   echo "$ac_t""yes" 1>&6
6685     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6686   cat >> confdefs.h <<EOF
6687 #define $ac_tr_func 1
6688 EOF
6689  
6690 else
6691   echo "$ac_t""no" 1>&6
6692 fi
6693 done
6694
6695   ;;
6696   esac
6697
6698 case "$LIBS" in
6699   *-lsec*) for ac_func in putprpwnam
6700 do
6701 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6702 echo "configure:6703: checking for $ac_func" >&5
6703 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6704   echo $ac_n "(cached) $ac_c" 1>&6
6705 else
6706   cat > conftest.$ac_ext <<EOF
6707 #line 6708 "configure"
6708 #include "confdefs.h"
6709 /* System header to define __stub macros and hopefully few prototypes,
6710     which can conflict with char $ac_func(); below.  */
6711 #include <assert.h>
6712 /* Override any gcc2 internal prototype to avoid an error.  */
6713 /* We use char because int might match the return type of a gcc2
6714     builtin and then its argument prototype would still apply.  */
6715 char $ac_func();
6716
6717 int main() {
6718
6719 /* The GNU C library defines this for functions which it implements
6720     to always fail with ENOSYS.  Some functions are actually named
6721     something starting with __ and the normal name is an alias.  */
6722 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6723 choke me
6724 #else
6725 $ac_func();
6726 #endif
6727
6728 ; return 0; }
6729 EOF
6730 if { (eval echo configure:6731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6731   rm -rf conftest*
6732   eval "ac_cv_func_$ac_func=yes"
6733 else
6734   echo "configure: failed program was:" >&5
6735   cat conftest.$ac_ext >&5
6736   rm -rf conftest*
6737   eval "ac_cv_func_$ac_func=no"
6738 fi
6739 rm -f conftest*
6740 fi
6741
6742 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6743   echo "$ac_t""yes" 1>&6
6744     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6745   cat >> confdefs.h <<EOF
6746 #define $ac_tr_func 1
6747 EOF
6748  
6749 else
6750   echo "$ac_t""no" 1>&6
6751 fi
6752 done
6753  ;;
6754   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
6755 echo "configure:6756: checking for putprpwnam in -lsec" >&5
6756 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
6757 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6758   echo $ac_n "(cached) $ac_c" 1>&6
6759 else
6760   ac_save_LIBS="$LIBS"
6761 LIBS="-lsec  $LIBS"
6762 cat > conftest.$ac_ext <<EOF
6763 #line 6764 "configure"
6764 #include "confdefs.h"
6765 /* Override any gcc2 internal prototype to avoid an error.  */
6766 /* We use char because int might match the return type of a gcc2
6767     builtin and then its argument prototype would still apply.  */
6768 char putprpwnam();
6769
6770 int main() {
6771 putprpwnam()
6772 ; return 0; }
6773 EOF
6774 if { (eval echo configure:6775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6775   rm -rf conftest*
6776   eval "ac_cv_lib_$ac_lib_var=yes"
6777 else
6778   echo "configure: failed program was:" >&5
6779   cat conftest.$ac_ext >&5
6780   rm -rf conftest*
6781   eval "ac_cv_lib_$ac_lib_var=no"
6782 fi
6783 rm -f conftest*
6784 LIBS="$ac_save_LIBS"
6785
6786 fi
6787 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6788   echo "$ac_t""yes" 1>&6
6789     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6790     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6791   cat >> confdefs.h <<EOF
6792 #define $ac_tr_lib 1
6793 EOF
6794
6795   LIBS="-lsec $LIBS"
6796
6797 else
6798   echo "$ac_t""no" 1>&6
6799 fi
6800  
6801      for ac_func in putprpwnam
6802 do
6803 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6804 echo "configure:6805: checking for $ac_func" >&5
6805 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6806   echo $ac_n "(cached) $ac_c" 1>&6
6807 else
6808   cat > conftest.$ac_ext <<EOF
6809 #line 6810 "configure"
6810 #include "confdefs.h"
6811 /* System header to define __stub macros and hopefully few prototypes,
6812     which can conflict with char $ac_func(); below.  */
6813 #include <assert.h>
6814 /* Override any gcc2 internal prototype to avoid an error.  */
6815 /* We use char because int might match the return type of a gcc2
6816     builtin and then its argument prototype would still apply.  */
6817 char $ac_func();
6818
6819 int main() {
6820
6821 /* The GNU C library defines this for functions which it implements
6822     to always fail with ENOSYS.  Some functions are actually named
6823     something starting with __ and the normal name is an alias.  */
6824 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6825 choke me
6826 #else
6827 $ac_func();
6828 #endif
6829
6830 ; return 0; }
6831 EOF
6832 if { (eval echo configure:6833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6833   rm -rf conftest*
6834   eval "ac_cv_func_$ac_func=yes"
6835 else
6836   echo "configure: failed program was:" >&5
6837   cat conftest.$ac_ext >&5
6838   rm -rf conftest*
6839   eval "ac_cv_func_$ac_func=no"
6840 fi
6841 rm -f conftest*
6842 fi
6843
6844 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6845   echo "$ac_t""yes" 1>&6
6846     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6847   cat >> confdefs.h <<EOF
6848 #define $ac_tr_func 1
6849 EOF
6850  
6851 else
6852   echo "$ac_t""no" 1>&6
6853 fi
6854 done
6855
6856   ;;
6857   esac
6858
6859
6860 case "$LIBS" in
6861   *-lsecurity*) for ac_func in set_auth_parameters
6862 do
6863 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6864 echo "configure:6865: checking for $ac_func" >&5
6865 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6866   echo $ac_n "(cached) $ac_c" 1>&6
6867 else
6868   cat > conftest.$ac_ext <<EOF
6869 #line 6870 "configure"
6870 #include "confdefs.h"
6871 /* System header to define __stub macros and hopefully few prototypes,
6872     which can conflict with char $ac_func(); below.  */
6873 #include <assert.h>
6874 /* Override any gcc2 internal prototype to avoid an error.  */
6875 /* We use char because int might match the return type of a gcc2
6876     builtin and then its argument prototype would still apply.  */
6877 char $ac_func();
6878
6879 int main() {
6880
6881 /* The GNU C library defines this for functions which it implements
6882     to always fail with ENOSYS.  Some functions are actually named
6883     something starting with __ and the normal name is an alias.  */
6884 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6885 choke me
6886 #else
6887 $ac_func();
6888 #endif
6889
6890 ; return 0; }
6891 EOF
6892 if { (eval echo configure:6893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6893   rm -rf conftest*
6894   eval "ac_cv_func_$ac_func=yes"
6895 else
6896   echo "configure: failed program was:" >&5
6897   cat conftest.$ac_ext >&5
6898   rm -rf conftest*
6899   eval "ac_cv_func_$ac_func=no"
6900 fi
6901 rm -f conftest*
6902 fi
6903
6904 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6905   echo "$ac_t""yes" 1>&6
6906     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6907   cat >> confdefs.h <<EOF
6908 #define $ac_tr_func 1
6909 EOF
6910  
6911 else
6912   echo "$ac_t""no" 1>&6
6913 fi
6914 done
6915  ;;
6916   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
6917 echo "configure:6918: checking for set_auth_parameters in -lsecurity" >&5
6918 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
6919 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6920   echo $ac_n "(cached) $ac_c" 1>&6
6921 else
6922   ac_save_LIBS="$LIBS"
6923 LIBS="-lsecurity  $LIBS"
6924 cat > conftest.$ac_ext <<EOF
6925 #line 6926 "configure"
6926 #include "confdefs.h"
6927 /* Override any gcc2 internal prototype to avoid an error.  */
6928 /* We use char because int might match the return type of a gcc2
6929     builtin and then its argument prototype would still apply.  */
6930 char set_auth_parameters();
6931
6932 int main() {
6933 set_auth_parameters()
6934 ; return 0; }
6935 EOF
6936 if { (eval echo configure:6937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6937   rm -rf conftest*
6938   eval "ac_cv_lib_$ac_lib_var=yes"
6939 else
6940   echo "configure: failed program was:" >&5
6941   cat conftest.$ac_ext >&5
6942   rm -rf conftest*
6943   eval "ac_cv_lib_$ac_lib_var=no"
6944 fi
6945 rm -f conftest*
6946 LIBS="$ac_save_LIBS"
6947
6948 fi
6949 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6950   echo "$ac_t""yes" 1>&6
6951     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6952     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6953   cat >> confdefs.h <<EOF
6954 #define $ac_tr_lib 1
6955 EOF
6956
6957   LIBS="-lsecurity $LIBS"
6958
6959 else
6960   echo "$ac_t""no" 1>&6
6961 fi
6962  
6963      for ac_func in set_auth_parameters
6964 do
6965 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6966 echo "configure:6967: checking for $ac_func" >&5
6967 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6968   echo $ac_n "(cached) $ac_c" 1>&6
6969 else
6970   cat > conftest.$ac_ext <<EOF
6971 #line 6972 "configure"
6972 #include "confdefs.h"
6973 /* System header to define __stub macros and hopefully few prototypes,
6974     which can conflict with char $ac_func(); below.  */
6975 #include <assert.h>
6976 /* Override any gcc2 internal prototype to avoid an error.  */
6977 /* We use char because int might match the return type of a gcc2
6978     builtin and then its argument prototype would still apply.  */
6979 char $ac_func();
6980
6981 int main() {
6982
6983 /* The GNU C library defines this for functions which it implements
6984     to always fail with ENOSYS.  Some functions are actually named
6985     something starting with __ and the normal name is an alias.  */
6986 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6987 choke me
6988 #else
6989 $ac_func();
6990 #endif
6991
6992 ; return 0; }
6993 EOF
6994 if { (eval echo configure:6995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6995   rm -rf conftest*
6996   eval "ac_cv_func_$ac_func=yes"
6997 else
6998   echo "configure: failed program was:" >&5
6999   cat conftest.$ac_ext >&5
7000   rm -rf conftest*
7001   eval "ac_cv_func_$ac_func=no"
7002 fi
7003 rm -f conftest*
7004 fi
7005
7006 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7007   echo "$ac_t""yes" 1>&6
7008     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7009   cat >> confdefs.h <<EOF
7010 #define $ac_tr_func 1
7011 EOF
7012  
7013 else
7014   echo "$ac_t""no" 1>&6
7015 fi
7016 done
7017
7018   ;;
7019   esac
7020
7021 case "$LIBS" in
7022   *-lsec*) for ac_func in set_auth_parameters
7023 do
7024 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7025 echo "configure:7026: checking for $ac_func" >&5
7026 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7027   echo $ac_n "(cached) $ac_c" 1>&6
7028 else
7029   cat > conftest.$ac_ext <<EOF
7030 #line 7031 "configure"
7031 #include "confdefs.h"
7032 /* System header to define __stub macros and hopefully few prototypes,
7033     which can conflict with char $ac_func(); below.  */
7034 #include <assert.h>
7035 /* Override any gcc2 internal prototype to avoid an error.  */
7036 /* We use char because int might match the return type of a gcc2
7037     builtin and then its argument prototype would still apply.  */
7038 char $ac_func();
7039
7040 int main() {
7041
7042 /* The GNU C library defines this for functions which it implements
7043     to always fail with ENOSYS.  Some functions are actually named
7044     something starting with __ and the normal name is an alias.  */
7045 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7046 choke me
7047 #else
7048 $ac_func();
7049 #endif
7050
7051 ; return 0; }
7052 EOF
7053 if { (eval echo configure:7054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7054   rm -rf conftest*
7055   eval "ac_cv_func_$ac_func=yes"
7056 else
7057   echo "configure: failed program was:" >&5
7058   cat conftest.$ac_ext >&5
7059   rm -rf conftest*
7060   eval "ac_cv_func_$ac_func=no"
7061 fi
7062 rm -f conftest*
7063 fi
7064
7065 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7066   echo "$ac_t""yes" 1>&6
7067     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7068   cat >> confdefs.h <<EOF
7069 #define $ac_tr_func 1
7070 EOF
7071  
7072 else
7073   echo "$ac_t""no" 1>&6
7074 fi
7075 done
7076  ;;
7077   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7078 echo "configure:7079: checking for set_auth_parameters in -lsec" >&5
7079 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7080 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7081   echo $ac_n "(cached) $ac_c" 1>&6
7082 else
7083   ac_save_LIBS="$LIBS"
7084 LIBS="-lsec  $LIBS"
7085 cat > conftest.$ac_ext <<EOF
7086 #line 7087 "configure"
7087 #include "confdefs.h"
7088 /* Override any gcc2 internal prototype to avoid an error.  */
7089 /* We use char because int might match the return type of a gcc2
7090     builtin and then its argument prototype would still apply.  */
7091 char set_auth_parameters();
7092
7093 int main() {
7094 set_auth_parameters()
7095 ; return 0; }
7096 EOF
7097 if { (eval echo configure:7098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7098   rm -rf conftest*
7099   eval "ac_cv_lib_$ac_lib_var=yes"
7100 else
7101   echo "configure: failed program was:" >&5
7102   cat conftest.$ac_ext >&5
7103   rm -rf conftest*
7104   eval "ac_cv_lib_$ac_lib_var=no"
7105 fi
7106 rm -f conftest*
7107 LIBS="$ac_save_LIBS"
7108
7109 fi
7110 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7111   echo "$ac_t""yes" 1>&6
7112     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7113     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7114   cat >> confdefs.h <<EOF
7115 #define $ac_tr_lib 1
7116 EOF
7117
7118   LIBS="-lsec $LIBS"
7119
7120 else
7121   echo "$ac_t""no" 1>&6
7122 fi
7123  
7124      for ac_func in set_auth_parameters
7125 do
7126 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7127 echo "configure:7128: checking for $ac_func" >&5
7128 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7129   echo $ac_n "(cached) $ac_c" 1>&6
7130 else
7131   cat > conftest.$ac_ext <<EOF
7132 #line 7133 "configure"
7133 #include "confdefs.h"
7134 /* System header to define __stub macros and hopefully few prototypes,
7135     which can conflict with char $ac_func(); below.  */
7136 #include <assert.h>
7137 /* Override any gcc2 internal prototype to avoid an error.  */
7138 /* We use char because int might match the return type of a gcc2
7139     builtin and then its argument prototype would still apply.  */
7140 char $ac_func();
7141
7142 int main() {
7143
7144 /* The GNU C library defines this for functions which it implements
7145     to always fail with ENOSYS.  Some functions are actually named
7146     something starting with __ and the normal name is an alias.  */
7147 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7148 choke me
7149 #else
7150 $ac_func();
7151 #endif
7152
7153 ; return 0; }
7154 EOF
7155 if { (eval echo configure:7156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7156   rm -rf conftest*
7157   eval "ac_cv_func_$ac_func=yes"
7158 else
7159   echo "configure: failed program was:" >&5
7160   cat conftest.$ac_ext >&5
7161   rm -rf conftest*
7162   eval "ac_cv_func_$ac_func=no"
7163 fi
7164 rm -f conftest*
7165 fi
7166
7167 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7168   echo "$ac_t""yes" 1>&6
7169     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7170   cat >> confdefs.h <<EOF
7171 #define $ac_tr_func 1
7172 EOF
7173  
7174 else
7175   echo "$ac_t""no" 1>&6
7176 fi
7177 done
7178
7179   ;;
7180   esac
7181
7182
7183 # UnixWare 7.x has its getspnam in -lgen
7184 case "$LIBS" in
7185   *-lgen*) for ac_func in getspnam
7186 do
7187 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7188 echo "configure:7189: checking for $ac_func" >&5
7189 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7190   echo $ac_n "(cached) $ac_c" 1>&6
7191 else
7192   cat > conftest.$ac_ext <<EOF
7193 #line 7194 "configure"
7194 #include "confdefs.h"
7195 /* System header to define __stub macros and hopefully few prototypes,
7196     which can conflict with char $ac_func(); below.  */
7197 #include <assert.h>
7198 /* Override any gcc2 internal prototype to avoid an error.  */
7199 /* We use char because int might match the return type of a gcc2
7200     builtin and then its argument prototype would still apply.  */
7201 char $ac_func();
7202
7203 int main() {
7204
7205 /* The GNU C library defines this for functions which it implements
7206     to always fail with ENOSYS.  Some functions are actually named
7207     something starting with __ and the normal name is an alias.  */
7208 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7209 choke me
7210 #else
7211 $ac_func();
7212 #endif
7213
7214 ; return 0; }
7215 EOF
7216 if { (eval echo configure:7217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7217   rm -rf conftest*
7218   eval "ac_cv_func_$ac_func=yes"
7219 else
7220   echo "configure: failed program was:" >&5
7221   cat conftest.$ac_ext >&5
7222   rm -rf conftest*
7223   eval "ac_cv_func_$ac_func=no"
7224 fi
7225 rm -f conftest*
7226 fi
7227
7228 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7229   echo "$ac_t""yes" 1>&6
7230     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7231   cat >> confdefs.h <<EOF
7232 #define $ac_tr_func 1
7233 EOF
7234  
7235 else
7236   echo "$ac_t""no" 1>&6
7237 fi
7238 done
7239  ;;
7240   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7241 echo "configure:7242: checking for getspnam in -lgen" >&5
7242 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7243 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7244   echo $ac_n "(cached) $ac_c" 1>&6
7245 else
7246   ac_save_LIBS="$LIBS"
7247 LIBS="-lgen  $LIBS"
7248 cat > conftest.$ac_ext <<EOF
7249 #line 7250 "configure"
7250 #include "confdefs.h"
7251 /* Override any gcc2 internal prototype to avoid an error.  */
7252 /* We use char because int might match the return type of a gcc2
7253     builtin and then its argument prototype would still apply.  */
7254 char getspnam();
7255
7256 int main() {
7257 getspnam()
7258 ; return 0; }
7259 EOF
7260 if { (eval echo configure:7261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7261   rm -rf conftest*
7262   eval "ac_cv_lib_$ac_lib_var=yes"
7263 else
7264   echo "configure: failed program was:" >&5
7265   cat conftest.$ac_ext >&5
7266   rm -rf conftest*
7267   eval "ac_cv_lib_$ac_lib_var=no"
7268 fi
7269 rm -f conftest*
7270 LIBS="$ac_save_LIBS"
7271
7272 fi
7273 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7274   echo "$ac_t""yes" 1>&6
7275     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7276     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7277   cat >> confdefs.h <<EOF
7278 #define $ac_tr_lib 1
7279 EOF
7280
7281   LIBS="-lgen $LIBS"
7282
7283 else
7284   echo "$ac_t""no" 1>&6
7285 fi
7286  
7287      for ac_func in getspnam
7288 do
7289 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7290 echo "configure:7291: checking for $ac_func" >&5
7291 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7292   echo $ac_n "(cached) $ac_c" 1>&6
7293 else
7294   cat > conftest.$ac_ext <<EOF
7295 #line 7296 "configure"
7296 #include "confdefs.h"
7297 /* System header to define __stub macros and hopefully few prototypes,
7298     which can conflict with char $ac_func(); below.  */
7299 #include <assert.h>
7300 /* Override any gcc2 internal prototype to avoid an error.  */
7301 /* We use char because int might match the return type of a gcc2
7302     builtin and then its argument prototype would still apply.  */
7303 char $ac_func();
7304
7305 int main() {
7306
7307 /* The GNU C library defines this for functions which it implements
7308     to always fail with ENOSYS.  Some functions are actually named
7309     something starting with __ and the normal name is an alias.  */
7310 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7311 choke me
7312 #else
7313 $ac_func();
7314 #endif
7315
7316 ; return 0; }
7317 EOF
7318 if { (eval echo configure:7319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7319   rm -rf conftest*
7320   eval "ac_cv_func_$ac_func=yes"
7321 else
7322   echo "configure: failed program was:" >&5
7323   cat conftest.$ac_ext >&5
7324   rm -rf conftest*
7325   eval "ac_cv_func_$ac_func=no"
7326 fi
7327 rm -f conftest*
7328 fi
7329
7330 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7331   echo "$ac_t""yes" 1>&6
7332     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7333   cat >> confdefs.h <<EOF
7334 #define $ac_tr_func 1
7335 EOF
7336  
7337 else
7338   echo "$ac_t""no" 1>&6
7339 fi
7340 done
7341
7342   ;;
7343   esac
7344
7345
7346 case "$LIBS" in
7347   *-lsecurity*) for ac_func in getspnam
7348 do
7349 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7350 echo "configure:7351: checking for $ac_func" >&5
7351 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7352   echo $ac_n "(cached) $ac_c" 1>&6
7353 else
7354   cat > conftest.$ac_ext <<EOF
7355 #line 7356 "configure"
7356 #include "confdefs.h"
7357 /* System header to define __stub macros and hopefully few prototypes,
7358     which can conflict with char $ac_func(); below.  */
7359 #include <assert.h>
7360 /* Override any gcc2 internal prototype to avoid an error.  */
7361 /* We use char because int might match the return type of a gcc2
7362     builtin and then its argument prototype would still apply.  */
7363 char $ac_func();
7364
7365 int main() {
7366
7367 /* The GNU C library defines this for functions which it implements
7368     to always fail with ENOSYS.  Some functions are actually named
7369     something starting with __ and the normal name is an alias.  */
7370 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7371 choke me
7372 #else
7373 $ac_func();
7374 #endif
7375
7376 ; return 0; }
7377 EOF
7378 if { (eval echo configure:7379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7379   rm -rf conftest*
7380   eval "ac_cv_func_$ac_func=yes"
7381 else
7382   echo "configure: failed program was:" >&5
7383   cat conftest.$ac_ext >&5
7384   rm -rf conftest*
7385   eval "ac_cv_func_$ac_func=no"
7386 fi
7387 rm -f conftest*
7388 fi
7389
7390 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7391   echo "$ac_t""yes" 1>&6
7392     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7393   cat >> confdefs.h <<EOF
7394 #define $ac_tr_func 1
7395 EOF
7396  
7397 else
7398   echo "$ac_t""no" 1>&6
7399 fi
7400 done
7401  ;;
7402   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7403 echo "configure:7404: checking for getspnam in -lsecurity" >&5
7404 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7405 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7406   echo $ac_n "(cached) $ac_c" 1>&6
7407 else
7408   ac_save_LIBS="$LIBS"
7409 LIBS="-lsecurity  $LIBS"
7410 cat > conftest.$ac_ext <<EOF
7411 #line 7412 "configure"
7412 #include "confdefs.h"
7413 /* Override any gcc2 internal prototype to avoid an error.  */
7414 /* We use char because int might match the return type of a gcc2
7415     builtin and then its argument prototype would still apply.  */
7416 char getspnam();
7417
7418 int main() {
7419 getspnam()
7420 ; return 0; }
7421 EOF
7422 if { (eval echo configure:7423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7423   rm -rf conftest*
7424   eval "ac_cv_lib_$ac_lib_var=yes"
7425 else
7426   echo "configure: failed program was:" >&5
7427   cat conftest.$ac_ext >&5
7428   rm -rf conftest*
7429   eval "ac_cv_lib_$ac_lib_var=no"
7430 fi
7431 rm -f conftest*
7432 LIBS="$ac_save_LIBS"
7433
7434 fi
7435 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7436   echo "$ac_t""yes" 1>&6
7437     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7438     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7439   cat >> confdefs.h <<EOF
7440 #define $ac_tr_lib 1
7441 EOF
7442
7443   LIBS="-lsecurity $LIBS"
7444
7445 else
7446   echo "$ac_t""no" 1>&6
7447 fi
7448  
7449      for ac_func in getspnam
7450 do
7451 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7452 echo "configure:7453: checking for $ac_func" >&5
7453 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7454   echo $ac_n "(cached) $ac_c" 1>&6
7455 else
7456   cat > conftest.$ac_ext <<EOF
7457 #line 7458 "configure"
7458 #include "confdefs.h"
7459 /* System header to define __stub macros and hopefully few prototypes,
7460     which can conflict with char $ac_func(); below.  */
7461 #include <assert.h>
7462 /* Override any gcc2 internal prototype to avoid an error.  */
7463 /* We use char because int might match the return type of a gcc2
7464     builtin and then its argument prototype would still apply.  */
7465 char $ac_func();
7466
7467 int main() {
7468
7469 /* The GNU C library defines this for functions which it implements
7470     to always fail with ENOSYS.  Some functions are actually named
7471     something starting with __ and the normal name is an alias.  */
7472 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7473 choke me
7474 #else
7475 $ac_func();
7476 #endif
7477
7478 ; return 0; }
7479 EOF
7480 if { (eval echo configure:7481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7481   rm -rf conftest*
7482   eval "ac_cv_func_$ac_func=yes"
7483 else
7484   echo "configure: failed program was:" >&5
7485   cat conftest.$ac_ext >&5
7486   rm -rf conftest*
7487   eval "ac_cv_func_$ac_func=no"
7488 fi
7489 rm -f conftest*
7490 fi
7491
7492 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7493   echo "$ac_t""yes" 1>&6
7494     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7495   cat >> confdefs.h <<EOF
7496 #define $ac_tr_func 1
7497 EOF
7498  
7499 else
7500   echo "$ac_t""no" 1>&6
7501 fi
7502 done
7503
7504   ;;
7505   esac
7506
7507 case "$LIBS" in
7508   *-lsec*) for ac_func in getspnam
7509 do
7510 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7511 echo "configure:7512: checking for $ac_func" >&5
7512 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7513   echo $ac_n "(cached) $ac_c" 1>&6
7514 else
7515   cat > conftest.$ac_ext <<EOF
7516 #line 7517 "configure"
7517 #include "confdefs.h"
7518 /* System header to define __stub macros and hopefully few prototypes,
7519     which can conflict with char $ac_func(); below.  */
7520 #include <assert.h>
7521 /* Override any gcc2 internal prototype to avoid an error.  */
7522 /* We use char because int might match the return type of a gcc2
7523     builtin and then its argument prototype would still apply.  */
7524 char $ac_func();
7525
7526 int main() {
7527
7528 /* The GNU C library defines this for functions which it implements
7529     to always fail with ENOSYS.  Some functions are actually named
7530     something starting with __ and the normal name is an alias.  */
7531 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7532 choke me
7533 #else
7534 $ac_func();
7535 #endif
7536
7537 ; return 0; }
7538 EOF
7539 if { (eval echo configure:7540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7540   rm -rf conftest*
7541   eval "ac_cv_func_$ac_func=yes"
7542 else
7543   echo "configure: failed program was:" >&5
7544   cat conftest.$ac_ext >&5
7545   rm -rf conftest*
7546   eval "ac_cv_func_$ac_func=no"
7547 fi
7548 rm -f conftest*
7549 fi
7550
7551 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7552   echo "$ac_t""yes" 1>&6
7553     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7554   cat >> confdefs.h <<EOF
7555 #define $ac_tr_func 1
7556 EOF
7557  
7558 else
7559   echo "$ac_t""no" 1>&6
7560 fi
7561 done
7562  ;;
7563   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7564 echo "configure:7565: checking for getspnam in -lsec" >&5
7565 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7566 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7567   echo $ac_n "(cached) $ac_c" 1>&6
7568 else
7569   ac_save_LIBS="$LIBS"
7570 LIBS="-lsec  $LIBS"
7571 cat > conftest.$ac_ext <<EOF
7572 #line 7573 "configure"
7573 #include "confdefs.h"
7574 /* Override any gcc2 internal prototype to avoid an error.  */
7575 /* We use char because int might match the return type of a gcc2
7576     builtin and then its argument prototype would still apply.  */
7577 char getspnam();
7578
7579 int main() {
7580 getspnam()
7581 ; return 0; }
7582 EOF
7583 if { (eval echo configure:7584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7584   rm -rf conftest*
7585   eval "ac_cv_lib_$ac_lib_var=yes"
7586 else
7587   echo "configure: failed program was:" >&5
7588   cat conftest.$ac_ext >&5
7589   rm -rf conftest*
7590   eval "ac_cv_lib_$ac_lib_var=no"
7591 fi
7592 rm -f conftest*
7593 LIBS="$ac_save_LIBS"
7594
7595 fi
7596 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7597   echo "$ac_t""yes" 1>&6
7598     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7599     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7600   cat >> confdefs.h <<EOF
7601 #define $ac_tr_lib 1
7602 EOF
7603
7604   LIBS="-lsec $LIBS"
7605
7606 else
7607   echo "$ac_t""no" 1>&6
7608 fi
7609  
7610      for ac_func in getspnam
7611 do
7612 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7613 echo "configure:7614: checking for $ac_func" >&5
7614 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7615   echo $ac_n "(cached) $ac_c" 1>&6
7616 else
7617   cat > conftest.$ac_ext <<EOF
7618 #line 7619 "configure"
7619 #include "confdefs.h"
7620 /* System header to define __stub macros and hopefully few prototypes,
7621     which can conflict with char $ac_func(); below.  */
7622 #include <assert.h>
7623 /* Override any gcc2 internal prototype to avoid an error.  */
7624 /* We use char because int might match the return type of a gcc2
7625     builtin and then its argument prototype would still apply.  */
7626 char $ac_func();
7627
7628 int main() {
7629
7630 /* The GNU C library defines this for functions which it implements
7631     to always fail with ENOSYS.  Some functions are actually named
7632     something starting with __ and the normal name is an alias.  */
7633 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7634 choke me
7635 #else
7636 $ac_func();
7637 #endif
7638
7639 ; return 0; }
7640 EOF
7641 if { (eval echo configure:7642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7642   rm -rf conftest*
7643   eval "ac_cv_func_$ac_func=yes"
7644 else
7645   echo "configure: failed program was:" >&5
7646   cat conftest.$ac_ext >&5
7647   rm -rf conftest*
7648   eval "ac_cv_func_$ac_func=no"
7649 fi
7650 rm -f conftest*
7651 fi
7652
7653 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7654   echo "$ac_t""yes" 1>&6
7655     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7656   cat >> confdefs.h <<EOF
7657 #define $ac_tr_func 1
7658 EOF
7659  
7660 else
7661   echo "$ac_t""no" 1>&6
7662 fi
7663 done
7664
7665   ;;
7666   esac
7667
7668
7669 case "$LIBS" in
7670   *-lsecurity*) for ac_func in bigcrypt
7671 do
7672 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7673 echo "configure:7674: checking for $ac_func" >&5
7674 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7675   echo $ac_n "(cached) $ac_c" 1>&6
7676 else
7677   cat > conftest.$ac_ext <<EOF
7678 #line 7679 "configure"
7679 #include "confdefs.h"
7680 /* System header to define __stub macros and hopefully few prototypes,
7681     which can conflict with char $ac_func(); below.  */
7682 #include <assert.h>
7683 /* Override any gcc2 internal prototype to avoid an error.  */
7684 /* We use char because int might match the return type of a gcc2
7685     builtin and then its argument prototype would still apply.  */
7686 char $ac_func();
7687
7688 int main() {
7689
7690 /* The GNU C library defines this for functions which it implements
7691     to always fail with ENOSYS.  Some functions are actually named
7692     something starting with __ and the normal name is an alias.  */
7693 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7694 choke me
7695 #else
7696 $ac_func();
7697 #endif
7698
7699 ; return 0; }
7700 EOF
7701 if { (eval echo configure:7702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7702   rm -rf conftest*
7703   eval "ac_cv_func_$ac_func=yes"
7704 else
7705   echo "configure: failed program was:" >&5
7706   cat conftest.$ac_ext >&5
7707   rm -rf conftest*
7708   eval "ac_cv_func_$ac_func=no"
7709 fi
7710 rm -f conftest*
7711 fi
7712
7713 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7714   echo "$ac_t""yes" 1>&6
7715     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7716   cat >> confdefs.h <<EOF
7717 #define $ac_tr_func 1
7718 EOF
7719  
7720 else
7721   echo "$ac_t""no" 1>&6
7722 fi
7723 done
7724  ;;
7725   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
7726 echo "configure:7727: checking for bigcrypt in -lsecurity" >&5
7727 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
7728 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7729   echo $ac_n "(cached) $ac_c" 1>&6
7730 else
7731   ac_save_LIBS="$LIBS"
7732 LIBS="-lsecurity  $LIBS"
7733 cat > conftest.$ac_ext <<EOF
7734 #line 7735 "configure"
7735 #include "confdefs.h"
7736 /* Override any gcc2 internal prototype to avoid an error.  */
7737 /* We use char because int might match the return type of a gcc2
7738     builtin and then its argument prototype would still apply.  */
7739 char bigcrypt();
7740
7741 int main() {
7742 bigcrypt()
7743 ; return 0; }
7744 EOF
7745 if { (eval echo configure:7746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7746   rm -rf conftest*
7747   eval "ac_cv_lib_$ac_lib_var=yes"
7748 else
7749   echo "configure: failed program was:" >&5
7750   cat conftest.$ac_ext >&5
7751   rm -rf conftest*
7752   eval "ac_cv_lib_$ac_lib_var=no"
7753 fi
7754 rm -f conftest*
7755 LIBS="$ac_save_LIBS"
7756
7757 fi
7758 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7759   echo "$ac_t""yes" 1>&6
7760     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7761     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7762   cat >> confdefs.h <<EOF
7763 #define $ac_tr_lib 1
7764 EOF
7765
7766   LIBS="-lsecurity $LIBS"
7767
7768 else
7769   echo "$ac_t""no" 1>&6
7770 fi
7771  
7772      for ac_func in bigcrypt
7773 do
7774 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7775 echo "configure:7776: checking for $ac_func" >&5
7776 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7777   echo $ac_n "(cached) $ac_c" 1>&6
7778 else
7779   cat > conftest.$ac_ext <<EOF
7780 #line 7781 "configure"
7781 #include "confdefs.h"
7782 /* System header to define __stub macros and hopefully few prototypes,
7783     which can conflict with char $ac_func(); below.  */
7784 #include <assert.h>
7785 /* Override any gcc2 internal prototype to avoid an error.  */
7786 /* We use char because int might match the return type of a gcc2
7787     builtin and then its argument prototype would still apply.  */
7788 char $ac_func();
7789
7790 int main() {
7791
7792 /* The GNU C library defines this for functions which it implements
7793     to always fail with ENOSYS.  Some functions are actually named
7794     something starting with __ and the normal name is an alias.  */
7795 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7796 choke me
7797 #else
7798 $ac_func();
7799 #endif
7800
7801 ; return 0; }
7802 EOF
7803 if { (eval echo configure:7804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7804   rm -rf conftest*
7805   eval "ac_cv_func_$ac_func=yes"
7806 else
7807   echo "configure: failed program was:" >&5
7808   cat conftest.$ac_ext >&5
7809   rm -rf conftest*
7810   eval "ac_cv_func_$ac_func=no"
7811 fi
7812 rm -f conftest*
7813 fi
7814
7815 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7816   echo "$ac_t""yes" 1>&6
7817     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7818   cat >> confdefs.h <<EOF
7819 #define $ac_tr_func 1
7820 EOF
7821  
7822 else
7823   echo "$ac_t""no" 1>&6
7824 fi
7825 done
7826
7827   ;;
7828   esac
7829
7830 case "$LIBS" in
7831   *-lsec*) for ac_func in bigcrypt
7832 do
7833 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7834 echo "configure:7835: checking for $ac_func" >&5
7835 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7836   echo $ac_n "(cached) $ac_c" 1>&6
7837 else
7838   cat > conftest.$ac_ext <<EOF
7839 #line 7840 "configure"
7840 #include "confdefs.h"
7841 /* System header to define __stub macros and hopefully few prototypes,
7842     which can conflict with char $ac_func(); below.  */
7843 #include <assert.h>
7844 /* Override any gcc2 internal prototype to avoid an error.  */
7845 /* We use char because int might match the return type of a gcc2
7846     builtin and then its argument prototype would still apply.  */
7847 char $ac_func();
7848
7849 int main() {
7850
7851 /* The GNU C library defines this for functions which it implements
7852     to always fail with ENOSYS.  Some functions are actually named
7853     something starting with __ and the normal name is an alias.  */
7854 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7855 choke me
7856 #else
7857 $ac_func();
7858 #endif
7859
7860 ; return 0; }
7861 EOF
7862 if { (eval echo configure:7863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7863   rm -rf conftest*
7864   eval "ac_cv_func_$ac_func=yes"
7865 else
7866   echo "configure: failed program was:" >&5
7867   cat conftest.$ac_ext >&5
7868   rm -rf conftest*
7869   eval "ac_cv_func_$ac_func=no"
7870 fi
7871 rm -f conftest*
7872 fi
7873
7874 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7875   echo "$ac_t""yes" 1>&6
7876     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7877   cat >> confdefs.h <<EOF
7878 #define $ac_tr_func 1
7879 EOF
7880  
7881 else
7882   echo "$ac_t""no" 1>&6
7883 fi
7884 done
7885  ;;
7886   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
7887 echo "configure:7888: checking for bigcrypt in -lsec" >&5
7888 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
7889 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7890   echo $ac_n "(cached) $ac_c" 1>&6
7891 else
7892   ac_save_LIBS="$LIBS"
7893 LIBS="-lsec  $LIBS"
7894 cat > conftest.$ac_ext <<EOF
7895 #line 7896 "configure"
7896 #include "confdefs.h"
7897 /* Override any gcc2 internal prototype to avoid an error.  */
7898 /* We use char because int might match the return type of a gcc2
7899     builtin and then its argument prototype would still apply.  */
7900 char bigcrypt();
7901
7902 int main() {
7903 bigcrypt()
7904 ; return 0; }
7905 EOF
7906 if { (eval echo configure:7907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7907   rm -rf conftest*
7908   eval "ac_cv_lib_$ac_lib_var=yes"
7909 else
7910   echo "configure: failed program was:" >&5
7911   cat conftest.$ac_ext >&5
7912   rm -rf conftest*
7913   eval "ac_cv_lib_$ac_lib_var=no"
7914 fi
7915 rm -f conftest*
7916 LIBS="$ac_save_LIBS"
7917
7918 fi
7919 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7920   echo "$ac_t""yes" 1>&6
7921     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7922     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7923   cat >> confdefs.h <<EOF
7924 #define $ac_tr_lib 1
7925 EOF
7926
7927   LIBS="-lsec $LIBS"
7928
7929 else
7930   echo "$ac_t""no" 1>&6
7931 fi
7932  
7933      for ac_func in bigcrypt
7934 do
7935 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7936 echo "configure:7937: checking for $ac_func" >&5
7937 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7938   echo $ac_n "(cached) $ac_c" 1>&6
7939 else
7940   cat > conftest.$ac_ext <<EOF
7941 #line 7942 "configure"
7942 #include "confdefs.h"
7943 /* System header to define __stub macros and hopefully few prototypes,
7944     which can conflict with char $ac_func(); below.  */
7945 #include <assert.h>
7946 /* Override any gcc2 internal prototype to avoid an error.  */
7947 /* We use char because int might match the return type of a gcc2
7948     builtin and then its argument prototype would still apply.  */
7949 char $ac_func();
7950
7951 int main() {
7952
7953 /* The GNU C library defines this for functions which it implements
7954     to always fail with ENOSYS.  Some functions are actually named
7955     something starting with __ and the normal name is an alias.  */
7956 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7957 choke me
7958 #else
7959 $ac_func();
7960 #endif
7961
7962 ; return 0; }
7963 EOF
7964 if { (eval echo configure:7965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7965   rm -rf conftest*
7966   eval "ac_cv_func_$ac_func=yes"
7967 else
7968   echo "configure: failed program was:" >&5
7969   cat conftest.$ac_ext >&5
7970   rm -rf conftest*
7971   eval "ac_cv_func_$ac_func=no"
7972 fi
7973 rm -f conftest*
7974 fi
7975
7976 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7977   echo "$ac_t""yes" 1>&6
7978     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7979   cat >> confdefs.h <<EOF
7980 #define $ac_tr_func 1
7981 EOF
7982  
7983 else
7984   echo "$ac_t""no" 1>&6
7985 fi
7986 done
7987
7988   ;;
7989   esac
7990
7991
7992 case "$LIBS" in
7993   *-lsecurity*) for ac_func in getprpwnam
7994 do
7995 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7996 echo "configure:7997: checking for $ac_func" >&5
7997 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7998   echo $ac_n "(cached) $ac_c" 1>&6
7999 else
8000   cat > conftest.$ac_ext <<EOF
8001 #line 8002 "configure"
8002 #include "confdefs.h"
8003 /* System header to define __stub macros and hopefully few prototypes,
8004     which can conflict with char $ac_func(); below.  */
8005 #include <assert.h>
8006 /* Override any gcc2 internal prototype to avoid an error.  */
8007 /* We use char because int might match the return type of a gcc2
8008     builtin and then its argument prototype would still apply.  */
8009 char $ac_func();
8010
8011 int main() {
8012
8013 /* The GNU C library defines this for functions which it implements
8014     to always fail with ENOSYS.  Some functions are actually named
8015     something starting with __ and the normal name is an alias.  */
8016 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8017 choke me
8018 #else
8019 $ac_func();
8020 #endif
8021
8022 ; return 0; }
8023 EOF
8024 if { (eval echo configure:8025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8025   rm -rf conftest*
8026   eval "ac_cv_func_$ac_func=yes"
8027 else
8028   echo "configure: failed program was:" >&5
8029   cat conftest.$ac_ext >&5
8030   rm -rf conftest*
8031   eval "ac_cv_func_$ac_func=no"
8032 fi
8033 rm -f conftest*
8034 fi
8035
8036 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8037   echo "$ac_t""yes" 1>&6
8038     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8039   cat >> confdefs.h <<EOF
8040 #define $ac_tr_func 1
8041 EOF
8042  
8043 else
8044   echo "$ac_t""no" 1>&6
8045 fi
8046 done
8047  ;;
8048   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8049 echo "configure:8050: checking for getprpwnam in -lsecurity" >&5
8050 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8051 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8052   echo $ac_n "(cached) $ac_c" 1>&6
8053 else
8054   ac_save_LIBS="$LIBS"
8055 LIBS="-lsecurity  $LIBS"
8056 cat > conftest.$ac_ext <<EOF
8057 #line 8058 "configure"
8058 #include "confdefs.h"
8059 /* Override any gcc2 internal prototype to avoid an error.  */
8060 /* We use char because int might match the return type of a gcc2
8061     builtin and then its argument prototype would still apply.  */
8062 char getprpwnam();
8063
8064 int main() {
8065 getprpwnam()
8066 ; return 0; }
8067 EOF
8068 if { (eval echo configure:8069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8069   rm -rf conftest*
8070   eval "ac_cv_lib_$ac_lib_var=yes"
8071 else
8072   echo "configure: failed program was:" >&5
8073   cat conftest.$ac_ext >&5
8074   rm -rf conftest*
8075   eval "ac_cv_lib_$ac_lib_var=no"
8076 fi
8077 rm -f conftest*
8078 LIBS="$ac_save_LIBS"
8079
8080 fi
8081 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8082   echo "$ac_t""yes" 1>&6
8083     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8084     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8085   cat >> confdefs.h <<EOF
8086 #define $ac_tr_lib 1
8087 EOF
8088
8089   LIBS="-lsecurity $LIBS"
8090
8091 else
8092   echo "$ac_t""no" 1>&6
8093 fi
8094  
8095      for ac_func in getprpwnam
8096 do
8097 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8098 echo "configure:8099: checking for $ac_func" >&5
8099 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8100   echo $ac_n "(cached) $ac_c" 1>&6
8101 else
8102   cat > conftest.$ac_ext <<EOF
8103 #line 8104 "configure"
8104 #include "confdefs.h"
8105 /* System header to define __stub macros and hopefully few prototypes,
8106     which can conflict with char $ac_func(); below.  */
8107 #include <assert.h>
8108 /* Override any gcc2 internal prototype to avoid an error.  */
8109 /* We use char because int might match the return type of a gcc2
8110     builtin and then its argument prototype would still apply.  */
8111 char $ac_func();
8112
8113 int main() {
8114
8115 /* The GNU C library defines this for functions which it implements
8116     to always fail with ENOSYS.  Some functions are actually named
8117     something starting with __ and the normal name is an alias.  */
8118 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8119 choke me
8120 #else
8121 $ac_func();
8122 #endif
8123
8124 ; return 0; }
8125 EOF
8126 if { (eval echo configure:8127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8127   rm -rf conftest*
8128   eval "ac_cv_func_$ac_func=yes"
8129 else
8130   echo "configure: failed program was:" >&5
8131   cat conftest.$ac_ext >&5
8132   rm -rf conftest*
8133   eval "ac_cv_func_$ac_func=no"
8134 fi
8135 rm -f conftest*
8136 fi
8137
8138 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8139   echo "$ac_t""yes" 1>&6
8140     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8141   cat >> confdefs.h <<EOF
8142 #define $ac_tr_func 1
8143 EOF
8144  
8145 else
8146   echo "$ac_t""no" 1>&6
8147 fi
8148 done
8149
8150   ;;
8151   esac
8152
8153 case "$LIBS" in
8154   *-lsec*) for ac_func in getprpwnam
8155 do
8156 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8157 echo "configure:8158: checking for $ac_func" >&5
8158 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8159   echo $ac_n "(cached) $ac_c" 1>&6
8160 else
8161   cat > conftest.$ac_ext <<EOF
8162 #line 8163 "configure"
8163 #include "confdefs.h"
8164 /* System header to define __stub macros and hopefully few prototypes,
8165     which can conflict with char $ac_func(); below.  */
8166 #include <assert.h>
8167 /* Override any gcc2 internal prototype to avoid an error.  */
8168 /* We use char because int might match the return type of a gcc2
8169     builtin and then its argument prototype would still apply.  */
8170 char $ac_func();
8171
8172 int main() {
8173
8174 /* The GNU C library defines this for functions which it implements
8175     to always fail with ENOSYS.  Some functions are actually named
8176     something starting with __ and the normal name is an alias.  */
8177 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8178 choke me
8179 #else
8180 $ac_func();
8181 #endif
8182
8183 ; return 0; }
8184 EOF
8185 if { (eval echo configure:8186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8186   rm -rf conftest*
8187   eval "ac_cv_func_$ac_func=yes"
8188 else
8189   echo "configure: failed program was:" >&5
8190   cat conftest.$ac_ext >&5
8191   rm -rf conftest*
8192   eval "ac_cv_func_$ac_func=no"
8193 fi
8194 rm -f conftest*
8195 fi
8196
8197 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8198   echo "$ac_t""yes" 1>&6
8199     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8200   cat >> confdefs.h <<EOF
8201 #define $ac_tr_func 1
8202 EOF
8203  
8204 else
8205   echo "$ac_t""no" 1>&6
8206 fi
8207 done
8208  ;;
8209   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8210 echo "configure:8211: checking for getprpwnam in -lsec" >&5
8211 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8212 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8213   echo $ac_n "(cached) $ac_c" 1>&6
8214 else
8215   ac_save_LIBS="$LIBS"
8216 LIBS="-lsec  $LIBS"
8217 cat > conftest.$ac_ext <<EOF
8218 #line 8219 "configure"
8219 #include "confdefs.h"
8220 /* Override any gcc2 internal prototype to avoid an error.  */
8221 /* We use char because int might match the return type of a gcc2
8222     builtin and then its argument prototype would still apply.  */
8223 char getprpwnam();
8224
8225 int main() {
8226 getprpwnam()
8227 ; return 0; }
8228 EOF
8229 if { (eval echo configure:8230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8230   rm -rf conftest*
8231   eval "ac_cv_lib_$ac_lib_var=yes"
8232 else
8233   echo "configure: failed program was:" >&5
8234   cat conftest.$ac_ext >&5
8235   rm -rf conftest*
8236   eval "ac_cv_lib_$ac_lib_var=no"
8237 fi
8238 rm -f conftest*
8239 LIBS="$ac_save_LIBS"
8240
8241 fi
8242 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8243   echo "$ac_t""yes" 1>&6
8244     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8245     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8246   cat >> confdefs.h <<EOF
8247 #define $ac_tr_lib 1
8248 EOF
8249
8250   LIBS="-lsec $LIBS"
8251
8252 else
8253   echo "$ac_t""no" 1>&6
8254 fi
8255  
8256      for ac_func in getprpwnam
8257 do
8258 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8259 echo "configure:8260: checking for $ac_func" >&5
8260 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8261   echo $ac_n "(cached) $ac_c" 1>&6
8262 else
8263   cat > conftest.$ac_ext <<EOF
8264 #line 8265 "configure"
8265 #include "confdefs.h"
8266 /* System header to define __stub macros and hopefully few prototypes,
8267     which can conflict with char $ac_func(); below.  */
8268 #include <assert.h>
8269 /* Override any gcc2 internal prototype to avoid an error.  */
8270 /* We use char because int might match the return type of a gcc2
8271     builtin and then its argument prototype would still apply.  */
8272 char $ac_func();
8273
8274 int main() {
8275
8276 /* The GNU C library defines this for functions which it implements
8277     to always fail with ENOSYS.  Some functions are actually named
8278     something starting with __ and the normal name is an alias.  */
8279 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8280 choke me
8281 #else
8282 $ac_func();
8283 #endif
8284
8285 ; return 0; }
8286 EOF
8287 if { (eval echo configure:8288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8288   rm -rf conftest*
8289   eval "ac_cv_func_$ac_func=yes"
8290 else
8291   echo "configure: failed program was:" >&5
8292   cat conftest.$ac_ext >&5
8293   rm -rf conftest*
8294   eval "ac_cv_func_$ac_func=no"
8295 fi
8296 rm -f conftest*
8297 fi
8298
8299 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8300   echo "$ac_t""yes" 1>&6
8301     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8302   cat >> confdefs.h <<EOF
8303 #define $ac_tr_func 1
8304 EOF
8305  
8306 else
8307   echo "$ac_t""no" 1>&6
8308 fi
8309 done
8310
8311   ;;
8312   esac
8313
8314
8315 # this bit needs to be modified for each OS that is suported by
8316 # smbwrapper. You need to specify how to created a shared library and
8317 # how to compile C code to produce PIC object files
8318
8319 # these are the defaults, good for lots of systems
8320 HOST_OS="$host_os"
8321 LDSHFLAGS="-shared"
8322 SHLD="\${CC}"
8323 PICFLAG=""
8324 PICSUFFIX="po"
8325 POBAD_CC="#"
8326 SHLIBEXT="so"
8327 BLDSHARED="false"
8328
8329 # and these are for particular systems
8330 case "$host_os" in
8331                 *linux*)   cat >> confdefs.h <<\EOF
8332 #define LINUX 1
8333 EOF
8334
8335                         BLDSHARED="true"
8336                         LDSHFLAGS="-shared" 
8337                         PICFLAG="-fPIC"
8338                 ;;
8339                 *solaris*) cat >> confdefs.h <<\EOF
8340 #define SUNOS5 1
8341 EOF
8342
8343                         BLDSHARED="true"
8344                         LDSHFLAGS="-Wl,-h,\$@.so -G"
8345                         if test "${ac_cv_prog_CC}" = "gcc"; then
8346                                 PICFLAG="-fPIC"
8347                         else
8348                                 PICFLAG="-KPIC -xO4"
8349                                 POBAD_CC=""
8350                                 PICSUFFIX="po.o"
8351                         fi
8352                 ;;
8353                 *sunos*) cat >> confdefs.h <<\EOF
8354 #define SUNOS4 1
8355 EOF
8356
8357                         BLDSHARED="true"
8358                         LDSHFLAGS="-Wl,-h,\$@ -G"
8359                         PICFLAG="-KPIC -O2"   # Is this correct for SunOS
8360                 ;;
8361                 *bsd*)  BLDSHARED="true"
8362                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8363                         PICFLAG="-fPIC -O2"
8364                 ;;
8365                 *irix*) cat >> confdefs.h <<\EOF
8366 #define IRIX 1
8367 EOF
8368
8369                         case "$host_os" in
8370                         *irix6*) cat >> confdefs.h <<\EOF
8371 #define IRIX6 1
8372 EOF
8373
8374                         ;;
8375                         esac
8376                         ATTEMPT_WRAP32_BUILD=yes
8377                         BLDSHARED="true"
8378                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8379                         if test "${ac_cv_prog_CC}" = "gcc"; then
8380                                 PICFLAG="-fPIC"
8381                         else 
8382                                 PICFLAG="-KPIC"
8383                         fi
8384                 ;;
8385                 *aix*) cat >> confdefs.h <<\EOF
8386 #define AIX 1
8387 EOF
8388
8389                         BLDSHARED="true"
8390                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8391                         PICFLAG="-O2 -qmaxmem=6000"
8392                 ;;
8393                 *hpux*) cat >> confdefs.h <<\EOF
8394 #define HPUX 1
8395 EOF
8396
8397                         SHLIBEXT="sl"
8398                         # Use special PIC flags for the native HP-UX compiler.
8399                         if test $ac_cv_prog_cc_Ae = yes; then
8400                                 #BLDSHARED="true"
8401                                 LDSHFLAGS="-b -z +h \$@"
8402                                 PICFLAG="+z"
8403                         fi
8404                 ;;
8405                 *qnx*) cat >> confdefs.h <<\EOF
8406 #define QNX 1
8407 EOF
8408 ;;
8409                 *osf*) cat >> confdefs.h <<\EOF
8410 #define OSF1 1
8411 EOF
8412
8413                         BLDSHARED="true"
8414                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8415                         PICFLAG="-fPIC"
8416                 ;;
8417                 *sco*) cat >> confdefs.h <<\EOF
8418 #define SCO 1
8419 EOF
8420 ;;
8421                 *unixware*) cat >> confdefs.h <<\EOF
8422 #define UNIXWARE 1
8423 EOF
8424
8425                         BLDSHARED="true"
8426                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8427                         PICFLAG="-KPIC"
8428                 ;;
8429                 *next2*) cat >> confdefs.h <<\EOF
8430 #define NEXT2 1
8431 EOF
8432 ;;
8433                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8434 set dummy groff; ac_word=$2
8435 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8436 echo "configure:8437: checking for $ac_word" >&5
8437 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8438   echo $ac_n "(cached) $ac_c" 1>&6
8439 else
8440   if test -n "$ROFF"; then
8441   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8442 else
8443   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8444   ac_dummy="$PATH"
8445   for ac_dir in $ac_dummy; do
8446     test -z "$ac_dir" && ac_dir=.
8447     if test -f $ac_dir/$ac_word; then
8448       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8449       break
8450     fi
8451   done
8452   IFS="$ac_save_ifs"
8453 fi
8454 fi
8455 ROFF="$ac_cv_prog_ROFF"
8456 if test -n "$ROFF"; then
8457   echo "$ac_t""$ROFF" 1>&6
8458 else
8459   echo "$ac_t""no" 1>&6
8460 fi
8461 ;;
8462                 *sysv4*)
8463                         case "$host" in
8464                                 *-univel-*)     if  test "$GCC" != yes ; then
8465                                                                         cat >> confdefs.h <<\EOF
8466 #define HAVE_MEMSET 1
8467 EOF
8468
8469                                                                 fi
8470                                                                 LDSHFLAGS="-G"
8471                                 ;;
8472                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
8473 #define RELIANTUNIX 1
8474 EOF
8475 ;;
8476                         esac
8477                         ;;
8478                 *sysv5*)
8479                         if  test "$GCC" != yes ; then
8480                                 cat >> confdefs.h <<\EOF
8481 #define HAVE_MEMSET 1
8482 EOF
8483
8484                         fi
8485                         LDSHFLAGS="-G"
8486                         ;;
8487 esac
8488
8489 ################
8490
8491 echo $ac_n "checking for long long""... $ac_c" 1>&6
8492 echo "configure:8493: checking for long long" >&5
8493 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8494   echo $ac_n "(cached) $ac_c" 1>&6
8495 else
8496   
8497 if test "$cross_compiling" = yes; then
8498   samba_cv_have_longlong=cross
8499 else
8500   cat > conftest.$ac_ext <<EOF
8501 #line 8502 "configure"
8502 #include "confdefs.h"
8503 #include <stdio.h>
8504 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8505 EOF
8506 if { (eval echo configure:8507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8507 then
8508   samba_cv_have_longlong=yes
8509 else
8510   echo "configure: failed program was:" >&5
8511   cat conftest.$ac_ext >&5
8512   rm -fr conftest*
8513   samba_cv_have_longlong=no
8514 fi
8515 rm -fr conftest*
8516 fi
8517
8518 fi
8519
8520 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8521 if test x"$samba_cv_have_longlong" = x"yes"; then
8522     cat >> confdefs.h <<\EOF
8523 #define HAVE_LONGLONG 1
8524 EOF
8525
8526 fi
8527
8528 #
8529 # Check if the compiler supports the LL prefix on long long integers.
8530 # AIX needs this.
8531
8532 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8533 echo "configure:8534: checking for LL suffix on long long integers" >&5
8534 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8535   echo $ac_n "(cached) $ac_c" 1>&6
8536 else
8537   
8538     cat > conftest.$ac_ext <<EOF
8539 #line 8540 "configure"
8540 #include "confdefs.h"
8541 #include <stdio.h>
8542 int main() {
8543 long long i = 0x8000000000LL
8544 ; return 0; }
8545 EOF
8546 if { (eval echo configure:8547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8547   rm -rf conftest*
8548   samba_cv_compiler_supports_ll=yes
8549 else
8550   echo "configure: failed program was:" >&5
8551   cat conftest.$ac_ext >&5
8552   rm -rf conftest*
8553   samba_cv_compiler_supports_ll=no
8554 fi
8555 rm -f conftest*
8556 fi
8557
8558 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8559 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8560    cat >> confdefs.h <<\EOF
8561 #define COMPILER_SUPPORTS_LL 1
8562 EOF
8563
8564 fi
8565
8566   
8567 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8568 echo "configure:8569: checking for 64 bit off_t" >&5
8569 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8570   echo $ac_n "(cached) $ac_c" 1>&6
8571 else
8572   
8573 if test "$cross_compiling" = yes; then
8574   samba_cv_SIZEOF_OFF_T=cross
8575 else
8576   cat > conftest.$ac_ext <<EOF
8577 #line 8578 "configure"
8578 #include "confdefs.h"
8579 #include <stdio.h>
8580 #include <sys/stat.h>
8581 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8582 EOF
8583 if { (eval echo configure:8584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8584 then
8585   samba_cv_SIZEOF_OFF_T=yes
8586 else
8587   echo "configure: failed program was:" >&5
8588   cat conftest.$ac_ext >&5
8589   rm -fr conftest*
8590   samba_cv_SIZEOF_OFF_T=no
8591 fi
8592 rm -fr conftest*
8593 fi
8594
8595 fi
8596
8597 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8598 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8599     cat >> confdefs.h <<\EOF
8600 #define SIZEOF_OFF_T 8
8601 EOF
8602
8603 fi
8604
8605 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8606 echo "configure:8607: checking for off64_t" >&5
8607 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8608   echo $ac_n "(cached) $ac_c" 1>&6
8609 else
8610   
8611 if test "$cross_compiling" = yes; then
8612   samba_cv_HAVE_OFF64_T=cross
8613 else
8614   cat > conftest.$ac_ext <<EOF
8615 #line 8616 "configure"
8616 #include "confdefs.h"
8617
8618 #if defined(HAVE_UNISTD_H)
8619 #include <unistd.h>
8620 #endif
8621 #include <stdio.h>
8622 #include <sys/stat.h>
8623 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8624 EOF
8625 if { (eval echo configure:8626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8626 then
8627   samba_cv_HAVE_OFF64_T=yes
8628 else
8629   echo "configure: failed program was:" >&5
8630   cat conftest.$ac_ext >&5
8631   rm -fr conftest*
8632   samba_cv_HAVE_OFF64_T=no
8633 fi
8634 rm -fr conftest*
8635 fi
8636
8637 fi
8638
8639 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8640 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8641     cat >> confdefs.h <<\EOF
8642 #define HAVE_OFF64_T 1
8643 EOF
8644
8645 fi
8646
8647 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8648 echo "configure:8649: checking for 64 bit ino_t" >&5
8649 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8650   echo $ac_n "(cached) $ac_c" 1>&6
8651 else
8652   
8653 if test "$cross_compiling" = yes; then
8654   samba_cv_SIZEOF_INO_T=cross
8655 else
8656   cat > conftest.$ac_ext <<EOF
8657 #line 8658 "configure"
8658 #include "confdefs.h"
8659 #include <stdio.h>
8660 #include <sys/stat.h>
8661 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8662 EOF
8663 if { (eval echo configure:8664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8664 then
8665   samba_cv_SIZEOF_INO_T=yes
8666 else
8667   echo "configure: failed program was:" >&5
8668   cat conftest.$ac_ext >&5
8669   rm -fr conftest*
8670   samba_cv_SIZEOF_INO_T=no
8671 fi
8672 rm -fr conftest*
8673 fi
8674
8675 fi
8676
8677 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8678 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8679     cat >> confdefs.h <<\EOF
8680 #define SIZEOF_INO_T 8
8681 EOF
8682
8683 fi
8684
8685 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
8686 echo "configure:8687: checking for ino64_t" >&5
8687 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
8688   echo $ac_n "(cached) $ac_c" 1>&6
8689 else
8690   
8691 if test "$cross_compiling" = yes; then
8692   samba_cv_HAVE_INO64_T=cross
8693 else
8694   cat > conftest.$ac_ext <<EOF
8695 #line 8696 "configure"
8696 #include "confdefs.h"
8697
8698 #if defined(HAVE_UNISTD_H)
8699 #include <unistd.h>
8700 #endif
8701 #include <stdio.h>
8702 #include <sys/stat.h>
8703 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8704 EOF
8705 if { (eval echo configure:8706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8706 then
8707   samba_cv_HAVE_INO64_T=yes
8708 else
8709   echo "configure: failed program was:" >&5
8710   cat conftest.$ac_ext >&5
8711   rm -fr conftest*
8712   samba_cv_HAVE_INO64_T=no
8713 fi
8714 rm -fr conftest*
8715 fi
8716
8717 fi
8718
8719 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
8720 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
8721     cat >> confdefs.h <<\EOF
8722 #define HAVE_INO64_T 1
8723 EOF
8724
8725 fi
8726
8727 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
8728 echo "configure:8729: checking for struct dirent64" >&5
8729 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
8730   echo $ac_n "(cached) $ac_c" 1>&6
8731 else
8732   
8733 cat > conftest.$ac_ext <<EOF
8734 #line 8735 "configure"
8735 #include "confdefs.h"
8736
8737 #if defined(HAVE_UNISTD_H)
8738 #include <unistd.h>
8739 #endif
8740 #include <sys/types.h>
8741 #include <dirent.h>
8742 int main() {
8743 struct dirent64 de;
8744 ; return 0; }
8745 EOF
8746 if { (eval echo configure:8747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8747   rm -rf conftest*
8748   samba_cv_HAVE_STRUCT_DIRENT64=yes
8749 else
8750   echo "configure: failed program was:" >&5
8751   cat conftest.$ac_ext >&5
8752   rm -rf conftest*
8753   samba_cv_HAVE_STRUCT_DIRENT64=no
8754 fi
8755 rm -f conftest*
8756 fi
8757
8758 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
8759 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
8760     cat >> confdefs.h <<\EOF
8761 #define HAVE_STRUCT_DIRENT64 1
8762 EOF
8763
8764 fi
8765
8766 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
8767 echo "configure:8768: checking for unsigned char" >&5
8768 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
8769   echo $ac_n "(cached) $ac_c" 1>&6
8770 else
8771   
8772 if test "$cross_compiling" = yes; then
8773   samba_cv_HAVE_UNSIGNED_CHAR=cross
8774 else
8775   cat > conftest.$ac_ext <<EOF
8776 #line 8777 "configure"
8777 #include "confdefs.h"
8778 #include <stdio.h>
8779 main() { char c; c=250; exit((c > 0)?0:1); }
8780 EOF
8781 if { (eval echo configure:8782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8782 then
8783   samba_cv_HAVE_UNSIGNED_CHAR=yes
8784 else
8785   echo "configure: failed program was:" >&5
8786   cat conftest.$ac_ext >&5
8787   rm -fr conftest*
8788   samba_cv_HAVE_UNSIGNED_CHAR=no
8789 fi
8790 rm -fr conftest*
8791 fi
8792
8793 fi
8794
8795 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
8796 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
8797     cat >> confdefs.h <<\EOF
8798 #define HAVE_UNSIGNED_CHAR 1
8799 EOF
8800
8801 fi
8802
8803 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
8804 echo "configure:8805: checking for sin_len in sock" >&5
8805 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
8806   echo $ac_n "(cached) $ac_c" 1>&6
8807 else
8808   
8809 cat > conftest.$ac_ext <<EOF
8810 #line 8811 "configure"
8811 #include "confdefs.h"
8812 #include <sys/types.h>
8813 #include <sys/socket.h>
8814 #include <netinet/in.h>
8815 int main() {
8816 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
8817 ; return 0; }
8818 EOF
8819 if { (eval echo configure:8820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8820   rm -rf conftest*
8821   samba_cv_HAVE_SOCK_SIN_LEN=yes
8822 else
8823   echo "configure: failed program was:" >&5
8824   cat conftest.$ac_ext >&5
8825   rm -rf conftest*
8826   samba_cv_HAVE_SOCK_SIN_LEN=no
8827 fi
8828 rm -f conftest*
8829 fi
8830
8831 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
8832 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
8833     cat >> confdefs.h <<\EOF
8834 #define HAVE_SOCK_SIN_LEN 1
8835 EOF
8836
8837 fi
8838
8839 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
8840 echo "configure:8841: checking whether seekdir returns void" >&5
8841 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
8842   echo $ac_n "(cached) $ac_c" 1>&6
8843 else
8844   
8845 cat > conftest.$ac_ext <<EOF
8846 #line 8847 "configure"
8847 #include "confdefs.h"
8848 #include <sys/types.h>
8849 #include <dirent.h>
8850 void seekdir(DIR *d, long loc) { return; }
8851 int main() {
8852 return 0;
8853 ; return 0; }
8854 EOF
8855 if { (eval echo configure:8856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8856   rm -rf conftest*
8857   samba_cv_SEEKDIR_RETURNS_VOID=yes
8858 else
8859   echo "configure: failed program was:" >&5
8860   cat conftest.$ac_ext >&5
8861   rm -rf conftest*
8862   samba_cv_SEEKDIR_RETURNS_VOID=no
8863 fi
8864 rm -f conftest*
8865 fi
8866
8867 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
8868 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
8869     cat >> confdefs.h <<\EOF
8870 #define SEEKDIR_RETURNS_VOID 1
8871 EOF
8872
8873 fi
8874
8875 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
8876 echo "configure:8877: checking for __FILE__ macro" >&5
8877 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
8878   echo $ac_n "(cached) $ac_c" 1>&6
8879 else
8880   
8881 cat > conftest.$ac_ext <<EOF
8882 #line 8883 "configure"
8883 #include "confdefs.h"
8884 #include <stdio.h>
8885 int main() {
8886 printf("%s\n", __FILE__);
8887 ; return 0; }
8888 EOF
8889 if { (eval echo configure:8890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8890   rm -rf conftest*
8891   samba_cv_HAVE_FILE_MACRO=yes
8892 else
8893   echo "configure: failed program was:" >&5
8894   cat conftest.$ac_ext >&5
8895   rm -rf conftest*
8896   samba_cv_HAVE_FILE_MACRO=no
8897 fi
8898 rm -f conftest*
8899 fi
8900
8901 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
8902 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
8903     cat >> confdefs.h <<\EOF
8904 #define HAVE_FILE_MACRO 1
8905 EOF
8906
8907 fi
8908
8909 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
8910 echo "configure:8911: checking for __FUNCTION__ macro" >&5
8911 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
8912   echo $ac_n "(cached) $ac_c" 1>&6
8913 else
8914   
8915 cat > conftest.$ac_ext <<EOF
8916 #line 8917 "configure"
8917 #include "confdefs.h"
8918 #include <stdio.h>
8919 int main() {
8920 printf("%s\n", __FUNCTION__);
8921 ; return 0; }
8922 EOF
8923 if { (eval echo configure:8924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8924   rm -rf conftest*
8925   samba_cv_HAVE_FUNCTION_MACRO=yes
8926 else
8927   echo "configure: failed program was:" >&5
8928   cat conftest.$ac_ext >&5
8929   rm -rf conftest*
8930   samba_cv_HAVE_FUNCTION_MACRO=no
8931 fi
8932 rm -f conftest*
8933 fi
8934
8935 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
8936 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
8937     cat >> confdefs.h <<\EOF
8938 #define HAVE_FUNCTION_MACRO 1
8939 EOF
8940
8941 fi
8942
8943 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
8944 echo "configure:8945: checking if gettimeofday takes tz argument" >&5
8945 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
8946   echo $ac_n "(cached) $ac_c" 1>&6
8947 else
8948   
8949 if test "$cross_compiling" = yes; then
8950   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
8951 else
8952   cat > conftest.$ac_ext <<EOF
8953 #line 8954 "configure"
8954 #include "confdefs.h"
8955
8956 #include <sys/time.h>
8957 #include <unistd.h>
8958 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
8959 EOF
8960 if { (eval echo configure:8961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8961 then
8962   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
8963 else
8964   echo "configure: failed program was:" >&5
8965   cat conftest.$ac_ext >&5
8966   rm -fr conftest*
8967   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
8968 fi
8969 rm -fr conftest*
8970 fi
8971
8972 fi
8973
8974 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
8975 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
8976     cat >> confdefs.h <<\EOF
8977 #define HAVE_GETTIMEOFDAY_TZ 1
8978 EOF
8979
8980 fi
8981
8982 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
8983 echo "configure:8984: checking for C99 vsnprintf" >&5
8984 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
8985   echo $ac_n "(cached) $ac_c" 1>&6
8986 else
8987   
8988 if test "$cross_compiling" = yes; then
8989   samba_cv_HAVE_C99_VSNPRINTF=cross
8990 else
8991   cat > conftest.$ac_ext <<EOF
8992 #line 8993 "configure"
8993 #include "confdefs.h"
8994
8995 #include <sys/types.h>
8996 #include <stdarg.h>
8997 void foo(const char *format, ...) { 
8998        va_list ap;
8999        int len;
9000        char buf[5];
9001
9002        va_start(ap, format);
9003        len = vsnprintf(0, 0, format, ap);
9004        va_end(ap);
9005        if (len != 5) exit(1);
9006
9007        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9008
9009        exit(0);
9010 }
9011 main() { foo("hello"); }
9012
9013 EOF
9014 if { (eval echo configure:9015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9015 then
9016   samba_cv_HAVE_C99_VSNPRINTF=yes
9017 else
9018   echo "configure: failed program was:" >&5
9019   cat conftest.$ac_ext >&5
9020   rm -fr conftest*
9021   samba_cv_HAVE_C99_VSNPRINTF=no
9022 fi
9023 rm -fr conftest*
9024 fi
9025
9026 fi
9027
9028 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9029 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9030     cat >> confdefs.h <<\EOF
9031 #define HAVE_C99_VSNPRINTF 1
9032 EOF
9033
9034 fi
9035
9036 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9037 echo "configure:9038: checking for broken readdir" >&5
9038 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9039   echo $ac_n "(cached) $ac_c" 1>&6
9040 else
9041   
9042 if test "$cross_compiling" = yes; then
9043   samba_cv_HAVE_BROKEN_READDIR=cross
9044 else
9045   cat > conftest.$ac_ext <<EOF
9046 #line 9047 "configure"
9047 #include "confdefs.h"
9048 #include <sys/types.h>
9049 #include <dirent.h>
9050 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9051 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9052 di->d_name[0] == 0) exit(0); exit(1);} 
9053 EOF
9054 if { (eval echo configure:9055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9055 then
9056   samba_cv_HAVE_BROKEN_READDIR=yes
9057 else
9058   echo "configure: failed program was:" >&5
9059   cat conftest.$ac_ext >&5
9060   rm -fr conftest*
9061   samba_cv_HAVE_BROKEN_READDIR=no
9062 fi
9063 rm -fr conftest*
9064 fi
9065
9066 fi
9067
9068 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9069 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9070     cat >> confdefs.h <<\EOF
9071 #define HAVE_BROKEN_READDIR 1
9072 EOF
9073
9074 fi
9075
9076 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9077 echo "configure:9078: checking for utimbuf" >&5
9078 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9079   echo $ac_n "(cached) $ac_c" 1>&6
9080 else
9081   
9082 cat > conftest.$ac_ext <<EOF
9083 #line 9084 "configure"
9084 #include "confdefs.h"
9085 #include <sys/types.h>
9086 #include <utime.h>
9087 int main() {
9088 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9089 ; return 0; }
9090 EOF
9091 if { (eval echo configure:9092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9092   rm -rf conftest*
9093   samba_cv_HAVE_UTIMBUF=yes
9094 else
9095   echo "configure: failed program was:" >&5
9096   cat conftest.$ac_ext >&5
9097   rm -rf conftest*
9098   samba_cv_HAVE_UTIMBUF=no
9099 fi
9100 rm -f conftest*
9101 fi
9102
9103 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9104 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9105     cat >> confdefs.h <<\EOF
9106 #define HAVE_UTIMBUF 1
9107 EOF
9108
9109 fi
9110
9111
9112 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9113 do
9114 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9115 echo "configure:9116: checking for $ac_func" >&5
9116 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9117   echo $ac_n "(cached) $ac_c" 1>&6
9118 else
9119   cat > conftest.$ac_ext <<EOF
9120 #line 9121 "configure"
9121 #include "confdefs.h"
9122 /* System header to define __stub macros and hopefully few prototypes,
9123     which can conflict with char $ac_func(); below.  */
9124 #include <assert.h>
9125 /* Override any gcc2 internal prototype to avoid an error.  */
9126 /* We use char because int might match the return type of a gcc2
9127     builtin and then its argument prototype would still apply.  */
9128 char $ac_func();
9129
9130 int main() {
9131
9132 /* The GNU C library defines this for functions which it implements
9133     to always fail with ENOSYS.  Some functions are actually named
9134     something starting with __ and the normal name is an alias.  */
9135 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9136 choke me
9137 #else
9138 $ac_func();
9139 #endif
9140
9141 ; return 0; }
9142 EOF
9143 if { (eval echo configure:9144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9144   rm -rf conftest*
9145   eval "ac_cv_func_$ac_func=yes"
9146 else
9147   echo "configure: failed program was:" >&5
9148   cat conftest.$ac_ext >&5
9149   rm -rf conftest*
9150   eval "ac_cv_func_$ac_func=no"
9151 fi
9152 rm -f conftest*
9153 fi
9154
9155 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9156   echo "$ac_t""yes" 1>&6
9157     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9158   cat >> confdefs.h <<EOF
9159 #define $ac_tr_func 1
9160 EOF
9161  
9162 else
9163   echo "$ac_t""no" 1>&6
9164 fi
9165 done
9166
9167
9168 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9169 echo "configure:9170: checking for ut_name in utmp" >&5
9170 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9171   echo $ac_n "(cached) $ac_c" 1>&6
9172 else
9173   
9174 cat > conftest.$ac_ext <<EOF
9175 #line 9176 "configure"
9176 #include "confdefs.h"
9177 #include <sys/types.h>
9178 #include <utmp.h>
9179 int main() {
9180 struct utmp ut;  ut.ut_name[0] = 'a';
9181 ; return 0; }
9182 EOF
9183 if { (eval echo configure:9184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9184   rm -rf conftest*
9185   samba_cv_HAVE_UT_UT_NAME=yes
9186 else
9187   echo "configure: failed program was:" >&5
9188   cat conftest.$ac_ext >&5
9189   rm -rf conftest*
9190   samba_cv_HAVE_UT_UT_NAME=no
9191 fi
9192 rm -f conftest*
9193 fi
9194
9195 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9196 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9197     cat >> confdefs.h <<\EOF
9198 #define HAVE_UT_UT_NAME 1
9199 EOF
9200
9201 fi 
9202
9203 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9204 echo "configure:9205: checking for ut_user in utmp" >&5
9205 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9206   echo $ac_n "(cached) $ac_c" 1>&6
9207 else
9208   
9209 cat > conftest.$ac_ext <<EOF
9210 #line 9211 "configure"
9211 #include "confdefs.h"
9212 #include <sys/types.h>
9213 #include <utmp.h>
9214 int main() {
9215 struct utmp ut;  ut.ut_user[0] = 'a';
9216 ; return 0; }
9217 EOF
9218 if { (eval echo configure:9219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9219   rm -rf conftest*
9220   samba_cv_HAVE_UT_UT_USER=yes
9221 else
9222   echo "configure: failed program was:" >&5
9223   cat conftest.$ac_ext >&5
9224   rm -rf conftest*
9225   samba_cv_HAVE_UT_UT_USER=no
9226 fi
9227 rm -f conftest*
9228 fi
9229
9230 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9231 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9232     cat >> confdefs.h <<\EOF
9233 #define HAVE_UT_UT_USER 1
9234 EOF
9235
9236 fi 
9237
9238 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9239 echo "configure:9240: checking for ut_id in utmp" >&5
9240 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9241   echo $ac_n "(cached) $ac_c" 1>&6
9242 else
9243   
9244 cat > conftest.$ac_ext <<EOF
9245 #line 9246 "configure"
9246 #include "confdefs.h"
9247 #include <sys/types.h>
9248 #include <utmp.h>
9249 int main() {
9250 struct utmp ut;  ut.ut_id[0] = 'a';
9251 ; return 0; }
9252 EOF
9253 if { (eval echo configure:9254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9254   rm -rf conftest*
9255   samba_cv_HAVE_UT_UT_ID=yes
9256 else
9257   echo "configure: failed program was:" >&5
9258   cat conftest.$ac_ext >&5
9259   rm -rf conftest*
9260   samba_cv_HAVE_UT_UT_ID=no
9261 fi
9262 rm -f conftest*
9263 fi
9264
9265 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9266 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9267     cat >> confdefs.h <<\EOF
9268 #define HAVE_UT_UT_ID 1
9269 EOF
9270
9271 fi 
9272
9273 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9274 echo "configure:9275: checking for ut_host in utmp" >&5
9275 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9276   echo $ac_n "(cached) $ac_c" 1>&6
9277 else
9278   
9279 cat > conftest.$ac_ext <<EOF
9280 #line 9281 "configure"
9281 #include "confdefs.h"
9282 #include <sys/types.h>
9283 #include <utmp.h>
9284 int main() {
9285 struct utmp ut;  ut.ut_host[0] = 'a';
9286 ; return 0; }
9287 EOF
9288 if { (eval echo configure:9289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9289   rm -rf conftest*
9290   samba_cv_HAVE_UT_UT_HOST=yes
9291 else
9292   echo "configure: failed program was:" >&5
9293   cat conftest.$ac_ext >&5
9294   rm -rf conftest*
9295   samba_cv_HAVE_UT_UT_HOST=no
9296 fi
9297 rm -f conftest*
9298 fi
9299
9300 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9301 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9302     cat >> confdefs.h <<\EOF
9303 #define HAVE_UT_UT_HOST 1
9304 EOF
9305
9306 fi 
9307
9308 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9309 echo "configure:9310: checking for ut_time in utmp" >&5
9310 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9311   echo $ac_n "(cached) $ac_c" 1>&6
9312 else
9313   
9314 cat > conftest.$ac_ext <<EOF
9315 #line 9316 "configure"
9316 #include "confdefs.h"
9317 #include <sys/types.h>
9318 #include <utmp.h>
9319 int main() {
9320 struct utmp ut;  time_t t; ut.ut_time = t;
9321 ; return 0; }
9322 EOF
9323 if { (eval echo configure:9324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9324   rm -rf conftest*
9325   samba_cv_HAVE_UT_UT_TIME=yes
9326 else
9327   echo "configure: failed program was:" >&5
9328   cat conftest.$ac_ext >&5
9329   rm -rf conftest*
9330   samba_cv_HAVE_UT_UT_TIME=no
9331 fi
9332 rm -f conftest*
9333 fi
9334
9335 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9336 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9337     cat >> confdefs.h <<\EOF
9338 #define HAVE_UT_UT_TIME 1
9339 EOF
9340
9341 fi 
9342
9343 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9344 echo "configure:9345: checking for ut_tv in utmp" >&5
9345 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9346   echo $ac_n "(cached) $ac_c" 1>&6
9347 else
9348   
9349 cat > conftest.$ac_ext <<EOF
9350 #line 9351 "configure"
9351 #include "confdefs.h"
9352 #include <sys/types.h>
9353 #include <utmp.h>
9354 int main() {
9355 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9356 ; return 0; }
9357 EOF
9358 if { (eval echo configure:9359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9359   rm -rf conftest*
9360   samba_cv_HAVE_UT_UT_TV=yes
9361 else
9362   echo "configure: failed program was:" >&5
9363   cat conftest.$ac_ext >&5
9364   rm -rf conftest*
9365   samba_cv_HAVE_UT_UT_TV=no
9366 fi
9367 rm -f conftest*
9368 fi
9369
9370 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9371 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9372     cat >> confdefs.h <<\EOF
9373 #define HAVE_UT_UT_TV 1
9374 EOF
9375
9376 fi 
9377
9378 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9379 echo "configure:9380: checking for ut_type in utmp" >&5
9380 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9381   echo $ac_n "(cached) $ac_c" 1>&6
9382 else
9383   
9384 cat > conftest.$ac_ext <<EOF
9385 #line 9386 "configure"
9386 #include "confdefs.h"
9387 #include <sys/types.h>
9388 #include <utmp.h>
9389 int main() {
9390 struct utmp ut;  ut.ut_type = 0;
9391 ; return 0; }
9392 EOF
9393 if { (eval echo configure:9394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9394   rm -rf conftest*
9395   samba_cv_HAVE_UT_UT_TYPE=yes
9396 else
9397   echo "configure: failed program was:" >&5
9398   cat conftest.$ac_ext >&5
9399   rm -rf conftest*
9400   samba_cv_HAVE_UT_UT_TYPE=no
9401 fi
9402 rm -f conftest*
9403 fi
9404
9405 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9406 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9407     cat >> confdefs.h <<\EOF
9408 #define HAVE_UT_UT_TYPE 1
9409 EOF
9410
9411 fi 
9412
9413 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9414 echo "configure:9415: checking for ut_pid in utmp" >&5
9415 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9416   echo $ac_n "(cached) $ac_c" 1>&6
9417 else
9418   
9419 cat > conftest.$ac_ext <<EOF
9420 #line 9421 "configure"
9421 #include "confdefs.h"
9422 #include <sys/types.h>
9423 #include <utmp.h>
9424 int main() {
9425 struct utmp ut;  ut.ut_pid = 0;
9426 ; return 0; }
9427 EOF
9428 if { (eval echo configure:9429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9429   rm -rf conftest*
9430   samba_cv_HAVE_UT_UT_PID=yes
9431 else
9432   echo "configure: failed program was:" >&5
9433   cat conftest.$ac_ext >&5
9434   rm -rf conftest*
9435   samba_cv_HAVE_UT_UT_PID=no
9436 fi
9437 rm -f conftest*
9438 fi
9439
9440 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9441 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9442     cat >> confdefs.h <<\EOF
9443 #define HAVE_UT_UT_PID 1
9444 EOF
9445
9446 fi 
9447
9448 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9449 echo "configure:9450: checking for ut_exit in utmp" >&5
9450 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9451   echo $ac_n "(cached) $ac_c" 1>&6
9452 else
9453   
9454 cat > conftest.$ac_ext <<EOF
9455 #line 9456 "configure"
9456 #include "confdefs.h"
9457 #include <sys/types.h>
9458 #include <utmp.h>
9459 int main() {
9460 struct utmp ut;  ut.ut_exit.e_exit = 0;
9461 ; return 0; }
9462 EOF
9463 if { (eval echo configure:9464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9464   rm -rf conftest*
9465   samba_cv_HAVE_UT_UT_EXIT=yes
9466 else
9467   echo "configure: failed program was:" >&5
9468   cat conftest.$ac_ext >&5
9469   rm -rf conftest*
9470   samba_cv_HAVE_UT_UT_EXIT=no
9471 fi
9472 rm -f conftest*
9473 fi
9474
9475 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9476 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9477     cat >> confdefs.h <<\EOF
9478 #define HAVE_UT_UT_EXIT 1
9479 EOF
9480
9481 fi 
9482
9483 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9484 echo "configure:9485: checking for ut_addr in utmp" >&5
9485 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9486   echo $ac_n "(cached) $ac_c" 1>&6
9487 else
9488   
9489 cat > conftest.$ac_ext <<EOF
9490 #line 9491 "configure"
9491 #include "confdefs.h"
9492 #include <sys/types.h>
9493 #include <utmp.h>
9494 int main() {
9495 struct utmp ut;  ut.ut_addr = 0;
9496 ; return 0; }
9497 EOF
9498 if { (eval echo configure:9499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9499   rm -rf conftest*
9500   samba_cv_HAVE_UT_UT_ADDR=yes
9501 else
9502   echo "configure: failed program was:" >&5
9503   cat conftest.$ac_ext >&5
9504   rm -rf conftest*
9505   samba_cv_HAVE_UT_UT_ADDR=no
9506 fi
9507 rm -f conftest*
9508 fi
9509
9510 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9511 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9512     cat >> confdefs.h <<\EOF
9513 #define HAVE_UT_UT_ADDR 1
9514 EOF
9515
9516 fi 
9517
9518 if test x$ac_cv_func_pututline = xyes ; then
9519   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9520 echo "configure:9521: checking whether pututline returns pointer" >&5
9521 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9522   echo $ac_n "(cached) $ac_c" 1>&6
9523 else
9524   
9525   cat > conftest.$ac_ext <<EOF
9526 #line 9527 "configure"
9527 #include "confdefs.h"
9528 #include <sys/types.h>
9529 #include <utmp.h>
9530 int main() {
9531 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9532 ; return 0; }
9533 EOF
9534 if { (eval echo configure:9535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9535   rm -rf conftest*
9536   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9537 else
9538   echo "configure: failed program was:" >&5
9539   cat conftest.$ac_ext >&5
9540   rm -rf conftest*
9541   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9542 fi
9543 rm -f conftest*
9544 fi
9545
9546 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9547   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9548       cat >> confdefs.h <<\EOF
9549 #define PUTUTLINE_RETURNS_UTMP 1
9550 EOF
9551
9552   fi
9553 fi
9554
9555 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9556 echo "configure:9557: checking for ut_syslen in utmpx" >&5
9557 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9558   echo $ac_n "(cached) $ac_c" 1>&6
9559 else
9560   
9561 cat > conftest.$ac_ext <<EOF
9562 #line 9563 "configure"
9563 #include "confdefs.h"
9564 #include <sys/types.h>
9565 #include <utmpx.h>
9566 int main() {
9567 struct utmpx ux;  ux.ut_syslen = 0;
9568 ; return 0; }
9569 EOF
9570 if { (eval echo configure:9571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9571   rm -rf conftest*
9572   samba_cv_HAVE_UX_UT_SYSLEN=yes
9573 else
9574   echo "configure: failed program was:" >&5
9575   cat conftest.$ac_ext >&5
9576   rm -rf conftest*
9577   samba_cv_HAVE_UX_UT_SYSLEN=no
9578 fi
9579 rm -f conftest*
9580 fi
9581
9582 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
9583 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
9584     cat >> confdefs.h <<\EOF
9585 #define HAVE_UX_UT_SYSLEN 1
9586 EOF
9587
9588 fi 
9589
9590
9591 #################################################
9592 # check for libiconv support
9593 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
9594 echo "configure:9595: checking whether to use libiconv" >&5
9595 # Check whether --with-libiconv or --without-libiconv was given.
9596 if test "${with_libiconv+set}" = set; then
9597   withval="$with_libiconv"
9598    case "$withval" in
9599   no)
9600     echo "$ac_t""no" 1>&6
9601     ;;
9602   *)
9603     echo "$ac_t""yes" 1>&6
9604     CFLAGS="$CFLAGS -I$withval/include"
9605     LDFLAGS="$LDFLAGS -L$withval/lib"
9606     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
9607 echo "configure:9608: checking for iconv_open in -liconv" >&5
9608 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
9609 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9610   echo $ac_n "(cached) $ac_c" 1>&6
9611 else
9612   ac_save_LIBS="$LIBS"
9613 LIBS="-liconv  $LIBS"
9614 cat > conftest.$ac_ext <<EOF
9615 #line 9616 "configure"
9616 #include "confdefs.h"
9617 /* Override any gcc2 internal prototype to avoid an error.  */
9618 /* We use char because int might match the return type of a gcc2
9619     builtin and then its argument prototype would still apply.  */
9620 char iconv_open();
9621
9622 int main() {
9623 iconv_open()
9624 ; return 0; }
9625 EOF
9626 if { (eval echo configure:9627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9627   rm -rf conftest*
9628   eval "ac_cv_lib_$ac_lib_var=yes"
9629 else
9630   echo "configure: failed program was:" >&5
9631   cat conftest.$ac_ext >&5
9632   rm -rf conftest*
9633   eval "ac_cv_lib_$ac_lib_var=no"
9634 fi
9635 rm -f conftest*
9636 LIBS="$ac_save_LIBS"
9637
9638 fi
9639 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9640   echo "$ac_t""yes" 1>&6
9641     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9642     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9643   cat >> confdefs.h <<EOF
9644 #define $ac_tr_lib 1
9645 EOF
9646
9647   LIBS="-liconv $LIBS"
9648
9649 else
9650   echo "$ac_t""no" 1>&6
9651 fi
9652
9653     ;;
9654   esac 
9655 else
9656   echo "$ac_t""no" 1>&6
9657
9658 fi
9659
9660
9661
9662 ############
9663 # check for iconv in libc
9664 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
9665 echo "configure:9666: checking for working iconv" >&5
9666 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
9667   echo $ac_n "(cached) $ac_c" 1>&6
9668 else
9669   
9670 if test "$cross_compiling" = yes; then
9671   samba_cv_HAVE_NATIVE_ICONV=cross
9672 else
9673   cat > conftest.$ac_ext <<EOF
9674 #line 9675 "configure"
9675 #include "confdefs.h"
9676
9677 #include <iconv.h>
9678 main() {
9679        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
9680        if (cd == 0 || cd == (iconv_t)-1) return -1;
9681        return 0;
9682 }
9683
9684 EOF
9685 if { (eval echo configure:9686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9686 then
9687   samba_cv_HAVE_NATIVE_ICONV=yes
9688 else
9689   echo "configure: failed program was:" >&5
9690   cat conftest.$ac_ext >&5
9691   rm -fr conftest*
9692   samba_cv_HAVE_NATIVE_ICONV=no
9693 fi
9694 rm -fr conftest*
9695 fi
9696
9697 fi
9698
9699 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
9700 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
9701     cat >> confdefs.h <<\EOF
9702 #define HAVE_NATIVE_ICONV 1
9703 EOF
9704
9705 fi
9706
9707
9708 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
9709 echo "configure:9710: checking for Linux kernel oplocks" >&5
9710 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
9711   echo $ac_n "(cached) $ac_c" 1>&6
9712 else
9713   
9714 if test "$cross_compiling" = yes; then
9715   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
9716 else
9717   cat > conftest.$ac_ext <<EOF
9718 #line 9719 "configure"
9719 #include "confdefs.h"
9720
9721 #include <sys/types.h>
9722 #include <fcntl.h>
9723 #ifndef F_GETLEASE
9724 #define F_GETLEASE      1025
9725 #endif
9726 main() {
9727        int fd = open("/dev/null", O_RDONLY);
9728        return fcntl(fd, F_GETLEASE, 0) == -1;
9729 }
9730
9731 EOF
9732 if { (eval echo configure:9733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9733 then
9734   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
9735 else
9736   echo "configure: failed program was:" >&5
9737   cat conftest.$ac_ext >&5
9738   rm -fr conftest*
9739   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
9740 fi
9741 rm -fr conftest*
9742 fi
9743
9744 fi
9745
9746 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
9747 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
9748     cat >> confdefs.h <<\EOF
9749 #define HAVE_KERNEL_OPLOCKS_LINUX 1
9750 EOF
9751
9752 fi
9753
9754 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
9755 echo "configure:9756: checking for kernel change notify support" >&5
9756 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
9757   echo $ac_n "(cached) $ac_c" 1>&6
9758 else
9759   
9760 if test "$cross_compiling" = yes; then
9761   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
9762 else
9763   cat > conftest.$ac_ext <<EOF
9764 #line 9765 "configure"
9765 #include "confdefs.h"
9766
9767 #include <sys/types.h>
9768 #include <fcntl.h>
9769 #include <signal.h>
9770 #ifndef F_NOTIFY
9771 #define F_NOTIFY 1026
9772 #endif
9773 main() {
9774         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
9775 }
9776
9777 EOF
9778 if { (eval echo configure:9779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9779 then
9780   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
9781 else
9782   echo "configure: failed program was:" >&5
9783   cat conftest.$ac_ext >&5
9784   rm -fr conftest*
9785   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
9786 fi
9787 rm -fr conftest*
9788 fi
9789
9790 fi
9791
9792 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
9793 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
9794     cat >> confdefs.h <<\EOF
9795 #define HAVE_KERNEL_CHANGE_NOTIFY 1
9796 EOF
9797
9798 fi
9799
9800 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
9801 echo "configure:9802: checking for kernel share modes" >&5
9802 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
9803   echo $ac_n "(cached) $ac_c" 1>&6
9804 else
9805   
9806 if test "$cross_compiling" = yes; then
9807   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
9808 else
9809   cat > conftest.$ac_ext <<EOF
9810 #line 9811 "configure"
9811 #include "confdefs.h"
9812
9813 #include <sys/types.h>
9814 #include <fcntl.h>
9815 #include <signal.h>
9816 #include <sys/file.h>
9817 #ifndef LOCK_MAND
9818 #define LOCK_MAND       32
9819 #define LOCK_READ       64
9820 #endif
9821 main() {
9822         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
9823 }
9824
9825 EOF
9826 if { (eval echo configure:9827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9827 then
9828   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
9829 else
9830   echo "configure: failed program was:" >&5
9831   cat conftest.$ac_ext >&5
9832   rm -fr conftest*
9833   samba_cv_HAVE_KERNEL_SHARE_MODES=no
9834 fi
9835 rm -fr conftest*
9836 fi
9837
9838 fi
9839
9840 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
9841 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
9842     cat >> confdefs.h <<\EOF
9843 #define HAVE_KERNEL_SHARE_MODES 1
9844 EOF
9845
9846 fi
9847
9848
9849
9850
9851 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
9852 echo "configure:9853: checking for IRIX kernel oplock type definitions" >&5
9853 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
9854   echo $ac_n "(cached) $ac_c" 1>&6
9855 else
9856   
9857 cat > conftest.$ac_ext <<EOF
9858 #line 9859 "configure"
9859 #include "confdefs.h"
9860 #include <sys/types.h>
9861 #include <fcntl.h>
9862 int main() {
9863 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
9864 ; return 0; }
9865 EOF
9866 if { (eval echo configure:9867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9867   rm -rf conftest*
9868   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
9869 else
9870   echo "configure: failed program was:" >&5
9871   cat conftest.$ac_ext >&5
9872   rm -rf conftest*
9873   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
9874 fi
9875 rm -f conftest*
9876 fi
9877
9878 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
9879 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
9880     cat >> confdefs.h <<\EOF
9881 #define HAVE_KERNEL_OPLOCKS_IRIX 1
9882 EOF
9883
9884 fi
9885
9886 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
9887 echo "configure:9888: checking for irix specific capabilities" >&5
9888 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
9889   echo $ac_n "(cached) $ac_c" 1>&6
9890 else
9891   
9892 if test "$cross_compiling" = yes; then
9893   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
9894 else
9895   cat > conftest.$ac_ext <<EOF
9896 #line 9897 "configure"
9897 #include "confdefs.h"
9898 #include <sys/types.h>
9899 #include <sys/capability.h>
9900 main() {
9901  cap_t cap;
9902  if ((cap = cap_get_proc()) == NULL)
9903    exit(1);
9904  cap->cap_effective |= CAP_NETWORK_MGT;
9905  cap->cap_inheritable |= CAP_NETWORK_MGT;
9906  cap_set_proc(cap);
9907  exit(0);
9908 }
9909
9910 EOF
9911 if { (eval echo configure:9912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9912 then
9913   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
9914 else
9915   echo "configure: failed program was:" >&5
9916   cat conftest.$ac_ext >&5
9917   rm -fr conftest*
9918   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
9919 fi
9920 rm -fr conftest*
9921 fi
9922
9923 fi
9924
9925 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
9926 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
9927     cat >> confdefs.h <<\EOF
9928 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
9929 EOF
9930
9931 fi
9932
9933 #
9934 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
9935 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
9936 #
9937
9938 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9939 echo "configure:9940: checking for int16 typedef included by rpc/rpc.h" >&5
9940 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
9941   echo $ac_n "(cached) $ac_c" 1>&6
9942 else
9943   
9944 cat > conftest.$ac_ext <<EOF
9945 #line 9946 "configure"
9946 #include "confdefs.h"
9947 #include <sys/types.h>
9948 #if defined(HAVE_RPC_RPC_H)
9949 #include <rpc/rpc.h>
9950 #endif
9951 int main() {
9952 int16 testvar;
9953 ; return 0; }
9954 EOF
9955 if { (eval echo configure:9956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9956   rm -rf conftest*
9957   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
9958 else
9959   echo "configure: failed program was:" >&5
9960   cat conftest.$ac_ext >&5
9961   rm -rf conftest*
9962   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
9963 fi
9964 rm -f conftest*
9965 fi
9966
9967 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
9968 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
9969     cat >> confdefs.h <<\EOF
9970 #define HAVE_INT16_FROM_RPC_RPC_H 1
9971 EOF
9972
9973 fi
9974
9975 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9976 echo "configure:9977: checking for uint16 typedef included by rpc/rpc.h" >&5
9977 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
9978   echo $ac_n "(cached) $ac_c" 1>&6
9979 else
9980   
9981 cat > conftest.$ac_ext <<EOF
9982 #line 9983 "configure"
9983 #include "confdefs.h"
9984 #include <sys/types.h>
9985 #if defined(HAVE_RPC_RPC_H)
9986 #include <rpc/rpc.h>
9987 #endif
9988 int main() {
9989 uint16 testvar;
9990 ; return 0; }
9991 EOF
9992 if { (eval echo configure:9993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9993   rm -rf conftest*
9994   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
9995 else
9996   echo "configure: failed program was:" >&5
9997   cat conftest.$ac_ext >&5
9998   rm -rf conftest*
9999   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10000 fi
10001 rm -f conftest*
10002 fi
10003
10004 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10005 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10006     cat >> confdefs.h <<\EOF
10007 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10008 EOF
10009
10010 fi
10011
10012 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10013 echo "configure:10014: checking for int32 typedef included by rpc/rpc.h" >&5
10014 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10015   echo $ac_n "(cached) $ac_c" 1>&6
10016 else
10017   
10018 cat > conftest.$ac_ext <<EOF
10019 #line 10020 "configure"
10020 #include "confdefs.h"
10021 #include <sys/types.h>
10022 #if defined(HAVE_RPC_RPC_H)
10023 #include <rpc/rpc.h>
10024 #endif
10025 int main() {
10026 int32 testvar;
10027 ; return 0; }
10028 EOF
10029 if { (eval echo configure:10030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10030   rm -rf conftest*
10031   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10032 else
10033   echo "configure: failed program was:" >&5
10034   cat conftest.$ac_ext >&5
10035   rm -rf conftest*
10036   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10037 fi
10038 rm -f conftest*
10039 fi
10040
10041 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10042 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10043     cat >> confdefs.h <<\EOF
10044 #define HAVE_INT32_FROM_RPC_RPC_H 1
10045 EOF
10046
10047 fi
10048
10049 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10050 echo "configure:10051: checking for uint32 typedef included by rpc/rpc.h" >&5
10051 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10052   echo $ac_n "(cached) $ac_c" 1>&6
10053 else
10054   
10055 cat > conftest.$ac_ext <<EOF
10056 #line 10057 "configure"
10057 #include "confdefs.h"
10058 #include <sys/types.h>
10059 #if defined(HAVE_RPC_RPC_H)
10060 #include <rpc/rpc.h>
10061 #endif
10062 int main() {
10063 uint32 testvar;
10064 ; return 0; }
10065 EOF
10066 if { (eval echo configure:10067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10067   rm -rf conftest*
10068   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10069 else
10070   echo "configure: failed program was:" >&5
10071   cat conftest.$ac_ext >&5
10072   rm -rf conftest*
10073   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10074 fi
10075 rm -f conftest*
10076 fi
10077
10078 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10079 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10080     cat >> confdefs.h <<\EOF
10081 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10082 EOF
10083
10084 fi
10085
10086
10087 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10088 echo "configure:10089: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10089 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10090   echo $ac_n "(cached) $ac_c" 1>&6
10091 else
10092   
10093 cat > conftest.$ac_ext <<EOF
10094 #line 10095 "configure"
10095 #include "confdefs.h"
10096 #include <sys/types.h>
10097 #ifdef HAVE_SYS_SECURITY_H
10098 #include <sys/security.h>
10099 #include <prot.h>
10100 #endif  /* HAVE_SYS_SECURITY_H */
10101 #if defined(HAVE_RPC_RPC_H)
10102 #include <rpc/rpc.h>
10103 #endif
10104 int main() {
10105 int testvar;
10106 ; return 0; }
10107 EOF
10108 if { (eval echo configure:10109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10109   rm -rf conftest*
10110   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10111 else
10112   echo "configure: failed program was:" >&5
10113   cat conftest.$ac_ext >&5
10114   rm -rf conftest*
10115   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10116 fi
10117 rm -f conftest*
10118 fi
10119
10120 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10121 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10122     cat >> confdefs.h <<\EOF
10123 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10124 EOF
10125
10126 fi
10127
10128 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10129 echo "configure:10130: checking for test routines" >&5
10130 if test "$cross_compiling" = yes; then
10131   echo "configure: warning: cannot run when cross-compiling" 1>&2
10132 else
10133   cat > conftest.$ac_ext <<EOF
10134 #line 10135 "configure"
10135 #include "confdefs.h"
10136 #include "${srcdir-.}/tests/trivial.c"
10137 EOF
10138 if { (eval echo configure:10139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10139 then
10140   echo "$ac_t""yes" 1>&6
10141 else
10142   echo "configure: failed program was:" >&5
10143   cat conftest.$ac_ext >&5
10144   rm -fr conftest*
10145   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10146 fi
10147 rm -fr conftest*
10148 fi
10149
10150
10151 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10152 echo "configure:10153: checking for ftruncate extend" >&5
10153 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10154   echo $ac_n "(cached) $ac_c" 1>&6
10155 else
10156   
10157 if test "$cross_compiling" = yes; then
10158   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10159 else
10160   cat > conftest.$ac_ext <<EOF
10161 #line 10162 "configure"
10162 #include "confdefs.h"
10163 #include "${srcdir-.}/tests/ftruncate.c"
10164 EOF
10165 if { (eval echo configure:10166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10166 then
10167   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10168 else
10169   echo "configure: failed program was:" >&5
10170   cat conftest.$ac_ext >&5
10171   rm -fr conftest*
10172   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10173 fi
10174 rm -fr conftest*
10175 fi
10176
10177 fi
10178
10179 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10180 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10181     cat >> confdefs.h <<\EOF
10182 #define HAVE_FTRUNCATE_EXTEND 1
10183 EOF
10184
10185 fi
10186
10187 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10188 echo "configure:10189: checking for AF_LOCAL socket support" >&5
10189 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10190   echo $ac_n "(cached) $ac_c" 1>&6
10191 else
10192   
10193 if test "$cross_compiling" = yes; then
10194   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10195 else
10196   cat > conftest.$ac_ext <<EOF
10197 #line 10198 "configure"
10198 #include "confdefs.h"
10199 #include "${srcdir-.}/tests/unixsock.c"
10200 EOF
10201 if { (eval echo configure:10202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10202 then
10203   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10204 else
10205   echo "configure: failed program was:" >&5
10206   cat conftest.$ac_ext >&5
10207   rm -fr conftest*
10208   samba_cv_HAVE_WORKING_AF_LOCAL=no
10209 fi
10210 rm -fr conftest*
10211 fi
10212
10213 fi
10214
10215 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10216 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10217 then
10218     cat >> confdefs.h <<\EOF
10219 #define HAVE_WORKING_AF_LOCAL 1
10220 EOF
10221
10222 fi
10223
10224 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10225 echo "configure:10226: checking for broken getgroups" >&5
10226 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10227   echo $ac_n "(cached) $ac_c" 1>&6
10228 else
10229   
10230 if test "$cross_compiling" = yes; then
10231   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10232 else
10233   cat > conftest.$ac_ext <<EOF
10234 #line 10235 "configure"
10235 #include "confdefs.h"
10236 #include "${srcdir-.}/tests/getgroups.c"
10237 EOF
10238 if { (eval echo configure:10239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10239 then
10240   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10241 else
10242   echo "configure: failed program was:" >&5
10243   cat conftest.$ac_ext >&5
10244   rm -fr conftest*
10245   samba_cv_HAVE_BROKEN_GETGROUPS=no
10246 fi
10247 rm -fr conftest*
10248 fi
10249
10250 fi
10251
10252 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10253 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10254     cat >> confdefs.h <<\EOF
10255 #define HAVE_BROKEN_GETGROUPS 1
10256 EOF
10257
10258 fi
10259
10260 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10261 echo "configure:10262: checking whether getpass should be replaced" >&5
10262 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10263   echo $ac_n "(cached) $ac_c" 1>&6
10264 else
10265   
10266 SAVE_CPPFLAGS="$CPPFLAGS"
10267 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10268 cat > conftest.$ac_ext <<EOF
10269 #line 10270 "configure"
10270 #include "confdefs.h"
10271
10272 #define REPLACE_GETPASS 1
10273 #define NO_CONFIG_H 1
10274 #define main dont_declare_main
10275 #include "${srcdir-.}/lib/getsmbpass.c"
10276 #undef main
10277
10278 int main() {
10279
10280 ; return 0; }
10281 EOF
10282 if { (eval echo configure:10283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10283   rm -rf conftest*
10284   samba_cv_REPLACE_GETPASS=yes
10285 else
10286   echo "configure: failed program was:" >&5
10287   cat conftest.$ac_ext >&5
10288   rm -rf conftest*
10289   samba_cv_REPLACE_GETPASS=no
10290 fi
10291 rm -f conftest*
10292 CPPFLAGS="$SAVE_CPPFLAGS"
10293
10294 fi
10295
10296 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10297 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10298         cat >> confdefs.h <<\EOF
10299 #define REPLACE_GETPASS 1
10300 EOF
10301
10302 fi
10303
10304 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10305 echo "configure:10306: checking for broken inet_ntoa" >&5
10306 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10307   echo $ac_n "(cached) $ac_c" 1>&6
10308 else
10309   
10310 if test "$cross_compiling" = yes; then
10311   samba_cv_REPLACE_INET_NTOA=cross
10312 else
10313   cat > conftest.$ac_ext <<EOF
10314 #line 10315 "configure"
10315 #include "confdefs.h"
10316
10317 #include <stdio.h>
10318 #include <sys/types.h>
10319 #include <netinet/in.h>
10320 #ifdef HAVE_ARPA_INET_H
10321 #include <arpa/inet.h>
10322 #endif
10323 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10324 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10325     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10326 exit(1);}
10327 EOF
10328 if { (eval echo configure:10329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10329 then
10330   samba_cv_REPLACE_INET_NTOA=yes
10331 else
10332   echo "configure: failed program was:" >&5
10333   cat conftest.$ac_ext >&5
10334   rm -fr conftest*
10335   samba_cv_REPLACE_INET_NTOA=no
10336 fi
10337 rm -fr conftest*
10338 fi
10339
10340 fi
10341
10342 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10343 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10344     cat >> confdefs.h <<\EOF
10345 #define REPLACE_INET_NTOA 1
10346 EOF
10347
10348 fi
10349
10350 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10351 echo "configure:10352: checking for secure mkstemp" >&5
10352 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10353   echo $ac_n "(cached) $ac_c" 1>&6
10354 else
10355   
10356 if test "$cross_compiling" = yes; then
10357   samba_cv_HAVE_SECURE_MKSTEMP=cross
10358 else
10359   cat > conftest.$ac_ext <<EOF
10360 #line 10361 "configure"
10361 #include "confdefs.h"
10362 #include <stdlib.h>
10363 #include <sys/types.h>
10364 #include <sys/stat.h>
10365 #include <unistd.h>
10366 main() { 
10367   struct stat st;
10368   char tpl[20]="/tmp/test.XXXXXX"; 
10369   int fd = mkstemp(tpl); 
10370   if (fd == -1) exit(1);
10371   unlink(tpl);
10372   if (fstat(fd, &st) != 0) exit(1);
10373   if ((st.st_mode & 0777) != 0600) exit(1);
10374   exit(0);
10375 }
10376 EOF
10377 if { (eval echo configure:10378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10378 then
10379   samba_cv_HAVE_SECURE_MKSTEMP=yes
10380 else
10381   echo "configure: failed program was:" >&5
10382   cat conftest.$ac_ext >&5
10383   rm -fr conftest*
10384   samba_cv_HAVE_SECURE_MKSTEMP=no
10385 fi
10386 rm -fr conftest*
10387 fi
10388
10389 fi
10390
10391 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10392 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10393     cat >> confdefs.h <<\EOF
10394 #define HAVE_SECURE_MKSTEMP 1
10395 EOF
10396
10397 fi
10398
10399 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10400 echo "configure:10401: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10401 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10402   echo $ac_n "(cached) $ac_c" 1>&6
10403 else
10404   
10405 if test "$cross_compiling" = yes; then
10406   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10407 else
10408   cat > conftest.$ac_ext <<EOF
10409 #line 10410 "configure"
10410 #include "confdefs.h"
10411 #include <unistd.h>
10412 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10413 EOF
10414 if { (eval echo configure:10415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10415 then
10416   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10417 else
10418   echo "configure: failed program was:" >&5
10419   cat conftest.$ac_ext >&5
10420   rm -fr conftest*
10421   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10422 fi
10423 rm -fr conftest*
10424 fi
10425
10426 fi
10427
10428 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10429 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10430     cat >> confdefs.h <<\EOF
10431 #define SYSCONF_SC_NGROUPS_MAX 1
10432 EOF
10433
10434 fi
10435
10436 echo $ac_n "checking for root""... $ac_c" 1>&6
10437 echo "configure:10438: checking for root" >&5
10438 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10439   echo $ac_n "(cached) $ac_c" 1>&6
10440 else
10441   
10442 if test "$cross_compiling" = yes; then
10443   samba_cv_HAVE_ROOT=cross
10444 else
10445   cat > conftest.$ac_ext <<EOF
10446 #line 10447 "configure"
10447 #include "confdefs.h"
10448 main() { exit(getuid() != 0); }
10449 EOF
10450 if { (eval echo configure:10451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10451 then
10452   samba_cv_HAVE_ROOT=yes
10453 else
10454   echo "configure: failed program was:" >&5
10455   cat conftest.$ac_ext >&5
10456   rm -fr conftest*
10457   samba_cv_HAVE_ROOT=no
10458 fi
10459 rm -fr conftest*
10460 fi
10461
10462 fi
10463
10464 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10465 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10466     cat >> confdefs.h <<\EOF
10467 #define HAVE_ROOT 1
10468 EOF
10469
10470 else
10471     echo "configure: warning: running as non-root will disable some tests" 1>&2
10472 fi
10473
10474 ##################
10475 # look for a method of finding the list of network interfaces
10476 iface=no;
10477 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10478 echo "configure:10479: checking for iface AIX" >&5
10479 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10480   echo $ac_n "(cached) $ac_c" 1>&6
10481 else
10482   
10483 if test "$cross_compiling" = yes; then
10484   samba_cv_HAVE_IFACE_AIX=cross
10485 else
10486   cat > conftest.$ac_ext <<EOF
10487 #line 10488 "configure"
10488 #include "confdefs.h"
10489
10490 #define HAVE_IFACE_AIX 1
10491 #define AUTOCONF_TEST 1
10492 #include "confdefs.h"
10493 #include "${srcdir-.}/lib/interfaces.c"
10494 EOF
10495 if { (eval echo configure:10496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10496 then
10497   samba_cv_HAVE_IFACE_AIX=yes
10498 else
10499   echo "configure: failed program was:" >&5
10500   cat conftest.$ac_ext >&5
10501   rm -fr conftest*
10502   samba_cv_HAVE_IFACE_AIX=no
10503 fi
10504 rm -fr conftest*
10505 fi
10506
10507 fi
10508
10509 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10510 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10511     iface=yes;cat >> confdefs.h <<\EOF
10512 #define HAVE_IFACE_AIX 1
10513 EOF
10514
10515 fi
10516
10517 if test $iface = no; then
10518 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10519 echo "configure:10520: checking for iface ifconf" >&5
10520 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10521   echo $ac_n "(cached) $ac_c" 1>&6
10522 else
10523   
10524 if test "$cross_compiling" = yes; then
10525   samba_cv_HAVE_IFACE_IFCONF=cross
10526 else
10527   cat > conftest.$ac_ext <<EOF
10528 #line 10529 "configure"
10529 #include "confdefs.h"
10530
10531 #define HAVE_IFACE_IFCONF 1
10532 #define AUTOCONF_TEST 1
10533 #include "confdefs.h"
10534 #include "${srcdir-.}/lib/interfaces.c"
10535 EOF
10536 if { (eval echo configure:10537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10537 then
10538   samba_cv_HAVE_IFACE_IFCONF=yes
10539 else
10540   echo "configure: failed program was:" >&5
10541   cat conftest.$ac_ext >&5
10542   rm -fr conftest*
10543   samba_cv_HAVE_IFACE_IFCONF=no
10544 fi
10545 rm -fr conftest*
10546 fi
10547
10548 fi
10549
10550 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10551 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10552     iface=yes;cat >> confdefs.h <<\EOF
10553 #define HAVE_IFACE_IFCONF 1
10554 EOF
10555
10556 fi
10557 fi
10558
10559 if test $iface = no; then
10560 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
10561 echo "configure:10562: checking for iface ifreq" >&5
10562 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
10563   echo $ac_n "(cached) $ac_c" 1>&6
10564 else
10565   
10566 if test "$cross_compiling" = yes; then
10567   samba_cv_HAVE_IFACE_IFREQ=cross
10568 else
10569   cat > conftest.$ac_ext <<EOF
10570 #line 10571 "configure"
10571 #include "confdefs.h"
10572
10573 #define HAVE_IFACE_IFREQ 1
10574 #define AUTOCONF_TEST 1
10575 #include "confdefs.h"
10576 #include "${srcdir-.}/lib/interfaces.c"
10577 EOF
10578 if { (eval echo configure:10579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10579 then
10580   samba_cv_HAVE_IFACE_IFREQ=yes
10581 else
10582   echo "configure: failed program was:" >&5
10583   cat conftest.$ac_ext >&5
10584   rm -fr conftest*
10585   samba_cv_HAVE_IFACE_IFREQ=no
10586 fi
10587 rm -fr conftest*
10588 fi
10589
10590 fi
10591
10592 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
10593 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
10594     iface=yes;cat >> confdefs.h <<\EOF
10595 #define HAVE_IFACE_IFREQ 1
10596 EOF
10597
10598 fi
10599 fi
10600
10601
10602 ################################################
10603 # look for a method of setting the effective uid
10604 seteuid=no;
10605 if test $seteuid = no; then
10606 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
10607 echo "configure:10608: checking for setresuid" >&5
10608 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
10609   echo $ac_n "(cached) $ac_c" 1>&6
10610 else
10611   
10612 if test "$cross_compiling" = yes; then
10613   samba_cv_USE_SETRESUID=cross
10614 else
10615   cat > conftest.$ac_ext <<EOF
10616 #line 10617 "configure"
10617 #include "confdefs.h"
10618
10619 #define AUTOCONF_TEST 1
10620 #define USE_SETRESUID 1
10621 #include "confdefs.h"
10622 #include "${srcdir-.}/lib/util_sec.c"
10623 EOF
10624 if { (eval echo configure:10625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10625 then
10626   samba_cv_USE_SETRESUID=yes
10627 else
10628   echo "configure: failed program was:" >&5
10629   cat conftest.$ac_ext >&5
10630   rm -fr conftest*
10631   samba_cv_USE_SETRESUID=no
10632 fi
10633 rm -fr conftest*
10634 fi
10635
10636 fi
10637
10638 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
10639 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
10640     seteuid=yes;cat >> confdefs.h <<\EOF
10641 #define USE_SETRESUID 1
10642 EOF
10643
10644 fi
10645 fi
10646
10647
10648 if test $seteuid = no; then
10649 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
10650 echo "configure:10651: checking for setreuid" >&5
10651 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
10652   echo $ac_n "(cached) $ac_c" 1>&6
10653 else
10654   
10655 if test "$cross_compiling" = yes; then
10656   samba_cv_USE_SETREUID=cross
10657 else
10658   cat > conftest.$ac_ext <<EOF
10659 #line 10660 "configure"
10660 #include "confdefs.h"
10661
10662 #define AUTOCONF_TEST 1
10663 #define USE_SETREUID 1
10664 #include "confdefs.h"
10665 #include "${srcdir-.}/lib/util_sec.c"
10666 EOF
10667 if { (eval echo configure:10668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10668 then
10669   samba_cv_USE_SETREUID=yes
10670 else
10671   echo "configure: failed program was:" >&5
10672   cat conftest.$ac_ext >&5
10673   rm -fr conftest*
10674   samba_cv_USE_SETREUID=no
10675 fi
10676 rm -fr conftest*
10677 fi
10678
10679 fi
10680
10681 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
10682 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
10683     seteuid=yes;cat >> confdefs.h <<\EOF
10684 #define USE_SETREUID 1
10685 EOF
10686
10687 fi
10688 fi
10689
10690 if test $seteuid = no; then
10691 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
10692 echo "configure:10693: checking for seteuid" >&5
10693 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
10694   echo $ac_n "(cached) $ac_c" 1>&6
10695 else
10696   
10697 if test "$cross_compiling" = yes; then
10698   samba_cv_USE_SETEUID=cross
10699 else
10700   cat > conftest.$ac_ext <<EOF
10701 #line 10702 "configure"
10702 #include "confdefs.h"
10703
10704 #define AUTOCONF_TEST 1
10705 #define USE_SETEUID 1
10706 #include "confdefs.h"
10707 #include "${srcdir-.}/lib/util_sec.c"
10708 EOF
10709 if { (eval echo configure:10710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10710 then
10711   samba_cv_USE_SETEUID=yes
10712 else
10713   echo "configure: failed program was:" >&5
10714   cat conftest.$ac_ext >&5
10715   rm -fr conftest*
10716   samba_cv_USE_SETEUID=no
10717 fi
10718 rm -fr conftest*
10719 fi
10720
10721 fi
10722
10723 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
10724 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
10725     seteuid=yes;cat >> confdefs.h <<\EOF
10726 #define USE_SETEUID 1
10727 EOF
10728
10729 fi
10730 fi
10731
10732 if test $seteuid = no; then
10733 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
10734 echo "configure:10735: checking for setuidx" >&5
10735 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
10736   echo $ac_n "(cached) $ac_c" 1>&6
10737 else
10738   
10739 if test "$cross_compiling" = yes; then
10740   samba_cv_USE_SETUIDX=cross
10741 else
10742   cat > conftest.$ac_ext <<EOF
10743 #line 10744 "configure"
10744 #include "confdefs.h"
10745
10746 #define AUTOCONF_TEST 1
10747 #define USE_SETUIDX 1
10748 #include "confdefs.h"
10749 #include "${srcdir-.}/lib/util_sec.c"
10750 EOF
10751 if { (eval echo configure:10752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10752 then
10753   samba_cv_USE_SETUIDX=yes
10754 else
10755   echo "configure: failed program was:" >&5
10756   cat conftest.$ac_ext >&5
10757   rm -fr conftest*
10758   samba_cv_USE_SETUIDX=no
10759 fi
10760 rm -fr conftest*
10761 fi
10762
10763 fi
10764
10765 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
10766 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
10767     seteuid=yes;cat >> confdefs.h <<\EOF
10768 #define USE_SETUIDX 1
10769 EOF
10770
10771 fi
10772 fi
10773
10774
10775 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10776 echo "configure:10777: checking for working mmap" >&5
10777 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
10778   echo $ac_n "(cached) $ac_c" 1>&6
10779 else
10780   
10781 if test "$cross_compiling" = yes; then
10782   samba_cv_HAVE_MMAP=cross
10783 else
10784   cat > conftest.$ac_ext <<EOF
10785 #line 10786 "configure"
10786 #include "confdefs.h"
10787 #include "${srcdir-.}/tests/shared_mmap.c"
10788 EOF
10789 if { (eval echo configure:10790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10790 then
10791   samba_cv_HAVE_MMAP=yes
10792 else
10793   echo "configure: failed program was:" >&5
10794   cat conftest.$ac_ext >&5
10795   rm -fr conftest*
10796   samba_cv_HAVE_MMAP=no
10797 fi
10798 rm -fr conftest*
10799 fi
10800
10801 fi
10802
10803 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
10804 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
10805     cat >> confdefs.h <<\EOF
10806 #define HAVE_MMAP 1
10807 EOF
10808
10809 fi
10810
10811 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
10812 echo "configure:10813: checking for ftruncate needs root" >&5
10813 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
10814   echo $ac_n "(cached) $ac_c" 1>&6
10815 else
10816   
10817 if test "$cross_compiling" = yes; then
10818   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
10819 else
10820   cat > conftest.$ac_ext <<EOF
10821 #line 10822 "configure"
10822 #include "confdefs.h"
10823 #include "${srcdir-.}/tests/ftruncroot.c"
10824 EOF
10825 if { (eval echo configure:10826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10826 then
10827   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
10828 else
10829   echo "configure: failed program was:" >&5
10830   cat conftest.$ac_ext >&5
10831   rm -fr conftest*
10832   samba_cv_FTRUNCATE_NEEDS_ROOT=no
10833 fi
10834 rm -fr conftest*
10835 fi
10836
10837 fi
10838
10839 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
10840 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
10841     cat >> confdefs.h <<\EOF
10842 #define FTRUNCATE_NEEDS_ROOT 1
10843 EOF
10844
10845 fi
10846
10847 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
10848 echo "configure:10849: checking for fcntl locking" >&5
10849 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
10850   echo $ac_n "(cached) $ac_c" 1>&6
10851 else
10852   
10853 if test "$cross_compiling" = yes; then
10854   samba_cv_HAVE_FCNTL_LOCK=cross
10855 else
10856   cat > conftest.$ac_ext <<EOF
10857 #line 10858 "configure"
10858 #include "confdefs.h"
10859 #include "${srcdir-.}/tests/fcntl_lock.c"
10860 EOF
10861 if { (eval echo configure:10862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10862 then
10863   samba_cv_HAVE_FCNTL_LOCK=yes
10864 else
10865   echo "configure: failed program was:" >&5
10866   cat conftest.$ac_ext >&5
10867   rm -fr conftest*
10868   samba_cv_HAVE_FCNTL_LOCK=no
10869 fi
10870 rm -fr conftest*
10871 fi
10872
10873 fi
10874
10875 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
10876 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
10877     cat >> confdefs.h <<\EOF
10878 #define HAVE_FCNTL_LOCK 1
10879 EOF
10880
10881 fi
10882
10883 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
10884 echo "configure:10885: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
10885 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
10886   echo $ac_n "(cached) $ac_c" 1>&6
10887 else
10888   
10889 if test "$cross_compiling" = yes; then
10890   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
10891 else
10892   cat > conftest.$ac_ext <<EOF
10893 #line 10894 "configure"
10894 #include "confdefs.h"
10895 #include "${srcdir-.}/tests/fcntl_lock64.c"
10896 EOF
10897 if { (eval echo configure:10898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10898 then
10899   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
10900 else
10901   echo "configure: failed program was:" >&5
10902   cat conftest.$ac_ext >&5
10903   rm -fr conftest*
10904   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
10905 fi
10906 rm -fr conftest*
10907 fi
10908
10909 fi
10910
10911 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
10912 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
10913     cat >> confdefs.h <<\EOF
10914 #define HAVE_BROKEN_FCNTL64_LOCKS 1
10915 EOF
10916
10917
10918 else
10919
10920
10921   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
10922 echo "configure:10923: checking for 64 bit fcntl locking" >&5
10923 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
10924   echo $ac_n "(cached) $ac_c" 1>&6
10925 else
10926   
10927   if test "$cross_compiling" = yes; then
10928   samba_cv_HAVE_STRUCT_FLOCK64=cross
10929 else
10930   cat > conftest.$ac_ext <<EOF
10931 #line 10932 "configure"
10932 #include "confdefs.h"
10933
10934 #if defined(HAVE_UNISTD_H)
10935 #include <unistd.h>
10936 #endif
10937 #include <stdio.h>
10938 #include <stdlib.h>
10939
10940 #ifdef HAVE_FCNTL_H
10941 #include <fcntl.h>
10942 #endif
10943
10944 #ifdef HAVE_SYS_FCNTL_H
10945 #include <sys/fcntl.h>
10946 #endif
10947 main() { struct flock64 fl64;
10948 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
10949 exit(0);
10950 #else
10951 exit(1);
10952 #endif
10953 }
10954 EOF
10955 if { (eval echo configure:10956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10956 then
10957   samba_cv_HAVE_STRUCT_FLOCK64=yes
10958 else
10959   echo "configure: failed program was:" >&5
10960   cat conftest.$ac_ext >&5
10961   rm -fr conftest*
10962   samba_cv_HAVE_STRUCT_FLOCK64=no
10963 fi
10964 rm -fr conftest*
10965 fi
10966
10967 fi
10968
10969 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
10970
10971   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
10972       cat >> confdefs.h <<\EOF
10973 #define HAVE_STRUCT_FLOCK64 1
10974 EOF
10975
10976   fi
10977 fi
10978
10979 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
10980 echo "configure:10981: checking for broken nisplus include files" >&5
10981 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
10982   echo $ac_n "(cached) $ac_c" 1>&6
10983 else
10984   
10985 cat > conftest.$ac_ext <<EOF
10986 #line 10987 "configure"
10987 #include "confdefs.h"
10988 #include <sys/acl.h>
10989 #if defined(HAVE_RPCSVC_NIS_H)
10990 #include <rpcsvc/nis.h>
10991 #endif
10992 int main() {
10993 return 0;
10994 ; return 0; }
10995 EOF
10996 if { (eval echo configure:10997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10997   rm -rf conftest*
10998   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
10999 else
11000   echo "configure: failed program was:" >&5
11001   cat conftest.$ac_ext >&5
11002   rm -rf conftest*
11003   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11004 fi
11005 rm -f conftest*
11006 fi
11007
11008 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11009 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11010     cat >> confdefs.h <<\EOF
11011 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11012 EOF
11013
11014 fi
11015
11016
11017 #################################################
11018 # check for smbwrapper support
11019 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11020 echo "configure:11021: checking whether to use smbwrapper" >&5
11021 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11022 if test "${with_smbwrapper+set}" = set; then
11023   withval="$with_smbwrapper"
11024    case "$withval" in
11025   yes)
11026     echo "$ac_t""yes" 1>&6
11027     cat >> confdefs.h <<\EOF
11028 #define WITH_SMBWRAPPER 1
11029 EOF
11030
11031         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11032
11033         if test x$ATTEMPT_WRAP32_BUILD = x; then
11034                 WRAP32=""
11035         else
11036                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11037         fi
11038
11039 # Conditions under which smbwrapper should not be built.
11040
11041         if test x$PICFLAG = x; then
11042            echo No support for PIC code - disabling smbwrapper and smbsh
11043            WRAP=""
11044            WRAP32=""
11045         elif test x$ac_cv_func_syscall = xno; then
11046            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11047            WRAP=""
11048            WRAP32=""
11049         fi
11050     ;;
11051   *)
11052     echo "$ac_t""no" 1>&6
11053     ;;
11054   esac 
11055 else
11056   echo "$ac_t""no" 1>&6
11057
11058 fi
11059
11060
11061 #################################################
11062 # check for the AFS filesystem
11063 echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
11064 echo "configure:11065: checking whether to use AFS" >&5
11065 # Check whether --with-afs or --without-afs was given.
11066 if test "${with_afs+set}" = set; then
11067   withval="$with_afs"
11068    case "$withval" in
11069   yes)
11070     echo "$ac_t""yes" 1>&6
11071     cat >> confdefs.h <<\EOF
11072 #define WITH_AFS 1
11073 EOF
11074
11075     ;;
11076   *)
11077     echo "$ac_t""no" 1>&6
11078     ;;
11079   esac 
11080 else
11081   echo "$ac_t""no" 1>&6
11082
11083 fi
11084
11085
11086
11087 #################################################
11088 # check for the DFS auth system
11089 echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
11090 echo "configure:11091: checking whether to use DFS auth" >&5
11091 # Check whether --with-dfs or --without-dfs was given.
11092 if test "${with_dfs+set}" = set; then
11093   withval="$with_dfs"
11094    case "$withval" in
11095   yes)
11096     echo "$ac_t""yes" 1>&6
11097     cat >> confdefs.h <<\EOF
11098 #define WITH_DFS 1
11099 EOF
11100
11101     ;;
11102   *)
11103     echo "$ac_t""no" 1>&6
11104     ;;
11105   esac 
11106 else
11107   echo "$ac_t""no" 1>&6
11108
11109 fi
11110
11111
11112 #################################################
11113 # check for Kerberos IV auth system
11114 echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
11115 echo "configure:11116: checking whether to use Kerberos IV" >&5
11116 # Check whether --with-krb4 or --without-krb4 was given.
11117 if test "${with_krb4+set}" = set; then
11118   withval="$with_krb4"
11119    case "$withval" in
11120   yes)
11121     echo "$ac_t""yes" 1>&6
11122     cat >> confdefs.h <<\EOF
11123 #define KRB4_AUTH 1
11124 EOF
11125
11126     echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
11127 echo "configure:11128: checking for dn_expand in -lresolv" >&5
11128 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
11129 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11130   echo $ac_n "(cached) $ac_c" 1>&6
11131 else
11132   ac_save_LIBS="$LIBS"
11133 LIBS="-lresolv  $LIBS"
11134 cat > conftest.$ac_ext <<EOF
11135 #line 11136 "configure"
11136 #include "confdefs.h"
11137 /* Override any gcc2 internal prototype to avoid an error.  */
11138 /* We use char because int might match the return type of a gcc2
11139     builtin and then its argument prototype would still apply.  */
11140 char dn_expand();
11141
11142 int main() {
11143 dn_expand()
11144 ; return 0; }
11145 EOF
11146 if { (eval echo configure:11147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11147   rm -rf conftest*
11148   eval "ac_cv_lib_$ac_lib_var=yes"
11149 else
11150   echo "configure: failed program was:" >&5
11151   cat conftest.$ac_ext >&5
11152   rm -rf conftest*
11153   eval "ac_cv_lib_$ac_lib_var=no"
11154 fi
11155 rm -f conftest*
11156 LIBS="$ac_save_LIBS"
11157
11158 fi
11159 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11160   echo "$ac_t""yes" 1>&6
11161     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11162     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11163   cat >> confdefs.h <<EOF
11164 #define $ac_tr_lib 1
11165 EOF
11166
11167   LIBS="-lresolv $LIBS"
11168
11169 else
11170   echo "$ac_t""no" 1>&6
11171 fi
11172
11173     LIBS="$LIBS -lkrb -ldes"
11174     CFLAGS="$CFLAGS -I$withval/include"
11175     LDFLAGS="$LDFLAGS -L$withval/lib"
11176     ;;
11177   *)
11178     echo "$ac_t""no" 1>&6
11179     ;;
11180   esac 
11181 else
11182   echo "$ac_t""no" 1>&6
11183
11184 fi
11185
11186
11187 #################################################
11188 # check for Kerberos 5 auth system
11189 echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6
11190 echo "configure:11191: checking whether to use Kerberos 5" >&5
11191 # Check whether --with-krb5 or --without-krb5 was given.
11192 if test "${with_krb5+set}" = set; then
11193   withval="$with_krb5"
11194    case "$withval" in
11195   yes)
11196     echo "$ac_t""yes" 1>&6
11197     cat >> confdefs.h <<\EOF
11198 #define KRB5_AUTH 1
11199 EOF
11200
11201     LIBS="$LIBS -ldes425 -lkrb5 -lcrypto -lcom_err"
11202     CFLAGS="$CFLAGS -I$withval/include"
11203     LDFLAGS="$LDFLAGS -L$withval/lib"
11204     ;;
11205   *)
11206     echo "$ac_t""no" 1>&6
11207     ;;
11208   esac 
11209 else
11210   echo "$ac_t""no" 1>&6
11211
11212 fi
11213
11214
11215 #################################################
11216 # check for automount support
11217 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
11218 echo "configure:11219: checking whether to use AUTOMOUNT" >&5
11219 # Check whether --with-automount or --without-automount was given.
11220 if test "${with_automount+set}" = set; then
11221   withval="$with_automount"
11222    case "$withval" in
11223   yes)
11224     echo "$ac_t""yes" 1>&6
11225     cat >> confdefs.h <<\EOF
11226 #define WITH_AUTOMOUNT 1
11227 EOF
11228
11229     ;;
11230   *)
11231     echo "$ac_t""no" 1>&6
11232     ;;
11233   esac 
11234 else
11235   echo "$ac_t""no" 1>&6
11236
11237 fi
11238
11239
11240 #################################################
11241 # check for smbmount support
11242 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
11243 echo "configure:11244: checking whether to use SMBMOUNT" >&5
11244 # Check whether --with-smbmount or --without-smbmount was given.
11245 if test "${with_smbmount+set}" = set; then
11246   withval="$with_smbmount"
11247    case "$withval" in
11248   yes)
11249     echo "$ac_t""yes" 1>&6
11250     cat >> confdefs.h <<\EOF
11251 #define WITH_SMBMOUNT 1
11252 EOF
11253
11254     MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
11255     ;;
11256   *)
11257     echo "$ac_t""no" 1>&6
11258     MPROGS=
11259     ;;
11260   esac 
11261 else
11262   echo "$ac_t""no" 1>&6
11263   MPROGS=
11264
11265 fi
11266
11267
11268
11269 #################################################
11270 # check for a PAM password database
11271 with_pam_for_crypt=no
11272 echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6
11273 echo "configure:11274: checking whether to use PAM password database" >&5
11274 # Check whether --with-pam or --without-pam was given.
11275 if test "${with_pam+set}" = set; then
11276   withval="$with_pam"
11277    case "$withval" in
11278   yes)
11279     echo "$ac_t""yes" 1>&6
11280     cat >> confdefs.h <<\EOF
11281 #define WITH_PAM 1
11282 EOF
11283
11284     LIBS="$LIBS -lpam"
11285     with_pam_for_crypt=yes
11286     ;;
11287   *)
11288     echo "$ac_t""no" 1>&6
11289     ;;
11290   esac 
11291 else
11292   echo "$ac_t""no" 1>&6
11293
11294 fi
11295
11296
11297 # we can't build a pam module if we don't have pam.
11298 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
11299 echo "configure:11300: checking for pam_get_data in -lpam" >&5
11300 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
11301 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11302   echo $ac_n "(cached) $ac_c" 1>&6
11303 else
11304   ac_save_LIBS="$LIBS"
11305 LIBS="-lpam  $LIBS"
11306 cat > conftest.$ac_ext <<EOF
11307 #line 11308 "configure"
11308 #include "confdefs.h"
11309 /* Override any gcc2 internal prototype to avoid an error.  */
11310 /* We use char because int might match the return type of a gcc2
11311     builtin and then its argument prototype would still apply.  */
11312 char pam_get_data();
11313
11314 int main() {
11315 pam_get_data()
11316 ; return 0; }
11317 EOF
11318 if { (eval echo configure:11319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11319   rm -rf conftest*
11320   eval "ac_cv_lib_$ac_lib_var=yes"
11321 else
11322   echo "configure: failed program was:" >&5
11323   cat conftest.$ac_ext >&5
11324   rm -rf conftest*
11325   eval "ac_cv_lib_$ac_lib_var=no"
11326 fi
11327 rm -f conftest*
11328 LIBS="$ac_save_LIBS"
11329
11330 fi
11331 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11332   echo "$ac_t""yes" 1>&6
11333   cat >> confdefs.h <<\EOF
11334 #define HAVE_LIBPAM 1
11335 EOF
11336
11337 else
11338   echo "$ac_t""no" 1>&6
11339 fi
11340
11341
11342 #################################################
11343 # check for pam_smbpass support
11344 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
11345 echo "configure:11346: checking whether to use pam_smbpass" >&5
11346 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
11347 if test "${with_pam_smbpass+set}" = set; then
11348   withval="$with_pam_smbpass"
11349    case "$withval" in
11350   yes)
11351     echo "$ac_t""yes" 1>&6
11352
11353 # Conditions under which pam_smbpass should not be built.
11354
11355        if test x$PICFLAG = x; then
11356           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
11357           PAM_MOD=""
11358        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
11359           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
11360           PAM_MOD=""
11361        else
11362           PAM_MOD="bin/pam_smbpass.so"
11363        fi
11364     ;;
11365   *)
11366     echo "$ac_t""no" 1>&6
11367     ;;
11368   esac 
11369 else
11370   echo "$ac_t""no" 1>&6
11371
11372 fi
11373
11374
11375
11376 ###############################################
11377 # test for where we get crypt() from, but only
11378 # if not using PAM
11379 if test $with_pam_for_crypt = no; then
11380 for ac_func in crypt
11381 do
11382 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11383 echo "configure:11384: checking for $ac_func" >&5
11384 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11385   echo $ac_n "(cached) $ac_c" 1>&6
11386 else
11387   cat > conftest.$ac_ext <<EOF
11388 #line 11389 "configure"
11389 #include "confdefs.h"
11390 /* System header to define __stub macros and hopefully few prototypes,
11391     which can conflict with char $ac_func(); below.  */
11392 #include <assert.h>
11393 /* Override any gcc2 internal prototype to avoid an error.  */
11394 /* We use char because int might match the return type of a gcc2
11395     builtin and then its argument prototype would still apply.  */
11396 char $ac_func();
11397
11398 int main() {
11399
11400 /* The GNU C library defines this for functions which it implements
11401     to always fail with ENOSYS.  Some functions are actually named
11402     something starting with __ and the normal name is an alias.  */
11403 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11404 choke me
11405 #else
11406 $ac_func();
11407 #endif
11408
11409 ; return 0; }
11410 EOF
11411 if { (eval echo configure:11412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11412   rm -rf conftest*
11413   eval "ac_cv_func_$ac_func=yes"
11414 else
11415   echo "configure: failed program was:" >&5
11416   cat conftest.$ac_ext >&5
11417   rm -rf conftest*
11418   eval "ac_cv_func_$ac_func=no"
11419 fi
11420 rm -f conftest*
11421 fi
11422
11423 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11424   echo "$ac_t""yes" 1>&6
11425     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11426   cat >> confdefs.h <<EOF
11427 #define $ac_tr_func 1
11428 EOF
11429  
11430 else
11431   echo "$ac_t""no" 1>&6
11432 fi
11433 done
11434
11435 if test x"$ac_cv_func_crypt" = x"no"; then
11436     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
11437 echo "configure:11438: checking for crypt in -lcrypt" >&5
11438 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
11439 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11440   echo $ac_n "(cached) $ac_c" 1>&6
11441 else
11442   ac_save_LIBS="$LIBS"
11443 LIBS="-lcrypt  $LIBS"
11444 cat > conftest.$ac_ext <<EOF
11445 #line 11446 "configure"
11446 #include "confdefs.h"
11447 /* Override any gcc2 internal prototype to avoid an error.  */
11448 /* We use char because int might match the return type of a gcc2
11449     builtin and then its argument prototype would still apply.  */
11450 char crypt();
11451
11452 int main() {
11453 crypt()
11454 ; return 0; }
11455 EOF
11456 if { (eval echo configure:11457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11457   rm -rf conftest*
11458   eval "ac_cv_lib_$ac_lib_var=yes"
11459 else
11460   echo "configure: failed program was:" >&5
11461   cat conftest.$ac_ext >&5
11462   rm -rf conftest*
11463   eval "ac_cv_lib_$ac_lib_var=no"
11464 fi
11465 rm -f conftest*
11466 LIBS="$ac_save_LIBS"
11467
11468 fi
11469 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11470   echo "$ac_t""yes" 1>&6
11471   LIBS="$LIBS -lcrypt";
11472         cat >> confdefs.h <<\EOF
11473 #define HAVE_CRYPT 1
11474 EOF
11475
11476 else
11477   echo "$ac_t""no" 1>&6
11478 fi
11479
11480 fi
11481 fi
11482
11483 ##
11484 ## moved after the check for -lcrypt in order to
11485 ## ensure that the necessary libraries are included
11486 ## check checking for truncated salt.  Wrapped by the
11487 ## $with_pam_for_crypt variable as above   --jerry
11488 ##
11489 if test $with_pam_for_crypt = no; then
11490 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
11491 echo "configure:11492: checking for a crypt that needs truncated salt" >&5
11492 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
11493   echo $ac_n "(cached) $ac_c" 1>&6
11494 else
11495   
11496 if test "$cross_compiling" = yes; then
11497   samba_cv_HAVE_TRUNCATED_SALT=cross
11498 else
11499   cat > conftest.$ac_ext <<EOF
11500 #line 11501 "configure"
11501 #include "confdefs.h"
11502 #include "${srcdir-.}/tests/crypttest.c"
11503 EOF
11504 if { (eval echo configure:11505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11505 then
11506   samba_cv_HAVE_TRUNCATED_SALT=no
11507 else
11508   echo "configure: failed program was:" >&5
11509   cat conftest.$ac_ext >&5
11510   rm -fr conftest*
11511   samba_cv_HAVE_TRUNCATED_SALT=yes
11512 fi
11513 rm -fr conftest*
11514 fi
11515
11516 fi
11517
11518 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
11519 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
11520         cat >> confdefs.h <<\EOF
11521 #define HAVE_TRUNCATED_SALT 1
11522 EOF
11523
11524 fi
11525 fi
11526
11527
11528 #################################################
11529 # check for a TDB password database
11530 echo $ac_n "checking whether to use TDB password database""... $ac_c" 1>&6
11531 echo "configure:11532: checking whether to use TDB password database" >&5
11532 # Check whether --with-tdbsam or --without-tdbsam was given.
11533 if test "${with_tdbsam+set}" = set; then
11534   withval="$with_tdbsam"
11535    case "$withval" in
11536   yes)
11537     echo "$ac_t""yes" 1>&6
11538     cat >> confdefs.h <<\EOF
11539 #define WITH_TDBPWD 1
11540 EOF
11541
11542 #    AC_MSG_ERROR([TDB password database not supported in this version.])
11543     ;;
11544   *)
11545     echo "$ac_t""no" 1>&6
11546     ;;
11547   esac 
11548 else
11549   echo "$ac_t""no" 1>&6
11550
11551 fi
11552
11553
11554 #################################################
11555 # check for a LDAP password database
11556 echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6
11557 echo "configure:11558: checking whether to use LDAP password database" >&5
11558 # Check whether --with-ldap or --without-ldap was given.
11559 if test "${with_ldap+set}" = set; then
11560   withval="$with_ldap"
11561    case "$withval" in
11562   yes)
11563     echo "$ac_t""yes" 1>&6
11564     cat >> confdefs.h <<\EOF
11565 #define WITH_LDAP 1
11566 EOF
11567
11568     { echo "configure: error: LDAP password database not supported in this version." 1>&2; exit 1; }
11569     ;;
11570   *)
11571     echo "$ac_t""no" 1>&6
11572     ;;
11573   esac 
11574 else
11575   echo "$ac_t""no" 1>&6
11576
11577 fi
11578
11579
11580 #################################################
11581 # commented out by --jerry
11582 # check for a NISPLUS password database
11583 #AC_MSG_CHECKING(whether to use NISPLUS password database)
11584 #AC_ARG_WITH(nisplus,
11585 #[  --with-nisplus     Include NISPLUS password database support
11586 #[ case "$withval" in
11587 #  yes)
11588 #    AC_MSG_RESULT(yes)
11589 #    AC_DEFINE(WITH_NISPLUS)
11590 #    ;;
11591 #  *)
11592 #    AC_MSG_RESULT(no)
11593 #    ;;
11594 #  esac ],
11595 #  AC_MSG_RESULT(no)
11596 #)
11597
11598 #################################################
11599 # check for a NISPLUS_HOME support 
11600 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
11601 echo "configure:11602: checking whether to use NISPLUS_HOME" >&5
11602 # Check whether --with-nisplus-home or --without-nisplus-home was given.
11603 if test "${with_nisplus_home+set}" = set; then
11604   withval="$with_nisplus_home"
11605    case "$withval" in
11606   yes)
11607     echo "$ac_t""yes" 1>&6
11608     cat >> confdefs.h <<\EOF
11609 #define WITH_NISPLUS_HOME 1
11610 EOF
11611
11612     ;;
11613   *)
11614     echo "$ac_t""no" 1>&6
11615     ;;
11616   esac 
11617 else
11618   echo "$ac_t""no" 1>&6
11619
11620 fi
11621
11622
11623 #################################################
11624 # check for the secure socket layer
11625 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
11626 echo "configure:11627: checking whether to use SSL" >&5
11627 # Check whether --with-ssl or --without-ssl was given.
11628 if test "${with_ssl+set}" = set; then
11629   withval="$with_ssl"
11630    case "$withval" in
11631   yes)
11632     echo "$ac_t""yes" 1>&6
11633     cat >> confdefs.h <<\EOF
11634 #define WITH_SSL 1
11635 EOF
11636
11637     withval="/usr/local/ssl"     # default
11638
11639     if test "${with_sslinc+set}" = set; then
11640
11641         withval="$with_sslinc"
11642         case "$withval" in
11643         yes|no)
11644           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
11645           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
11646           LIBS="-lssl -lcrypto $LIBS"
11647           LDFLAGS="=L/usr/local/ssl/lib $LDFLAGS"
11648         ;;
11649         * )
11650           CFLAGS="-I${withval} $CFLAGS"
11651           LIBS="-lssl -lcrypto $LIBS"
11652           LDFLAGS="-L${withval}/lib $LDFLAGS"
11653         ;;
11654         esac
11655
11656     else
11657
11658         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
11659         LIBS="-lssl -lcrypto $LIBS"
11660         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
11661
11662     fi
11663
11664     if test ! -d ${withval}; then
11665       echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
11666       exit 1
11667     fi 
11668
11669     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
11670
11671     ;;
11672   *)
11673     echo "$ac_t""no" 1>&6
11674     ;;
11675   esac 
11676 else
11677   echo "$ac_t""no" 1>&6
11678
11679 fi
11680
11681
11682 #################################################
11683 # check for syslog logging
11684 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
11685 echo "configure:11686: checking whether to use syslog logging" >&5
11686 # Check whether --with-syslog or --without-syslog was given.
11687 if test "${with_syslog+set}" = set; then
11688   withval="$with_syslog"
11689    case "$withval" in
11690   yes)
11691     echo "$ac_t""yes" 1>&6
11692     cat >> confdefs.h <<\EOF
11693 #define WITH_SYSLOG 1
11694 EOF
11695
11696     ;;
11697   *)
11698     echo "$ac_t""no" 1>&6
11699     ;;
11700   esac 
11701 else
11702   echo "$ac_t""no" 1>&6
11703
11704 fi
11705
11706
11707 #################################################
11708 # check for a shared memory profiling support
11709 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
11710 echo "configure:11711: checking whether to use profiling" >&5
11711 # Check whether --with-profiling-data or --without-profiling-data was given.
11712 if test "${with_profiling_data+set}" = set; then
11713   withval="$with_profiling_data"
11714    case "$withval" in
11715   yes)
11716     echo "$ac_t""yes" 1>&6
11717     cat >> confdefs.h <<\EOF
11718 #define WITH_PROFILE 1
11719 EOF
11720
11721     ;;
11722   *)
11723     echo "$ac_t""no" 1>&6
11724     ;;
11725   esac 
11726 else
11727   echo "$ac_t""no" 1>&6
11728
11729 fi
11730
11731
11732
11733 #################################################
11734 # check for experimental disk-quotas support
11735 QUOTAOBJS=smbd/noquotas.o
11736
11737 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
11738 echo "configure:11739: checking whether to support disk-quotas" >&5
11739 # Check whether --with-quotas or --without-quotas was given.
11740 if test "${with_quotas+set}" = set; then
11741   withval="$with_quotas"
11742    case "$withval" in
11743   yes)
11744     echo "$ac_t""yes" 1>&6
11745     QUOTAOBJS=smbd/quotas.o
11746     ;;
11747   *)
11748     echo "$ac_t""no" 1>&6
11749     ;;
11750   esac 
11751 else
11752   echo "$ac_t""no" 1>&6
11753
11754 fi
11755
11756
11757
11758 #################################################
11759 # check for experimental utmp accounting
11760
11761 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
11762 echo "configure:11763: checking whether to support utmp accounting" >&5
11763 # Check whether --with-utmp or --without-utmp was given.
11764 if test "${with_utmp+set}" = set; then
11765   withval="$with_utmp"
11766    case "$withval" in
11767   yes)
11768     echo "$ac_t""yes" 1>&6
11769     cat >> confdefs.h <<\EOF
11770 #define WITH_UTMP 1
11771 EOF
11772
11773     ;;
11774   *)
11775     echo "$ac_t""no" 1>&6
11776     ;;
11777   esac 
11778 else
11779   echo "$ac_t""no" 1>&6
11780
11781 fi
11782
11783
11784 #################################################
11785 # check for MS Dfs support
11786
11787 echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6
11788 echo "configure:11789: checking whether to support Microsoft Dfs" >&5
11789 # Check whether --with-msdfs or --without-msdfs was given.
11790 if test "${with_msdfs+set}" = set; then
11791   withval="$with_msdfs"
11792    case "$withval" in
11793   yes)
11794      echo "$ac_t""yes" 1>&6
11795      cat >> confdefs.h <<\EOF
11796 #define WITH_MSDFS 1
11797 EOF
11798
11799      ;;
11800   *)
11801     echo "$ac_t""no" 1>&6
11802     ;;
11803   esac 
11804 else
11805   echo "$ac_t""no" 1>&6
11806
11807 fi
11808
11809
11810 #################################################
11811 # set private directory location
11812 # Check whether --with-privatedir or --without-privatedir was given.
11813 if test "${with_privatedir+set}" = set; then
11814   withval="$with_privatedir"
11815    case "$withval" in
11816   yes|no)
11817   #
11818   # Just in case anybody calls it without argument
11819   #
11820     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
11821     privatedir='${prefix}/private'
11822   ;;
11823   * )
11824     privatedir="$withval"
11825     ;;
11826   esac
11827   
11828 else
11829   privatedir='${prefix}/private'
11830    
11831
11832 fi
11833
11834
11835 #################################################
11836 # set lock directory location
11837 # Check whether --with-lockdir or --without-lockdir was given.
11838 if test "${with_lockdir+set}" = set; then
11839   withval="$with_lockdir"
11840    case "$withval" in
11841   yes|no)
11842   #
11843   # Just in case anybody calls it without argument
11844   #
11845     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
11846     lockdir='$(VARDIR)/locks'
11847   ;;
11848   * )
11849     lockdir="$withval"
11850     ;;
11851   esac
11852   
11853 else
11854   lockdir='$(VARDIR)/locks'
11855    
11856
11857 fi
11858
11859
11860 #################################################
11861 # set SWAT directory location
11862 # Check whether --with-swatdir or --without-swatdir was given.
11863 if test "${with_swatdir+set}" = set; then
11864   withval="$with_swatdir"
11865    case "$withval" in
11866   yes|no)
11867   #
11868   # Just in case anybody does it
11869   #
11870     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
11871     swatdir='${prefix}/swat'
11872   ;;
11873   * )
11874     swatdir="$withval"
11875     ;;
11876   esac
11877   
11878 else
11879   swatdir='${prefix}/swat'
11880    
11881
11882 fi
11883
11884
11885 #################################################
11886 # these tests are taken from the GNU fileutils package
11887 echo "checking how to get filesystem space usage" 1>&6
11888 echo "configure:11889: checking how to get filesystem space usage" >&5
11889 space=no
11890
11891 # Test for statvfs64.
11892 if test $space = no; then
11893   # SVR4
11894   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
11895 echo "configure:11896: checking statvfs64 function (SVR4)" >&5
11896 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
11897   echo $ac_n "(cached) $ac_c" 1>&6
11898 else
11899   if test "$cross_compiling" = yes; then
11900   fu_cv_sys_stat_statvfs64=cross
11901 else
11902   cat > conftest.$ac_ext <<EOF
11903 #line 11904 "configure"
11904 #include "confdefs.h"
11905
11906 #if defined(HAVE_UNISTD_H)
11907 #include <unistd.h>
11908 #endif
11909 #include <sys/types.h>
11910 #include <sys/statvfs.h>
11911   main ()
11912   {
11913     struct statvfs64 fsd;
11914     exit (statvfs64 (".", &fsd));
11915   }
11916 EOF
11917 if { (eval echo configure:11918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11918 then
11919   fu_cv_sys_stat_statvfs64=yes
11920 else
11921   echo "configure: failed program was:" >&5
11922   cat conftest.$ac_ext >&5
11923   rm -fr conftest*
11924   fu_cv_sys_stat_statvfs64=no
11925 fi
11926 rm -fr conftest*
11927 fi
11928
11929 fi
11930
11931 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
11932   if test $fu_cv_sys_stat_statvfs64 = yes; then
11933     space=yes
11934     cat >> confdefs.h <<\EOF
11935 #define STAT_STATVFS64 1
11936 EOF
11937
11938   fi
11939 fi
11940
11941 # Perform only the link test since it seems there are no variants of the
11942 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
11943 # because that got a false positive on SCO OSR5.  Adding the declaration
11944 # of a `struct statvfs' causes this test to fail (as it should) on such
11945 # systems.  That system is reported to work fine with STAT_STATFS4 which
11946 # is what it gets when this test fails.
11947 if test $space = no; then
11948   # SVR4
11949   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
11950 echo "configure:11951: checking statvfs function (SVR4)" >&5
11951 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
11952   echo $ac_n "(cached) $ac_c" 1>&6
11953 else
11954   cat > conftest.$ac_ext <<EOF
11955 #line 11956 "configure"
11956 #include "confdefs.h"
11957 #include <sys/types.h>
11958 #include <sys/statvfs.h>
11959 int main() {
11960 struct statvfs fsd; statvfs (0, &fsd);
11961 ; return 0; }
11962 EOF
11963 if { (eval echo configure:11964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11964   rm -rf conftest*
11965   fu_cv_sys_stat_statvfs=yes
11966 else
11967   echo "configure: failed program was:" >&5
11968   cat conftest.$ac_ext >&5
11969   rm -rf conftest*
11970   fu_cv_sys_stat_statvfs=no
11971 fi
11972 rm -f conftest*
11973 fi
11974
11975 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
11976   if test $fu_cv_sys_stat_statvfs = yes; then
11977     space=yes
11978     cat >> confdefs.h <<\EOF
11979 #define STAT_STATVFS 1
11980 EOF
11981
11982   fi
11983 fi
11984
11985 if test $space = no; then
11986   # DEC Alpha running OSF/1
11987   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
11988 echo "configure:11989: checking for 3-argument statfs function (DEC OSF/1)" >&5
11989   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
11990   echo $ac_n "(cached) $ac_c" 1>&6
11991 else
11992   if test "$cross_compiling" = yes; then
11993   fu_cv_sys_stat_statfs3_osf1=no
11994 else
11995   cat > conftest.$ac_ext <<EOF
11996 #line 11997 "configure"
11997 #include "confdefs.h"
11998
11999 #include <sys/param.h>
12000 #include <sys/types.h>
12001 #include <sys/mount.h>
12002   main ()
12003   {
12004     struct statfs fsd;
12005     fsd.f_fsize = 0;
12006     exit (statfs (".", &fsd, sizeof (struct statfs)));
12007   }
12008 EOF
12009 if { (eval echo configure:12010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12010 then
12011   fu_cv_sys_stat_statfs3_osf1=yes
12012 else
12013   echo "configure: failed program was:" >&5
12014   cat conftest.$ac_ext >&5
12015   rm -fr conftest*
12016   fu_cv_sys_stat_statfs3_osf1=no
12017 fi
12018 rm -fr conftest*
12019 fi
12020
12021 fi
12022
12023   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
12024   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
12025     space=yes
12026     cat >> confdefs.h <<\EOF
12027 #define STAT_STATFS3_OSF1 1
12028 EOF
12029
12030   fi
12031 fi
12032
12033 if test $space = no; then
12034 # AIX
12035   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
12036 echo "configure:12037: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
12037   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
12038   echo $ac_n "(cached) $ac_c" 1>&6
12039 else
12040   if test "$cross_compiling" = yes; then
12041   fu_cv_sys_stat_statfs2_bsize=no
12042 else
12043   cat > conftest.$ac_ext <<EOF
12044 #line 12045 "configure"
12045 #include "confdefs.h"
12046
12047 #ifdef HAVE_SYS_PARAM_H
12048 #include <sys/param.h>
12049 #endif
12050 #ifdef HAVE_SYS_MOUNT_H
12051 #include <sys/mount.h>
12052 #endif
12053 #ifdef HAVE_SYS_VFS_H
12054 #include <sys/vfs.h>
12055 #endif
12056   main ()
12057   {
12058   struct statfs fsd;
12059   fsd.f_bsize = 0;
12060   exit (statfs (".", &fsd));
12061   }
12062 EOF
12063 if { (eval echo configure:12064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12064 then
12065   fu_cv_sys_stat_statfs2_bsize=yes
12066 else
12067   echo "configure: failed program was:" >&5
12068   cat conftest.$ac_ext >&5
12069   rm -fr conftest*
12070   fu_cv_sys_stat_statfs2_bsize=no
12071 fi
12072 rm -fr conftest*
12073 fi
12074
12075 fi
12076
12077   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
12078   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
12079     space=yes
12080     cat >> confdefs.h <<\EOF
12081 #define STAT_STATFS2_BSIZE 1
12082 EOF
12083
12084   fi
12085 fi
12086
12087 if test $space = no; then
12088 # SVR3
12089   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
12090 echo "configure:12091: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
12091   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
12092   echo $ac_n "(cached) $ac_c" 1>&6
12093 else
12094   if test "$cross_compiling" = yes; then
12095   fu_cv_sys_stat_statfs4=no
12096 else
12097   cat > conftest.$ac_ext <<EOF
12098 #line 12099 "configure"
12099 #include "confdefs.h"
12100 #include <sys/types.h>
12101 #include <sys/statfs.h>
12102   main ()
12103   {
12104   struct statfs fsd;
12105   exit (statfs (".", &fsd, sizeof fsd, 0));
12106   }
12107 EOF
12108 if { (eval echo configure:12109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12109 then
12110   fu_cv_sys_stat_statfs4=yes
12111 else
12112   echo "configure: failed program was:" >&5
12113   cat conftest.$ac_ext >&5
12114   rm -fr conftest*
12115   fu_cv_sys_stat_statfs4=no
12116 fi
12117 rm -fr conftest*
12118 fi
12119
12120 fi
12121
12122   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
12123   if test $fu_cv_sys_stat_statfs4 = yes; then
12124     space=yes
12125     cat >> confdefs.h <<\EOF
12126 #define STAT_STATFS4 1
12127 EOF
12128
12129   fi
12130 fi
12131
12132 if test $space = no; then
12133 # 4.4BSD and NetBSD
12134   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
12135 echo "configure:12136: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
12136   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
12137   echo $ac_n "(cached) $ac_c" 1>&6
12138 else
12139   if test "$cross_compiling" = yes; then
12140   fu_cv_sys_stat_statfs2_fsize=no
12141 else
12142   cat > conftest.$ac_ext <<EOF
12143 #line 12144 "configure"
12144 #include "confdefs.h"
12145 #include <sys/types.h>
12146 #ifdef HAVE_SYS_PARAM_H
12147 #include <sys/param.h>
12148 #endif
12149 #ifdef HAVE_SYS_MOUNT_H
12150 #include <sys/mount.h>
12151 #endif
12152   main ()
12153   {
12154   struct statfs fsd;
12155   fsd.f_fsize = 0;
12156   exit (statfs (".", &fsd));
12157   }
12158 EOF
12159 if { (eval echo configure:12160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12160 then
12161   fu_cv_sys_stat_statfs2_fsize=yes
12162 else
12163   echo "configure: failed program was:" >&5
12164   cat conftest.$ac_ext >&5
12165   rm -fr conftest*
12166   fu_cv_sys_stat_statfs2_fsize=no
12167 fi
12168 rm -fr conftest*
12169 fi
12170
12171 fi
12172
12173   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
12174   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
12175     space=yes
12176     cat >> confdefs.h <<\EOF
12177 #define STAT_STATFS2_FSIZE 1
12178 EOF
12179
12180   fi
12181 fi
12182
12183 if test $space = no; then
12184   # Ultrix
12185   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
12186 echo "configure:12187: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
12187   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
12188   echo $ac_n "(cached) $ac_c" 1>&6
12189 else
12190   if test "$cross_compiling" = yes; then
12191   fu_cv_sys_stat_fs_data=no
12192 else
12193   cat > conftest.$ac_ext <<EOF
12194 #line 12195 "configure"
12195 #include "confdefs.h"
12196 #include <sys/types.h>
12197 #ifdef HAVE_SYS_PARAM_H
12198 #include <sys/param.h>
12199 #endif
12200 #ifdef HAVE_SYS_MOUNT_H
12201 #include <sys/mount.h>
12202 #endif
12203 #ifdef HAVE_SYS_FS_TYPES_H
12204 #include <sys/fs_types.h>
12205 #endif
12206   main ()
12207   {
12208   struct fs_data fsd;
12209   /* Ultrix's statfs returns 1 for success,
12210      0 for not mounted, -1 for failure.  */
12211   exit (statfs (".", &fsd) != 1);
12212   }
12213 EOF
12214 if { (eval echo configure:12215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12215 then
12216   fu_cv_sys_stat_fs_data=yes
12217 else
12218   echo "configure: failed program was:" >&5
12219   cat conftest.$ac_ext >&5
12220   rm -fr conftest*
12221   fu_cv_sys_stat_fs_data=no
12222 fi
12223 rm -fr conftest*
12224 fi
12225
12226 fi
12227
12228   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
12229   if test $fu_cv_sys_stat_fs_data = yes; then
12230     space=yes
12231     cat >> confdefs.h <<\EOF
12232 #define STAT_STATFS2_FS_DATA 1
12233 EOF
12234
12235   fi
12236 fi
12237
12238 #
12239 # As a gating factor for large file support, in order to
12240 # use <4GB files we must have the following minimal support
12241 # available.
12242 # long long, and a 64 bit off_t or off64_t.
12243 # If we don't have all of these then disable large
12244 # file support.
12245 #
12246 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
12247 echo "configure:12248: checking if large file support can be enabled" >&5
12248 cat > conftest.$ac_ext <<EOF
12249 #line 12250 "configure"
12250 #include "confdefs.h"
12251
12252 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
12253 #include <sys/types.h>
12254 #else
12255 __COMPILE_ERROR_
12256 #endif
12257
12258 int main() {
12259 int i
12260 ; return 0; }
12261 EOF
12262 if { (eval echo configure:12263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12263   rm -rf conftest*
12264   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
12265 else
12266   echo "configure: failed program was:" >&5
12267   cat conftest.$ac_ext >&5
12268   rm -rf conftest*
12269   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
12270 fi
12271 rm -f conftest*
12272 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
12273     cat >> confdefs.h <<\EOF
12274 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
12275 EOF
12276
12277 fi
12278 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
12279
12280 # Check whether --with-spinlocks or --without-spinlocks was given.
12281 if test "${with_spinlocks+set}" = set; then
12282   withval="$with_spinlocks"
12283   :
12284 fi
12285
12286 if test "x$with_spinlocks" = "xyes"; then
12287     cat >> confdefs.h <<\EOF
12288 #define USE_SPINLOCKS 1
12289 EOF
12290
12291
12292     case "$host_cpu" in
12293         sparc)
12294             cat >> confdefs.h <<\EOF
12295 #define SPARC_SPINLOCKS 1
12296 EOF
12297
12298             ;;
12299
12300         i386|i486|i586|i686)
12301             cat >> confdefs.h <<\EOF
12302 #define INTEL_SPINLOCKS 1
12303 EOF
12304
12305             ;;
12306
12307         mips)
12308             cat >> confdefs.h <<\EOF
12309 #define MIPS_SPINLOCKS 1
12310 EOF
12311
12312             ;;
12313
12314         powerpc)
12315             cat >> confdefs.h <<\EOF
12316 #define POWERPC_SPINLOCKS 1
12317 EOF
12318
12319             ;;
12320     esac
12321 fi
12322
12323 #################################################
12324 # check for ACL support
12325
12326 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
12327 echo "configure:12328: checking whether to support ACLs" >&5
12328 # Check whether --with-acl-support or --without-acl-support was given.
12329 if test "${with_acl_support+set}" = set; then
12330   withval="$with_acl_support"
12331    case "$withval" in
12332   yes)
12333
12334         case "$host_os" in
12335         *sysv5*)
12336             echo "$ac_t""Using UnixWare ACLs" 1>&6
12337             cat >> confdefs.h <<\EOF
12338 #define HAVE_UNIXWARE_ACLS 1
12339 EOF
12340
12341             ;;
12342         *solaris*)
12343             echo "$ac_t""Using solaris ACLs" 1>&6
12344             cat >> confdefs.h <<\EOF
12345 #define HAVE_SOLARIS_ACLS 1
12346 EOF
12347
12348             ;;
12349                 *irix*)
12350                         echo "$ac_t""Using IRIX ACLs" 1>&6
12351                         cat >> confdefs.h <<\EOF
12352 #define HAVE_IRIX_ACLS 1
12353 EOF
12354
12355                         ;;
12356                 *aix*)
12357                         echo "$ac_t""Using AIX ACLs" 1>&6
12358                         cat >> confdefs.h <<\EOF
12359 #define HAVE_AIX_ACLS 1
12360 EOF
12361
12362                         ;;
12363                 *osf*)
12364                         echo "$ac_t""Using Tru64 ACLs" 1>&6
12365                         cat >> confdefs.h <<\EOF
12366 #define HAVE_TRU64_ACLS 1
12367 EOF
12368
12369                         LIBS="$LIBS -lpacl"
12370                         ;;
12371         *)
12372                         echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
12373 echo "configure:12374: checking for acl_get_file in -lacl" >&5
12374 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
12375 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12376   echo $ac_n "(cached) $ac_c" 1>&6
12377 else
12378   ac_save_LIBS="$LIBS"
12379 LIBS="-lacl  $LIBS"
12380 cat > conftest.$ac_ext <<EOF
12381 #line 12382 "configure"
12382 #include "confdefs.h"
12383 /* Override any gcc2 internal prototype to avoid an error.  */
12384 /* We use char because int might match the return type of a gcc2
12385     builtin and then its argument prototype would still apply.  */
12386 char acl_get_file();
12387
12388 int main() {
12389 acl_get_file()
12390 ; return 0; }
12391 EOF
12392 if { (eval echo configure:12393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12393   rm -rf conftest*
12394   eval "ac_cv_lib_$ac_lib_var=yes"
12395 else
12396   echo "configure: failed program was:" >&5
12397   cat conftest.$ac_ext >&5
12398   rm -rf conftest*
12399   eval "ac_cv_lib_$ac_lib_var=no"
12400 fi
12401 rm -f conftest*
12402 LIBS="$ac_save_LIBS"
12403
12404 fi
12405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12406   echo "$ac_t""yes" 1>&6
12407     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12408     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12409   cat >> confdefs.h <<EOF
12410 #define $ac_tr_lib 1
12411 EOF
12412
12413   LIBS="-lacl $LIBS"
12414
12415 else
12416   echo "$ac_t""no" 1>&6
12417 fi
12418
12419                         echo $ac_n "checking for ACL support""... $ac_c" 1>&6
12420 echo "configure:12421: checking for ACL support" >&5
12421 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
12422   echo $ac_n "(cached) $ac_c" 1>&6
12423 else
12424   
12425                         cat > conftest.$ac_ext <<EOF
12426 #line 12427 "configure"
12427 #include "confdefs.h"
12428 #include <sys/types.h>
12429 #include <sys/acl.h>
12430 int main() {
12431  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
12432 ; return 0; }
12433 EOF
12434 if { (eval echo configure:12435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12435   rm -rf conftest*
12436   samba_cv_HAVE_POSIX_ACLS=yes
12437 else
12438   echo "configure: failed program was:" >&5
12439   cat conftest.$ac_ext >&5
12440   rm -rf conftest*
12441   samba_cv_HAVE_POSIX_ACLS=no
12442 fi
12443 rm -f conftest*
12444 fi
12445
12446 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
12447                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
12448                                 echo "$ac_t""Using posix ACLs" 1>&6
12449                                 cat >> confdefs.h <<\EOF
12450 #define HAVE_POSIX_ACLS 1
12451 EOF
12452
12453                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
12454 echo "configure:12455: checking for acl_get_perm_np" >&5
12455 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
12456   echo $ac_n "(cached) $ac_c" 1>&6
12457 else
12458   
12459                                 cat > conftest.$ac_ext <<EOF
12460 #line 12461 "configure"
12461 #include "confdefs.h"
12462 #include <sys/types.h>
12463 #include <sys/acl.h>
12464 int main() {
12465  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
12466 ; return 0; }
12467 EOF
12468 if { (eval echo configure:12469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12469   rm -rf conftest*
12470   samba_cv_HAVE_ACL_GET_PERM_NP=yes
12471 else
12472   echo "configure: failed program was:" >&5
12473   cat conftest.$ac_ext >&5
12474   rm -rf conftest*
12475   samba_cv_HAVE_ACL_GET_PERM_NP=no
12476 fi
12477 rm -f conftest*
12478 fi
12479
12480 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
12481                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
12482                                         cat >> confdefs.h <<\EOF
12483 #define HAVE_ACL_GET_PERM_NP 1
12484 EOF
12485
12486                                 fi
12487                         fi
12488             ;;
12489         esac
12490         ;;
12491   *)
12492     echo "$ac_t""no" 1>&6
12493     cat >> confdefs.h <<\EOF
12494 #define HAVE_NO_ACLS 1
12495 EOF
12496
12497     ;;
12498   esac 
12499 else
12500   cat >> confdefs.h <<\EOF
12501 #define HAVE_NO_ACLS 1
12502 EOF
12503
12504   echo "$ac_t""no" 1>&6
12505
12506 fi
12507
12508
12509 #################################################
12510 # Check whether winbind is supported on this platform.  If so we need to
12511 # build and install client programs (WINBIND_TARGETS), sbin programs
12512 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
12513
12514 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
12515 echo "configure:12516: checking whether to build winbind" >&5
12516
12517 # Initially, the value of $host_os decides whether winbind is supported
12518
12519 case "$host_os" in 
12520         *linux*|*solaris*)
12521                 HAVE_WINBIND=yes
12522                 ;;
12523         *)
12524                 HAVE_WINBIND=no
12525                 winbind_no_reason=", unsupported on $host_os"
12526                 ;;
12527 esac
12528
12529 # Check the setting of --with-winbindd
12530
12531 # Check whether --with-winbind or --without-winbind was given.
12532 if test "${with_winbind+set}" = set; then
12533   withval="$with_winbind"
12534    
12535   case "$withval" in
12536         yes)
12537                 HAVE_WINBIND=yes
12538                 ;;
12539         no)
12540                 HAVE_WINBIND=no
12541                 winbind_reason=""
12542                 ;;
12543   esac 
12544 fi
12545
12546
12547 # We need unix domain sockets for winbind
12548
12549 if test x"$HAVE_WINBIND" = x"yes"; then
12550         if test x"$samba_cv_unixsocket" = x"no"; then
12551                 winbind_no_reason=", no unix domain socket support on $host_os"
12552                 HAVE_WINBIND=no
12553         fi
12554 fi
12555
12556 # Display test results
12557
12558 if test x"$HAVE_WINBIND" = x"yes"; then
12559
12560         echo "$ac_t""yes" 1>&6
12561
12562         WINBIND_TARGETS="\$(WINBIND_PROGS)"
12563         WINBIND_STARGETS="\$(WINBIND_SPROGS)"
12564         WINBIND_LTARGETS="\$(WINBIND_LPROGS)"
12565
12566         case "$with_pam" in
12567                 yes)
12568                         WINBIND_PAM_PROGS="\$(WINBIND_PAM_PROGS)"
12569                 ;;
12570         esac
12571 else
12572         echo "$ac_t""no$winbind_no_reason" 1>&6
12573
12574         WINBIND_TARGETS=""
12575         WINBIND_STARGETS=""
12576         WINBIND_LTARGETS=""
12577         WINBIND_PAM_PROGS=""
12578 fi
12579
12580 # Substitution time!
12581
12582
12583
12584
12585
12586
12587 #################################################
12588 # final configure stuff
12589
12590 echo "checking configure summary"
12591 if test "$cross_compiling" = yes; then
12592   :
12593 else
12594   cat > conftest.$ac_ext <<EOF
12595 #line 12596 "configure"
12596 #include "confdefs.h"
12597 #include "${srcdir-.}/tests/summary.c"
12598 EOF
12599 if { (eval echo configure:12600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12600 then
12601   echo "configure OK";
12602 else
12603   echo "configure: failed program was:" >&5
12604   cat conftest.$ac_ext >&5
12605   rm -fr conftest*
12606   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
12607 fi
12608 rm -fr conftest*
12609 fi
12610
12611
12612 builddir=`pwd`
12613
12614
12615 trap '' 1 2 15
12616 cat > confcache <<\EOF
12617 # This file is a shell script that caches the results of configure
12618 # tests run on this system so they can be shared between configure
12619 # scripts and configure runs.  It is not useful on other systems.
12620 # If it contains results you don't want to keep, you may remove or edit it.
12621 #
12622 # By default, configure uses ./config.cache as the cache file,
12623 # creating it if it does not exist already.  You can give configure
12624 # the --cache-file=FILE option to use a different cache file; that is
12625 # what configure does when it calls configure scripts in
12626 # subdirectories, so they share the cache.
12627 # Giving --cache-file=/dev/null disables caching, for debugging configure.
12628 # config.status only pays attention to the cache file if you give it the
12629 # --recheck option to rerun configure.
12630 #
12631 EOF
12632 # The following way of writing the cache mishandles newlines in values,
12633 # but we know of no workaround that is simple, portable, and efficient.
12634 # So, don't put newlines in cache variables' values.
12635 # Ultrix sh set writes to stderr and can't be redirected directly,
12636 # and sets the high bit in the cache file unless we assign to the vars.
12637 (set) 2>&1 |
12638   case `(ac_space=' '; set | grep ac_space) 2>&1` in
12639   *ac_space=\ *)
12640     # `set' does not quote correctly, so add quotes (double-quote substitution
12641     # turns \\\\ into \\, and sed turns \\ into \).
12642     sed -n \
12643       -e "s/'/'\\\\''/g" \
12644       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
12645     ;;
12646   *)
12647     # `set' quotes correctly as required by POSIX, so do not add quotes.
12648     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
12649     ;;
12650   esac >> confcache
12651 if cmp -s $cache_file confcache; then
12652   :
12653 else
12654   if test -w $cache_file; then
12655     echo "updating cache $cache_file"
12656     cat confcache > $cache_file
12657   else
12658     echo "not updating unwritable cache $cache_file"
12659   fi
12660 fi
12661 rm -f confcache
12662
12663 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12664
12665 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12666 # Let make expand exec_prefix.
12667 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12668
12669 # Any assignment to VPATH causes Sun make to only execute
12670 # the first set of double-colon rules, so remove it if not needed.
12671 # If there is a colon in the path, we need to keep it.
12672 if test "x$srcdir" = x.; then
12673   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12674 fi
12675
12676 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12677
12678 DEFS=-DHAVE_CONFIG_H
12679
12680 # Without the "./", some shells look in PATH for config.status.
12681 : ${CONFIG_STATUS=./config.status}
12682
12683 echo creating $CONFIG_STATUS
12684 rm -f $CONFIG_STATUS
12685 cat > $CONFIG_STATUS <<EOF
12686 #! /bin/sh
12687 # Generated automatically by configure.
12688 # Run this file to recreate the current configuration.
12689 # This directory was configured as follows,
12690 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12691 #
12692 # $0 $ac_configure_args
12693 #
12694 # Compiler output produced by configure, useful for debugging
12695 # configure, is in ./config.log if it exists.
12696
12697 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12698 for ac_option
12699 do
12700   case "\$ac_option" in
12701   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12702     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12703     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12704   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12705     echo "$CONFIG_STATUS generated by autoconf version 2.13"
12706     exit 0 ;;
12707   -help | --help | --hel | --he | --h)
12708     echo "\$ac_cs_usage"; exit 0 ;;
12709   *) echo "\$ac_cs_usage"; exit 1 ;;
12710   esac
12711 done
12712
12713 ac_given_srcdir=$srcdir
12714 ac_given_INSTALL="$INSTALL"
12715
12716 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12717 EOF
12718 cat >> $CONFIG_STATUS <<EOF
12719
12720 # Protect against being on the right side of a sed subst in config.status.
12721 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12722  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12723 $ac_vpsub
12724 $extrasub
12725 s%@SHELL@%$SHELL%g
12726 s%@CFLAGS@%$CFLAGS%g
12727 s%@CPPFLAGS@%$CPPFLAGS%g
12728 s%@CXXFLAGS@%$CXXFLAGS%g
12729 s%@FFLAGS@%$FFLAGS%g
12730 s%@DEFS@%$DEFS%g
12731 s%@LDFLAGS@%$LDFLAGS%g
12732 s%@LIBS@%$LIBS%g
12733 s%@exec_prefix@%$exec_prefix%g
12734 s%@prefix@%$prefix%g
12735 s%@program_transform_name@%$program_transform_name%g
12736 s%@bindir@%$bindir%g
12737 s%@sbindir@%$sbindir%g
12738 s%@libexecdir@%$libexecdir%g
12739 s%@datadir@%$datadir%g
12740 s%@sysconfdir@%$sysconfdir%g
12741 s%@sharedstatedir@%$sharedstatedir%g
12742 s%@localstatedir@%$localstatedir%g
12743 s%@libdir@%$libdir%g
12744 s%@includedir@%$includedir%g
12745 s%@oldincludedir@%$oldincludedir%g
12746 s%@infodir@%$infodir%g
12747 s%@mandir@%$mandir%g
12748 s%@RUNPROG@%$RUNPROG%g
12749 s%@MPROGS@%$MPROGS%g
12750 s%@LDSHFLAGS@%$LDSHFLAGS%g
12751 s%@SHLD@%$SHLD%g
12752 s%@HOST_OS@%$HOST_OS%g
12753 s%@PAM_MOD@%$PAM_MOD%g
12754 s%@WRAP@%$WRAP%g
12755 s%@WRAP32@%$WRAP32%g
12756 s%@PICFLAG@%$PICFLAG%g
12757 s%@PICSUFFIX@%$PICSUFFIX%g
12758 s%@POBAD_CC@%$POBAD_CC%g
12759 s%@SHLIBEXT@%$SHLIBEXT%g
12760 s%@BLDSHARED@%$BLDSHARED%g
12761 s%@CC@%$CC%g
12762 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12763 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
12764 s%@INSTALL_DATA@%$INSTALL_DATA%g
12765 s%@AWK@%$AWK%g
12766 s%@BROKEN_CC@%$BROKEN_CC%g
12767 s%@host@%$host%g
12768 s%@host_alias@%$host_alias%g
12769 s%@host_cpu@%$host_cpu%g
12770 s%@host_vendor@%$host_vendor%g
12771 s%@host_os@%$host_os%g
12772 s%@target@%$target%g
12773 s%@target_alias@%$target_alias%g
12774 s%@target_cpu@%$target_cpu%g
12775 s%@target_vendor@%$target_vendor%g
12776 s%@target_os@%$target_os%g
12777 s%@build@%$build%g
12778 s%@build_alias@%$build_alias%g
12779 s%@build_cpu@%$build_cpu%g
12780 s%@build_vendor@%$build_vendor%g
12781 s%@build_os@%$build_os%g
12782 s%@CPP@%$CPP%g
12783 s%@LIBOBJS@%$LIBOBJS%g
12784 s%@TERMLIBS@%$TERMLIBS%g
12785 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
12786 s%@ROFF@%$ROFF%g
12787 s%@QUOTAOBJS@%$QUOTAOBJS%g
12788 s%@privatedir@%$privatedir%g
12789 s%@lockdir@%$lockdir%g
12790 s%@swatdir@%$swatdir%g
12791 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
12792 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
12793 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
12794 s%@WINBIND_PAM_PROGS@%$WINBIND_PAM_PROGS%g
12795 s%@builddir@%$builddir%g
12796
12797 CEOF
12798 EOF
12799
12800 cat >> $CONFIG_STATUS <<\EOF
12801
12802 # Split the substitutions into bite-sized pieces for seds with
12803 # small command number limits, like on Digital OSF/1 and HP-UX.
12804 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
12805 ac_file=1 # Number of current file.
12806 ac_beg=1 # First line for current file.
12807 ac_end=$ac_max_sed_cmds # Line after last line for current file.
12808 ac_more_lines=:
12809 ac_sed_cmds=""
12810 while $ac_more_lines; do
12811   if test $ac_beg -gt 1; then
12812     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
12813   else
12814     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
12815   fi
12816   if test ! -s conftest.s$ac_file; then
12817     ac_more_lines=false
12818     rm -f conftest.s$ac_file
12819   else
12820     if test -z "$ac_sed_cmds"; then
12821       ac_sed_cmds="sed -f conftest.s$ac_file"
12822     else
12823       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
12824     fi
12825     ac_file=`expr $ac_file + 1`
12826     ac_beg=$ac_end
12827     ac_end=`expr $ac_end + $ac_max_sed_cmds`
12828   fi
12829 done
12830 if test -z "$ac_sed_cmds"; then
12831   ac_sed_cmds=cat
12832 fi
12833 EOF
12834
12835 cat >> $CONFIG_STATUS <<EOF
12836
12837 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
12838 EOF
12839 cat >> $CONFIG_STATUS <<\EOF
12840 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
12841   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12842   case "$ac_file" in
12843   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12844        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12845   *) ac_file_in="${ac_file}.in" ;;
12846   esac
12847
12848   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
12849
12850   # Remove last slash and all that follows it.  Not all systems have dirname.
12851   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12852   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12853     # The file is in a subdirectory.
12854     test ! -d "$ac_dir" && mkdir "$ac_dir"
12855     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
12856     # A "../" for each directory in $ac_dir_suffix.
12857     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
12858   else
12859     ac_dir_suffix= ac_dots=
12860   fi
12861
12862   case "$ac_given_srcdir" in
12863   .)  srcdir=.
12864       if test -z "$ac_dots"; then top_srcdir=.
12865       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
12866   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
12867   *) # Relative path.
12868     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
12869     top_srcdir="$ac_dots$ac_given_srcdir" ;;
12870   esac
12871
12872   case "$ac_given_INSTALL" in
12873   [/$]*) INSTALL="$ac_given_INSTALL" ;;
12874   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
12875   esac
12876
12877   echo creating "$ac_file"
12878   rm -f "$ac_file"
12879   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
12880   case "$ac_file" in
12881   *Makefile*) ac_comsub="1i\\
12882 # $configure_input" ;;
12883   *) ac_comsub= ;;
12884   esac
12885
12886   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12887   sed -e "$ac_comsub
12888 s%@configure_input@%$configure_input%g
12889 s%@srcdir@%$srcdir%g
12890 s%@top_srcdir@%$top_srcdir%g
12891 s%@INSTALL@%$INSTALL%g
12892 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
12893 fi; done
12894 rm -f conftest.s*
12895
12896 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12897 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12898 #
12899 # ac_d sets the value in "#define NAME VALUE" lines.
12900 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12901 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
12902 ac_dC='\3'
12903 ac_dD='%g'
12904 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12905 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12906 ac_uB='\([      ]\)%\1#\2define\3'
12907 ac_uC=' '
12908 ac_uD='\4%g'
12909 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12910 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12911 ac_eB='$%\1#\2define\3'
12912 ac_eC=' '
12913 ac_eD='%g'
12914
12915 if test "${CONFIG_HEADERS+set}" != set; then
12916 EOF
12917 cat >> $CONFIG_STATUS <<EOF
12918   CONFIG_HEADERS="include/config.h"
12919 EOF
12920 cat >> $CONFIG_STATUS <<\EOF
12921 fi
12922 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
12923   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12924   case "$ac_file" in
12925   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12926        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12927   *) ac_file_in="${ac_file}.in" ;;
12928   esac
12929
12930   echo creating $ac_file
12931
12932   rm -f conftest.frag conftest.in conftest.out
12933   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12934   cat $ac_file_inputs > conftest.in
12935
12936 EOF
12937
12938 # Transform confdefs.h into a sed script conftest.vals that substitutes
12939 # the proper values into config.h.in to produce config.h.  And first:
12940 # Protect against being on the right side of a sed subst in config.status.
12941 # Protect against being in an unquoted here document in config.status.
12942 rm -f conftest.vals
12943 cat > conftest.hdr <<\EOF
12944 s/[\\&%]/\\&/g
12945 s%[\\$`]%\\&%g
12946 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
12947 s%ac_d%ac_u%gp
12948 s%ac_u%ac_e%gp
12949 EOF
12950 sed -n -f conftest.hdr confdefs.h > conftest.vals
12951 rm -f conftest.hdr
12952
12953 # This sed command replaces #undef with comments.  This is necessary, for
12954 # example, in the case of _POSIX_SOURCE, which is predefined and required
12955 # on some systems where configure will not decide to define it.
12956 cat >> conftest.vals <<\EOF
12957 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
12958 EOF
12959
12960 # Break up conftest.vals because some shells have a limit on
12961 # the size of here documents, and old seds have small limits too.
12962
12963 rm -f conftest.tail
12964 while :
12965 do
12966   ac_lines=`grep -c . conftest.vals`
12967   # grep -c gives empty output for an empty file on some AIX systems.
12968   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
12969   # Write a limited-size here document to conftest.frag.
12970   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
12971   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
12972   echo 'CEOF
12973   sed -f conftest.frag conftest.in > conftest.out
12974   rm -f conftest.in
12975   mv conftest.out conftest.in
12976 ' >> $CONFIG_STATUS
12977   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12978   rm -f conftest.vals
12979   mv conftest.tail conftest.vals
12980 done
12981 rm -f conftest.vals
12982
12983 cat >> $CONFIG_STATUS <<\EOF
12984   rm -f conftest.frag conftest.h
12985   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
12986   cat conftest.in >> conftest.h
12987   rm -f conftest.in
12988   if cmp -s $ac_file conftest.h 2>/dev/null; then
12989     echo "$ac_file is unchanged"
12990     rm -f conftest.h
12991   else
12992     # Remove last slash and all that follows it.  Not all systems have dirname.
12993       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12994       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12995       # The file is in a subdirectory.
12996       test ! -d "$ac_dir" && mkdir "$ac_dir"
12997     fi
12998     rm -f $ac_file
12999     mv conftest.h $ac_file
13000   fi
13001 fi; done
13002
13003 EOF
13004 cat >> $CONFIG_STATUS <<EOF
13005
13006 EOF
13007 cat >> $CONFIG_STATUS <<\EOF
13008
13009 exit 0
13010 EOF
13011 chmod +x $CONFIG_STATUS
13012 rm -fr confdefs* $ac_clean_files
13013 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
13014