added a --with-libiconv=BASEDIR/ option to allow easier use of an
[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-codepagedir=DIR     Where to put codepage files (\$libdir/codepages)"
19 ac_help="$ac_help
20   --with-readline[=DIR]   Look for readline include/libs in DIR
21   --without-readline      Don't include readline support"
22 ac_help="$ac_help
23   --with-libiconv=BASEDIR     use libiconv in BASEDIR/lib and BASEDIR/include
24   --without-libiconv          Don't use libiconv library"
25 ac_help="$ac_help
26   --with-smbwrapper     Include SMB wrapper support
27   --without-smbwrapper  Don't include SMB wrapper support (default)"
28 ac_help="$ac_help
29   --with-afs     Include AFS support
30   --without-afs  Don't include AFS support (default)"
31 ac_help="$ac_help
32   --with-dfs     Include DFS support
33   --without-dfs  Don't include DFS support (default)"
34 ac_help="$ac_help
35   --with-krb4=base-dir     Include Kerberos IV support
36   --without-krb4          Don't include Kerberos IV support (default)"
37 ac_help="$ac_help
38   --with-krb5=base-dir     Include Kerberos 5 support
39   --without-krb5          Don't include Kerberos 5 support (default)"
40 ac_help="$ac_help
41   --with-automount     Include AUTOMOUNT support
42   --without-automount  Don't include AUTOMOUNT support (default)"
43 ac_help="$ac_help
44   --with-smbmount     Include SMBMOUNT (Linux only) support
45   --without-smbmount  Don't include SMBMOUNT support (default)"
46 ac_help="$ac_help
47   --with-pam     Include PAM password database support
48   --without-pam  Don't include PAM password database support (default)"
49 ac_help="$ac_help
50   --with-pam_smbpass     Include the smbpass PAM module
51   --without-pam_smbpass  Don't include the smbpass PAM module (default)"
52 ac_help="$ac_help
53   --with-tdbsam   Include experimental TDB password database
54   --without-tdbsam  Don't include experimental TDB password database (default)"
55 ac_help="$ac_help
56   --with-ldap     Include LDAP support
57   --without-ldap  Don't include LDAP support (default)"
58 ac_help="$ac_help
59   --with-nisplus     Include NISPLUS password database support
60   --without-nisplus  Don't include NISPLUS password database support (default)"
61 ac_help="$ac_help
62   --with-nisplus-home     Include NISPLUS_HOME support
63   --without-nisplus-home  Don't include NISPLUS_HOME support (default)"
64 ac_help="$ac_help
65   --with-ssl     Include SSL support
66   --without-ssl  Don't include SSL support (default)
67   --with-sslinc=DIR Where the SSL includes are (defaults to /usr/local/ssl)"
68 ac_help="$ac_help
69   --with-syslog     Include experimental SYSLOG support
70   --without-syslog  Don't include SYSLOG support (default)"
71 ac_help="$ac_help
72   --with-profile     Include profile support
73   --without-profile  Don't include profile support (default)"
74 ac_help="$ac_help
75   --with-netatalk     Include experimental Netatalk support
76   --without-netatalk  Don't include experimental Netatalk support (default)"
77 ac_help="$ac_help
78   --with-quotas     Include experimental disk-quota support
79   --without-quotas  Don't include experimental disk-quota support (default)"
80 ac_help="$ac_help
81   --with-utmp     Include experimental utmp accounting
82   --without-utmp  Don't include experimental utmp accounting (default)"
83 ac_help="$ac_help
84   --with-msdfs          Include MS Dfs support
85   --without-msdfs       Don't include MS Dfs support (default)"
86 ac_help="$ac_help
87   --with-privatedir=DIR     Where to put smbpasswd ($ac_default_prefix/private)"
88 ac_help="$ac_help
89   --with-lockdir=DIR     Where to put lock files ($ac_default_prefix/var/locks)"
90 ac_help="$ac_help
91   --with-swatdir=DIR     Where to put SWAT files ($ac_default_prefix/swat)"
92 ac_help="$ac_help
93   --with-spinlocks        use spin locks instead of fcntl locks "
94 ac_help="$ac_help
95   --with-acl-support        Include ACL support
96   --without-acl-support  Don't include ACL support (default)"
97 ac_help="$ac_help
98   --with-winbind        Build winbind library (default, if supported by OS)
99   --without-winbind     Don't build winbind library"
100
101 # Initialize some variables set by options.
102 # The variables have the same names as the options, with
103 # dashes changed to underlines.
104 build=NONE
105 cache_file=./config.cache
106 exec_prefix=NONE
107 host=NONE
108 no_create=
109 nonopt=NONE
110 no_recursion=
111 prefix=NONE
112 program_prefix=NONE
113 program_suffix=NONE
114 program_transform_name=s,x,x,
115 silent=
116 site=
117 srcdir=
118 target=NONE
119 verbose=
120 x_includes=NONE
121 x_libraries=NONE
122 bindir='${exec_prefix}/bin'
123 sbindir='${exec_prefix}/sbin'
124 libexecdir='${exec_prefix}/libexec'
125 datadir='${prefix}/share'
126 sysconfdir='${prefix}/etc'
127 sharedstatedir='${prefix}/com'
128 localstatedir='${prefix}/var'
129 libdir='${exec_prefix}/lib'
130 includedir='${prefix}/include'
131 oldincludedir='/usr/include'
132 infodir='${prefix}/info'
133 mandir='${prefix}/man'
134
135 # Initialize some other variables.
136 subdirs=
137 MFLAGS= MAKEFLAGS=
138 SHELL=${CONFIG_SHELL-/bin/sh}
139 # Maximum number of lines to put in a shell here document.
140 ac_max_here_lines=12
141
142 ac_prev=
143 for ac_option
144 do
145
146   # If the previous option needs an argument, assign it.
147   if test -n "$ac_prev"; then
148     eval "$ac_prev=\$ac_option"
149     ac_prev=
150     continue
151   fi
152
153   case "$ac_option" in
154   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
155   *) ac_optarg= ;;
156   esac
157
158   # Accept the important Cygnus configure options, so we can diagnose typos.
159
160   case "$ac_option" in
161
162   -bindir | --bindir | --bindi | --bind | --bin | --bi)
163     ac_prev=bindir ;;
164   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
165     bindir="$ac_optarg" ;;
166
167   -build | --build | --buil | --bui | --bu)
168     ac_prev=build ;;
169   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
170     build="$ac_optarg" ;;
171
172   -cache-file | --cache-file | --cache-fil | --cache-fi \
173   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
174     ac_prev=cache_file ;;
175   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
176   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
177     cache_file="$ac_optarg" ;;
178
179   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
180     ac_prev=datadir ;;
181   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
182   | --da=*)
183     datadir="$ac_optarg" ;;
184
185   -disable-* | --disable-*)
186     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
187     # Reject names that are not valid shell variable names.
188     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
189       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
190     fi
191     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
192     eval "enable_${ac_feature}=no" ;;
193
194   -enable-* | --enable-*)
195     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
196     # Reject names that are not valid shell variable names.
197     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
198       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
199     fi
200     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
201     case "$ac_option" in
202       *=*) ;;
203       *) ac_optarg=yes ;;
204     esac
205     eval "enable_${ac_feature}='$ac_optarg'" ;;
206
207   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
208   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
209   | --exec | --exe | --ex)
210     ac_prev=exec_prefix ;;
211   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
212   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
213   | --exec=* | --exe=* | --ex=*)
214     exec_prefix="$ac_optarg" ;;
215
216   -gas | --gas | --ga | --g)
217     # Obsolete; use --with-gas.
218     with_gas=yes ;;
219
220   -help | --help | --hel | --he)
221     # Omit some internal or obsolete options to make the list less imposing.
222     # This message is too long to be a string in the A/UX 3.1 sh.
223     cat << EOF
224 Usage: configure [options] [host]
225 Options: [defaults in brackets after descriptions]
226 Configuration:
227   --cache-file=FILE       cache test results in FILE
228   --help                  print this message
229   --no-create             do not create output files
230   --quiet, --silent       do not print \`checking...' messages
231   --version               print the version of autoconf that created configure
232 Directory and file names:
233   --prefix=PREFIX         install architecture-independent files in PREFIX
234                           [$ac_default_prefix]
235   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
236                           [same as prefix]
237   --bindir=DIR            user executables in DIR [EPREFIX/bin]
238   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
239   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
240   --datadir=DIR           read-only architecture-independent data in DIR
241                           [PREFIX/share]
242   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
243   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
244                           [PREFIX/com]
245   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
246   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
247   --includedir=DIR        C header files in DIR [PREFIX/include]
248   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
249   --infodir=DIR           info documentation in DIR [PREFIX/info]
250   --mandir=DIR            man documentation in DIR [PREFIX/man]
251   --srcdir=DIR            find the sources in DIR [configure dir or ..]
252   --program-prefix=PREFIX prepend PREFIX to installed program names
253   --program-suffix=SUFFIX append SUFFIX to installed program names
254   --program-transform-name=PROGRAM
255                           run sed PROGRAM on installed program names
256 EOF
257     cat << EOF
258 Host type:
259   --build=BUILD           configure for building on BUILD [BUILD=HOST]
260   --host=HOST             configure for HOST [guessed]
261   --target=TARGET         configure for TARGET [TARGET=HOST]
262 Features and packages:
263   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
264   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
265   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
266   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
267   --x-includes=DIR        X include files are in DIR
268   --x-libraries=DIR       X library files are in DIR
269 EOF
270     if test -n "$ac_help"; then
271       echo "--enable and --with options recognized:$ac_help"
272     fi
273     exit 0 ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host="$ac_optarg" ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir="$ac_optarg" ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir="$ac_optarg" ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir="$ac_optarg" ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir="$ac_optarg" ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir="$ac_optarg" ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir="$ac_optarg" ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir="$ac_optarg" ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix="$ac_optarg" ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix="$ac_optarg" ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix="$ac_optarg" ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name="$ac_optarg" ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir="$ac_optarg" ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir="$ac_optarg" ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site="$ac_optarg" ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir="$ac_optarg" ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir="$ac_optarg" ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target="$ac_optarg" ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers)
422     echo "configure generated by autoconf version 2.13"
423     exit 0 ;;
424
425   -with-* | --with-*)
426     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
427     # Reject names that are not valid shell variable names.
428     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
429       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
430     fi
431     ac_package=`echo $ac_package| sed 's/-/_/g'`
432     case "$ac_option" in
433       *=*) ;;
434       *) ac_optarg=yes ;;
435     esac
436     eval "with_${ac_package}='$ac_optarg'" ;;
437
438   -without-* | --without-*)
439     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
440     # Reject names that are not valid shell variable names.
441     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
442       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
443     fi
444     ac_package=`echo $ac_package| sed 's/-/_/g'`
445     eval "with_${ac_package}=no" ;;
446
447   --x)
448     # Obsolete; use --with-x.
449     with_x=yes ;;
450
451   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
452   | --x-incl | --x-inc | --x-in | --x-i)
453     ac_prev=x_includes ;;
454   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
455   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
456     x_includes="$ac_optarg" ;;
457
458   -x-libraries | --x-libraries | --x-librarie | --x-librari \
459   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
460     ac_prev=x_libraries ;;
461   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
462   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
463     x_libraries="$ac_optarg" ;;
464
465   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
466     ;;
467
468   *)
469     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
470       echo "configure: warning: $ac_option: invalid host type" 1>&2
471     fi
472     if test "x$nonopt" != xNONE; then
473       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
474     fi
475     nonopt="$ac_option"
476     ;;
477
478   esac
479 done
480
481 if test -n "$ac_prev"; then
482   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
483 fi
484
485 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
486
487 # File descriptor usage:
488 # 0 standard input
489 # 1 file creation
490 # 2 errors and warnings
491 # 3 some systems may open it to /dev/tty
492 # 4 used on the Kubota Titan
493 # 6 checking for... messages and results
494 # 5 compiler messages saved in config.log
495 if test "$silent" = yes; then
496   exec 6>/dev/null
497 else
498   exec 6>&1
499 fi
500 exec 5>./config.log
501
502 echo "\
503 This file contains any messages produced by compilers while
504 running configure, to aid debugging if configure makes a mistake.
505 " 1>&5
506
507 # Strip out --no-create and --no-recursion so they do not pile up.
508 # Also quote any args containing shell metacharacters.
509 ac_configure_args=
510 for ac_arg
511 do
512   case "$ac_arg" in
513   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
514   | --no-cr | --no-c) ;;
515   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
516   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
517   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
518   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
519   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
520   esac
521 done
522
523 # NLS nuisances.
524 # Only set these to C if already set.  These must not be set unconditionally
525 # because not all systems understand e.g. LANG=C (notably SCO).
526 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
527 # Non-C LC_CTYPE values break the ctype check.
528 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
529 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
530 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
531 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
532
533 # confdefs.h avoids OS command line length limits that DEFS can exceed.
534 rm -rf conftest* confdefs.h
535 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
536 echo > confdefs.h
537
538 # A filename unique to this package, relative to the directory that
539 # configure is in, which we can look for to find out if srcdir is correct.
540 ac_unique_file=include/includes.h
541
542 # Find the source files, if location was not specified.
543 if test -z "$srcdir"; then
544   ac_srcdir_defaulted=yes
545   # Try the directory containing this script, then its parent.
546   ac_prog=$0
547   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
548   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
549   srcdir=$ac_confdir
550   if test ! -r $srcdir/$ac_unique_file; then
551     srcdir=..
552   fi
553 else
554   ac_srcdir_defaulted=no
555 fi
556 if test ! -r $srcdir/$ac_unique_file; then
557   if test "$ac_srcdir_defaulted" = yes; then
558     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
559   else
560     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
561   fi
562 fi
563 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
564
565 # Prefer explicitly selected file to automatically selected ones.
566 if test -z "$CONFIG_SITE"; then
567   if test "x$prefix" != xNONE; then
568     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
569   else
570     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
571   fi
572 fi
573 for ac_site_file in $CONFIG_SITE; do
574   if test -r "$ac_site_file"; then
575     echo "loading site script $ac_site_file"
576     . "$ac_site_file"
577   fi
578 done
579
580 if test -r "$cache_file"; then
581   echo "loading cache $cache_file"
582   . $cache_file
583 else
584   echo "creating cache $cache_file"
585   > $cache_file
586 fi
587
588 ac_ext=c
589 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
590 ac_cpp='$CPP $CPPFLAGS'
591 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
592 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
593 cross_compiling=$ac_cv_prog_cc_cross
594
595 ac_exeext=
596 ac_objext=o
597 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
598   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
599   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
600     ac_n= ac_c='
601 ' ac_t='        '
602   else
603     ac_n=-n ac_c= ac_t=
604   fi
605 else
606   ac_n= ac_c='\c' ac_t=
607 fi
608
609
610
611 # we want to be compatibe with older versions of Samba
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629 # compile with optimisation and without debugging by default
630 CFLAGS="-O ${CFLAGS}"
631
632 # Check whether --enable-debug or --disable-debug was given.
633 if test "${enable_debug+set}" = set; then
634   enableval="$enable_debug"
635   if eval "test x$enable_debug = xyes"; then
636         CFLAGS="${CFLAGS} -g"
637     fi
638 fi
639
640
641
642 # Extract the first word of "gcc", so it can be a program name with args.
643 set dummy gcc; 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_dummy="$PATH"
654   for ac_dir in $ac_dummy; do
655     test -z "$ac_dir" && ac_dir=.
656     if test -f $ac_dir/$ac_word; then
657       ac_cv_prog_CC="gcc"
658       break
659     fi
660   done
661   IFS="$ac_save_ifs"
662 fi
663 fi
664 CC="$ac_cv_prog_CC"
665 if test -n "$CC"; then
666   echo "$ac_t""$CC" 1>&6
667 else
668   echo "$ac_t""no" 1>&6
669 fi
670
671 if test -z "$CC"; then
672   # Extract the first word of "cc", so it can be a program name with args.
673 set dummy cc; ac_word=$2
674 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
675 echo "configure:676: checking for $ac_word" >&5
676 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
677   echo $ac_n "(cached) $ac_c" 1>&6
678 else
679   if test -n "$CC"; then
680   ac_cv_prog_CC="$CC" # Let the user override the test.
681 else
682   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
683   ac_prog_rejected=no
684   ac_dummy="$PATH"
685   for ac_dir in $ac_dummy; do
686     test -z "$ac_dir" && ac_dir=.
687     if test -f $ac_dir/$ac_word; then
688       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
689         ac_prog_rejected=yes
690         continue
691       fi
692       ac_cv_prog_CC="cc"
693       break
694     fi
695   done
696   IFS="$ac_save_ifs"
697 if test $ac_prog_rejected = yes; then
698   # We found a bogon in the path, so make sure we never use it.
699   set dummy $ac_cv_prog_CC
700   shift
701   if test $# -gt 0; then
702     # We chose a different compiler from the bogus one.
703     # However, it has the same basename, so the bogon will be chosen
704     # first if we set CC to just the basename; use the full file name.
705     shift
706     set dummy "$ac_dir/$ac_word" "$@"
707     shift
708     ac_cv_prog_CC="$@"
709   fi
710 fi
711 fi
712 fi
713 CC="$ac_cv_prog_CC"
714 if test -n "$CC"; then
715   echo "$ac_t""$CC" 1>&6
716 else
717   echo "$ac_t""no" 1>&6
718 fi
719
720   if test -z "$CC"; then
721     case "`uname -s`" in
722     *win32* | *WIN32*)
723       # Extract the first word of "cl", so it can be a program name with args.
724 set dummy cl; ac_word=$2
725 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
726 echo "configure:727: checking for $ac_word" >&5
727 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
728   echo $ac_n "(cached) $ac_c" 1>&6
729 else
730   if test -n "$CC"; then
731   ac_cv_prog_CC="$CC" # Let the user override the test.
732 else
733   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
734   ac_dummy="$PATH"
735   for ac_dir in $ac_dummy; do
736     test -z "$ac_dir" && ac_dir=.
737     if test -f $ac_dir/$ac_word; then
738       ac_cv_prog_CC="cl"
739       break
740     fi
741   done
742   IFS="$ac_save_ifs"
743 fi
744 fi
745 CC="$ac_cv_prog_CC"
746 if test -n "$CC"; then
747   echo "$ac_t""$CC" 1>&6
748 else
749   echo "$ac_t""no" 1>&6
750 fi
751  ;;
752     esac
753   fi
754   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
755 fi
756
757 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
758 echo "configure:759: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
759
760 ac_ext=c
761 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
762 ac_cpp='$CPP $CPPFLAGS'
763 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
764 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
765 cross_compiling=$ac_cv_prog_cc_cross
766
767 cat > conftest.$ac_ext << EOF
768
769 #line 770 "configure"
770 #include "confdefs.h"
771
772 main(){return(0);}
773 EOF
774 if { (eval echo configure:775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
775   ac_cv_prog_cc_works=yes
776   # If we can't run a trivial program, we are probably using a cross compiler.
777   if (./conftest; exit) 2>/dev/null; then
778     ac_cv_prog_cc_cross=no
779   else
780     ac_cv_prog_cc_cross=yes
781   fi
782 else
783   echo "configure: failed program was:" >&5
784   cat conftest.$ac_ext >&5
785   ac_cv_prog_cc_works=no
786 fi
787 rm -fr conftest*
788 ac_ext=c
789 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
790 ac_cpp='$CPP $CPPFLAGS'
791 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
792 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
793 cross_compiling=$ac_cv_prog_cc_cross
794
795 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
796 if test $ac_cv_prog_cc_works = no; then
797   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
798 fi
799 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
800 echo "configure:801: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
801 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
802 cross_compiling=$ac_cv_prog_cc_cross
803
804 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
805 echo "configure:806: checking whether we are using GNU C" >&5
806 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
807   echo $ac_n "(cached) $ac_c" 1>&6
808 else
809   cat > conftest.c <<EOF
810 #ifdef __GNUC__
811   yes;
812 #endif
813 EOF
814 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
815   ac_cv_prog_gcc=yes
816 else
817   ac_cv_prog_gcc=no
818 fi
819 fi
820
821 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
822
823 if test $ac_cv_prog_gcc = yes; then
824   GCC=yes
825 else
826   GCC=
827 fi
828
829 ac_test_CFLAGS="${CFLAGS+set}"
830 ac_save_CFLAGS="$CFLAGS"
831 CFLAGS=
832 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
833 echo "configure:834: checking whether ${CC-cc} accepts -g" >&5
834 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
835   echo $ac_n "(cached) $ac_c" 1>&6
836 else
837   echo 'void f(){}' > conftest.c
838 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
839   ac_cv_prog_cc_g=yes
840 else
841   ac_cv_prog_cc_g=no
842 fi
843 rm -f conftest*
844
845 fi
846
847 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
848 if test "$ac_test_CFLAGS" = set; then
849   CFLAGS="$ac_save_CFLAGS"
850 elif test $ac_cv_prog_cc_g = yes; then
851   if test "$GCC" = yes; then
852     CFLAGS="-g -O2"
853   else
854     CFLAGS="-g"
855   fi
856 else
857   if test "$GCC" = yes; then
858     CFLAGS="-O2"
859   else
860     CFLAGS=
861   fi
862 fi
863
864 ac_aux_dir=
865 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
866   if test -f $ac_dir/install-sh; then
867     ac_aux_dir=$ac_dir
868     ac_install_sh="$ac_aux_dir/install-sh -c"
869     break
870   elif test -f $ac_dir/install.sh; then
871     ac_aux_dir=$ac_dir
872     ac_install_sh="$ac_aux_dir/install.sh -c"
873     break
874   fi
875 done
876 if test -z "$ac_aux_dir"; then
877   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
878 fi
879 ac_config_guess=$ac_aux_dir/config.guess
880 ac_config_sub=$ac_aux_dir/config.sub
881 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
882
883 # Find a good install program.  We prefer a C program (faster),
884 # so one script is as good as another.  But avoid the broken or
885 # incompatible versions:
886 # SysV /etc/install, /usr/sbin/install
887 # SunOS /usr/etc/install
888 # IRIX /sbin/install
889 # AIX /bin/install
890 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
891 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
892 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
893 # ./install, which can be erroneously created by make from ./install.sh.
894 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
895 echo "configure:896: checking for a BSD compatible install" >&5
896 if test -z "$INSTALL"; then
897 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
898   echo $ac_n "(cached) $ac_c" 1>&6
899 else
900     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
901   for ac_dir in $PATH; do
902     # Account for people who put trailing slashes in PATH elements.
903     case "$ac_dir/" in
904     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
905     *)
906       # OSF1 and SCO ODT 3.0 have their own names for install.
907       # Don't use installbsd from OSF since it installs stuff as root
908       # by default.
909       for ac_prog in ginstall scoinst install; do
910         if test -f $ac_dir/$ac_prog; then
911           if test $ac_prog = install &&
912             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
913             # AIX install.  It has an incompatible calling convention.
914             :
915           else
916             ac_cv_path_install="$ac_dir/$ac_prog -c"
917             break 2
918           fi
919         fi
920       done
921       ;;
922     esac
923   done
924   IFS="$ac_save_IFS"
925
926 fi
927   if test "${ac_cv_path_install+set}" = set; then
928     INSTALL="$ac_cv_path_install"
929   else
930     # As a last resort, use the slow shell script.  We don't cache a
931     # path for INSTALL within a source directory, because that will
932     # break other packages using the cache if that directory is
933     # removed, or if the path is relative.
934     INSTALL="$ac_install_sh"
935   fi
936 fi
937 echo "$ac_t""$INSTALL" 1>&6
938
939 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
940 # It thinks the first close brace ends the variable substitution.
941 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
942
943 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
944
945 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
946
947 for ac_prog in mawk gawk nawk awk
948 do
949 # Extract the first word of "$ac_prog", so it can be a program name with args.
950 set dummy $ac_prog; ac_word=$2
951 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
952 echo "configure:953: checking for $ac_word" >&5
953 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
954   echo $ac_n "(cached) $ac_c" 1>&6
955 else
956   if test -n "$AWK"; then
957   ac_cv_prog_AWK="$AWK" # Let the user override the test.
958 else
959   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
960   ac_dummy="$PATH"
961   for ac_dir in $ac_dummy; do
962     test -z "$ac_dir" && ac_dir=.
963     if test -f $ac_dir/$ac_word; then
964       ac_cv_prog_AWK="$ac_prog"
965       break
966     fi
967   done
968   IFS="$ac_save_ifs"
969 fi
970 fi
971 AWK="$ac_cv_prog_AWK"
972 if test -n "$AWK"; then
973   echo "$ac_t""$AWK" 1>&6
974 else
975   echo "$ac_t""no" 1>&6
976 fi
977
978 test -n "$AWK" && break
979 done
980
981
982 if test "x$CC" != xcc; then
983   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
984 echo "configure:985: checking whether $CC and cc understand -c and -o together" >&5
985 else
986   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
987 echo "configure:988: checking whether cc understands -c and -o together" >&5
988 fi
989 set dummy $CC; ac_cc="`echo $2 |
990                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
991 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
992   echo $ac_n "(cached) $ac_c" 1>&6
993 else
994   echo 'foo(){}' > conftest.c
995 # Make sure it works both with $CC and with simple cc.
996 # We do the test twice because some compilers refuse to overwrite an
997 # existing .o file with -o, though they will create one.
998 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
999 if { (eval echo configure:1000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1000    test -f conftest.o && { (eval echo configure:1001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1001 then
1002   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1003   if test "x$CC" != xcc; then
1004     # Test first that cc exists at all.
1005     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1006       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1007       if { (eval echo configure:1008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1008          test -f conftest.o && { (eval echo configure:1009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1009       then
1010         # cc works too.
1011         :
1012       else
1013         # cc exists but doesn't like -o.
1014         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1015       fi
1016     fi
1017   fi
1018 else
1019   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1020 fi
1021 rm -f conftest*
1022
1023 fi
1024 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1025   echo "$ac_t""yes" 1>&6
1026 else
1027   echo "$ac_t""no" 1>&6
1028   cat >> confdefs.h <<\EOF
1029 #define NO_MINUS_C_MINUS_O 1
1030 EOF
1031
1032 fi
1033
1034 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1035       BROKEN_CC=
1036 else
1037       BROKEN_CC=#
1038 fi
1039
1040
1041 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1042 echo "configure:1043: checking that the C compiler understands volatile" >&5
1043 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1044   echo $ac_n "(cached) $ac_c" 1>&6
1045 else
1046   
1047     cat > conftest.$ac_ext <<EOF
1048 #line 1049 "configure"
1049 #include "confdefs.h"
1050 #include <sys/types.h>
1051 int main() {
1052 volatile int i = 0
1053 ; return 0; }
1054 EOF
1055 if { (eval echo configure:1056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1056   rm -rf conftest*
1057   samba_cv_volatile=yes
1058 else
1059   echo "configure: failed program was:" >&5
1060   cat conftest.$ac_ext >&5
1061   rm -rf conftest*
1062   samba_cv_volatile=no
1063 fi
1064 rm -f conftest*
1065 fi
1066
1067 echo "$ac_t""$samba_cv_volatile" 1>&6
1068 if test x"$samba_cv_volatile" = x"yes"; then
1069    cat >> confdefs.h <<\EOF
1070 #define HAVE_VOLATILE 1
1071 EOF
1072
1073 fi
1074
1075
1076 #################################################
1077 # set codepage directory location
1078 # Check whether --with-codepagedir or --without-codepagedir was given.
1079 if test "${with_codepagedir+set}" = set; then
1080   withval="$with_codepagedir"
1081    case "$withval" in
1082   yes|no)
1083   #
1084   # Just in case anybody does it
1085   #
1086     echo "configure: warning: --with-codepagedir called without argument - will use default" 1>&2
1087   ;;
1088   * )
1089     codepagedir="$withval"
1090     ;;
1091   esac
1092 fi
1093
1094
1095
1096
1097 # Do some error checking and defaulting for the host and target type.
1098 # The inputs are:
1099 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1100 #
1101 # The rules are:
1102 # 1. You are not allowed to specify --host, --target, and nonopt at the
1103 #    same time.
1104 # 2. Host defaults to nonopt.
1105 # 3. If nonopt is not specified, then host defaults to the current host,
1106 #    as determined by config.guess.
1107 # 4. Target and build default to nonopt.
1108 # 5. If nonopt is not specified, then target and build default to host.
1109
1110 # The aliases save the names the user supplied, while $host etc.
1111 # will get canonicalized.
1112 case $host---$target---$nonopt in
1113 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1114 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1115 esac
1116
1117
1118 # Make sure we can run config.sub.
1119 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1120 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1121 fi
1122
1123 echo $ac_n "checking host system type""... $ac_c" 1>&6
1124 echo "configure:1125: checking host system type" >&5
1125
1126 host_alias=$host
1127 case "$host_alias" in
1128 NONE)
1129   case $nonopt in
1130   NONE)
1131     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1132     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1133     fi ;;
1134   *) host_alias=$nonopt ;;
1135   esac ;;
1136 esac
1137
1138 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1139 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1140 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1141 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1142 echo "$ac_t""$host" 1>&6
1143
1144 echo $ac_n "checking target system type""... $ac_c" 1>&6
1145 echo "configure:1146: checking target system type" >&5
1146
1147 target_alias=$target
1148 case "$target_alias" in
1149 NONE)
1150   case $nonopt in
1151   NONE) target_alias=$host_alias ;;
1152   *) target_alias=$nonopt ;;
1153   esac ;;
1154 esac
1155
1156 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1157 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1158 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1159 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1160 echo "$ac_t""$target" 1>&6
1161
1162 echo $ac_n "checking build system type""... $ac_c" 1>&6
1163 echo "configure:1164: checking build system type" >&5
1164
1165 build_alias=$build
1166 case "$build_alias" in
1167 NONE)
1168   case $nonopt in
1169   NONE) build_alias=$host_alias ;;
1170   *) build_alias=$nonopt ;;
1171   esac ;;
1172 esac
1173
1174 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1175 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1176 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1177 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1178 echo "$ac_t""$build" 1>&6
1179
1180 test "$host_alias" != "$target_alias" &&
1181   test "$program_prefix$program_suffix$program_transform_name" = \
1182     NONENONEs,x,x, &&
1183   program_prefix=${target_alias}-
1184
1185
1186   case "$host_os" in
1187         *irix6*) cat >> confdefs.h <<\EOF
1188 #include <standards.h>
1189 EOF
1190
1191         ;;
1192 esac
1193
1194
1195     
1196     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1197 echo "configure:1198: checking config.cache system type" >&5
1198     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1199          test x"$ac_cv_host_system_type" != x"$host"; } ||
1200        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1201          test x"$ac_cv_build_system_type" != x"$build"; } ||
1202        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1203          test x"$ac_cv_target_system_type" != x"$target"; }; then
1204         echo "$ac_t""different" 1>&6
1205         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1206     else
1207         echo "$ac_t""same" 1>&6
1208     fi
1209     ac_cv_host_system_type="$host"
1210     ac_cv_build_system_type="$build"
1211     ac_cv_target_system_type="$target"
1212
1213
1214 #
1215 # Config CPPFLAG settings for strange OS's that must be set
1216 # before other tests.
1217 #
1218 case "$host_os" in
1219 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1220     *hpux*)
1221       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1222 echo "configure:1223: checking whether ${CC-cc} accepts -Ae" >&5
1223 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1224   echo $ac_n "(cached) $ac_c" 1>&6
1225 else
1226   echo 'void f(){}' > conftest.c
1227 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1228   ac_cv_prog_cc_Ae=yes
1229 else
1230   ac_cv_prog_cc_Ae=no
1231 fi
1232 rm -f conftest*
1233
1234 fi
1235
1236 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1237       if test $ac_cv_prog_cc_Ae = yes; then
1238         CPPFLAGS="$CPPFLAGS -Ae"
1239       fi
1240 #
1241 # Defines needed for HPUX support.
1242 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1243 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1244 #
1245       case `uname -r` in
1246                         *9*|*10*)
1247                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
1248                                 cat >> confdefs.h <<\EOF
1249 #define USE_BOTH_CRYPT_CALLS 1
1250 EOF
1251
1252                                 ;;
1253                         *11*)
1254                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
1255                                 cat >> confdefs.h <<\EOF
1256 #define USE_BOTH_CRYPT_CALLS 1
1257 EOF
1258
1259                                 ;;
1260       esac
1261       ;;
1262 #
1263 # AIX4.x doesn't even admit to having large
1264 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1265 #
1266     *aix4*)
1267           echo "$ac_t""enabling large file support" 1>&6
1268       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1269       ;;    
1270 #
1271 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1272 # to the existance of large files..
1273 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1274 # recommendations on large file support, however it makes the
1275 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1276 # recommendation makes the compile fail on gcc2.7. JRA.
1277 #
1278         *solaris*)
1279                 case `uname -r` in
1280                         5.6*|5.7*)
1281                         echo "$ac_t""enabling large file support" 1>&6
1282                         if test "$ac_cv_prog_gcc" = yes; then
1283                                 ${CC-cc} -v >conftest.c 2>&1
1284                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1285                                 rm -fr conftest.c
1286                                 case "$ac_cv_gcc_compiler_version_number" in
1287                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1288                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1289                                                 ;;
1290                                         *)
1291                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1292                                                 ;;
1293                                 esac
1294                         else
1295                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1296                         fi
1297                         ;;
1298                 esac
1299                 ;;
1300 #
1301 # Tests needed for SINIX large file support.
1302 #
1303     *sysv4*)
1304       if test $host = mips-sni-sysv4 ; then
1305         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1306 echo "configure:1307: checking for LFS support" >&5
1307         old_CPPFLAGS="$CPPFLAGS"
1308         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1309         if test "$cross_compiling" = yes; then
1310   SINIX_LFS_SUPPORT=cross
1311 else
1312   cat > conftest.$ac_ext <<EOF
1313 #line 1314 "configure"
1314 #include "confdefs.h"
1315
1316 #include <unistd.h>
1317 main () {
1318 #if _LFS64_LARGEFILE == 1
1319 exit(0);
1320 #else
1321 exit(1);
1322 #endif
1323 }
1324 EOF
1325 if { (eval echo configure:1326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1326 then
1327   SINIX_LFS_SUPPORT=yes
1328 else
1329   echo "configure: failed program was:" >&5
1330   cat conftest.$ac_ext >&5
1331   rm -fr conftest*
1332   SINIX_LFS_SUPPORT=no
1333 fi
1334 rm -fr conftest*
1335 fi
1336
1337         CPPFLAGS="$old_CPPFLAGS"
1338         if test x$SINIX_LFS_SUPPORT = xyes ; then
1339           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1340           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1341           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1342           LIBS="`getconf LFS64_LIBS` $LIBS"
1343         fi
1344       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1345       fi
1346     ;;
1347
1348 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1349 #
1350     *linux*)
1351         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1352 echo "configure:1353: checking for LFS support" >&5
1353         old_CPPFLAGS="$CPPFLAGS"
1354         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1355        if test "$cross_compiling" = yes; then
1356   LINUX_LFS_SUPPORT=cross
1357 else
1358   cat > conftest.$ac_ext <<EOF
1359 #line 1360 "configure"
1360 #include "confdefs.h"
1361
1362 #include <unistd.h>
1363 #include <sys/utsname.h>
1364 main() {
1365 #if _LFS64_LARGEFILE == 1
1366        struct utsname uts;
1367        char *release;
1368        int major, minor;
1369
1370        /* Ensure this is glibc 2.2 or higher */
1371 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1372        int libc_major = __GLIBC__;
1373        int libc_minor = __GLIBC_MINOR__;
1374
1375        if (libc_major < 2)
1376               exit(1);
1377        if (libc_minor < 2)
1378               exit(1);
1379 #endif
1380
1381        /* Ensure this is kernel 2.4 or higher */
1382
1383        uname(&uts);
1384        release = uts.release;
1385        major = atoi(strsep(&release, "."));
1386        minor = atoi(strsep(&release, "."));
1387
1388        if (major > 2 || (major == 2 && minor > 3))
1389                exit(0);
1390        exit(1);
1391 #else
1392        exit(1);
1393 #endif
1394 }
1395
1396 EOF
1397 if { (eval echo configure:1398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1398 then
1399   LINUX_LFS_SUPPORT=yes
1400 else
1401   echo "configure: failed program was:" >&5
1402   cat conftest.$ac_ext >&5
1403   rm -fr conftest*
1404   LINUX_LFS_SUPPORT=no
1405 fi
1406 rm -fr conftest*
1407 fi
1408
1409         CPPFLAGS="$old_CPPFLAGS"
1410         if test x$LINUX_LFS_SUPPORT = xyes ; then
1411           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1412         fi
1413        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1414                 ;;
1415
1416     *hurd*)
1417         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1418 echo "configure:1419: checking for LFS support" >&5
1419         old_CPPFLAGS="$CPPFLAGS"
1420         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1421         if test "$cross_compiling" = yes; then
1422   GLIBC_LFS_SUPPORT=cross
1423 else
1424   cat > conftest.$ac_ext <<EOF
1425 #line 1426 "configure"
1426 #include "confdefs.h"
1427
1428 #include <unistd.h>
1429 main () {
1430 #if _LFS64_LARGEFILE == 1
1431 exit(0);
1432 #else
1433 exit(1);
1434 #endif
1435 }
1436 EOF
1437 if { (eval echo configure:1438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1438 then
1439   GLIBC_LFS_SUPPORT=yes
1440 else
1441   echo "configure: failed program was:" >&5
1442   cat conftest.$ac_ext >&5
1443   rm -fr conftest*
1444   GLIBC_LFS_SUPPORT=no
1445 fi
1446 rm -fr conftest*
1447 fi
1448
1449         CPPFLAGS="$old_CPPFLAGS"
1450         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1451           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1452         fi
1453       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1454     ;;
1455
1456 esac
1457
1458 echo $ac_n "checking for inline""... $ac_c" 1>&6
1459 echo "configure:1460: checking for inline" >&5
1460 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1461   echo $ac_n "(cached) $ac_c" 1>&6
1462 else
1463   ac_cv_c_inline=no
1464 for ac_kw in inline __inline__ __inline; do
1465   cat > conftest.$ac_ext <<EOF
1466 #line 1467 "configure"
1467 #include "confdefs.h"
1468
1469 int main() {
1470 } $ac_kw foo() {
1471 ; return 0; }
1472 EOF
1473 if { (eval echo configure:1474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1474   rm -rf conftest*
1475   ac_cv_c_inline=$ac_kw; break
1476 else
1477   echo "configure: failed program was:" >&5
1478   cat conftest.$ac_ext >&5
1479 fi
1480 rm -f conftest*
1481 done
1482
1483 fi
1484
1485 echo "$ac_t""$ac_cv_c_inline" 1>&6
1486 case "$ac_cv_c_inline" in
1487   inline | yes) ;;
1488   no) cat >> confdefs.h <<\EOF
1489 #define inline 
1490 EOF
1491  ;;
1492   *)  cat >> confdefs.h <<EOF
1493 #define inline $ac_cv_c_inline
1494 EOF
1495  ;;
1496 esac
1497
1498 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1499 echo "configure:1500: checking how to run the C preprocessor" >&5
1500 # On Suns, sometimes $CPP names a directory.
1501 if test -n "$CPP" && test -d "$CPP"; then
1502   CPP=
1503 fi
1504 if test -z "$CPP"; then
1505 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1506   echo $ac_n "(cached) $ac_c" 1>&6
1507 else
1508     # This must be in double quotes, not single quotes, because CPP may get
1509   # substituted into the Makefile and "${CC-cc}" will confuse make.
1510   CPP="${CC-cc} -E"
1511   # On the NeXT, cc -E runs the code through the compiler's parser,
1512   # not just through cpp.
1513   cat > conftest.$ac_ext <<EOF
1514 #line 1515 "configure"
1515 #include "confdefs.h"
1516 #include <assert.h>
1517 Syntax Error
1518 EOF
1519 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1520 { (eval echo configure:1521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1521 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1522 if test -z "$ac_err"; then
1523   :
1524 else
1525   echo "$ac_err" >&5
1526   echo "configure: failed program was:" >&5
1527   cat conftest.$ac_ext >&5
1528   rm -rf conftest*
1529   CPP="${CC-cc} -E -traditional-cpp"
1530   cat > conftest.$ac_ext <<EOF
1531 #line 1532 "configure"
1532 #include "confdefs.h"
1533 #include <assert.h>
1534 Syntax Error
1535 EOF
1536 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1537 { (eval echo configure:1538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1538 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1539 if test -z "$ac_err"; then
1540   :
1541 else
1542   echo "$ac_err" >&5
1543   echo "configure: failed program was:" >&5
1544   cat conftest.$ac_ext >&5
1545   rm -rf conftest*
1546   CPP="${CC-cc} -nologo -E"
1547   cat > conftest.$ac_ext <<EOF
1548 #line 1549 "configure"
1549 #include "confdefs.h"
1550 #include <assert.h>
1551 Syntax Error
1552 EOF
1553 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1554 { (eval echo configure:1555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1555 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1556 if test -z "$ac_err"; then
1557   :
1558 else
1559   echo "$ac_err" >&5
1560   echo "configure: failed program was:" >&5
1561   cat conftest.$ac_ext >&5
1562   rm -rf conftest*
1563   CPP=/lib/cpp
1564 fi
1565 rm -f conftest*
1566 fi
1567 rm -f conftest*
1568 fi
1569 rm -f conftest*
1570   ac_cv_prog_CPP="$CPP"
1571 fi
1572   CPP="$ac_cv_prog_CPP"
1573 else
1574   ac_cv_prog_CPP="$CPP"
1575 fi
1576 echo "$ac_t""$CPP" 1>&6
1577
1578 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1579 echo "configure:1580: checking for ANSI C header files" >&5
1580 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1581   echo $ac_n "(cached) $ac_c" 1>&6
1582 else
1583   cat > conftest.$ac_ext <<EOF
1584 #line 1585 "configure"
1585 #include "confdefs.h"
1586 #include <stdlib.h>
1587 #include <stdarg.h>
1588 #include <string.h>
1589 #include <float.h>
1590 EOF
1591 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1592 { (eval echo configure:1593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1593 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1594 if test -z "$ac_err"; then
1595   rm -rf conftest*
1596   ac_cv_header_stdc=yes
1597 else
1598   echo "$ac_err" >&5
1599   echo "configure: failed program was:" >&5
1600   cat conftest.$ac_ext >&5
1601   rm -rf conftest*
1602   ac_cv_header_stdc=no
1603 fi
1604 rm -f conftest*
1605
1606 if test $ac_cv_header_stdc = yes; then
1607   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1608 cat > conftest.$ac_ext <<EOF
1609 #line 1610 "configure"
1610 #include "confdefs.h"
1611 #include <string.h>
1612 EOF
1613 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1614   egrep "memchr" >/dev/null 2>&1; then
1615   :
1616 else
1617   rm -rf conftest*
1618   ac_cv_header_stdc=no
1619 fi
1620 rm -f conftest*
1621
1622 fi
1623
1624 if test $ac_cv_header_stdc = yes; then
1625   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1626 cat > conftest.$ac_ext <<EOF
1627 #line 1628 "configure"
1628 #include "confdefs.h"
1629 #include <stdlib.h>
1630 EOF
1631 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1632   egrep "free" >/dev/null 2>&1; then
1633   :
1634 else
1635   rm -rf conftest*
1636   ac_cv_header_stdc=no
1637 fi
1638 rm -f conftest*
1639
1640 fi
1641
1642 if test $ac_cv_header_stdc = yes; then
1643   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1644 if test "$cross_compiling" = yes; then
1645   :
1646 else
1647   cat > conftest.$ac_ext <<EOF
1648 #line 1649 "configure"
1649 #include "confdefs.h"
1650 #include <ctype.h>
1651 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1652 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1653 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1654 int main () { int i; for (i = 0; i < 256; i++)
1655 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1656 exit (0); }
1657
1658 EOF
1659 if { (eval echo configure:1660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1660 then
1661   :
1662 else
1663   echo "configure: failed program was:" >&5
1664   cat conftest.$ac_ext >&5
1665   rm -fr conftest*
1666   ac_cv_header_stdc=no
1667 fi
1668 rm -fr conftest*
1669 fi
1670
1671 fi
1672 fi
1673
1674 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1675 if test $ac_cv_header_stdc = yes; then
1676   cat >> confdefs.h <<\EOF
1677 #define STDC_HEADERS 1
1678 EOF
1679
1680 fi
1681
1682 ac_header_dirent=no
1683 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1684 do
1685 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1686 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1687 echo "configure:1688: checking for $ac_hdr that defines DIR" >&5
1688 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1689   echo $ac_n "(cached) $ac_c" 1>&6
1690 else
1691   cat > conftest.$ac_ext <<EOF
1692 #line 1693 "configure"
1693 #include "confdefs.h"
1694 #include <sys/types.h>
1695 #include <$ac_hdr>
1696 int main() {
1697 DIR *dirp = 0;
1698 ; return 0; }
1699 EOF
1700 if { (eval echo configure:1701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1701   rm -rf conftest*
1702   eval "ac_cv_header_dirent_$ac_safe=yes"
1703 else
1704   echo "configure: failed program was:" >&5
1705   cat conftest.$ac_ext >&5
1706   rm -rf conftest*
1707   eval "ac_cv_header_dirent_$ac_safe=no"
1708 fi
1709 rm -f conftest*
1710 fi
1711 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1712   echo "$ac_t""yes" 1>&6
1713     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1714   cat >> confdefs.h <<EOF
1715 #define $ac_tr_hdr 1
1716 EOF
1717  ac_header_dirent=$ac_hdr; break
1718 else
1719   echo "$ac_t""no" 1>&6
1720 fi
1721 done
1722 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1723 if test $ac_header_dirent = dirent.h; then
1724 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1725 echo "configure:1726: checking for opendir in -ldir" >&5
1726 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1727 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1728   echo $ac_n "(cached) $ac_c" 1>&6
1729 else
1730   ac_save_LIBS="$LIBS"
1731 LIBS="-ldir  $LIBS"
1732 cat > conftest.$ac_ext <<EOF
1733 #line 1734 "configure"
1734 #include "confdefs.h"
1735 /* Override any gcc2 internal prototype to avoid an error.  */
1736 /* We use char because int might match the return type of a gcc2
1737     builtin and then its argument prototype would still apply.  */
1738 char opendir();
1739
1740 int main() {
1741 opendir()
1742 ; return 0; }
1743 EOF
1744 if { (eval echo configure:1745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1745   rm -rf conftest*
1746   eval "ac_cv_lib_$ac_lib_var=yes"
1747 else
1748   echo "configure: failed program was:" >&5
1749   cat conftest.$ac_ext >&5
1750   rm -rf conftest*
1751   eval "ac_cv_lib_$ac_lib_var=no"
1752 fi
1753 rm -f conftest*
1754 LIBS="$ac_save_LIBS"
1755
1756 fi
1757 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1758   echo "$ac_t""yes" 1>&6
1759   LIBS="$LIBS -ldir"
1760 else
1761   echo "$ac_t""no" 1>&6
1762 fi
1763
1764 else
1765 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1766 echo "configure:1767: checking for opendir in -lx" >&5
1767 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1768 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1769   echo $ac_n "(cached) $ac_c" 1>&6
1770 else
1771   ac_save_LIBS="$LIBS"
1772 LIBS="-lx  $LIBS"
1773 cat > conftest.$ac_ext <<EOF
1774 #line 1775 "configure"
1775 #include "confdefs.h"
1776 /* Override any gcc2 internal prototype to avoid an error.  */
1777 /* We use char because int might match the return type of a gcc2
1778     builtin and then its argument prototype would still apply.  */
1779 char opendir();
1780
1781 int main() {
1782 opendir()
1783 ; return 0; }
1784 EOF
1785 if { (eval echo configure:1786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1786   rm -rf conftest*
1787   eval "ac_cv_lib_$ac_lib_var=yes"
1788 else
1789   echo "configure: failed program was:" >&5
1790   cat conftest.$ac_ext >&5
1791   rm -rf conftest*
1792   eval "ac_cv_lib_$ac_lib_var=no"
1793 fi
1794 rm -f conftest*
1795 LIBS="$ac_save_LIBS"
1796
1797 fi
1798 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1799   echo "$ac_t""yes" 1>&6
1800   LIBS="$LIBS -lx"
1801 else
1802   echo "$ac_t""no" 1>&6
1803 fi
1804
1805 fi
1806
1807 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1808 echo "configure:1809: checking whether time.h and sys/time.h may both be included" >&5
1809 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1810   echo $ac_n "(cached) $ac_c" 1>&6
1811 else
1812   cat > conftest.$ac_ext <<EOF
1813 #line 1814 "configure"
1814 #include "confdefs.h"
1815 #include <sys/types.h>
1816 #include <sys/time.h>
1817 #include <time.h>
1818 int main() {
1819 struct tm *tp;
1820 ; return 0; }
1821 EOF
1822 if { (eval echo configure:1823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1823   rm -rf conftest*
1824   ac_cv_header_time=yes
1825 else
1826   echo "configure: failed program was:" >&5
1827   cat conftest.$ac_ext >&5
1828   rm -rf conftest*
1829   ac_cv_header_time=no
1830 fi
1831 rm -f conftest*
1832 fi
1833
1834 echo "$ac_t""$ac_cv_header_time" 1>&6
1835 if test $ac_cv_header_time = yes; then
1836   cat >> confdefs.h <<\EOF
1837 #define TIME_WITH_SYS_TIME 1
1838 EOF
1839
1840 fi
1841
1842 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1843 echo "configure:1844: checking for sys/wait.h that is POSIX.1 compatible" >&5
1844 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+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 <sys/types.h>
1851 #include <sys/wait.h>
1852 #ifndef WEXITSTATUS
1853 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1854 #endif
1855 #ifndef WIFEXITED
1856 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1857 #endif
1858 int main() {
1859 int s;
1860 wait (&s);
1861 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1862 ; return 0; }
1863 EOF
1864 if { (eval echo configure:1865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1865   rm -rf conftest*
1866   ac_cv_header_sys_wait_h=yes
1867 else
1868   echo "configure: failed program was:" >&5
1869   cat conftest.$ac_ext >&5
1870   rm -rf conftest*
1871   ac_cv_header_sys_wait_h=no
1872 fi
1873 rm -f conftest*
1874 fi
1875
1876 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1877 if test $ac_cv_header_sys_wait_h = yes; then
1878   cat >> confdefs.h <<\EOF
1879 #define HAVE_SYS_WAIT_H 1
1880 EOF
1881
1882 fi
1883
1884 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1885 do
1886 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1887 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1888 echo "configure:1889: checking for $ac_hdr" >&5
1889 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1890   echo $ac_n "(cached) $ac_c" 1>&6
1891 else
1892   cat > conftest.$ac_ext <<EOF
1893 #line 1894 "configure"
1894 #include "confdefs.h"
1895 #include <$ac_hdr>
1896 EOF
1897 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1898 { (eval echo configure:1899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1899 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1900 if test -z "$ac_err"; then
1901   rm -rf conftest*
1902   eval "ac_cv_header_$ac_safe=yes"
1903 else
1904   echo "$ac_err" >&5
1905   echo "configure: failed program was:" >&5
1906   cat conftest.$ac_ext >&5
1907   rm -rf conftest*
1908   eval "ac_cv_header_$ac_safe=no"
1909 fi
1910 rm -f conftest*
1911 fi
1912 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1913   echo "$ac_t""yes" 1>&6
1914     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1915   cat >> confdefs.h <<EOF
1916 #define $ac_tr_hdr 1
1917 EOF
1918  
1919 else
1920   echo "$ac_t""no" 1>&6
1921 fi
1922 done
1923
1924 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
1925 do
1926 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1927 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1928 echo "configure:1929: checking for $ac_hdr" >&5
1929 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1930   echo $ac_n "(cached) $ac_c" 1>&6
1931 else
1932   cat > conftest.$ac_ext <<EOF
1933 #line 1934 "configure"
1934 #include "confdefs.h"
1935 #include <$ac_hdr>
1936 EOF
1937 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1938 { (eval echo configure:1939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1939 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1940 if test -z "$ac_err"; then
1941   rm -rf conftest*
1942   eval "ac_cv_header_$ac_safe=yes"
1943 else
1944   echo "$ac_err" >&5
1945   echo "configure: failed program was:" >&5
1946   cat conftest.$ac_ext >&5
1947   rm -rf conftest*
1948   eval "ac_cv_header_$ac_safe=no"
1949 fi
1950 rm -f conftest*
1951 fi
1952 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1953   echo "$ac_t""yes" 1>&6
1954     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1955   cat >> confdefs.h <<EOF
1956 #define $ac_tr_hdr 1
1957 EOF
1958  
1959 else
1960   echo "$ac_t""no" 1>&6
1961 fi
1962 done
1963
1964 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
1965 do
1966 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1967 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1968 echo "configure:1969: checking for $ac_hdr" >&5
1969 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1970   echo $ac_n "(cached) $ac_c" 1>&6
1971 else
1972   cat > conftest.$ac_ext <<EOF
1973 #line 1974 "configure"
1974 #include "confdefs.h"
1975 #include <$ac_hdr>
1976 EOF
1977 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1978 { (eval echo configure:1979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1979 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1980 if test -z "$ac_err"; then
1981   rm -rf conftest*
1982   eval "ac_cv_header_$ac_safe=yes"
1983 else
1984   echo "$ac_err" >&5
1985   echo "configure: failed program was:" >&5
1986   cat conftest.$ac_ext >&5
1987   rm -rf conftest*
1988   eval "ac_cv_header_$ac_safe=no"
1989 fi
1990 rm -f conftest*
1991 fi
1992 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1993   echo "$ac_t""yes" 1>&6
1994     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1995   cat >> confdefs.h <<EOF
1996 #define $ac_tr_hdr 1
1997 EOF
1998  
1999 else
2000   echo "$ac_t""no" 1>&6
2001 fi
2002 done
2003
2004 for ac_hdr in sys/param.h ctype.h sys/un.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
2005 do
2006 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2007 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2008 echo "configure:2009: checking for $ac_hdr" >&5
2009 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2010   echo $ac_n "(cached) $ac_c" 1>&6
2011 else
2012   cat > conftest.$ac_ext <<EOF
2013 #line 2014 "configure"
2014 #include "confdefs.h"
2015 #include <$ac_hdr>
2016 EOF
2017 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2018 { (eval echo configure:2019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2019 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2020 if test -z "$ac_err"; then
2021   rm -rf conftest*
2022   eval "ac_cv_header_$ac_safe=yes"
2023 else
2024   echo "$ac_err" >&5
2025   echo "configure: failed program was:" >&5
2026   cat conftest.$ac_ext >&5
2027   rm -rf conftest*
2028   eval "ac_cv_header_$ac_safe=no"
2029 fi
2030 rm -f conftest*
2031 fi
2032 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2033   echo "$ac_t""yes" 1>&6
2034     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2035   cat >> confdefs.h <<EOF
2036 #define $ac_tr_hdr 1
2037 EOF
2038  
2039 else
2040   echo "$ac_t""no" 1>&6
2041 fi
2042 done
2043
2044 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
2045 do
2046 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2047 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2048 echo "configure:2049: checking for $ac_hdr" >&5
2049 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2050   echo $ac_n "(cached) $ac_c" 1>&6
2051 else
2052   cat > conftest.$ac_ext <<EOF
2053 #line 2054 "configure"
2054 #include "confdefs.h"
2055 #include <$ac_hdr>
2056 EOF
2057 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2058 { (eval echo configure:2059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2059 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2060 if test -z "$ac_err"; then
2061   rm -rf conftest*
2062   eval "ac_cv_header_$ac_safe=yes"
2063 else
2064   echo "$ac_err" >&5
2065   echo "configure: failed program was:" >&5
2066   cat conftest.$ac_ext >&5
2067   rm -rf conftest*
2068   eval "ac_cv_header_$ac_safe=no"
2069 fi
2070 rm -f conftest*
2071 fi
2072 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2073   echo "$ac_t""yes" 1>&6
2074     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2075   cat >> confdefs.h <<EOF
2076 #define $ac_tr_hdr 1
2077 EOF
2078  
2079 else
2080   echo "$ac_t""no" 1>&6
2081 fi
2082 done
2083
2084 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2085 do
2086 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2087 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2088 echo "configure:2089: checking for $ac_hdr" >&5
2089 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2090   echo $ac_n "(cached) $ac_c" 1>&6
2091 else
2092   cat > conftest.$ac_ext <<EOF
2093 #line 2094 "configure"
2094 #include "confdefs.h"
2095 #include <$ac_hdr>
2096 EOF
2097 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2098 { (eval echo configure:2099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2099 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2100 if test -z "$ac_err"; then
2101   rm -rf conftest*
2102   eval "ac_cv_header_$ac_safe=yes"
2103 else
2104   echo "$ac_err" >&5
2105   echo "configure: failed program was:" >&5
2106   cat conftest.$ac_ext >&5
2107   rm -rf conftest*
2108   eval "ac_cv_header_$ac_safe=no"
2109 fi
2110 rm -f conftest*
2111 fi
2112 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2113   echo "$ac_t""yes" 1>&6
2114     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2115   cat >> confdefs.h <<EOF
2116 #define $ac_tr_hdr 1
2117 EOF
2118  
2119 else
2120   echo "$ac_t""no" 1>&6
2121 fi
2122 done
2123
2124 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2125 do
2126 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2127 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2128 echo "configure:2129: checking for $ac_hdr" >&5
2129 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2130   echo $ac_n "(cached) $ac_c" 1>&6
2131 else
2132   cat > conftest.$ac_ext <<EOF
2133 #line 2134 "configure"
2134 #include "confdefs.h"
2135 #include <$ac_hdr>
2136 EOF
2137 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2138 { (eval echo configure:2139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2139 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2140 if test -z "$ac_err"; then
2141   rm -rf conftest*
2142   eval "ac_cv_header_$ac_safe=yes"
2143 else
2144   echo "$ac_err" >&5
2145   echo "configure: failed program was:" >&5
2146   cat conftest.$ac_ext >&5
2147   rm -rf conftest*
2148   eval "ac_cv_header_$ac_safe=no"
2149 fi
2150 rm -f conftest*
2151 fi
2152 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2153   echo "$ac_t""yes" 1>&6
2154     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2155   cat >> confdefs.h <<EOF
2156 #define $ac_tr_hdr 1
2157 EOF
2158  
2159 else
2160   echo "$ac_t""no" 1>&6
2161 fi
2162 done
2163
2164 for ac_hdr in security/pam_modules.h security/_pam_macros.h
2165 do
2166 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2167 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2168 echo "configure:2169: checking for $ac_hdr" >&5
2169 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2170   echo $ac_n "(cached) $ac_c" 1>&6
2171 else
2172   cat > conftest.$ac_ext <<EOF
2173 #line 2174 "configure"
2174 #include "confdefs.h"
2175 #include <$ac_hdr>
2176 EOF
2177 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2178 { (eval echo configure:2179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2179 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2180 if test -z "$ac_err"; then
2181   rm -rf conftest*
2182   eval "ac_cv_header_$ac_safe=yes"
2183 else
2184   echo "$ac_err" >&5
2185   echo "configure: failed program was:" >&5
2186   cat conftest.$ac_ext >&5
2187   rm -rf conftest*
2188   eval "ac_cv_header_$ac_safe=no"
2189 fi
2190 rm -f conftest*
2191 fi
2192 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2193   echo "$ac_t""yes" 1>&6
2194     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2195   cat >> confdefs.h <<EOF
2196 #define $ac_tr_hdr 1
2197 EOF
2198  
2199 else
2200   echo "$ac_t""no" 1>&6
2201 fi
2202 done
2203
2204
2205 #
2206 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2207 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2208 #
2209 case "$host_os" in
2210     *hpux*)
2211                 cat > conftest.$ac_ext <<EOF
2212 #line 2213 "configure"
2213 #include "confdefs.h"
2214 #include <shadow.h>
2215 int main() {
2216 struct spwd testme
2217 ; return 0; }
2218 EOF
2219 if { (eval echo configure:2220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2220   rm -rf conftest*
2221   ac_cv_header_shadow_h=yes
2222 else
2223   echo "configure: failed program was:" >&5
2224   cat conftest.$ac_ext >&5
2225   rm -rf conftest*
2226   ac_cv_header_shadow_h=no
2227 fi
2228 rm -f conftest*
2229                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2230                    cat >> confdefs.h <<\EOF
2231 #define HAVE_SHADOW_H 1
2232 EOF
2233
2234                 fi
2235         ;;
2236 esac
2237 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2238 do
2239 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2240 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2241 echo "configure:2242: checking for $ac_hdr" >&5
2242 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2243   echo $ac_n "(cached) $ac_c" 1>&6
2244 else
2245   cat > conftest.$ac_ext <<EOF
2246 #line 2247 "configure"
2247 #include "confdefs.h"
2248 #include <$ac_hdr>
2249 EOF
2250 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2251 { (eval echo configure:2252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2252 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2253 if test -z "$ac_err"; then
2254   rm -rf conftest*
2255   eval "ac_cv_header_$ac_safe=yes"
2256 else
2257   echo "$ac_err" >&5
2258   echo "configure: failed program was:" >&5
2259   cat conftest.$ac_ext >&5
2260   rm -rf conftest*
2261   eval "ac_cv_header_$ac_safe=no"
2262 fi
2263 rm -f conftest*
2264 fi
2265 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2266   echo "$ac_t""yes" 1>&6
2267     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2268   cat >> confdefs.h <<EOF
2269 #define $ac_tr_hdr 1
2270 EOF
2271  
2272 else
2273   echo "$ac_t""no" 1>&6
2274 fi
2275 done
2276
2277 for ac_hdr in nss.h nss_common.h sys/security.h security/pam_appl.h security/pam_modules.h
2278 do
2279 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2280 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2281 echo "configure:2282: checking for $ac_hdr" >&5
2282 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2283   echo $ac_n "(cached) $ac_c" 1>&6
2284 else
2285   cat > conftest.$ac_ext <<EOF
2286 #line 2287 "configure"
2287 #include "confdefs.h"
2288 #include <$ac_hdr>
2289 EOF
2290 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2291 { (eval echo configure:2292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2292 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2293 if test -z "$ac_err"; then
2294   rm -rf conftest*
2295   eval "ac_cv_header_$ac_safe=yes"
2296 else
2297   echo "$ac_err" >&5
2298   echo "configure: failed program was:" >&5
2299   cat conftest.$ac_ext >&5
2300   rm -rf conftest*
2301   eval "ac_cv_header_$ac_safe=no"
2302 fi
2303 rm -f conftest*
2304 fi
2305 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2306   echo "$ac_t""yes" 1>&6
2307     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2308   cat >> confdefs.h <<EOF
2309 #define $ac_tr_hdr 1
2310 EOF
2311  
2312 else
2313   echo "$ac_t""no" 1>&6
2314 fi
2315 done
2316
2317 for ac_hdr in stropts.h poll.h
2318 do
2319 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2320 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2321 echo "configure:2322: checking for $ac_hdr" >&5
2322 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2323   echo $ac_n "(cached) $ac_c" 1>&6
2324 else
2325   cat > conftest.$ac_ext <<EOF
2326 #line 2327 "configure"
2327 #include "confdefs.h"
2328 #include <$ac_hdr>
2329 EOF
2330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2331 { (eval echo configure:2332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2332 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2333 if test -z "$ac_err"; then
2334   rm -rf conftest*
2335   eval "ac_cv_header_$ac_safe=yes"
2336 else
2337   echo "$ac_err" >&5
2338   echo "configure: failed program was:" >&5
2339   cat conftest.$ac_ext >&5
2340   rm -rf conftest*
2341   eval "ac_cv_header_$ac_safe=no"
2342 fi
2343 rm -f conftest*
2344 fi
2345 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2346   echo "$ac_t""yes" 1>&6
2347     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2348   cat >> confdefs.h <<EOF
2349 #define $ac_tr_hdr 1
2350 EOF
2351  
2352 else
2353   echo "$ac_t""no" 1>&6
2354 fi
2355 done
2356
2357 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2358 do
2359 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2360 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2361 echo "configure:2362: checking for $ac_hdr" >&5
2362 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2363   echo $ac_n "(cached) $ac_c" 1>&6
2364 else
2365   cat > conftest.$ac_ext <<EOF
2366 #line 2367 "configure"
2367 #include "confdefs.h"
2368 #include <$ac_hdr>
2369 EOF
2370 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2371 { (eval echo configure:2372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2372 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2373 if test -z "$ac_err"; then
2374   rm -rf conftest*
2375   eval "ac_cv_header_$ac_safe=yes"
2376 else
2377   echo "$ac_err" >&5
2378   echo "configure: failed program was:" >&5
2379   cat conftest.$ac_ext >&5
2380   rm -rf conftest*
2381   eval "ac_cv_header_$ac_safe=no"
2382 fi
2383 rm -f conftest*
2384 fi
2385 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2386   echo "$ac_t""yes" 1>&6
2387     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2388   cat >> confdefs.h <<EOF
2389 #define $ac_tr_hdr 1
2390 EOF
2391  
2392 else
2393   echo "$ac_t""no" 1>&6
2394 fi
2395 done
2396
2397 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2398 do
2399 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2400 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2401 echo "configure:2402: checking for $ac_hdr" >&5
2402 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2403   echo $ac_n "(cached) $ac_c" 1>&6
2404 else
2405   cat > conftest.$ac_ext <<EOF
2406 #line 2407 "configure"
2407 #include "confdefs.h"
2408 #include <$ac_hdr>
2409 EOF
2410 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2411 { (eval echo configure:2412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2412 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2413 if test -z "$ac_err"; then
2414   rm -rf conftest*
2415   eval "ac_cv_header_$ac_safe=yes"
2416 else
2417   echo "$ac_err" >&5
2418   echo "configure: failed program was:" >&5
2419   cat conftest.$ac_ext >&5
2420   rm -rf conftest*
2421   eval "ac_cv_header_$ac_safe=no"
2422 fi
2423 rm -f conftest*
2424 fi
2425 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2426   echo "$ac_t""yes" 1>&6
2427     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2428   cat >> confdefs.h <<EOF
2429 #define $ac_tr_hdr 1
2430 EOF
2431  
2432 else
2433   echo "$ac_t""no" 1>&6
2434 fi
2435 done
2436
2437
2438 # For experimental utmp support (lastlog on some BSD-like systems)
2439 for ac_hdr in utmp.h utmpx.h lastlog.h
2440 do
2441 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2442 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2443 echo "configure:2444: checking for $ac_hdr" >&5
2444 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2445   echo $ac_n "(cached) $ac_c" 1>&6
2446 else
2447   cat > conftest.$ac_ext <<EOF
2448 #line 2449 "configure"
2449 #include "confdefs.h"
2450 #include <$ac_hdr>
2451 EOF
2452 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2453 { (eval echo configure:2454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2454 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2455 if test -z "$ac_err"; then
2456   rm -rf conftest*
2457   eval "ac_cv_header_$ac_safe=yes"
2458 else
2459   echo "$ac_err" >&5
2460   echo "configure: failed program was:" >&5
2461   cat conftest.$ac_ext >&5
2462   rm -rf conftest*
2463   eval "ac_cv_header_$ac_safe=no"
2464 fi
2465 rm -f conftest*
2466 fi
2467 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2468   echo "$ac_t""yes" 1>&6
2469     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2470   cat >> confdefs.h <<EOF
2471 #define $ac_tr_hdr 1
2472 EOF
2473  
2474 else
2475   echo "$ac_t""no" 1>&6
2476 fi
2477 done
2478
2479  
2480 # For quotas on Veritas VxFS filesystems
2481 for ac_hdr in sys/fs/vx_quota.h
2482 do
2483 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2484 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2485 echo "configure:2486: checking for $ac_hdr" >&5
2486 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2487   echo $ac_n "(cached) $ac_c" 1>&6
2488 else
2489   cat > conftest.$ac_ext <<EOF
2490 #line 2491 "configure"
2491 #include "confdefs.h"
2492 #include <$ac_hdr>
2493 EOF
2494 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2495 { (eval echo configure:2496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2496 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2497 if test -z "$ac_err"; then
2498   rm -rf conftest*
2499   eval "ac_cv_header_$ac_safe=yes"
2500 else
2501   echo "$ac_err" >&5
2502   echo "configure: failed program was:" >&5
2503   cat conftest.$ac_ext >&5
2504   rm -rf conftest*
2505   eval "ac_cv_header_$ac_safe=no"
2506 fi
2507 rm -f conftest*
2508 fi
2509 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2510   echo "$ac_t""yes" 1>&6
2511     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2512   cat >> confdefs.h <<EOF
2513 #define $ac_tr_hdr 1
2514 EOF
2515  
2516 else
2517   echo "$ac_t""no" 1>&6
2518 fi
2519 done
2520
2521
2522 echo $ac_n "checking size of int""... $ac_c" 1>&6
2523 echo "configure:2524: checking size of int" >&5
2524 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2525   echo $ac_n "(cached) $ac_c" 1>&6
2526 else
2527   if test "$cross_compiling" = yes; then
2528   ac_cv_sizeof_int=cross
2529 else
2530   cat > conftest.$ac_ext <<EOF
2531 #line 2532 "configure"
2532 #include "confdefs.h"
2533 #include <stdio.h>
2534 #include <sys/types.h>
2535 main()
2536 {
2537   FILE *f=fopen("conftestval", "w");
2538   if (!f) exit(1);
2539   fprintf(f, "%d\n", sizeof(int));
2540   exit(0);
2541 }
2542 EOF
2543 if { (eval echo configure:2544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2544 then
2545   ac_cv_sizeof_int=`cat conftestval`
2546 else
2547   echo "configure: failed program was:" >&5
2548   cat conftest.$ac_ext >&5
2549   rm -fr conftest*
2550   ac_cv_sizeof_int=0
2551 fi
2552 rm -fr conftest*
2553 fi
2554
2555 fi
2556 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2557 cat >> confdefs.h <<EOF
2558 #define SIZEOF_INT $ac_cv_sizeof_int
2559 EOF
2560
2561
2562 echo $ac_n "checking size of long""... $ac_c" 1>&6
2563 echo "configure:2564: checking size of long" >&5
2564 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2565   echo $ac_n "(cached) $ac_c" 1>&6
2566 else
2567   if test "$cross_compiling" = yes; then
2568   ac_cv_sizeof_long=cross
2569 else
2570   cat > conftest.$ac_ext <<EOF
2571 #line 2572 "configure"
2572 #include "confdefs.h"
2573 #include <stdio.h>
2574 #include <sys/types.h>
2575 main()
2576 {
2577   FILE *f=fopen("conftestval", "w");
2578   if (!f) exit(1);
2579   fprintf(f, "%d\n", sizeof(long));
2580   exit(0);
2581 }
2582 EOF
2583 if { (eval echo configure:2584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2584 then
2585   ac_cv_sizeof_long=`cat conftestval`
2586 else
2587   echo "configure: failed program was:" >&5
2588   cat conftest.$ac_ext >&5
2589   rm -fr conftest*
2590   ac_cv_sizeof_long=0
2591 fi
2592 rm -fr conftest*
2593 fi
2594
2595 fi
2596 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2597 cat >> confdefs.h <<EOF
2598 #define SIZEOF_LONG $ac_cv_sizeof_long
2599 EOF
2600
2601
2602 echo $ac_n "checking size of short""... $ac_c" 1>&6
2603 echo "configure:2604: checking size of short" >&5
2604 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2605   echo $ac_n "(cached) $ac_c" 1>&6
2606 else
2607   if test "$cross_compiling" = yes; then
2608   ac_cv_sizeof_short=cross
2609 else
2610   cat > conftest.$ac_ext <<EOF
2611 #line 2612 "configure"
2612 #include "confdefs.h"
2613 #include <stdio.h>
2614 #include <sys/types.h>
2615 main()
2616 {
2617   FILE *f=fopen("conftestval", "w");
2618   if (!f) exit(1);
2619   fprintf(f, "%d\n", sizeof(short));
2620   exit(0);
2621 }
2622 EOF
2623 if { (eval echo configure:2624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2624 then
2625   ac_cv_sizeof_short=`cat conftestval`
2626 else
2627   echo "configure: failed program was:" >&5
2628   cat conftest.$ac_ext >&5
2629   rm -fr conftest*
2630   ac_cv_sizeof_short=0
2631 fi
2632 rm -fr conftest*
2633 fi
2634
2635 fi
2636 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2637 cat >> confdefs.h <<EOF
2638 #define SIZEOF_SHORT $ac_cv_sizeof_short
2639 EOF
2640
2641
2642
2643 echo $ac_n "checking for working const""... $ac_c" 1>&6
2644 echo "configure:2645: checking for working const" >&5
2645 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2646   echo $ac_n "(cached) $ac_c" 1>&6
2647 else
2648   cat > conftest.$ac_ext <<EOF
2649 #line 2650 "configure"
2650 #include "confdefs.h"
2651
2652 int main() {
2653
2654 /* Ultrix mips cc rejects this.  */
2655 typedef int charset[2]; const charset x;
2656 /* SunOS 4.1.1 cc rejects this.  */
2657 char const *const *ccp;
2658 char **p;
2659 /* NEC SVR4.0.2 mips cc rejects this.  */
2660 struct point {int x, y;};
2661 static struct point const zero = {0,0};
2662 /* AIX XL C 1.02.0.0 rejects this.
2663    It does not let you subtract one const X* pointer from another in an arm
2664    of an if-expression whose if-part is not a constant expression */
2665 const char *g = "string";
2666 ccp = &g + (g ? g-g : 0);
2667 /* HPUX 7.0 cc rejects these. */
2668 ++ccp;
2669 p = (char**) ccp;
2670 ccp = (char const *const *) p;
2671 { /* SCO 3.2v4 cc rejects this.  */
2672   char *t;
2673   char const *s = 0 ? (char *) 0 : (char const *) 0;
2674
2675   *t++ = 0;
2676 }
2677 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2678   int x[] = {25, 17};
2679   const int *foo = &x[0];
2680   ++foo;
2681 }
2682 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2683   typedef const int *iptr;
2684   iptr p = 0;
2685   ++p;
2686 }
2687 { /* AIX XL C 1.02.0.0 rejects this saying
2688      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2689   struct s { int j; const int *ap[3]; };
2690   struct s *b; b->j = 5;
2691 }
2692 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2693   const int foo = 10;
2694 }
2695
2696 ; return 0; }
2697 EOF
2698 if { (eval echo configure:2699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2699   rm -rf conftest*
2700   ac_cv_c_const=yes
2701 else
2702   echo "configure: failed program was:" >&5
2703   cat conftest.$ac_ext >&5
2704   rm -rf conftest*
2705   ac_cv_c_const=no
2706 fi
2707 rm -f conftest*
2708 fi
2709
2710 echo "$ac_t""$ac_cv_c_const" 1>&6
2711 if test $ac_cv_c_const = no; then
2712   cat >> confdefs.h <<\EOF
2713 #define const 
2714 EOF
2715
2716 fi
2717
2718 echo $ac_n "checking for inline""... $ac_c" 1>&6
2719 echo "configure:2720: checking for inline" >&5
2720 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2721   echo $ac_n "(cached) $ac_c" 1>&6
2722 else
2723   ac_cv_c_inline=no
2724 for ac_kw in inline __inline__ __inline; do
2725   cat > conftest.$ac_ext <<EOF
2726 #line 2727 "configure"
2727 #include "confdefs.h"
2728
2729 int main() {
2730 } $ac_kw foo() {
2731 ; return 0; }
2732 EOF
2733 if { (eval echo configure:2734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2734   rm -rf conftest*
2735   ac_cv_c_inline=$ac_kw; break
2736 else
2737   echo "configure: failed program was:" >&5
2738   cat conftest.$ac_ext >&5
2739 fi
2740 rm -f conftest*
2741 done
2742
2743 fi
2744
2745 echo "$ac_t""$ac_cv_c_inline" 1>&6
2746 case "$ac_cv_c_inline" in
2747   inline | yes) ;;
2748   no) cat >> confdefs.h <<\EOF
2749 #define inline 
2750 EOF
2751  ;;
2752   *)  cat >> confdefs.h <<EOF
2753 #define inline $ac_cv_c_inline
2754 EOF
2755  ;;
2756 esac
2757
2758 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2759 echo "configure:2760: checking whether byte ordering is bigendian" >&5
2760 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2761   echo $ac_n "(cached) $ac_c" 1>&6
2762 else
2763   ac_cv_c_bigendian=unknown
2764 # See if sys/param.h defines the BYTE_ORDER macro.
2765 cat > conftest.$ac_ext <<EOF
2766 #line 2767 "configure"
2767 #include "confdefs.h"
2768 #include <sys/types.h>
2769 #include <sys/param.h>
2770 int main() {
2771
2772 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2773  bogus endian macros
2774 #endif
2775 ; return 0; }
2776 EOF
2777 if { (eval echo configure:2778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2778   rm -rf conftest*
2779   # It does; now see whether it defined to BIG_ENDIAN or not.
2780 cat > conftest.$ac_ext <<EOF
2781 #line 2782 "configure"
2782 #include "confdefs.h"
2783 #include <sys/types.h>
2784 #include <sys/param.h>
2785 int main() {
2786
2787 #if BYTE_ORDER != BIG_ENDIAN
2788  not big endian
2789 #endif
2790 ; return 0; }
2791 EOF
2792 if { (eval echo configure:2793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2793   rm -rf conftest*
2794   ac_cv_c_bigendian=yes
2795 else
2796   echo "configure: failed program was:" >&5
2797   cat conftest.$ac_ext >&5
2798   rm -rf conftest*
2799   ac_cv_c_bigendian=no
2800 fi
2801 rm -f conftest*
2802 else
2803   echo "configure: failed program was:" >&5
2804   cat conftest.$ac_ext >&5
2805 fi
2806 rm -f conftest*
2807 if test $ac_cv_c_bigendian = unknown; then
2808 if test "$cross_compiling" = yes; then
2809     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2810 else
2811   cat > conftest.$ac_ext <<EOF
2812 #line 2813 "configure"
2813 #include "confdefs.h"
2814 main () {
2815   /* Are we little or big endian?  From Harbison&Steele.  */
2816   union
2817   {
2818     long l;
2819     char c[sizeof (long)];
2820   } u;
2821   u.l = 1;
2822   exit (u.c[sizeof (long) - 1] == 1);
2823 }
2824 EOF
2825 if { (eval echo configure:2826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2826 then
2827   ac_cv_c_bigendian=no
2828 else
2829   echo "configure: failed program was:" >&5
2830   cat conftest.$ac_ext >&5
2831   rm -fr conftest*
2832   ac_cv_c_bigendian=yes
2833 fi
2834 rm -fr conftest*
2835 fi
2836
2837 fi
2838 fi
2839
2840 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2841 if test $ac_cv_c_bigendian = yes; then
2842   cat >> confdefs.h <<\EOF
2843 #define WORDS_BIGENDIAN 1
2844 EOF
2845
2846 fi
2847
2848 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2849 echo "configure:2850: checking whether char is unsigned" >&5
2850 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2851   echo $ac_n "(cached) $ac_c" 1>&6
2852 else
2853   if test "$GCC" = yes; then
2854   # GCC predefines this symbol on systems where it applies.
2855 cat > conftest.$ac_ext <<EOF
2856 #line 2857 "configure"
2857 #include "confdefs.h"
2858 #ifdef __CHAR_UNSIGNED__
2859   yes
2860 #endif
2861
2862 EOF
2863 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2864   egrep "yes" >/dev/null 2>&1; then
2865   rm -rf conftest*
2866   ac_cv_c_char_unsigned=yes
2867 else
2868   rm -rf conftest*
2869   ac_cv_c_char_unsigned=no
2870 fi
2871 rm -f conftest*
2872
2873 else
2874 if test "$cross_compiling" = yes; then
2875     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2876 else
2877   cat > conftest.$ac_ext <<EOF
2878 #line 2879 "configure"
2879 #include "confdefs.h"
2880 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2881 #if !defined(__STDC__) || __STDC__ != 1
2882 #define volatile
2883 #endif
2884 main() {
2885   volatile char c = 255; exit(c < 0);
2886 }
2887 EOF
2888 if { (eval echo configure:2889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2889 then
2890   ac_cv_c_char_unsigned=yes
2891 else
2892   echo "configure: failed program was:" >&5
2893   cat conftest.$ac_ext >&5
2894   rm -fr conftest*
2895   ac_cv_c_char_unsigned=no
2896 fi
2897 rm -fr conftest*
2898 fi
2899
2900 fi
2901 fi
2902
2903 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2904 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2905   cat >> confdefs.h <<\EOF
2906 #define __CHAR_UNSIGNED__ 1
2907 EOF
2908
2909 fi
2910
2911
2912 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2913 echo "configure:2914: checking return type of signal handlers" >&5
2914 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2915   echo $ac_n "(cached) $ac_c" 1>&6
2916 else
2917   cat > conftest.$ac_ext <<EOF
2918 #line 2919 "configure"
2919 #include "confdefs.h"
2920 #include <sys/types.h>
2921 #include <signal.h>
2922 #ifdef signal
2923 #undef signal
2924 #endif
2925 #ifdef __cplusplus
2926 extern "C" void (*signal (int, void (*)(int)))(int);
2927 #else
2928 void (*signal ()) ();
2929 #endif
2930
2931 int main() {
2932 int i;
2933 ; return 0; }
2934 EOF
2935 if { (eval echo configure:2936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2936   rm -rf conftest*
2937   ac_cv_type_signal=void
2938 else
2939   echo "configure: failed program was:" >&5
2940   cat conftest.$ac_ext >&5
2941   rm -rf conftest*
2942   ac_cv_type_signal=int
2943 fi
2944 rm -f conftest*
2945 fi
2946
2947 echo "$ac_t""$ac_cv_type_signal" 1>&6
2948 cat >> confdefs.h <<EOF
2949 #define RETSIGTYPE $ac_cv_type_signal
2950 EOF
2951
2952
2953 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2954 echo "configure:2955: checking for uid_t in sys/types.h" >&5
2955 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2956   echo $ac_n "(cached) $ac_c" 1>&6
2957 else
2958   cat > conftest.$ac_ext <<EOF
2959 #line 2960 "configure"
2960 #include "confdefs.h"
2961 #include <sys/types.h>
2962 EOF
2963 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2964   egrep "uid_t" >/dev/null 2>&1; then
2965   rm -rf conftest*
2966   ac_cv_type_uid_t=yes
2967 else
2968   rm -rf conftest*
2969   ac_cv_type_uid_t=no
2970 fi
2971 rm -f conftest*
2972
2973 fi
2974
2975 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2976 if test $ac_cv_type_uid_t = no; then
2977   cat >> confdefs.h <<\EOF
2978 #define uid_t int
2979 EOF
2980
2981   cat >> confdefs.h <<\EOF
2982 #define gid_t int
2983 EOF
2984
2985 fi
2986
2987 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2988 echo "configure:2989: checking for mode_t" >&5
2989 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2990   echo $ac_n "(cached) $ac_c" 1>&6
2991 else
2992   cat > conftest.$ac_ext <<EOF
2993 #line 2994 "configure"
2994 #include "confdefs.h"
2995 #include <sys/types.h>
2996 #if STDC_HEADERS
2997 #include <stdlib.h>
2998 #include <stddef.h>
2999 #endif
3000 EOF
3001 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3002   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3003   rm -rf conftest*
3004   ac_cv_type_mode_t=yes
3005 else
3006   rm -rf conftest*
3007   ac_cv_type_mode_t=no
3008 fi
3009 rm -f conftest*
3010
3011 fi
3012 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3013 if test $ac_cv_type_mode_t = no; then
3014   cat >> confdefs.h <<\EOF
3015 #define mode_t int
3016 EOF
3017
3018 fi
3019
3020 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3021 echo "configure:3022: checking for off_t" >&5
3022 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3023   echo $ac_n "(cached) $ac_c" 1>&6
3024 else
3025   cat > conftest.$ac_ext <<EOF
3026 #line 3027 "configure"
3027 #include "confdefs.h"
3028 #include <sys/types.h>
3029 #if STDC_HEADERS
3030 #include <stdlib.h>
3031 #include <stddef.h>
3032 #endif
3033 EOF
3034 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3035   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3036   rm -rf conftest*
3037   ac_cv_type_off_t=yes
3038 else
3039   rm -rf conftest*
3040   ac_cv_type_off_t=no
3041 fi
3042 rm -f conftest*
3043
3044 fi
3045 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3046 if test $ac_cv_type_off_t = no; then
3047   cat >> confdefs.h <<\EOF
3048 #define off_t long
3049 EOF
3050
3051 fi
3052
3053 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3054 echo "configure:3055: checking for size_t" >&5
3055 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3056   echo $ac_n "(cached) $ac_c" 1>&6
3057 else
3058   cat > conftest.$ac_ext <<EOF
3059 #line 3060 "configure"
3060 #include "confdefs.h"
3061 #include <sys/types.h>
3062 #if STDC_HEADERS
3063 #include <stdlib.h>
3064 #include <stddef.h>
3065 #endif
3066 EOF
3067 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3068   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3069   rm -rf conftest*
3070   ac_cv_type_size_t=yes
3071 else
3072   rm -rf conftest*
3073   ac_cv_type_size_t=no
3074 fi
3075 rm -f conftest*
3076
3077 fi
3078 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3079 if test $ac_cv_type_size_t = no; then
3080   cat >> confdefs.h <<\EOF
3081 #define size_t unsigned
3082 EOF
3083
3084 fi
3085
3086 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3087 echo "configure:3088: checking for pid_t" >&5
3088 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3089   echo $ac_n "(cached) $ac_c" 1>&6
3090 else
3091   cat > conftest.$ac_ext <<EOF
3092 #line 3093 "configure"
3093 #include "confdefs.h"
3094 #include <sys/types.h>
3095 #if STDC_HEADERS
3096 #include <stdlib.h>
3097 #include <stddef.h>
3098 #endif
3099 EOF
3100 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3101   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3102   rm -rf conftest*
3103   ac_cv_type_pid_t=yes
3104 else
3105   rm -rf conftest*
3106   ac_cv_type_pid_t=no
3107 fi
3108 rm -f conftest*
3109
3110 fi
3111 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3112 if test $ac_cv_type_pid_t = no; then
3113   cat >> confdefs.h <<\EOF
3114 #define pid_t int
3115 EOF
3116
3117 fi
3118
3119 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3120 echo "configure:3121: checking for st_rdev in struct stat" >&5
3121 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3122   echo $ac_n "(cached) $ac_c" 1>&6
3123 else
3124   cat > conftest.$ac_ext <<EOF
3125 #line 3126 "configure"
3126 #include "confdefs.h"
3127 #include <sys/types.h>
3128 #include <sys/stat.h>
3129 int main() {
3130 struct stat s; s.st_rdev;
3131 ; return 0; }
3132 EOF
3133 if { (eval echo configure:3134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3134   rm -rf conftest*
3135   ac_cv_struct_st_rdev=yes
3136 else
3137   echo "configure: failed program was:" >&5
3138   cat conftest.$ac_ext >&5
3139   rm -rf conftest*
3140   ac_cv_struct_st_rdev=no
3141 fi
3142 rm -f conftest*
3143 fi
3144
3145 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3146 if test $ac_cv_struct_st_rdev = yes; then
3147   cat >> confdefs.h <<\EOF
3148 #define HAVE_ST_RDEV 1
3149 EOF
3150
3151 fi
3152
3153 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3154 echo "configure:3155: checking for d_off in dirent" >&5
3155 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3156   echo $ac_n "(cached) $ac_c" 1>&6
3157 else
3158   cat > conftest.$ac_ext <<EOF
3159 #line 3160 "configure"
3160 #include "confdefs.h"
3161
3162 #include <unistd.h>
3163 #include <sys/types.h>
3164 #include <dirent.h>
3165 int main() {
3166 struct dirent d; d.d_off;
3167 ; return 0; }
3168 EOF
3169 if { (eval echo configure:3170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3170   rm -rf conftest*
3171   ac_cv_dirent_d_off=yes
3172 else
3173   echo "configure: failed program was:" >&5
3174   cat conftest.$ac_ext >&5
3175   rm -rf conftest*
3176   ac_cv_dirent_d_off=no
3177 fi
3178 rm -f conftest*
3179 fi
3180
3181 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3182 if test $ac_cv_dirent_d_off = yes; then
3183   cat >> confdefs.h <<\EOF
3184 #define HAVE_DIRENT_D_OFF 1
3185 EOF
3186
3187 fi
3188
3189 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3190 echo "configure:3191: checking for ino_t" >&5
3191 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3192   echo $ac_n "(cached) $ac_c" 1>&6
3193 else
3194   cat > conftest.$ac_ext <<EOF
3195 #line 3196 "configure"
3196 #include "confdefs.h"
3197 #include <sys/types.h>
3198 #if STDC_HEADERS
3199 #include <stdlib.h>
3200 #include <stddef.h>
3201 #endif
3202 EOF
3203 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3204   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3205   rm -rf conftest*
3206   ac_cv_type_ino_t=yes
3207 else
3208   rm -rf conftest*
3209   ac_cv_type_ino_t=no
3210 fi
3211 rm -f conftest*
3212
3213 fi
3214 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3215 if test $ac_cv_type_ino_t = no; then
3216   cat >> confdefs.h <<\EOF
3217 #define ino_t unsigned
3218 EOF
3219
3220 fi
3221
3222 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3223 echo "configure:3224: checking for loff_t" >&5
3224 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3225   echo $ac_n "(cached) $ac_c" 1>&6
3226 else
3227   cat > conftest.$ac_ext <<EOF
3228 #line 3229 "configure"
3229 #include "confdefs.h"
3230 #include <sys/types.h>
3231 #if STDC_HEADERS
3232 #include <stdlib.h>
3233 #include <stddef.h>
3234 #endif
3235 EOF
3236 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3237   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3238   rm -rf conftest*
3239   ac_cv_type_loff_t=yes
3240 else
3241   rm -rf conftest*
3242   ac_cv_type_loff_t=no
3243 fi
3244 rm -f conftest*
3245
3246 fi
3247 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3248 if test $ac_cv_type_loff_t = no; then
3249   cat >> confdefs.h <<\EOF
3250 #define loff_t off_t
3251 EOF
3252
3253 fi
3254
3255 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3256 echo "configure:3257: checking for offset_t" >&5
3257 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3258   echo $ac_n "(cached) $ac_c" 1>&6
3259 else
3260   cat > conftest.$ac_ext <<EOF
3261 #line 3262 "configure"
3262 #include "confdefs.h"
3263 #include <sys/types.h>
3264 #if STDC_HEADERS
3265 #include <stdlib.h>
3266 #include <stddef.h>
3267 #endif
3268 EOF
3269 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3270   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3271   rm -rf conftest*
3272   ac_cv_type_offset_t=yes
3273 else
3274   rm -rf conftest*
3275   ac_cv_type_offset_t=no
3276 fi
3277 rm -f conftest*
3278
3279 fi
3280 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3281 if test $ac_cv_type_offset_t = no; then
3282   cat >> confdefs.h <<\EOF
3283 #define offset_t loff_t
3284 EOF
3285
3286 fi
3287
3288 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3289 echo "configure:3290: checking for ssize_t" >&5
3290 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3291   echo $ac_n "(cached) $ac_c" 1>&6
3292 else
3293   cat > conftest.$ac_ext <<EOF
3294 #line 3295 "configure"
3295 #include "confdefs.h"
3296 #include <sys/types.h>
3297 #if STDC_HEADERS
3298 #include <stdlib.h>
3299 #include <stddef.h>
3300 #endif
3301 EOF
3302 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3303   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3304   rm -rf conftest*
3305   ac_cv_type_ssize_t=yes
3306 else
3307   rm -rf conftest*
3308   ac_cv_type_ssize_t=no
3309 fi
3310 rm -f conftest*
3311
3312 fi
3313 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3314 if test $ac_cv_type_ssize_t = no; then
3315   cat >> confdefs.h <<\EOF
3316 #define ssize_t int
3317 EOF
3318
3319 fi
3320
3321 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3322 echo "configure:3323: checking for wchar_t" >&5
3323 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3324   echo $ac_n "(cached) $ac_c" 1>&6
3325 else
3326   cat > conftest.$ac_ext <<EOF
3327 #line 3328 "configure"
3328 #include "confdefs.h"
3329 #include <sys/types.h>
3330 #if STDC_HEADERS
3331 #include <stdlib.h>
3332 #include <stddef.h>
3333 #endif
3334 EOF
3335 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3336   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3337   rm -rf conftest*
3338   ac_cv_type_wchar_t=yes
3339 else
3340   rm -rf conftest*
3341   ac_cv_type_wchar_t=no
3342 fi
3343 rm -f conftest*
3344
3345 fi
3346 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3347 if test $ac_cv_type_wchar_t = no; then
3348   cat >> confdefs.h <<\EOF
3349 #define wchar_t unsigned short
3350 EOF
3351
3352 fi
3353
3354
3355 # we need libcups for CUPS support...
3356 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3357 echo "configure:3358: checking for httpConnect in -lcups" >&5
3358 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3359 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3360   echo $ac_n "(cached) $ac_c" 1>&6
3361 else
3362   ac_save_LIBS="$LIBS"
3363 LIBS="-lcups  $LIBS"
3364 cat > conftest.$ac_ext <<EOF
3365 #line 3366 "configure"
3366 #include "confdefs.h"
3367 /* Override any gcc2 internal prototype to avoid an error.  */
3368 /* We use char because int might match the return type of a gcc2
3369     builtin and then its argument prototype would still apply.  */
3370 char httpConnect();
3371
3372 int main() {
3373 httpConnect()
3374 ; return 0; }
3375 EOF
3376 if { (eval echo configure:3377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3377   rm -rf conftest*
3378   eval "ac_cv_lib_$ac_lib_var=yes"
3379 else
3380   echo "configure: failed program was:" >&5
3381   cat conftest.$ac_ext >&5
3382   rm -rf conftest*
3383   eval "ac_cv_lib_$ac_lib_var=no"
3384 fi
3385 rm -f conftest*
3386 LIBS="$ac_save_LIBS"
3387
3388 fi
3389 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3390   echo "$ac_t""yes" 1>&6
3391     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3392     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3393   cat >> confdefs.h <<EOF
3394 #define $ac_tr_lib 1
3395 EOF
3396
3397   LIBS="-lcups $LIBS"
3398
3399 else
3400   echo "$ac_t""no" 1>&6
3401 fi
3402
3403
3404 # we need libdl for PAM and the new VFS code
3405 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3406 echo "configure:3407: checking for dlopen in -ldl" >&5
3407 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3408 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3409   echo $ac_n "(cached) $ac_c" 1>&6
3410 else
3411   ac_save_LIBS="$LIBS"
3412 LIBS="-ldl  $LIBS"
3413 cat > conftest.$ac_ext <<EOF
3414 #line 3415 "configure"
3415 #include "confdefs.h"
3416 /* Override any gcc2 internal prototype to avoid an error.  */
3417 /* We use char because int might match the return type of a gcc2
3418     builtin and then its argument prototype would still apply.  */
3419 char dlopen();
3420
3421 int main() {
3422 dlopen()
3423 ; return 0; }
3424 EOF
3425 if { (eval echo configure:3426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3426   rm -rf conftest*
3427   eval "ac_cv_lib_$ac_lib_var=yes"
3428 else
3429   echo "configure: failed program was:" >&5
3430   cat conftest.$ac_ext >&5
3431   rm -rf conftest*
3432   eval "ac_cv_lib_$ac_lib_var=no"
3433 fi
3434 rm -f conftest*
3435 LIBS="$ac_save_LIBS"
3436
3437 fi
3438 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3439   echo "$ac_t""yes" 1>&6
3440   LIBS="$LIBS -ldl";
3441         cat >> confdefs.h <<\EOF
3442 #define HAVE_LIBDL 1
3443 EOF
3444
3445 else
3446   echo "$ac_t""no" 1>&6
3447 fi
3448
3449
3450 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3451 echo "configure:3452: checking for socklen_t type" >&5
3452 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3453   echo $ac_n "(cached) $ac_c" 1>&6
3454 else
3455   
3456     cat > conftest.$ac_ext <<EOF
3457 #line 3458 "configure"
3458 #include "confdefs.h"
3459
3460 #include <sys/types.h>
3461 #if STDC_HEADERS
3462 #include <stdlib.h>
3463 #include <stddef.h>
3464 #endif
3465 #include <sys/socket.h>
3466 int main() {
3467 socklen_t i = 0
3468 ; return 0; }
3469 EOF
3470 if { (eval echo configure:3471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3471   rm -rf conftest*
3472   samba_cv_socklen_t=yes
3473 else
3474   echo "configure: failed program was:" >&5
3475   cat conftest.$ac_ext >&5
3476   rm -rf conftest*
3477   samba_cv_socklen_t=no
3478 fi
3479 rm -f conftest*
3480 fi
3481
3482 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3483 if test x"$samba_cv_socklen_t" = x"yes"; then
3484    cat >> confdefs.h <<\EOF
3485 #define HAVE_SOCKLEN_T_TYPE 1
3486 EOF
3487
3488 fi
3489
3490 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3491 echo "configure:3492: checking for sig_atomic_t type" >&5
3492 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3493   echo $ac_n "(cached) $ac_c" 1>&6
3494 else
3495   
3496     cat > conftest.$ac_ext <<EOF
3497 #line 3498 "configure"
3498 #include "confdefs.h"
3499
3500 #include <sys/types.h>
3501 #if STDC_HEADERS
3502 #include <stdlib.h>
3503 #include <stddef.h>
3504 #endif
3505 #include <signal.h>
3506 int main() {
3507 sig_atomic_t i = 0
3508 ; return 0; }
3509 EOF
3510 if { (eval echo configure:3511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3511   rm -rf conftest*
3512   samba_cv_sig_atomic_t=yes
3513 else
3514   echo "configure: failed program was:" >&5
3515   cat conftest.$ac_ext >&5
3516   rm -rf conftest*
3517   samba_cv_sig_atomic_t=no
3518 fi
3519 rm -f conftest*
3520 fi
3521
3522 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3523 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3524    cat >> confdefs.h <<\EOF
3525 #define HAVE_SIG_ATOMIC_T_TYPE 1
3526 EOF
3527
3528 fi
3529
3530 # stupid headers have the functions but no declaration. grrrr.
3531
3532  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
3533 echo "configure:3534: checking for errno declaration" >&5
3534 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
3535   echo $ac_n "(cached) $ac_c" 1>&6
3536 else
3537   
3538     cat > conftest.$ac_ext <<EOF
3539 #line 3540 "configure"
3540 #include "confdefs.h"
3541 #include <errno.h>
3542 int main() {
3543 int i = (int)errno
3544 ; return 0; }
3545 EOF
3546 if { (eval echo configure:3547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3547   rm -rf conftest*
3548   ac_cv_have_errno_decl=yes
3549 else
3550   echo "configure: failed program was:" >&5
3551   cat conftest.$ac_ext >&5
3552   rm -rf conftest*
3553   ac_cv_have_errno_decl=no
3554 fi
3555 rm -f conftest*
3556 fi
3557
3558 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
3559  if test x"$ac_cv_have_errno_decl" = x"yes"; then
3560     cat >> confdefs.h <<\EOF
3561 #define HAVE_ERRNO_DECL 1
3562 EOF
3563
3564  fi
3565
3566
3567  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3568 echo "configure:3569: checking for setresuid declaration" >&5
3569 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
3570   echo $ac_n "(cached) $ac_c" 1>&6
3571 else
3572   
3573     cat > conftest.$ac_ext <<EOF
3574 #line 3575 "configure"
3575 #include "confdefs.h"
3576 #include <unistd.h>
3577 int main() {
3578 int i = (int)setresuid
3579 ; return 0; }
3580 EOF
3581 if { (eval echo configure:3582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3582   rm -rf conftest*
3583   ac_cv_have_setresuid_decl=yes
3584 else
3585   echo "configure: failed program was:" >&5
3586   cat conftest.$ac_ext >&5
3587   rm -rf conftest*
3588   ac_cv_have_setresuid_decl=no
3589 fi
3590 rm -f conftest*
3591 fi
3592
3593 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
3594  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
3595     cat >> confdefs.h <<\EOF
3596 #define HAVE_SETRESUID_DECL 1
3597 EOF
3598
3599  fi
3600
3601
3602  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
3603 echo "configure:3604: checking for setresgid declaration" >&5
3604 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
3605   echo $ac_n "(cached) $ac_c" 1>&6
3606 else
3607   
3608     cat > conftest.$ac_ext <<EOF
3609 #line 3610 "configure"
3610 #include "confdefs.h"
3611 #include <unistd.h>
3612 int main() {
3613 int i = (int)setresgid
3614 ; return 0; }
3615 EOF
3616 if { (eval echo configure:3617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3617   rm -rf conftest*
3618   ac_cv_have_setresgid_decl=yes
3619 else
3620   echo "configure: failed program was:" >&5
3621   cat conftest.$ac_ext >&5
3622   rm -rf conftest*
3623   ac_cv_have_setresgid_decl=no
3624 fi
3625 rm -f conftest*
3626 fi
3627
3628 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
3629  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
3630     cat >> confdefs.h <<\EOF
3631 #define HAVE_SETRESGID_DECL 1
3632 EOF
3633
3634  fi
3635
3636
3637  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
3638 echo "configure:3639: checking for asprintf declaration" >&5
3639 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
3640   echo $ac_n "(cached) $ac_c" 1>&6
3641 else
3642   
3643     cat > conftest.$ac_ext <<EOF
3644 #line 3645 "configure"
3645 #include "confdefs.h"
3646 #include <stdio.h>
3647 int main() {
3648 int i = (int)asprintf
3649 ; return 0; }
3650 EOF
3651 if { (eval echo configure:3652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3652   rm -rf conftest*
3653   ac_cv_have_asprintf_decl=yes
3654 else
3655   echo "configure: failed program was:" >&5
3656   cat conftest.$ac_ext >&5
3657   rm -rf conftest*
3658   ac_cv_have_asprintf_decl=no
3659 fi
3660 rm -f conftest*
3661 fi
3662
3663 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
3664  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
3665     cat >> confdefs.h <<\EOF
3666 #define HAVE_ASPRINTF_DECL 1
3667 EOF
3668
3669  fi
3670
3671
3672  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
3673 echo "configure:3674: checking for vasprintf declaration" >&5
3674 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
3675   echo $ac_n "(cached) $ac_c" 1>&6
3676 else
3677   
3678     cat > conftest.$ac_ext <<EOF
3679 #line 3680 "configure"
3680 #include "confdefs.h"
3681 #include <stdio.h>
3682 int main() {
3683 int i = (int)vasprintf
3684 ; return 0; }
3685 EOF
3686 if { (eval echo configure:3687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3687   rm -rf conftest*
3688   ac_cv_have_vasprintf_decl=yes
3689 else
3690   echo "configure: failed program was:" >&5
3691   cat conftest.$ac_ext >&5
3692   rm -rf conftest*
3693   ac_cv_have_vasprintf_decl=no
3694 fi
3695 rm -f conftest*
3696 fi
3697
3698 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
3699  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
3700     cat >> confdefs.h <<\EOF
3701 #define HAVE_VASPRINTF_DECL 1
3702 EOF
3703
3704  fi
3705
3706
3707  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
3708 echo "configure:3709: checking for vsnprintf declaration" >&5
3709 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
3710   echo $ac_n "(cached) $ac_c" 1>&6
3711 else
3712   
3713     cat > conftest.$ac_ext <<EOF
3714 #line 3715 "configure"
3715 #include "confdefs.h"
3716 #include <stdio.h>
3717 int main() {
3718 int i = (int)vsnprintf
3719 ; return 0; }
3720 EOF
3721 if { (eval echo configure:3722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3722   rm -rf conftest*
3723   ac_cv_have_vsnprintf_decl=yes
3724 else
3725   echo "configure: failed program was:" >&5
3726   cat conftest.$ac_ext >&5
3727   rm -rf conftest*
3728   ac_cv_have_vsnprintf_decl=no
3729 fi
3730 rm -f conftest*
3731 fi
3732
3733 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
3734  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
3735     cat >> confdefs.h <<\EOF
3736 #define HAVE_VSNPRINTF_DECL 1
3737 EOF
3738
3739  fi
3740
3741
3742  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
3743 echo "configure:3744: checking for snprintf declaration" >&5
3744 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
3745   echo $ac_n "(cached) $ac_c" 1>&6
3746 else
3747   
3748     cat > conftest.$ac_ext <<EOF
3749 #line 3750 "configure"
3750 #include "confdefs.h"
3751 #include <stdio.h>
3752 int main() {
3753 int i = (int)snprintf
3754 ; return 0; }
3755 EOF
3756 if { (eval echo configure:3757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3757   rm -rf conftest*
3758   ac_cv_have_snprintf_decl=yes
3759 else
3760   echo "configure: failed program was:" >&5
3761   cat conftest.$ac_ext >&5
3762   rm -rf conftest*
3763   ac_cv_have_snprintf_decl=no
3764 fi
3765 rm -f conftest*
3766 fi
3767
3768 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
3769  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
3770     cat >> confdefs.h <<\EOF
3771 #define HAVE_SNPRINTF_DECL 1
3772 EOF
3773
3774  fi
3775
3776
3777 # and glibc has setresuid under linux but the function does
3778 # nothing until kernel 2.1.44! very dumb.
3779 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
3780 echo "configure:3781: checking for real setresuid" >&5
3781 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
3782   echo $ac_n "(cached) $ac_c" 1>&6
3783 else
3784   
3785     if test "$cross_compiling" = yes; then
3786   samba_cv_have_setresuid=cross
3787 else
3788   cat > conftest.$ac_ext <<EOF
3789 #line 3790 "configure"
3790 #include "confdefs.h"
3791 #include <errno.h>
3792 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
3793 EOF
3794 if { (eval echo configure:3795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3795 then
3796   samba_cv_have_setresuid=yes
3797 else
3798   echo "configure: failed program was:" >&5
3799   cat conftest.$ac_ext >&5
3800   rm -fr conftest*
3801   samba_cv_have_setresuid=no
3802 fi
3803 rm -fr conftest*
3804 fi
3805
3806 fi
3807
3808 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
3809 if test x"$samba_cv_have_setresuid" = x"yes"; then
3810     cat >> confdefs.h <<\EOF
3811 #define HAVE_SETRESUID 1
3812 EOF
3813
3814 fi
3815
3816 # Do the same check for setresguid...
3817 #
3818 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
3819 echo "configure:3820: checking for real setresgid" >&5
3820 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
3821   echo $ac_n "(cached) $ac_c" 1>&6
3822 else
3823   
3824     if test "$cross_compiling" = yes; then
3825   samba_cv_have_setresgid=cross
3826 else
3827   cat > conftest.$ac_ext <<EOF
3828 #line 3829 "configure"
3829 #include "confdefs.h"
3830 #include <unistd.h>
3831 #include <errno.h>
3832 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
3833 EOF
3834 if { (eval echo configure:3835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3835 then
3836   samba_cv_have_setresgid=yes
3837 else
3838   echo "configure: failed program was:" >&5
3839   cat conftest.$ac_ext >&5
3840   rm -fr conftest*
3841   samba_cv_have_setresgid=no
3842 fi
3843 rm -fr conftest*
3844 fi
3845
3846 fi
3847
3848 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
3849 if test x"$samba_cv_have_setresgid" = x"yes"; then
3850     cat >> confdefs.h <<\EOF
3851 #define HAVE_SETRESGID 1
3852 EOF
3853
3854 fi
3855
3856 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
3857 echo "configure:3858: checking for 8-bit clean memcmp" >&5
3858 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
3859   echo $ac_n "(cached) $ac_c" 1>&6
3860 else
3861   if test "$cross_compiling" = yes; then
3862   ac_cv_func_memcmp_clean=no
3863 else
3864   cat > conftest.$ac_ext <<EOF
3865 #line 3866 "configure"
3866 #include "confdefs.h"
3867
3868 main()
3869 {
3870   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
3871   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
3872 }
3873
3874 EOF
3875 if { (eval echo configure:3876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3876 then
3877   ac_cv_func_memcmp_clean=yes
3878 else
3879   echo "configure: failed program was:" >&5
3880   cat conftest.$ac_ext >&5
3881   rm -fr conftest*
3882   ac_cv_func_memcmp_clean=no
3883 fi
3884 rm -fr conftest*
3885 fi
3886
3887 fi
3888
3889 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
3890 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
3891
3892
3893 ###############################################
3894 # test for where we get crypt() from
3895 for ac_func in crypt
3896 do
3897 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3898 echo "configure:3899: checking for $ac_func" >&5
3899 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3900   echo $ac_n "(cached) $ac_c" 1>&6
3901 else
3902   cat > conftest.$ac_ext <<EOF
3903 #line 3904 "configure"
3904 #include "confdefs.h"
3905 /* System header to define __stub macros and hopefully few prototypes,
3906     which can conflict with char $ac_func(); below.  */
3907 #include <assert.h>
3908 /* Override any gcc2 internal prototype to avoid an error.  */
3909 /* We use char because int might match the return type of a gcc2
3910     builtin and then its argument prototype would still apply.  */
3911 char $ac_func();
3912
3913 int main() {
3914
3915 /* The GNU C library defines this for functions which it implements
3916     to always fail with ENOSYS.  Some functions are actually named
3917     something starting with __ and the normal name is an alias.  */
3918 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3919 choke me
3920 #else
3921 $ac_func();
3922 #endif
3923
3924 ; return 0; }
3925 EOF
3926 if { (eval echo configure:3927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3927   rm -rf conftest*
3928   eval "ac_cv_func_$ac_func=yes"
3929 else
3930   echo "configure: failed program was:" >&5
3931   cat conftest.$ac_ext >&5
3932   rm -rf conftest*
3933   eval "ac_cv_func_$ac_func=no"
3934 fi
3935 rm -f conftest*
3936 fi
3937
3938 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3939   echo "$ac_t""yes" 1>&6
3940     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3941   cat >> confdefs.h <<EOF
3942 #define $ac_tr_func 1
3943 EOF
3944  
3945 else
3946   echo "$ac_t""no" 1>&6
3947 fi
3948 done
3949
3950 if test x"$ac_cv_func_crypt" = x"no"; then
3951     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
3952 echo "configure:3953: checking for crypt in -lcrypt" >&5
3953 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
3954 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3955   echo $ac_n "(cached) $ac_c" 1>&6
3956 else
3957   ac_save_LIBS="$LIBS"
3958 LIBS="-lcrypt  $LIBS"
3959 cat > conftest.$ac_ext <<EOF
3960 #line 3961 "configure"
3961 #include "confdefs.h"
3962 /* Override any gcc2 internal prototype to avoid an error.  */
3963 /* We use char because int might match the return type of a gcc2
3964     builtin and then its argument prototype would still apply.  */
3965 char crypt();
3966
3967 int main() {
3968 crypt()
3969 ; return 0; }
3970 EOF
3971 if { (eval echo configure:3972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3972   rm -rf conftest*
3973   eval "ac_cv_lib_$ac_lib_var=yes"
3974 else
3975   echo "configure: failed program was:" >&5
3976   cat conftest.$ac_ext >&5
3977   rm -rf conftest*
3978   eval "ac_cv_lib_$ac_lib_var=no"
3979 fi
3980 rm -f conftest*
3981 LIBS="$ac_save_LIBS"
3982
3983 fi
3984 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3985   echo "$ac_t""yes" 1>&6
3986   LIBS="$LIBS -lcrypt";
3987         cat >> confdefs.h <<\EOF
3988 #define HAVE_CRYPT 1
3989 EOF
3990
3991 else
3992   echo "$ac_t""no" 1>&6
3993 fi
3994
3995 fi
3996
3997
3998 ###############################################
3999 # Readline included by default unless explicitly asked not to
4000 test "${with_readline+set}" != "set" && with_readline=yes
4001
4002 # test for where we get readline() from
4003 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4004 echo "configure:4005: checking whether to use readline" >&5
4005 # Check whether --with-readline or --without-readline was given.
4006 if test "${with_readline+set}" = set; then
4007   withval="$with_readline"
4008     case "$with_readline" in
4009   yes)
4010     echo "$ac_t""yes" 1>&6
4011
4012     for ac_hdr in readline.h history.h readline/readline.h
4013 do
4014 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4015 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4016 echo "configure:4017: checking for $ac_hdr" >&5
4017 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4018   echo $ac_n "(cached) $ac_c" 1>&6
4019 else
4020   cat > conftest.$ac_ext <<EOF
4021 #line 4022 "configure"
4022 #include "confdefs.h"
4023 #include <$ac_hdr>
4024 EOF
4025 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4026 { (eval echo configure:4027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4027 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4028 if test -z "$ac_err"; then
4029   rm -rf conftest*
4030   eval "ac_cv_header_$ac_safe=yes"
4031 else
4032   echo "$ac_err" >&5
4033   echo "configure: failed program was:" >&5
4034   cat conftest.$ac_ext >&5
4035   rm -rf conftest*
4036   eval "ac_cv_header_$ac_safe=no"
4037 fi
4038 rm -f conftest*
4039 fi
4040 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4041   echo "$ac_t""yes" 1>&6
4042     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4043   cat >> confdefs.h <<EOF
4044 #define $ac_tr_hdr 1
4045 EOF
4046  
4047 else
4048   echo "$ac_t""no" 1>&6
4049 fi
4050 done
4051
4052     for ac_hdr in readline/history.h
4053 do
4054 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4055 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4056 echo "configure:4057: checking for $ac_hdr" >&5
4057 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4058   echo $ac_n "(cached) $ac_c" 1>&6
4059 else
4060   cat > conftest.$ac_ext <<EOF
4061 #line 4062 "configure"
4062 #include "confdefs.h"
4063 #include <$ac_hdr>
4064 EOF
4065 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4066 { (eval echo configure:4067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4067 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4068 if test -z "$ac_err"; then
4069   rm -rf conftest*
4070   eval "ac_cv_header_$ac_safe=yes"
4071 else
4072   echo "$ac_err" >&5
4073   echo "configure: failed program was:" >&5
4074   cat conftest.$ac_ext >&5
4075   rm -rf conftest*
4076   eval "ac_cv_header_$ac_safe=no"
4077 fi
4078 rm -f conftest*
4079 fi
4080 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4081   echo "$ac_t""yes" 1>&6
4082     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4083   cat >> confdefs.h <<EOF
4084 #define $ac_tr_hdr 1
4085 EOF
4086  
4087 else
4088   echo "$ac_t""no" 1>&6
4089 fi
4090 done
4091
4092
4093     for ac_hdr in readline.h readline/readline.h
4094 do
4095 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4096 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4097 echo "configure:4098: checking for $ac_hdr" >&5
4098 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4099   echo $ac_n "(cached) $ac_c" 1>&6
4100 else
4101   cat > conftest.$ac_ext <<EOF
4102 #line 4103 "configure"
4103 #include "confdefs.h"
4104 #include <$ac_hdr>
4105 EOF
4106 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4107 { (eval echo configure:4108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4108 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4109 if test -z "$ac_err"; then
4110   rm -rf conftest*
4111   eval "ac_cv_header_$ac_safe=yes"
4112 else
4113   echo "$ac_err" >&5
4114   echo "configure: failed program was:" >&5
4115   cat conftest.$ac_ext >&5
4116   rm -rf conftest*
4117   eval "ac_cv_header_$ac_safe=no"
4118 fi
4119 rm -f conftest*
4120 fi
4121 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4122   echo "$ac_t""yes" 1>&6
4123     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4124   cat >> confdefs.h <<EOF
4125 #define $ac_tr_hdr 1
4126 EOF
4127  
4128       for termlib in ncurses curses termcap terminfo termlib; do
4129        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4130 echo "configure:4131: checking for tgetent in -l${termlib}" >&5
4131 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4132 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4133   echo $ac_n "(cached) $ac_c" 1>&6
4134 else
4135   ac_save_LIBS="$LIBS"
4136 LIBS="-l${termlib}  $LIBS"
4137 cat > conftest.$ac_ext <<EOF
4138 #line 4139 "configure"
4139 #include "confdefs.h"
4140 /* Override any gcc2 internal prototype to avoid an error.  */
4141 /* We use char because int might match the return type of a gcc2
4142     builtin and then its argument prototype would still apply.  */
4143 char tgetent();
4144
4145 int main() {
4146 tgetent()
4147 ; return 0; }
4148 EOF
4149 if { (eval echo configure:4150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4150   rm -rf conftest*
4151   eval "ac_cv_lib_$ac_lib_var=yes"
4152 else
4153   echo "configure: failed program was:" >&5
4154   cat conftest.$ac_ext >&5
4155   rm -rf conftest*
4156   eval "ac_cv_lib_$ac_lib_var=no"
4157 fi
4158 rm -f conftest*
4159 LIBS="$ac_save_LIBS"
4160
4161 fi
4162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4163   echo "$ac_t""yes" 1>&6
4164   TERMLIBS="-l${termlib}"; break
4165 else
4166   echo "$ac_t""no" 1>&6
4167 fi
4168
4169       done
4170       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4171 echo "configure:4172: checking for rl_callback_handler_install in -lreadline" >&5
4172 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4173 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4174   echo $ac_n "(cached) $ac_c" 1>&6
4175 else
4176   ac_save_LIBS="$LIBS"
4177 LIBS="-lreadline $TERMLIBS $LIBS"
4178 cat > conftest.$ac_ext <<EOF
4179 #line 4180 "configure"
4180 #include "confdefs.h"
4181 /* Override any gcc2 internal prototype to avoid an error.  */
4182 /* We use char because int might match the return type of a gcc2
4183     builtin and then its argument prototype would still apply.  */
4184 char rl_callback_handler_install();
4185
4186 int main() {
4187 rl_callback_handler_install()
4188 ; return 0; }
4189 EOF
4190 if { (eval echo configure:4191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4191   rm -rf conftest*
4192   eval "ac_cv_lib_$ac_lib_var=yes"
4193 else
4194   echo "configure: failed program was:" >&5
4195   cat conftest.$ac_ext >&5
4196   rm -rf conftest*
4197   eval "ac_cv_lib_$ac_lib_var=no"
4198 fi
4199 rm -f conftest*
4200 LIBS="$ac_save_LIBS"
4201
4202 fi
4203 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4204   echo "$ac_t""yes" 1>&6
4205   TERMLIBS="-lreadline $TERMLIBS"
4206        cat >> confdefs.h <<\EOF
4207 #define HAVE_LIBREADLINE 1
4208 EOF
4209
4210        break
4211 else
4212   echo "$ac_t""no" 1>&6
4213 TERMLIBS=
4214 fi
4215
4216 else
4217   echo "$ac_t""no" 1>&6
4218 fi
4219 done
4220
4221     ;;
4222   no)
4223     echo "$ac_t""no" 1>&6
4224     ;;
4225   *)
4226     echo "$ac_t""yes" 1>&6
4227
4228     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4229     # alternate readline path
4230     _ldflags=${LDFLAGS}
4231     _cppflags=${CPPFLAGS}
4232
4233     # Add additional search path
4234     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4235     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4236
4237     for ac_hdr in readline.h history.h readline/readline.h
4238 do
4239 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4240 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4241 echo "configure:4242: checking for $ac_hdr" >&5
4242 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4243   echo $ac_n "(cached) $ac_c" 1>&6
4244 else
4245   cat > conftest.$ac_ext <<EOF
4246 #line 4247 "configure"
4247 #include "confdefs.h"
4248 #include <$ac_hdr>
4249 EOF
4250 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4251 { (eval echo configure:4252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4252 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4253 if test -z "$ac_err"; then
4254   rm -rf conftest*
4255   eval "ac_cv_header_$ac_safe=yes"
4256 else
4257   echo "$ac_err" >&5
4258   echo "configure: failed program was:" >&5
4259   cat conftest.$ac_ext >&5
4260   rm -rf conftest*
4261   eval "ac_cv_header_$ac_safe=no"
4262 fi
4263 rm -f conftest*
4264 fi
4265 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4266   echo "$ac_t""yes" 1>&6
4267     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4268   cat >> confdefs.h <<EOF
4269 #define $ac_tr_hdr 1
4270 EOF
4271  
4272 else
4273   echo "$ac_t""no" 1>&6
4274 fi
4275 done
4276
4277     for ac_hdr in readline/history.h
4278 do
4279 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4280 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4281 echo "configure:4282: checking for $ac_hdr" >&5
4282 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4283   echo $ac_n "(cached) $ac_c" 1>&6
4284 else
4285   cat > conftest.$ac_ext <<EOF
4286 #line 4287 "configure"
4287 #include "confdefs.h"
4288 #include <$ac_hdr>
4289 EOF
4290 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4291 { (eval echo configure:4292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4292 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4293 if test -z "$ac_err"; then
4294   rm -rf conftest*
4295   eval "ac_cv_header_$ac_safe=yes"
4296 else
4297   echo "$ac_err" >&5
4298   echo "configure: failed program was:" >&5
4299   cat conftest.$ac_ext >&5
4300   rm -rf conftest*
4301   eval "ac_cv_header_$ac_safe=no"
4302 fi
4303 rm -f conftest*
4304 fi
4305 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4306   echo "$ac_t""yes" 1>&6
4307     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4308   cat >> confdefs.h <<EOF
4309 #define $ac_tr_hdr 1
4310 EOF
4311  
4312 else
4313   echo "$ac_t""no" 1>&6
4314 fi
4315 done
4316
4317
4318     for ac_hdr in readline.h readline/readline.h
4319 do
4320 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4321 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4322 echo "configure:4323: checking for $ac_hdr" >&5
4323 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4324   echo $ac_n "(cached) $ac_c" 1>&6
4325 else
4326   cat > conftest.$ac_ext <<EOF
4327 #line 4328 "configure"
4328 #include "confdefs.h"
4329 #include <$ac_hdr>
4330 EOF
4331 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4332 { (eval echo configure:4333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4333 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4334 if test -z "$ac_err"; then
4335   rm -rf conftest*
4336   eval "ac_cv_header_$ac_safe=yes"
4337 else
4338   echo "$ac_err" >&5
4339   echo "configure: failed program was:" >&5
4340   cat conftest.$ac_ext >&5
4341   rm -rf conftest*
4342   eval "ac_cv_header_$ac_safe=no"
4343 fi
4344 rm -f conftest*
4345 fi
4346 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4347   echo "$ac_t""yes" 1>&6
4348     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4349   cat >> confdefs.h <<EOF
4350 #define $ac_tr_hdr 1
4351 EOF
4352  
4353       for termlib in ncurses curses termcap terminfo termlib; do
4354        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4355 echo "configure:4356: checking for tgetent in -l${termlib}" >&5
4356 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4357 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4358   echo $ac_n "(cached) $ac_c" 1>&6
4359 else
4360   ac_save_LIBS="$LIBS"
4361 LIBS="-l${termlib}  $LIBS"
4362 cat > conftest.$ac_ext <<EOF
4363 #line 4364 "configure"
4364 #include "confdefs.h"
4365 /* Override any gcc2 internal prototype to avoid an error.  */
4366 /* We use char because int might match the return type of a gcc2
4367     builtin and then its argument prototype would still apply.  */
4368 char tgetent();
4369
4370 int main() {
4371 tgetent()
4372 ; return 0; }
4373 EOF
4374 if { (eval echo configure:4375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4375   rm -rf conftest*
4376   eval "ac_cv_lib_$ac_lib_var=yes"
4377 else
4378   echo "configure: failed program was:" >&5
4379   cat conftest.$ac_ext >&5
4380   rm -rf conftest*
4381   eval "ac_cv_lib_$ac_lib_var=no"
4382 fi
4383 rm -f conftest*
4384 LIBS="$ac_save_LIBS"
4385
4386 fi
4387 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4388   echo "$ac_t""yes" 1>&6
4389   TERMLIBS="-l${termlib}"; break
4390 else
4391   echo "$ac_t""no" 1>&6
4392 fi
4393
4394       done
4395       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4396 echo "configure:4397: checking for rl_callback_handler_install in -lreadline" >&5
4397 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4398 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4399   echo $ac_n "(cached) $ac_c" 1>&6
4400 else
4401   ac_save_LIBS="$LIBS"
4402 LIBS="-lreadline $TERMLIBS $LIBS"
4403 cat > conftest.$ac_ext <<EOF
4404 #line 4405 "configure"
4405 #include "confdefs.h"
4406 /* Override any gcc2 internal prototype to avoid an error.  */
4407 /* We use char because int might match the return type of a gcc2
4408     builtin and then its argument prototype would still apply.  */
4409 char rl_callback_handler_install();
4410
4411 int main() {
4412 rl_callback_handler_install()
4413 ; return 0; }
4414 EOF
4415 if { (eval echo configure:4416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4416   rm -rf conftest*
4417   eval "ac_cv_lib_$ac_lib_var=yes"
4418 else
4419   echo "configure: failed program was:" >&5
4420   cat conftest.$ac_ext >&5
4421   rm -rf conftest*
4422   eval "ac_cv_lib_$ac_lib_var=no"
4423 fi
4424 rm -f conftest*
4425 LIBS="$ac_save_LIBS"
4426
4427 fi
4428 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4429   echo "$ac_t""yes" 1>&6
4430   TERMLDFLAGS="-L$with_readline/lib"
4431        TERMCPPFLAGS="-I$with_readline/include"
4432        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4433        TERMLIBS="-lreadline $TERMLIBS"
4434        cat >> confdefs.h <<\EOF
4435 #define HAVE_LIBREADLINE 1
4436 EOF
4437
4438        break
4439 else
4440   echo "$ac_t""no" 1>&6
4441 TERMLIBS= CPPFLAGS=$_cppflags
4442 fi
4443
4444 else
4445   echo "$ac_t""no" 1>&6
4446 fi
4447 done
4448
4449
4450     LDFLAGS=$_ldflags
4451     ;;
4452   esac
4453 else
4454   echo "$ac_t""no" 1>&6
4455
4456 fi
4457
4458
4459
4460
4461 # The following test taken from the cvs sources
4462 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4463 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4464 # libsocket.so which has a bad implementation of gethostbyname (it
4465 # only looks in /etc/hosts), so we only look for -lsocket if we need
4466 # it.
4467 for ac_func in connect
4468 do
4469 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4470 echo "configure:4471: checking for $ac_func" >&5
4471 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4472   echo $ac_n "(cached) $ac_c" 1>&6
4473 else
4474   cat > conftest.$ac_ext <<EOF
4475 #line 4476 "configure"
4476 #include "confdefs.h"
4477 /* System header to define __stub macros and hopefully few prototypes,
4478     which can conflict with char $ac_func(); below.  */
4479 #include <assert.h>
4480 /* Override any gcc2 internal prototype to avoid an error.  */
4481 /* We use char because int might match the return type of a gcc2
4482     builtin and then its argument prototype would still apply.  */
4483 char $ac_func();
4484
4485 int main() {
4486
4487 /* The GNU C library defines this for functions which it implements
4488     to always fail with ENOSYS.  Some functions are actually named
4489     something starting with __ and the normal name is an alias.  */
4490 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4491 choke me
4492 #else
4493 $ac_func();
4494 #endif
4495
4496 ; return 0; }
4497 EOF
4498 if { (eval echo configure:4499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4499   rm -rf conftest*
4500   eval "ac_cv_func_$ac_func=yes"
4501 else
4502   echo "configure: failed program was:" >&5
4503   cat conftest.$ac_ext >&5
4504   rm -rf conftest*
4505   eval "ac_cv_func_$ac_func=no"
4506 fi
4507 rm -f conftest*
4508 fi
4509
4510 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4511   echo "$ac_t""yes" 1>&6
4512     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4513   cat >> confdefs.h <<EOF
4514 #define $ac_tr_func 1
4515 EOF
4516  
4517 else
4518   echo "$ac_t""no" 1>&6
4519 fi
4520 done
4521
4522 if test x"$ac_cv_func_connect" = x"no"; then
4523     case "$LIBS" in
4524     *-lnsl*) ;;
4525     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4526 echo "configure:4527: checking for printf in -lnsl_s" >&5
4527 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4528 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4529   echo $ac_n "(cached) $ac_c" 1>&6
4530 else
4531   ac_save_LIBS="$LIBS"
4532 LIBS="-lnsl_s  $LIBS"
4533 cat > conftest.$ac_ext <<EOF
4534 #line 4535 "configure"
4535 #include "confdefs.h"
4536 /* Override any gcc2 internal prototype to avoid an error.  */
4537 /* We use char because int might match the return type of a gcc2
4538     builtin and then its argument prototype would still apply.  */
4539 char printf();
4540
4541 int main() {
4542 printf()
4543 ; return 0; }
4544 EOF
4545 if { (eval echo configure:4546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4546   rm -rf conftest*
4547   eval "ac_cv_lib_$ac_lib_var=yes"
4548 else
4549   echo "configure: failed program was:" >&5
4550   cat conftest.$ac_ext >&5
4551   rm -rf conftest*
4552   eval "ac_cv_lib_$ac_lib_var=no"
4553 fi
4554 rm -f conftest*
4555 LIBS="$ac_save_LIBS"
4556
4557 fi
4558 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4559   echo "$ac_t""yes" 1>&6
4560     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4561     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4562   cat >> confdefs.h <<EOF
4563 #define $ac_tr_lib 1
4564 EOF
4565
4566   LIBS="-lnsl_s $LIBS"
4567
4568 else
4569   echo "$ac_t""no" 1>&6
4570 fi
4571  ;;
4572     esac
4573     case "$LIBS" in
4574     *-lnsl*) ;;
4575     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
4576 echo "configure:4577: checking for printf in -lnsl" >&5
4577 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
4578 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4579   echo $ac_n "(cached) $ac_c" 1>&6
4580 else
4581   ac_save_LIBS="$LIBS"
4582 LIBS="-lnsl  $LIBS"
4583 cat > conftest.$ac_ext <<EOF
4584 #line 4585 "configure"
4585 #include "confdefs.h"
4586 /* Override any gcc2 internal prototype to avoid an error.  */
4587 /* We use char because int might match the return type of a gcc2
4588     builtin and then its argument prototype would still apply.  */
4589 char printf();
4590
4591 int main() {
4592 printf()
4593 ; return 0; }
4594 EOF
4595 if { (eval echo configure:4596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4596   rm -rf conftest*
4597   eval "ac_cv_lib_$ac_lib_var=yes"
4598 else
4599   echo "configure: failed program was:" >&5
4600   cat conftest.$ac_ext >&5
4601   rm -rf conftest*
4602   eval "ac_cv_lib_$ac_lib_var=no"
4603 fi
4604 rm -f conftest*
4605 LIBS="$ac_save_LIBS"
4606
4607 fi
4608 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4609   echo "$ac_t""yes" 1>&6
4610     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4611     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4612   cat >> confdefs.h <<EOF
4613 #define $ac_tr_lib 1
4614 EOF
4615
4616   LIBS="-lnsl $LIBS"
4617
4618 else
4619   echo "$ac_t""no" 1>&6
4620 fi
4621  ;;
4622     esac
4623     case "$LIBS" in
4624     *-lsocket*) ;;
4625     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4626 echo "configure:4627: checking for connect in -lsocket" >&5
4627 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4628 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4629   echo $ac_n "(cached) $ac_c" 1>&6
4630 else
4631   ac_save_LIBS="$LIBS"
4632 LIBS="-lsocket  $LIBS"
4633 cat > conftest.$ac_ext <<EOF
4634 #line 4635 "configure"
4635 #include "confdefs.h"
4636 /* Override any gcc2 internal prototype to avoid an error.  */
4637 /* We use char because int might match the return type of a gcc2
4638     builtin and then its argument prototype would still apply.  */
4639 char connect();
4640
4641 int main() {
4642 connect()
4643 ; return 0; }
4644 EOF
4645 if { (eval echo configure:4646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4646   rm -rf conftest*
4647   eval "ac_cv_lib_$ac_lib_var=yes"
4648 else
4649   echo "configure: failed program was:" >&5
4650   cat conftest.$ac_ext >&5
4651   rm -rf conftest*
4652   eval "ac_cv_lib_$ac_lib_var=no"
4653 fi
4654 rm -f conftest*
4655 LIBS="$ac_save_LIBS"
4656
4657 fi
4658 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4659   echo "$ac_t""yes" 1>&6
4660     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4661     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4662   cat >> confdefs.h <<EOF
4663 #define $ac_tr_lib 1
4664 EOF
4665
4666   LIBS="-lsocket $LIBS"
4667
4668 else
4669   echo "$ac_t""no" 1>&6
4670 fi
4671  ;;
4672     esac
4673     case "$LIBS" in
4674     *-linet*) ;;
4675     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
4676 echo "configure:4677: checking for connect in -linet" >&5
4677 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
4678 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4679   echo $ac_n "(cached) $ac_c" 1>&6
4680 else
4681   ac_save_LIBS="$LIBS"
4682 LIBS="-linet  $LIBS"
4683 cat > conftest.$ac_ext <<EOF
4684 #line 4685 "configure"
4685 #include "confdefs.h"
4686 /* Override any gcc2 internal prototype to avoid an error.  */
4687 /* We use char because int might match the return type of a gcc2
4688     builtin and then its argument prototype would still apply.  */
4689 char connect();
4690
4691 int main() {
4692 connect()
4693 ; return 0; }
4694 EOF
4695 if { (eval echo configure:4696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4696   rm -rf conftest*
4697   eval "ac_cv_lib_$ac_lib_var=yes"
4698 else
4699   echo "configure: failed program was:" >&5
4700   cat conftest.$ac_ext >&5
4701   rm -rf conftest*
4702   eval "ac_cv_lib_$ac_lib_var=no"
4703 fi
4704 rm -f conftest*
4705 LIBS="$ac_save_LIBS"
4706
4707 fi
4708 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4709   echo "$ac_t""yes" 1>&6
4710     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4711     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4712   cat >> confdefs.h <<EOF
4713 #define $ac_tr_lib 1
4714 EOF
4715
4716   LIBS="-linet $LIBS"
4717
4718 else
4719   echo "$ac_t""no" 1>&6
4720 fi
4721  ;;
4722     esac
4723             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
4724        test x"$ac_cv_lib_inet_connect" = x"yes"; then
4725         # ac_cv_func_connect=yes
4726         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
4727         cat >> confdefs.h <<\EOF
4728 #define HAVE_CONNECT 1
4729 EOF
4730
4731     fi
4732 fi
4733
4734 ###############################################
4735 # test for where we get get_yp_default_domain() from
4736 for ac_func in yp_get_default_domain
4737 do
4738 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4739 echo "configure:4740: checking for $ac_func" >&5
4740 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4741   echo $ac_n "(cached) $ac_c" 1>&6
4742 else
4743   cat > conftest.$ac_ext <<EOF
4744 #line 4745 "configure"
4745 #include "confdefs.h"
4746 /* System header to define __stub macros and hopefully few prototypes,
4747     which can conflict with char $ac_func(); below.  */
4748 #include <assert.h>
4749 /* Override any gcc2 internal prototype to avoid an error.  */
4750 /* We use char because int might match the return type of a gcc2
4751     builtin and then its argument prototype would still apply.  */
4752 char $ac_func();
4753
4754 int main() {
4755
4756 /* The GNU C library defines this for functions which it implements
4757     to always fail with ENOSYS.  Some functions are actually named
4758     something starting with __ and the normal name is an alias.  */
4759 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4760 choke me
4761 #else
4762 $ac_func();
4763 #endif
4764
4765 ; return 0; }
4766 EOF
4767 if { (eval echo configure:4768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4768   rm -rf conftest*
4769   eval "ac_cv_func_$ac_func=yes"
4770 else
4771   echo "configure: failed program was:" >&5
4772   cat conftest.$ac_ext >&5
4773   rm -rf conftest*
4774   eval "ac_cv_func_$ac_func=no"
4775 fi
4776 rm -f conftest*
4777 fi
4778
4779 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4780   echo "$ac_t""yes" 1>&6
4781     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4782   cat >> confdefs.h <<EOF
4783 #define $ac_tr_func 1
4784 EOF
4785  
4786 else
4787   echo "$ac_t""no" 1>&6
4788 fi
4789 done
4790
4791 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
4792         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
4793 echo "configure:4794: checking for yp_get_default_domain in -lnsl" >&5
4794 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
4795 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4796   echo $ac_n "(cached) $ac_c" 1>&6
4797 else
4798   ac_save_LIBS="$LIBS"
4799 LIBS="-lnsl  $LIBS"
4800 cat > conftest.$ac_ext <<EOF
4801 #line 4802 "configure"
4802 #include "confdefs.h"
4803 /* Override any gcc2 internal prototype to avoid an error.  */
4804 /* We use char because int might match the return type of a gcc2
4805     builtin and then its argument prototype would still apply.  */
4806 char yp_get_default_domain();
4807
4808 int main() {
4809 yp_get_default_domain()
4810 ; return 0; }
4811 EOF
4812 if { (eval echo configure:4813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4813   rm -rf conftest*
4814   eval "ac_cv_lib_$ac_lib_var=yes"
4815 else
4816   echo "configure: failed program was:" >&5
4817   cat conftest.$ac_ext >&5
4818   rm -rf conftest*
4819   eval "ac_cv_lib_$ac_lib_var=no"
4820 fi
4821 rm -f conftest*
4822 LIBS="$ac_save_LIBS"
4823
4824 fi
4825 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4826   echo "$ac_t""yes" 1>&6
4827   LIBS="$LIBS -lnsl";
4828         cat >> confdefs.h <<\EOF
4829 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
4830 EOF
4831
4832 else
4833   echo "$ac_t""no" 1>&6
4834 fi
4835  
4836 fi
4837
4838 # Check if we have execl, if not we need to compile smbrun.
4839 for ac_func in execl
4840 do
4841 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4842 echo "configure:4843: checking for $ac_func" >&5
4843 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4844   echo $ac_n "(cached) $ac_c" 1>&6
4845 else
4846   cat > conftest.$ac_ext <<EOF
4847 #line 4848 "configure"
4848 #include "confdefs.h"
4849 /* System header to define __stub macros and hopefully few prototypes,
4850     which can conflict with char $ac_func(); below.  */
4851 #include <assert.h>
4852 /* Override any gcc2 internal prototype to avoid an error.  */
4853 /* We use char because int might match the return type of a gcc2
4854     builtin and then its argument prototype would still apply.  */
4855 char $ac_func();
4856
4857 int main() {
4858
4859 /* The GNU C library defines this for functions which it implements
4860     to always fail with ENOSYS.  Some functions are actually named
4861     something starting with __ and the normal name is an alias.  */
4862 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4863 choke me
4864 #else
4865 $ac_func();
4866 #endif
4867
4868 ; return 0; }
4869 EOF
4870 if { (eval echo configure:4871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4871   rm -rf conftest*
4872   eval "ac_cv_func_$ac_func=yes"
4873 else
4874   echo "configure: failed program was:" >&5
4875   cat conftest.$ac_ext >&5
4876   rm -rf conftest*
4877   eval "ac_cv_func_$ac_func=no"
4878 fi
4879 rm -f conftest*
4880 fi
4881
4882 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4883   echo "$ac_t""yes" 1>&6
4884     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4885   cat >> confdefs.h <<EOF
4886 #define $ac_tr_func 1
4887 EOF
4888  
4889 else
4890   echo "$ac_t""no" 1>&6
4891 fi
4892 done
4893
4894 if test x"$ac_cv_func_execl" = x"no"; then
4895     RUNPROG="bin/smbrun"
4896 else
4897     RUNPROG=""
4898 fi
4899
4900 for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot
4901 do
4902 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4903 echo "configure:4904: checking for $ac_func" >&5
4904 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4905   echo $ac_n "(cached) $ac_c" 1>&6
4906 else
4907   cat > conftest.$ac_ext <<EOF
4908 #line 4909 "configure"
4909 #include "confdefs.h"
4910 /* System header to define __stub macros and hopefully few prototypes,
4911     which can conflict with char $ac_func(); below.  */
4912 #include <assert.h>
4913 /* Override any gcc2 internal prototype to avoid an error.  */
4914 /* We use char because int might match the return type of a gcc2
4915     builtin and then its argument prototype would still apply.  */
4916 char $ac_func();
4917
4918 int main() {
4919
4920 /* The GNU C library defines this for functions which it implements
4921     to always fail with ENOSYS.  Some functions are actually named
4922     something starting with __ and the normal name is an alias.  */
4923 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4924 choke me
4925 #else
4926 $ac_func();
4927 #endif
4928
4929 ; return 0; }
4930 EOF
4931 if { (eval echo configure:4932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4932   rm -rf conftest*
4933   eval "ac_cv_func_$ac_func=yes"
4934 else
4935   echo "configure: failed program was:" >&5
4936   cat conftest.$ac_ext >&5
4937   rm -rf conftest*
4938   eval "ac_cv_func_$ac_func=no"
4939 fi
4940 rm -f conftest*
4941 fi
4942
4943 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4944   echo "$ac_t""yes" 1>&6
4945     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4946   cat >> confdefs.h <<EOF
4947 #define $ac_tr_func 1
4948 EOF
4949  
4950 else
4951   echo "$ac_t""no" 1>&6
4952 fi
4953 done
4954
4955 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset
4956 do
4957 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4958 echo "configure:4959: checking for $ac_func" >&5
4959 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4960   echo $ac_n "(cached) $ac_c" 1>&6
4961 else
4962   cat > conftest.$ac_ext <<EOF
4963 #line 4964 "configure"
4964 #include "confdefs.h"
4965 /* System header to define __stub macros and hopefully few prototypes,
4966     which can conflict with char $ac_func(); below.  */
4967 #include <assert.h>
4968 /* Override any gcc2 internal prototype to avoid an error.  */
4969 /* We use char because int might match the return type of a gcc2
4970     builtin and then its argument prototype would still apply.  */
4971 char $ac_func();
4972
4973 int main() {
4974
4975 /* The GNU C library defines this for functions which it implements
4976     to always fail with ENOSYS.  Some functions are actually named
4977     something starting with __ and the normal name is an alias.  */
4978 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4979 choke me
4980 #else
4981 $ac_func();
4982 #endif
4983
4984 ; return 0; }
4985 EOF
4986 if { (eval echo configure:4987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4987   rm -rf conftest*
4988   eval "ac_cv_func_$ac_func=yes"
4989 else
4990   echo "configure: failed program was:" >&5
4991   cat conftest.$ac_ext >&5
4992   rm -rf conftest*
4993   eval "ac_cv_func_$ac_func=no"
4994 fi
4995 rm -f conftest*
4996 fi
4997
4998 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4999   echo "$ac_t""yes" 1>&6
5000     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5001   cat >> confdefs.h <<EOF
5002 #define $ac_tr_func 1
5003 EOF
5004  
5005 else
5006   echo "$ac_t""no" 1>&6
5007 fi
5008 done
5009
5010 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5011 do
5012 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5013 echo "configure:5014: checking for $ac_func" >&5
5014 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5015   echo $ac_n "(cached) $ac_c" 1>&6
5016 else
5017   cat > conftest.$ac_ext <<EOF
5018 #line 5019 "configure"
5019 #include "confdefs.h"
5020 /* System header to define __stub macros and hopefully few prototypes,
5021     which can conflict with char $ac_func(); below.  */
5022 #include <assert.h>
5023 /* Override any gcc2 internal prototype to avoid an error.  */
5024 /* We use char because int might match the return type of a gcc2
5025     builtin and then its argument prototype would still apply.  */
5026 char $ac_func();
5027
5028 int main() {
5029
5030 /* The GNU C library defines this for functions which it implements
5031     to always fail with ENOSYS.  Some functions are actually named
5032     something starting with __ and the normal name is an alias.  */
5033 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5034 choke me
5035 #else
5036 $ac_func();
5037 #endif
5038
5039 ; return 0; }
5040 EOF
5041 if { (eval echo configure:5042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5042   rm -rf conftest*
5043   eval "ac_cv_func_$ac_func=yes"
5044 else
5045   echo "configure: failed program was:" >&5
5046   cat conftest.$ac_ext >&5
5047   rm -rf conftest*
5048   eval "ac_cv_func_$ac_func=no"
5049 fi
5050 rm -f conftest*
5051 fi
5052
5053 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5054   echo "$ac_t""yes" 1>&6
5055     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5056   cat >> confdefs.h <<EOF
5057 #define $ac_tr_func 1
5058 EOF
5059  
5060 else
5061   echo "$ac_t""no" 1>&6
5062 fi
5063 done
5064
5065 for ac_func in strftime sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent
5066 do
5067 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5068 echo "configure:5069: checking for $ac_func" >&5
5069 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5070   echo $ac_n "(cached) $ac_c" 1>&6
5071 else
5072   cat > conftest.$ac_ext <<EOF
5073 #line 5074 "configure"
5074 #include "confdefs.h"
5075 /* System header to define __stub macros and hopefully few prototypes,
5076     which can conflict with char $ac_func(); below.  */
5077 #include <assert.h>
5078 /* Override any gcc2 internal prototype to avoid an error.  */
5079 /* We use char because int might match the return type of a gcc2
5080     builtin and then its argument prototype would still apply.  */
5081 char $ac_func();
5082
5083 int main() {
5084
5085 /* The GNU C library defines this for functions which it implements
5086     to always fail with ENOSYS.  Some functions are actually named
5087     something starting with __ and the normal name is an alias.  */
5088 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5089 choke me
5090 #else
5091 $ac_func();
5092 #endif
5093
5094 ; return 0; }
5095 EOF
5096 if { (eval echo configure:5097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5097   rm -rf conftest*
5098   eval "ac_cv_func_$ac_func=yes"
5099 else
5100   echo "configure: failed program was:" >&5
5101   cat conftest.$ac_ext >&5
5102   rm -rf conftest*
5103   eval "ac_cv_func_$ac_func=no"
5104 fi
5105 rm -f conftest*
5106 fi
5107
5108 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5109   echo "$ac_t""yes" 1>&6
5110     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5111   cat >> confdefs.h <<EOF
5112 #define $ac_tr_func 1
5113 EOF
5114  
5115 else
5116   echo "$ac_t""no" 1>&6
5117 fi
5118 done
5119
5120 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
5121 do
5122 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5123 echo "configure:5124: checking for $ac_func" >&5
5124 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5125   echo $ac_n "(cached) $ac_c" 1>&6
5126 else
5127   cat > conftest.$ac_ext <<EOF
5128 #line 5129 "configure"
5129 #include "confdefs.h"
5130 /* System header to define __stub macros and hopefully few prototypes,
5131     which can conflict with char $ac_func(); below.  */
5132 #include <assert.h>
5133 /* Override any gcc2 internal prototype to avoid an error.  */
5134 /* We use char because int might match the return type of a gcc2
5135     builtin and then its argument prototype would still apply.  */
5136 char $ac_func();
5137
5138 int main() {
5139
5140 /* The GNU C library defines this for functions which it implements
5141     to always fail with ENOSYS.  Some functions are actually named
5142     something starting with __ and the normal name is an alias.  */
5143 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5144 choke me
5145 #else
5146 $ac_func();
5147 #endif
5148
5149 ; return 0; }
5150 EOF
5151 if { (eval echo configure:5152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5152   rm -rf conftest*
5153   eval "ac_cv_func_$ac_func=yes"
5154 else
5155   echo "configure: failed program was:" >&5
5156   cat conftest.$ac_ext >&5
5157   rm -rf conftest*
5158   eval "ac_cv_func_$ac_func=no"
5159 fi
5160 rm -f conftest*
5161 fi
5162
5163 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5164   echo "$ac_t""yes" 1>&6
5165     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5166   cat >> confdefs.h <<EOF
5167 #define $ac_tr_func 1
5168 EOF
5169  
5170 else
5171   echo "$ac_t""no" 1>&6
5172 fi
5173 done
5174
5175 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5176 do
5177 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5178 echo "configure:5179: checking for $ac_func" >&5
5179 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5180   echo $ac_n "(cached) $ac_c" 1>&6
5181 else
5182   cat > conftest.$ac_ext <<EOF
5183 #line 5184 "configure"
5184 #include "confdefs.h"
5185 /* System header to define __stub macros and hopefully few prototypes,
5186     which can conflict with char $ac_func(); below.  */
5187 #include <assert.h>
5188 /* Override any gcc2 internal prototype to avoid an error.  */
5189 /* We use char because int might match the return type of a gcc2
5190     builtin and then its argument prototype would still apply.  */
5191 char $ac_func();
5192
5193 int main() {
5194
5195 /* The GNU C library defines this for functions which it implements
5196     to always fail with ENOSYS.  Some functions are actually named
5197     something starting with __ and the normal name is an alias.  */
5198 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5199 choke me
5200 #else
5201 $ac_func();
5202 #endif
5203
5204 ; return 0; }
5205 EOF
5206 if { (eval echo configure:5207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5207   rm -rf conftest*
5208   eval "ac_cv_func_$ac_func=yes"
5209 else
5210   echo "configure: failed program was:" >&5
5211   cat conftest.$ac_ext >&5
5212   rm -rf conftest*
5213   eval "ac_cv_func_$ac_func=no"
5214 fi
5215 rm -f conftest*
5216 fi
5217
5218 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5219   echo "$ac_t""yes" 1>&6
5220     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5221   cat >> confdefs.h <<EOF
5222 #define $ac_tr_func 1
5223 EOF
5224  
5225 else
5226   echo "$ac_t""no" 1>&6
5227 fi
5228 done
5229
5230 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5231 do
5232 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5233 echo "configure:5234: checking for $ac_func" >&5
5234 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5235   echo $ac_n "(cached) $ac_c" 1>&6
5236 else
5237   cat > conftest.$ac_ext <<EOF
5238 #line 5239 "configure"
5239 #include "confdefs.h"
5240 /* System header to define __stub macros and hopefully few prototypes,
5241     which can conflict with char $ac_func(); below.  */
5242 #include <assert.h>
5243 /* Override any gcc2 internal prototype to avoid an error.  */
5244 /* We use char because int might match the return type of a gcc2
5245     builtin and then its argument prototype would still apply.  */
5246 char $ac_func();
5247
5248 int main() {
5249
5250 /* The GNU C library defines this for functions which it implements
5251     to always fail with ENOSYS.  Some functions are actually named
5252     something starting with __ and the normal name is an alias.  */
5253 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5254 choke me
5255 #else
5256 $ac_func();
5257 #endif
5258
5259 ; return 0; }
5260 EOF
5261 if { (eval echo configure:5262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5262   rm -rf conftest*
5263   eval "ac_cv_func_$ac_func=yes"
5264 else
5265   echo "configure: failed program was:" >&5
5266   cat conftest.$ac_ext >&5
5267   rm -rf conftest*
5268   eval "ac_cv_func_$ac_func=no"
5269 fi
5270 rm -f conftest*
5271 fi
5272
5273 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5274   echo "$ac_t""yes" 1>&6
5275     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5276   cat >> confdefs.h <<EOF
5277 #define $ac_tr_func 1
5278 EOF
5279  
5280 else
5281   echo "$ac_t""no" 1>&6
5282 fi
5283 done
5284
5285 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5286 do
5287 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5288 echo "configure:5289: checking for $ac_func" >&5
5289 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5290   echo $ac_n "(cached) $ac_c" 1>&6
5291 else
5292   cat > conftest.$ac_ext <<EOF
5293 #line 5294 "configure"
5294 #include "confdefs.h"
5295 /* System header to define __stub macros and hopefully few prototypes,
5296     which can conflict with char $ac_func(); below.  */
5297 #include <assert.h>
5298 /* Override any gcc2 internal prototype to avoid an error.  */
5299 /* We use char because int might match the return type of a gcc2
5300     builtin and then its argument prototype would still apply.  */
5301 char $ac_func();
5302
5303 int main() {
5304
5305 /* The GNU C library defines this for functions which it implements
5306     to always fail with ENOSYS.  Some functions are actually named
5307     something starting with __ and the normal name is an alias.  */
5308 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5309 choke me
5310 #else
5311 $ac_func();
5312 #endif
5313
5314 ; return 0; }
5315 EOF
5316 if { (eval echo configure:5317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5317   rm -rf conftest*
5318   eval "ac_cv_func_$ac_func=yes"
5319 else
5320   echo "configure: failed program was:" >&5
5321   cat conftest.$ac_ext >&5
5322   rm -rf conftest*
5323   eval "ac_cv_func_$ac_func=no"
5324 fi
5325 rm -f conftest*
5326 fi
5327
5328 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5329   echo "$ac_t""yes" 1>&6
5330     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5331   cat >> confdefs.h <<EOF
5332 #define $ac_tr_func 1
5333 EOF
5334  
5335 else
5336   echo "$ac_t""no" 1>&6
5337 fi
5338 done
5339
5340 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5341 do
5342 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5343 echo "configure:5344: checking for $ac_func" >&5
5344 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5345   echo $ac_n "(cached) $ac_c" 1>&6
5346 else
5347   cat > conftest.$ac_ext <<EOF
5348 #line 5349 "configure"
5349 #include "confdefs.h"
5350 /* System header to define __stub macros and hopefully few prototypes,
5351     which can conflict with char $ac_func(); below.  */
5352 #include <assert.h>
5353 /* Override any gcc2 internal prototype to avoid an error.  */
5354 /* We use char because int might match the return type of a gcc2
5355     builtin and then its argument prototype would still apply.  */
5356 char $ac_func();
5357
5358 int main() {
5359
5360 /* The GNU C library defines this for functions which it implements
5361     to always fail with ENOSYS.  Some functions are actually named
5362     something starting with __ and the normal name is an alias.  */
5363 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5364 choke me
5365 #else
5366 $ac_func();
5367 #endif
5368
5369 ; return 0; }
5370 EOF
5371 if { (eval echo configure:5372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5372   rm -rf conftest*
5373   eval "ac_cv_func_$ac_func=yes"
5374 else
5375   echo "configure: failed program was:" >&5
5376   cat conftest.$ac_ext >&5
5377   rm -rf conftest*
5378   eval "ac_cv_func_$ac_func=no"
5379 fi
5380 rm -f conftest*
5381 fi
5382
5383 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5384   echo "$ac_t""yes" 1>&6
5385     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5386   cat >> confdefs.h <<EOF
5387 #define $ac_tr_func 1
5388 EOF
5389  
5390 else
5391   echo "$ac_t""no" 1>&6
5392 fi
5393 done
5394
5395 # setbuffer is needed for smbtorture
5396 for ac_func in setbuffer
5397 do
5398 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5399 echo "configure:5400: checking for $ac_func" >&5
5400 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5401   echo $ac_n "(cached) $ac_c" 1>&6
5402 else
5403   cat > conftest.$ac_ext <<EOF
5404 #line 5405 "configure"
5405 #include "confdefs.h"
5406 /* System header to define __stub macros and hopefully few prototypes,
5407     which can conflict with char $ac_func(); below.  */
5408 #include <assert.h>
5409 /* Override any gcc2 internal prototype to avoid an error.  */
5410 /* We use char because int might match the return type of a gcc2
5411     builtin and then its argument prototype would still apply.  */
5412 char $ac_func();
5413
5414 int main() {
5415
5416 /* The GNU C library defines this for functions which it implements
5417     to always fail with ENOSYS.  Some functions are actually named
5418     something starting with __ and the normal name is an alias.  */
5419 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5420 choke me
5421 #else
5422 $ac_func();
5423 #endif
5424
5425 ; return 0; }
5426 EOF
5427 if { (eval echo configure:5428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5428   rm -rf conftest*
5429   eval "ac_cv_func_$ac_func=yes"
5430 else
5431   echo "configure: failed program was:" >&5
5432   cat conftest.$ac_ext >&5
5433   rm -rf conftest*
5434   eval "ac_cv_func_$ac_func=no"
5435 fi
5436 rm -f conftest*
5437 fi
5438
5439 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5440   echo "$ac_t""yes" 1>&6
5441     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5442   cat >> confdefs.h <<EOF
5443 #define $ac_tr_func 1
5444 EOF
5445  
5446 else
5447   echo "$ac_t""no" 1>&6
5448 fi
5449 done
5450
5451
5452 # syscall() is needed for smbwrapper.
5453 for ac_func in syscall
5454 do
5455 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5456 echo "configure:5457: checking for $ac_func" >&5
5457 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5458   echo $ac_n "(cached) $ac_c" 1>&6
5459 else
5460   cat > conftest.$ac_ext <<EOF
5461 #line 5462 "configure"
5462 #include "confdefs.h"
5463 /* System header to define __stub macros and hopefully few prototypes,
5464     which can conflict with char $ac_func(); below.  */
5465 #include <assert.h>
5466 /* Override any gcc2 internal prototype to avoid an error.  */
5467 /* We use char because int might match the return type of a gcc2
5468     builtin and then its argument prototype would still apply.  */
5469 char $ac_func();
5470
5471 int main() {
5472
5473 /* The GNU C library defines this for functions which it implements
5474     to always fail with ENOSYS.  Some functions are actually named
5475     something starting with __ and the normal name is an alias.  */
5476 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5477 choke me
5478 #else
5479 $ac_func();
5480 #endif
5481
5482 ; return 0; }
5483 EOF
5484 if { (eval echo configure:5485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5485   rm -rf conftest*
5486   eval "ac_cv_func_$ac_func=yes"
5487 else
5488   echo "configure: failed program was:" >&5
5489   cat conftest.$ac_ext >&5
5490   rm -rf conftest*
5491   eval "ac_cv_func_$ac_func=no"
5492 fi
5493 rm -f conftest*
5494 fi
5495
5496 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5497   echo "$ac_t""yes" 1>&6
5498     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5499   cat >> confdefs.h <<EOF
5500 #define $ac_tr_func 1
5501 EOF
5502  
5503 else
5504   echo "$ac_t""no" 1>&6
5505 fi
5506 done
5507
5508
5509 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5510 do
5511 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5512 echo "configure:5513: checking for $ac_func" >&5
5513 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5514   echo $ac_n "(cached) $ac_c" 1>&6
5515 else
5516   cat > conftest.$ac_ext <<EOF
5517 #line 5518 "configure"
5518 #include "confdefs.h"
5519 /* System header to define __stub macros and hopefully few prototypes,
5520     which can conflict with char $ac_func(); below.  */
5521 #include <assert.h>
5522 /* Override any gcc2 internal prototype to avoid an error.  */
5523 /* We use char because int might match the return type of a gcc2
5524     builtin and then its argument prototype would still apply.  */
5525 char $ac_func();
5526
5527 int main() {
5528
5529 /* The GNU C library defines this for functions which it implements
5530     to always fail with ENOSYS.  Some functions are actually named
5531     something starting with __ and the normal name is an alias.  */
5532 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5533 choke me
5534 #else
5535 $ac_func();
5536 #endif
5537
5538 ; return 0; }
5539 EOF
5540 if { (eval echo configure:5541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5541   rm -rf conftest*
5542   eval "ac_cv_func_$ac_func=yes"
5543 else
5544   echo "configure: failed program was:" >&5
5545   cat conftest.$ac_ext >&5
5546   rm -rf conftest*
5547   eval "ac_cv_func_$ac_func=no"
5548 fi
5549 rm -f conftest*
5550 fi
5551
5552 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5553   echo "$ac_t""yes" 1>&6
5554     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5555   cat >> confdefs.h <<EOF
5556 #define $ac_tr_func 1
5557 EOF
5558  
5559 else
5560   echo "$ac_t""no" 1>&6
5561 fi
5562 done
5563
5564 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
5565 do
5566 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5567 echo "configure:5568: checking for $ac_func" >&5
5568 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5569   echo $ac_n "(cached) $ac_c" 1>&6
5570 else
5571   cat > conftest.$ac_ext <<EOF
5572 #line 5573 "configure"
5573 #include "confdefs.h"
5574 /* System header to define __stub macros and hopefully few prototypes,
5575     which can conflict with char $ac_func(); below.  */
5576 #include <assert.h>
5577 /* Override any gcc2 internal prototype to avoid an error.  */
5578 /* We use char because int might match the return type of a gcc2
5579     builtin and then its argument prototype would still apply.  */
5580 char $ac_func();
5581
5582 int main() {
5583
5584 /* The GNU C library defines this for functions which it implements
5585     to always fail with ENOSYS.  Some functions are actually named
5586     something starting with __ and the normal name is an alias.  */
5587 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5588 choke me
5589 #else
5590 $ac_func();
5591 #endif
5592
5593 ; return 0; }
5594 EOF
5595 if { (eval echo configure:5596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5596   rm -rf conftest*
5597   eval "ac_cv_func_$ac_func=yes"
5598 else
5599   echo "configure: failed program was:" >&5
5600   cat conftest.$ac_ext >&5
5601   rm -rf conftest*
5602   eval "ac_cv_func_$ac_func=no"
5603 fi
5604 rm -f conftest*
5605 fi
5606
5607 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5608   echo "$ac_t""yes" 1>&6
5609     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5610   cat >> confdefs.h <<EOF
5611 #define $ac_tr_func 1
5612 EOF
5613  
5614 else
5615   echo "$ac_t""no" 1>&6
5616 fi
5617 done
5618
5619 for ac_func in __getcwd _getcwd
5620 do
5621 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5622 echo "configure:5623: checking for $ac_func" >&5
5623 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5624   echo $ac_n "(cached) $ac_c" 1>&6
5625 else
5626   cat > conftest.$ac_ext <<EOF
5627 #line 5628 "configure"
5628 #include "confdefs.h"
5629 /* System header to define __stub macros and hopefully few prototypes,
5630     which can conflict with char $ac_func(); below.  */
5631 #include <assert.h>
5632 /* Override any gcc2 internal prototype to avoid an error.  */
5633 /* We use char because int might match the return type of a gcc2
5634     builtin and then its argument prototype would still apply.  */
5635 char $ac_func();
5636
5637 int main() {
5638
5639 /* The GNU C library defines this for functions which it implements
5640     to always fail with ENOSYS.  Some functions are actually named
5641     something starting with __ and the normal name is an alias.  */
5642 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5643 choke me
5644 #else
5645 $ac_func();
5646 #endif
5647
5648 ; return 0; }
5649 EOF
5650 if { (eval echo configure:5651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5651   rm -rf conftest*
5652   eval "ac_cv_func_$ac_func=yes"
5653 else
5654   echo "configure: failed program was:" >&5
5655   cat conftest.$ac_ext >&5
5656   rm -rf conftest*
5657   eval "ac_cv_func_$ac_func=no"
5658 fi
5659 rm -f conftest*
5660 fi
5661
5662 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5663   echo "$ac_t""yes" 1>&6
5664     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5665   cat >> confdefs.h <<EOF
5666 #define $ac_tr_func 1
5667 EOF
5668  
5669 else
5670   echo "$ac_t""no" 1>&6
5671 fi
5672 done
5673
5674 for ac_func in __xstat __fxstat __lxstat
5675 do
5676 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5677 echo "configure:5678: checking for $ac_func" >&5
5678 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5679   echo $ac_n "(cached) $ac_c" 1>&6
5680 else
5681   cat > conftest.$ac_ext <<EOF
5682 #line 5683 "configure"
5683 #include "confdefs.h"
5684 /* System header to define __stub macros and hopefully few prototypes,
5685     which can conflict with char $ac_func(); below.  */
5686 #include <assert.h>
5687 /* Override any gcc2 internal prototype to avoid an error.  */
5688 /* We use char because int might match the return type of a gcc2
5689     builtin and then its argument prototype would still apply.  */
5690 char $ac_func();
5691
5692 int main() {
5693
5694 /* The GNU C library defines this for functions which it implements
5695     to always fail with ENOSYS.  Some functions are actually named
5696     something starting with __ and the normal name is an alias.  */
5697 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5698 choke me
5699 #else
5700 $ac_func();
5701 #endif
5702
5703 ; return 0; }
5704 EOF
5705 if { (eval echo configure:5706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5706   rm -rf conftest*
5707   eval "ac_cv_func_$ac_func=yes"
5708 else
5709   echo "configure: failed program was:" >&5
5710   cat conftest.$ac_ext >&5
5711   rm -rf conftest*
5712   eval "ac_cv_func_$ac_func=no"
5713 fi
5714 rm -f conftest*
5715 fi
5716
5717 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5718   echo "$ac_t""yes" 1>&6
5719     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5720   cat >> confdefs.h <<EOF
5721 #define $ac_tr_func 1
5722 EOF
5723  
5724 else
5725   echo "$ac_t""no" 1>&6
5726 fi
5727 done
5728
5729 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
5730 do
5731 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5732 echo "configure:5733: checking for $ac_func" >&5
5733 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5734   echo $ac_n "(cached) $ac_c" 1>&6
5735 else
5736   cat > conftest.$ac_ext <<EOF
5737 #line 5738 "configure"
5738 #include "confdefs.h"
5739 /* System header to define __stub macros and hopefully few prototypes,
5740     which can conflict with char $ac_func(); below.  */
5741 #include <assert.h>
5742 /* Override any gcc2 internal prototype to avoid an error.  */
5743 /* We use char because int might match the return type of a gcc2
5744     builtin and then its argument prototype would still apply.  */
5745 char $ac_func();
5746
5747 int main() {
5748
5749 /* The GNU C library defines this for functions which it implements
5750     to always fail with ENOSYS.  Some functions are actually named
5751     something starting with __ and the normal name is an alias.  */
5752 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5753 choke me
5754 #else
5755 $ac_func();
5756 #endif
5757
5758 ; return 0; }
5759 EOF
5760 if { (eval echo configure:5761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5761   rm -rf conftest*
5762   eval "ac_cv_func_$ac_func=yes"
5763 else
5764   echo "configure: failed program was:" >&5
5765   cat conftest.$ac_ext >&5
5766   rm -rf conftest*
5767   eval "ac_cv_func_$ac_func=no"
5768 fi
5769 rm -f conftest*
5770 fi
5771
5772 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5773   echo "$ac_t""yes" 1>&6
5774     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5775   cat >> confdefs.h <<EOF
5776 #define $ac_tr_func 1
5777 EOF
5778  
5779 else
5780   echo "$ac_t""no" 1>&6
5781 fi
5782 done
5783
5784 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
5785 do
5786 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5787 echo "configure:5788: checking for $ac_func" >&5
5788 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5789   echo $ac_n "(cached) $ac_c" 1>&6
5790 else
5791   cat > conftest.$ac_ext <<EOF
5792 #line 5793 "configure"
5793 #include "confdefs.h"
5794 /* System header to define __stub macros and hopefully few prototypes,
5795     which can conflict with char $ac_func(); below.  */
5796 #include <assert.h>
5797 /* Override any gcc2 internal prototype to avoid an error.  */
5798 /* We use char because int might match the return type of a gcc2
5799     builtin and then its argument prototype would still apply.  */
5800 char $ac_func();
5801
5802 int main() {
5803
5804 /* The GNU C library defines this for functions which it implements
5805     to always fail with ENOSYS.  Some functions are actually named
5806     something starting with __ and the normal name is an alias.  */
5807 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5808 choke me
5809 #else
5810 $ac_func();
5811 #endif
5812
5813 ; return 0; }
5814 EOF
5815 if { (eval echo configure:5816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5816   rm -rf conftest*
5817   eval "ac_cv_func_$ac_func=yes"
5818 else
5819   echo "configure: failed program was:" >&5
5820   cat conftest.$ac_ext >&5
5821   rm -rf conftest*
5822   eval "ac_cv_func_$ac_func=no"
5823 fi
5824 rm -f conftest*
5825 fi
5826
5827 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5828   echo "$ac_t""yes" 1>&6
5829     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5830   cat >> confdefs.h <<EOF
5831 #define $ac_tr_func 1
5832 EOF
5833  
5834 else
5835   echo "$ac_t""no" 1>&6
5836 fi
5837 done
5838
5839 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
5840 do
5841 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5842 echo "configure:5843: checking for $ac_func" >&5
5843 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5844   echo $ac_n "(cached) $ac_c" 1>&6
5845 else
5846   cat > conftest.$ac_ext <<EOF
5847 #line 5848 "configure"
5848 #include "confdefs.h"
5849 /* System header to define __stub macros and hopefully few prototypes,
5850     which can conflict with char $ac_func(); below.  */
5851 #include <assert.h>
5852 /* Override any gcc2 internal prototype to avoid an error.  */
5853 /* We use char because int might match the return type of a gcc2
5854     builtin and then its argument prototype would still apply.  */
5855 char $ac_func();
5856
5857 int main() {
5858
5859 /* The GNU C library defines this for functions which it implements
5860     to always fail with ENOSYS.  Some functions are actually named
5861     something starting with __ and the normal name is an alias.  */
5862 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5863 choke me
5864 #else
5865 $ac_func();
5866 #endif
5867
5868 ; return 0; }
5869 EOF
5870 if { (eval echo configure:5871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5871   rm -rf conftest*
5872   eval "ac_cv_func_$ac_func=yes"
5873 else
5874   echo "configure: failed program was:" >&5
5875   cat conftest.$ac_ext >&5
5876   rm -rf conftest*
5877   eval "ac_cv_func_$ac_func=no"
5878 fi
5879 rm -f conftest*
5880 fi
5881
5882 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5883   echo "$ac_t""yes" 1>&6
5884     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5885   cat >> confdefs.h <<EOF
5886 #define $ac_tr_func 1
5887 EOF
5888  
5889 else
5890   echo "$ac_t""no" 1>&6
5891 fi
5892 done
5893
5894 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
5895 do
5896 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5897 echo "configure:5898: checking for $ac_func" >&5
5898 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5899   echo $ac_n "(cached) $ac_c" 1>&6
5900 else
5901   cat > conftest.$ac_ext <<EOF
5902 #line 5903 "configure"
5903 #include "confdefs.h"
5904 /* System header to define __stub macros and hopefully few prototypes,
5905     which can conflict with char $ac_func(); below.  */
5906 #include <assert.h>
5907 /* Override any gcc2 internal prototype to avoid an error.  */
5908 /* We use char because int might match the return type of a gcc2
5909     builtin and then its argument prototype would still apply.  */
5910 char $ac_func();
5911
5912 int main() {
5913
5914 /* The GNU C library defines this for functions which it implements
5915     to always fail with ENOSYS.  Some functions are actually named
5916     something starting with __ and the normal name is an alias.  */
5917 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5918 choke me
5919 #else
5920 $ac_func();
5921 #endif
5922
5923 ; return 0; }
5924 EOF
5925 if { (eval echo configure:5926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5926   rm -rf conftest*
5927   eval "ac_cv_func_$ac_func=yes"
5928 else
5929   echo "configure: failed program was:" >&5
5930   cat conftest.$ac_ext >&5
5931   rm -rf conftest*
5932   eval "ac_cv_func_$ac_func=no"
5933 fi
5934 rm -f conftest*
5935 fi
5936
5937 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5938   echo "$ac_t""yes" 1>&6
5939     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5940   cat >> confdefs.h <<EOF
5941 #define $ac_tr_func 1
5942 EOF
5943  
5944 else
5945   echo "$ac_t""no" 1>&6
5946 fi
5947 done
5948
5949 for ac_func in _write __write _fork __fork
5950 do
5951 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5952 echo "configure:5953: checking for $ac_func" >&5
5953 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5954   echo $ac_n "(cached) $ac_c" 1>&6
5955 else
5956   cat > conftest.$ac_ext <<EOF
5957 #line 5958 "configure"
5958 #include "confdefs.h"
5959 /* System header to define __stub macros and hopefully few prototypes,
5960     which can conflict with char $ac_func(); below.  */
5961 #include <assert.h>
5962 /* Override any gcc2 internal prototype to avoid an error.  */
5963 /* We use char because int might match the return type of a gcc2
5964     builtin and then its argument prototype would still apply.  */
5965 char $ac_func();
5966
5967 int main() {
5968
5969 /* The GNU C library defines this for functions which it implements
5970     to always fail with ENOSYS.  Some functions are actually named
5971     something starting with __ and the normal name is an alias.  */
5972 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5973 choke me
5974 #else
5975 $ac_func();
5976 #endif
5977
5978 ; return 0; }
5979 EOF
5980 if { (eval echo configure:5981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5981   rm -rf conftest*
5982   eval "ac_cv_func_$ac_func=yes"
5983 else
5984   echo "configure: failed program was:" >&5
5985   cat conftest.$ac_ext >&5
5986   rm -rf conftest*
5987   eval "ac_cv_func_$ac_func=no"
5988 fi
5989 rm -f conftest*
5990 fi
5991
5992 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5993   echo "$ac_t""yes" 1>&6
5994     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5995   cat >> confdefs.h <<EOF
5996 #define $ac_tr_func 1
5997 EOF
5998  
5999 else
6000   echo "$ac_t""no" 1>&6
6001 fi
6002 done
6003
6004 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6005 do
6006 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6007 echo "configure:6008: checking for $ac_func" >&5
6008 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6009   echo $ac_n "(cached) $ac_c" 1>&6
6010 else
6011   cat > conftest.$ac_ext <<EOF
6012 #line 6013 "configure"
6013 #include "confdefs.h"
6014 /* System header to define __stub macros and hopefully few prototypes,
6015     which can conflict with char $ac_func(); below.  */
6016 #include <assert.h>
6017 /* Override any gcc2 internal prototype to avoid an error.  */
6018 /* We use char because int might match the return type of a gcc2
6019     builtin and then its argument prototype would still apply.  */
6020 char $ac_func();
6021
6022 int main() {
6023
6024 /* The GNU C library defines this for functions which it implements
6025     to always fail with ENOSYS.  Some functions are actually named
6026     something starting with __ and the normal name is an alias.  */
6027 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6028 choke me
6029 #else
6030 $ac_func();
6031 #endif
6032
6033 ; return 0; }
6034 EOF
6035 if { (eval echo configure:6036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6036   rm -rf conftest*
6037   eval "ac_cv_func_$ac_func=yes"
6038 else
6039   echo "configure: failed program was:" >&5
6040   cat conftest.$ac_ext >&5
6041   rm -rf conftest*
6042   eval "ac_cv_func_$ac_func=no"
6043 fi
6044 rm -f conftest*
6045 fi
6046
6047 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6048   echo "$ac_t""yes" 1>&6
6049     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6050   cat >> confdefs.h <<EOF
6051 #define $ac_tr_func 1
6052 EOF
6053  
6054 else
6055   echo "$ac_t""no" 1>&6
6056 fi
6057 done
6058
6059 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6060 do
6061 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6062 echo "configure:6063: checking for $ac_func" >&5
6063 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6064   echo $ac_n "(cached) $ac_c" 1>&6
6065 else
6066   cat > conftest.$ac_ext <<EOF
6067 #line 6068 "configure"
6068 #include "confdefs.h"
6069 /* System header to define __stub macros and hopefully few prototypes,
6070     which can conflict with char $ac_func(); below.  */
6071 #include <assert.h>
6072 /* Override any gcc2 internal prototype to avoid an error.  */
6073 /* We use char because int might match the return type of a gcc2
6074     builtin and then its argument prototype would still apply.  */
6075 char $ac_func();
6076
6077 int main() {
6078
6079 /* The GNU C library defines this for functions which it implements
6080     to always fail with ENOSYS.  Some functions are actually named
6081     something starting with __ and the normal name is an alias.  */
6082 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6083 choke me
6084 #else
6085 $ac_func();
6086 #endif
6087
6088 ; return 0; }
6089 EOF
6090 if { (eval echo configure:6091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6091   rm -rf conftest*
6092   eval "ac_cv_func_$ac_func=yes"
6093 else
6094   echo "configure: failed program was:" >&5
6095   cat conftest.$ac_ext >&5
6096   rm -rf conftest*
6097   eval "ac_cv_func_$ac_func=no"
6098 fi
6099 rm -f conftest*
6100 fi
6101
6102 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6103   echo "$ac_t""yes" 1>&6
6104     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6105   cat >> confdefs.h <<EOF
6106 #define $ac_tr_func 1
6107 EOF
6108  
6109 else
6110   echo "$ac_t""no" 1>&6
6111 fi
6112 done
6113
6114 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6115 do
6116 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6117 echo "configure:6118: checking for $ac_func" >&5
6118 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6119   echo $ac_n "(cached) $ac_c" 1>&6
6120 else
6121   cat > conftest.$ac_ext <<EOF
6122 #line 6123 "configure"
6123 #include "confdefs.h"
6124 /* System header to define __stub macros and hopefully few prototypes,
6125     which can conflict with char $ac_func(); below.  */
6126 #include <assert.h>
6127 /* Override any gcc2 internal prototype to avoid an error.  */
6128 /* We use char because int might match the return type of a gcc2
6129     builtin and then its argument prototype would still apply.  */
6130 char $ac_func();
6131
6132 int main() {
6133
6134 /* The GNU C library defines this for functions which it implements
6135     to always fail with ENOSYS.  Some functions are actually named
6136     something starting with __ and the normal name is an alias.  */
6137 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6138 choke me
6139 #else
6140 $ac_func();
6141 #endif
6142
6143 ; return 0; }
6144 EOF
6145 if { (eval echo configure:6146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6146   rm -rf conftest*
6147   eval "ac_cv_func_$ac_func=yes"
6148 else
6149   echo "configure: failed program was:" >&5
6150   cat conftest.$ac_ext >&5
6151   rm -rf conftest*
6152   eval "ac_cv_func_$ac_func=no"
6153 fi
6154 rm -f conftest*
6155 fi
6156
6157 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6158   echo "$ac_t""yes" 1>&6
6159     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6160   cat >> confdefs.h <<EOF
6161 #define $ac_tr_func 1
6162 EOF
6163  
6164 else
6165   echo "$ac_t""no" 1>&6
6166 fi
6167 done
6168
6169 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6170 do
6171 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6172 echo "configure:6173: checking for $ac_func" >&5
6173 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6174   echo $ac_n "(cached) $ac_c" 1>&6
6175 else
6176   cat > conftest.$ac_ext <<EOF
6177 #line 6178 "configure"
6178 #include "confdefs.h"
6179 /* System header to define __stub macros and hopefully few prototypes,
6180     which can conflict with char $ac_func(); below.  */
6181 #include <assert.h>
6182 /* Override any gcc2 internal prototype to avoid an error.  */
6183 /* We use char because int might match the return type of a gcc2
6184     builtin and then its argument prototype would still apply.  */
6185 char $ac_func();
6186
6187 int main() {
6188
6189 /* The GNU C library defines this for functions which it implements
6190     to always fail with ENOSYS.  Some functions are actually named
6191     something starting with __ and the normal name is an alias.  */
6192 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6193 choke me
6194 #else
6195 $ac_func();
6196 #endif
6197
6198 ; return 0; }
6199 EOF
6200 if { (eval echo configure:6201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6201   rm -rf conftest*
6202   eval "ac_cv_func_$ac_func=yes"
6203 else
6204   echo "configure: failed program was:" >&5
6205   cat conftest.$ac_ext >&5
6206   rm -rf conftest*
6207   eval "ac_cv_func_$ac_func=no"
6208 fi
6209 rm -f conftest*
6210 fi
6211
6212 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6213   echo "$ac_t""yes" 1>&6
6214     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6215   cat >> confdefs.h <<EOF
6216 #define $ac_tr_func 1
6217 EOF
6218  
6219 else
6220   echo "$ac_t""no" 1>&6
6221 fi
6222 done
6223
6224 for ac_func in open64 _open64 __open64 creat64
6225 do
6226 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6227 echo "configure:6228: checking for $ac_func" >&5
6228 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6229   echo $ac_n "(cached) $ac_c" 1>&6
6230 else
6231   cat > conftest.$ac_ext <<EOF
6232 #line 6233 "configure"
6233 #include "confdefs.h"
6234 /* System header to define __stub macros and hopefully few prototypes,
6235     which can conflict with char $ac_func(); below.  */
6236 #include <assert.h>
6237 /* Override any gcc2 internal prototype to avoid an error.  */
6238 /* We use char because int might match the return type of a gcc2
6239     builtin and then its argument prototype would still apply.  */
6240 char $ac_func();
6241
6242 int main() {
6243
6244 /* The GNU C library defines this for functions which it implements
6245     to always fail with ENOSYS.  Some functions are actually named
6246     something starting with __ and the normal name is an alias.  */
6247 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6248 choke me
6249 #else
6250 $ac_func();
6251 #endif
6252
6253 ; return 0; }
6254 EOF
6255 if { (eval echo configure:6256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6256   rm -rf conftest*
6257   eval "ac_cv_func_$ac_func=yes"
6258 else
6259   echo "configure: failed program was:" >&5
6260   cat conftest.$ac_ext >&5
6261   rm -rf conftest*
6262   eval "ac_cv_func_$ac_func=no"
6263 fi
6264 rm -f conftest*
6265 fi
6266
6267 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6268   echo "$ac_t""yes" 1>&6
6269     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6270   cat >> confdefs.h <<EOF
6271 #define $ac_tr_func 1
6272 EOF
6273  
6274 else
6275   echo "$ac_t""no" 1>&6
6276 fi
6277 done
6278
6279
6280 #
6281 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6282 #
6283
6284 if test x$ac_cv_func_stat64 = xno ; then
6285   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6286 echo "configure:6287: checking for stat64 in <sys/stat.h>" >&5
6287   cat > conftest.$ac_ext <<EOF
6288 #line 6289 "configure"
6289 #include "confdefs.h"
6290
6291 #if defined(HAVE_UNISTD_H)
6292 #include <unistd.h>
6293 #endif
6294 #include <sys/stat.h>
6295
6296 int main() {
6297 struct stat64 st64; exit(stat64(".",&st64));
6298 ; return 0; }
6299 EOF
6300 if { (eval echo configure:6301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6301   rm -rf conftest*
6302   ac_cv_func_stat64=yes
6303 else
6304   echo "configure: failed program was:" >&5
6305   cat conftest.$ac_ext >&5
6306 fi
6307 rm -f conftest*
6308   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6309   if test x$ac_cv_func_stat64 = xyes ; then
6310     cat >> confdefs.h <<\EOF
6311 #define HAVE_STAT64 1
6312 EOF
6313
6314   fi
6315 fi
6316
6317 if test x$ac_cv_func_lstat64 = xno ; then
6318   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6319 echo "configure:6320: checking for lstat64 in <sys/stat.h>" >&5
6320   cat > conftest.$ac_ext <<EOF
6321 #line 6322 "configure"
6322 #include "confdefs.h"
6323
6324 #if defined(HAVE_UNISTD_H)
6325 #include <unistd.h>
6326 #endif
6327 #include <sys/stat.h>
6328
6329 int main() {
6330 struct stat64 st64; exit(lstat64(".",&st64));
6331 ; return 0; }
6332 EOF
6333 if { (eval echo configure:6334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6334   rm -rf conftest*
6335   ac_cv_func_lstat64=yes
6336 else
6337   echo "configure: failed program was:" >&5
6338   cat conftest.$ac_ext >&5
6339 fi
6340 rm -f conftest*
6341   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6342   if test x$ac_cv_func_lstat64 = xyes ; then
6343     cat >> confdefs.h <<\EOF
6344 #define HAVE_LSTAT64 1
6345 EOF
6346
6347   fi
6348 fi
6349
6350 if test x$ac_cv_func_fstat64 = xno ; then
6351   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6352 echo "configure:6353: checking for fstat64 in <sys/stat.h>" >&5
6353   cat > conftest.$ac_ext <<EOF
6354 #line 6355 "configure"
6355 #include "confdefs.h"
6356
6357 #if defined(HAVE_UNISTD_H)
6358 #include <unistd.h>
6359 #endif
6360 #include <sys/stat.h>
6361
6362 int main() {
6363 struct stat64 st64; exit(fstat64(0,&st64));
6364 ; return 0; }
6365 EOF
6366 if { (eval echo configure:6367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6367   rm -rf conftest*
6368   ac_cv_func_fstat64=yes
6369 else
6370   echo "configure: failed program was:" >&5
6371   cat conftest.$ac_ext >&5
6372 fi
6373 rm -f conftest*
6374   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6375   if test x$ac_cv_func_fstat64 = xyes ; then
6376     cat >> confdefs.h <<\EOF
6377 #define HAVE_FSTAT64 1
6378 EOF
6379
6380   fi
6381 fi
6382
6383 #
6384 # If no strcasecmp, check for it in some known places
6385 # It is in -lresolv on ReliantUNIX and UnixWare
6386 #   -lresolve *must* follow -lnsl for name resolution to work properly
6387 #
6388
6389 if test x$ac_cv_func_strcasecmp = xno ; then
6390         echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6
6391 echo "configure:6392: checking for strcasecmp in -lresolv" >&5
6392 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'`
6393 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6394   echo $ac_n "(cached) $ac_c" 1>&6
6395 else
6396   ac_save_LIBS="$LIBS"
6397 LIBS="-lresolv  $LIBS"
6398 cat > conftest.$ac_ext <<EOF
6399 #line 6400 "configure"
6400 #include "confdefs.h"
6401 /* Override any gcc2 internal prototype to avoid an error.  */
6402 /* We use char because int might match the return type of a gcc2
6403     builtin and then its argument prototype would still apply.  */
6404 char strcasecmp();
6405
6406 int main() {
6407 strcasecmp()
6408 ; return 0; }
6409 EOF
6410 if { (eval echo configure:6411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6411   rm -rf conftest*
6412   eval "ac_cv_lib_$ac_lib_var=yes"
6413 else
6414   echo "configure: failed program was:" >&5
6415   cat conftest.$ac_ext >&5
6416   rm -rf conftest*
6417   eval "ac_cv_lib_$ac_lib_var=no"
6418 fi
6419 rm -f conftest*
6420 LIBS="$ac_save_LIBS"
6421
6422 fi
6423 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6424   echo "$ac_t""yes" 1>&6
6425   LIBS="$LIBS -lresolv"
6426                 cat >> confdefs.h <<\EOF
6427 #define HAVE_STRCASECMP 1
6428 EOF
6429
6430 else
6431   echo "$ac_t""no" 1>&6
6432 fi
6433
6434 fi
6435
6436 #
6437 # Check for the functions putprpwnam, set_auth_parameters,
6438 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6439 # Needed for OSF1 and HPUX.
6440 #
6441
6442 case "$LIBS" in
6443   *-lsecurity*) for ac_func in putprpwnam
6444 do
6445 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6446 echo "configure:6447: checking for $ac_func" >&5
6447 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6448   echo $ac_n "(cached) $ac_c" 1>&6
6449 else
6450   cat > conftest.$ac_ext <<EOF
6451 #line 6452 "configure"
6452 #include "confdefs.h"
6453 /* System header to define __stub macros and hopefully few prototypes,
6454     which can conflict with char $ac_func(); below.  */
6455 #include <assert.h>
6456 /* Override any gcc2 internal prototype to avoid an error.  */
6457 /* We use char because int might match the return type of a gcc2
6458     builtin and then its argument prototype would still apply.  */
6459 char $ac_func();
6460
6461 int main() {
6462
6463 /* The GNU C library defines this for functions which it implements
6464     to always fail with ENOSYS.  Some functions are actually named
6465     something starting with __ and the normal name is an alias.  */
6466 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6467 choke me
6468 #else
6469 $ac_func();
6470 #endif
6471
6472 ; return 0; }
6473 EOF
6474 if { (eval echo configure:6475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6475   rm -rf conftest*
6476   eval "ac_cv_func_$ac_func=yes"
6477 else
6478   echo "configure: failed program was:" >&5
6479   cat conftest.$ac_ext >&5
6480   rm -rf conftest*
6481   eval "ac_cv_func_$ac_func=no"
6482 fi
6483 rm -f conftest*
6484 fi
6485
6486 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6487   echo "$ac_t""yes" 1>&6
6488     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6489   cat >> confdefs.h <<EOF
6490 #define $ac_tr_func 1
6491 EOF
6492  
6493 else
6494   echo "$ac_t""no" 1>&6
6495 fi
6496 done
6497  ;;
6498   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6499 echo "configure:6500: checking for putprpwnam in -lsecurity" >&5
6500 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6501 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6502   echo $ac_n "(cached) $ac_c" 1>&6
6503 else
6504   ac_save_LIBS="$LIBS"
6505 LIBS="-lsecurity  $LIBS"
6506 cat > conftest.$ac_ext <<EOF
6507 #line 6508 "configure"
6508 #include "confdefs.h"
6509 /* Override any gcc2 internal prototype to avoid an error.  */
6510 /* We use char because int might match the return type of a gcc2
6511     builtin and then its argument prototype would still apply.  */
6512 char putprpwnam();
6513
6514 int main() {
6515 putprpwnam()
6516 ; return 0; }
6517 EOF
6518 if { (eval echo configure:6519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6519   rm -rf conftest*
6520   eval "ac_cv_lib_$ac_lib_var=yes"
6521 else
6522   echo "configure: failed program was:" >&5
6523   cat conftest.$ac_ext >&5
6524   rm -rf conftest*
6525   eval "ac_cv_lib_$ac_lib_var=no"
6526 fi
6527 rm -f conftest*
6528 LIBS="$ac_save_LIBS"
6529
6530 fi
6531 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6532   echo "$ac_t""yes" 1>&6
6533     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6534     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6535   cat >> confdefs.h <<EOF
6536 #define $ac_tr_lib 1
6537 EOF
6538
6539   LIBS="-lsecurity $LIBS"
6540
6541 else
6542   echo "$ac_t""no" 1>&6
6543 fi
6544  
6545      for ac_func in putprpwnam
6546 do
6547 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6548 echo "configure:6549: checking for $ac_func" >&5
6549 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6550   echo $ac_n "(cached) $ac_c" 1>&6
6551 else
6552   cat > conftest.$ac_ext <<EOF
6553 #line 6554 "configure"
6554 #include "confdefs.h"
6555 /* System header to define __stub macros and hopefully few prototypes,
6556     which can conflict with char $ac_func(); below.  */
6557 #include <assert.h>
6558 /* Override any gcc2 internal prototype to avoid an error.  */
6559 /* We use char because int might match the return type of a gcc2
6560     builtin and then its argument prototype would still apply.  */
6561 char $ac_func();
6562
6563 int main() {
6564
6565 /* The GNU C library defines this for functions which it implements
6566     to always fail with ENOSYS.  Some functions are actually named
6567     something starting with __ and the normal name is an alias.  */
6568 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6569 choke me
6570 #else
6571 $ac_func();
6572 #endif
6573
6574 ; return 0; }
6575 EOF
6576 if { (eval echo configure:6577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6577   rm -rf conftest*
6578   eval "ac_cv_func_$ac_func=yes"
6579 else
6580   echo "configure: failed program was:" >&5
6581   cat conftest.$ac_ext >&5
6582   rm -rf conftest*
6583   eval "ac_cv_func_$ac_func=no"
6584 fi
6585 rm -f conftest*
6586 fi
6587
6588 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6589   echo "$ac_t""yes" 1>&6
6590     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6591   cat >> confdefs.h <<EOF
6592 #define $ac_tr_func 1
6593 EOF
6594  
6595 else
6596   echo "$ac_t""no" 1>&6
6597 fi
6598 done
6599
6600   ;;
6601   esac
6602
6603 case "$LIBS" in
6604   *-lsec*) for ac_func in putprpwnam
6605 do
6606 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6607 echo "configure:6608: checking for $ac_func" >&5
6608 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6609   echo $ac_n "(cached) $ac_c" 1>&6
6610 else
6611   cat > conftest.$ac_ext <<EOF
6612 #line 6613 "configure"
6613 #include "confdefs.h"
6614 /* System header to define __stub macros and hopefully few prototypes,
6615     which can conflict with char $ac_func(); below.  */
6616 #include <assert.h>
6617 /* Override any gcc2 internal prototype to avoid an error.  */
6618 /* We use char because int might match the return type of a gcc2
6619     builtin and then its argument prototype would still apply.  */
6620 char $ac_func();
6621
6622 int main() {
6623
6624 /* The GNU C library defines this for functions which it implements
6625     to always fail with ENOSYS.  Some functions are actually named
6626     something starting with __ and the normal name is an alias.  */
6627 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6628 choke me
6629 #else
6630 $ac_func();
6631 #endif
6632
6633 ; return 0; }
6634 EOF
6635 if { (eval echo configure:6636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6636   rm -rf conftest*
6637   eval "ac_cv_func_$ac_func=yes"
6638 else
6639   echo "configure: failed program was:" >&5
6640   cat conftest.$ac_ext >&5
6641   rm -rf conftest*
6642   eval "ac_cv_func_$ac_func=no"
6643 fi
6644 rm -f conftest*
6645 fi
6646
6647 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6648   echo "$ac_t""yes" 1>&6
6649     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6650   cat >> confdefs.h <<EOF
6651 #define $ac_tr_func 1
6652 EOF
6653  
6654 else
6655   echo "$ac_t""no" 1>&6
6656 fi
6657 done
6658  ;;
6659   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
6660 echo "configure:6661: checking for putprpwnam in -lsec" >&5
6661 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
6662 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6663   echo $ac_n "(cached) $ac_c" 1>&6
6664 else
6665   ac_save_LIBS="$LIBS"
6666 LIBS="-lsec  $LIBS"
6667 cat > conftest.$ac_ext <<EOF
6668 #line 6669 "configure"
6669 #include "confdefs.h"
6670 /* Override any gcc2 internal prototype to avoid an error.  */
6671 /* We use char because int might match the return type of a gcc2
6672     builtin and then its argument prototype would still apply.  */
6673 char putprpwnam();
6674
6675 int main() {
6676 putprpwnam()
6677 ; return 0; }
6678 EOF
6679 if { (eval echo configure:6680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6680   rm -rf conftest*
6681   eval "ac_cv_lib_$ac_lib_var=yes"
6682 else
6683   echo "configure: failed program was:" >&5
6684   cat conftest.$ac_ext >&5
6685   rm -rf conftest*
6686   eval "ac_cv_lib_$ac_lib_var=no"
6687 fi
6688 rm -f conftest*
6689 LIBS="$ac_save_LIBS"
6690
6691 fi
6692 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6693   echo "$ac_t""yes" 1>&6
6694     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6695     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6696   cat >> confdefs.h <<EOF
6697 #define $ac_tr_lib 1
6698 EOF
6699
6700   LIBS="-lsec $LIBS"
6701
6702 else
6703   echo "$ac_t""no" 1>&6
6704 fi
6705  
6706      for ac_func in putprpwnam
6707 do
6708 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6709 echo "configure:6710: checking for $ac_func" >&5
6710 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6711   echo $ac_n "(cached) $ac_c" 1>&6
6712 else
6713   cat > conftest.$ac_ext <<EOF
6714 #line 6715 "configure"
6715 #include "confdefs.h"
6716 /* System header to define __stub macros and hopefully few prototypes,
6717     which can conflict with char $ac_func(); below.  */
6718 #include <assert.h>
6719 /* Override any gcc2 internal prototype to avoid an error.  */
6720 /* We use char because int might match the return type of a gcc2
6721     builtin and then its argument prototype would still apply.  */
6722 char $ac_func();
6723
6724 int main() {
6725
6726 /* The GNU C library defines this for functions which it implements
6727     to always fail with ENOSYS.  Some functions are actually named
6728     something starting with __ and the normal name is an alias.  */
6729 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6730 choke me
6731 #else
6732 $ac_func();
6733 #endif
6734
6735 ; return 0; }
6736 EOF
6737 if { (eval echo configure:6738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6738   rm -rf conftest*
6739   eval "ac_cv_func_$ac_func=yes"
6740 else
6741   echo "configure: failed program was:" >&5
6742   cat conftest.$ac_ext >&5
6743   rm -rf conftest*
6744   eval "ac_cv_func_$ac_func=no"
6745 fi
6746 rm -f conftest*
6747 fi
6748
6749 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6750   echo "$ac_t""yes" 1>&6
6751     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6752   cat >> confdefs.h <<EOF
6753 #define $ac_tr_func 1
6754 EOF
6755  
6756 else
6757   echo "$ac_t""no" 1>&6
6758 fi
6759 done
6760
6761   ;;
6762   esac
6763
6764
6765 case "$LIBS" in
6766   *-lsecurity*) for ac_func in set_auth_parameters
6767 do
6768 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6769 echo "configure:6770: checking for $ac_func" >&5
6770 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6771   echo $ac_n "(cached) $ac_c" 1>&6
6772 else
6773   cat > conftest.$ac_ext <<EOF
6774 #line 6775 "configure"
6775 #include "confdefs.h"
6776 /* System header to define __stub macros and hopefully few prototypes,
6777     which can conflict with char $ac_func(); below.  */
6778 #include <assert.h>
6779 /* Override any gcc2 internal prototype to avoid an error.  */
6780 /* We use char because int might match the return type of a gcc2
6781     builtin and then its argument prototype would still apply.  */
6782 char $ac_func();
6783
6784 int main() {
6785
6786 /* The GNU C library defines this for functions which it implements
6787     to always fail with ENOSYS.  Some functions are actually named
6788     something starting with __ and the normal name is an alias.  */
6789 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6790 choke me
6791 #else
6792 $ac_func();
6793 #endif
6794
6795 ; return 0; }
6796 EOF
6797 if { (eval echo configure:6798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6798   rm -rf conftest*
6799   eval "ac_cv_func_$ac_func=yes"
6800 else
6801   echo "configure: failed program was:" >&5
6802   cat conftest.$ac_ext >&5
6803   rm -rf conftest*
6804   eval "ac_cv_func_$ac_func=no"
6805 fi
6806 rm -f conftest*
6807 fi
6808
6809 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6810   echo "$ac_t""yes" 1>&6
6811     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6812   cat >> confdefs.h <<EOF
6813 #define $ac_tr_func 1
6814 EOF
6815  
6816 else
6817   echo "$ac_t""no" 1>&6
6818 fi
6819 done
6820  ;;
6821   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
6822 echo "configure:6823: checking for set_auth_parameters in -lsecurity" >&5
6823 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
6824 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6825   echo $ac_n "(cached) $ac_c" 1>&6
6826 else
6827   ac_save_LIBS="$LIBS"
6828 LIBS="-lsecurity  $LIBS"
6829 cat > conftest.$ac_ext <<EOF
6830 #line 6831 "configure"
6831 #include "confdefs.h"
6832 /* Override any gcc2 internal prototype to avoid an error.  */
6833 /* We use char because int might match the return type of a gcc2
6834     builtin and then its argument prototype would still apply.  */
6835 char set_auth_parameters();
6836
6837 int main() {
6838 set_auth_parameters()
6839 ; return 0; }
6840 EOF
6841 if { (eval echo configure:6842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6842   rm -rf conftest*
6843   eval "ac_cv_lib_$ac_lib_var=yes"
6844 else
6845   echo "configure: failed program was:" >&5
6846   cat conftest.$ac_ext >&5
6847   rm -rf conftest*
6848   eval "ac_cv_lib_$ac_lib_var=no"
6849 fi
6850 rm -f conftest*
6851 LIBS="$ac_save_LIBS"
6852
6853 fi
6854 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6855   echo "$ac_t""yes" 1>&6
6856     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6857     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6858   cat >> confdefs.h <<EOF
6859 #define $ac_tr_lib 1
6860 EOF
6861
6862   LIBS="-lsecurity $LIBS"
6863
6864 else
6865   echo "$ac_t""no" 1>&6
6866 fi
6867  
6868      for ac_func in set_auth_parameters
6869 do
6870 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6871 echo "configure:6872: checking for $ac_func" >&5
6872 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6873   echo $ac_n "(cached) $ac_c" 1>&6
6874 else
6875   cat > conftest.$ac_ext <<EOF
6876 #line 6877 "configure"
6877 #include "confdefs.h"
6878 /* System header to define __stub macros and hopefully few prototypes,
6879     which can conflict with char $ac_func(); below.  */
6880 #include <assert.h>
6881 /* Override any gcc2 internal prototype to avoid an error.  */
6882 /* We use char because int might match the return type of a gcc2
6883     builtin and then its argument prototype would still apply.  */
6884 char $ac_func();
6885
6886 int main() {
6887
6888 /* The GNU C library defines this for functions which it implements
6889     to always fail with ENOSYS.  Some functions are actually named
6890     something starting with __ and the normal name is an alias.  */
6891 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6892 choke me
6893 #else
6894 $ac_func();
6895 #endif
6896
6897 ; return 0; }
6898 EOF
6899 if { (eval echo configure:6900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6900   rm -rf conftest*
6901   eval "ac_cv_func_$ac_func=yes"
6902 else
6903   echo "configure: failed program was:" >&5
6904   cat conftest.$ac_ext >&5
6905   rm -rf conftest*
6906   eval "ac_cv_func_$ac_func=no"
6907 fi
6908 rm -f conftest*
6909 fi
6910
6911 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6912   echo "$ac_t""yes" 1>&6
6913     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6914   cat >> confdefs.h <<EOF
6915 #define $ac_tr_func 1
6916 EOF
6917  
6918 else
6919   echo "$ac_t""no" 1>&6
6920 fi
6921 done
6922
6923   ;;
6924   esac
6925
6926 case "$LIBS" in
6927   *-lsec*) for ac_func in set_auth_parameters
6928 do
6929 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6930 echo "configure:6931: checking for $ac_func" >&5
6931 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6932   echo $ac_n "(cached) $ac_c" 1>&6
6933 else
6934   cat > conftest.$ac_ext <<EOF
6935 #line 6936 "configure"
6936 #include "confdefs.h"
6937 /* System header to define __stub macros and hopefully few prototypes,
6938     which can conflict with char $ac_func(); below.  */
6939 #include <assert.h>
6940 /* Override any gcc2 internal prototype to avoid an error.  */
6941 /* We use char because int might match the return type of a gcc2
6942     builtin and then its argument prototype would still apply.  */
6943 char $ac_func();
6944
6945 int main() {
6946
6947 /* The GNU C library defines this for functions which it implements
6948     to always fail with ENOSYS.  Some functions are actually named
6949     something starting with __ and the normal name is an alias.  */
6950 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6951 choke me
6952 #else
6953 $ac_func();
6954 #endif
6955
6956 ; return 0; }
6957 EOF
6958 if { (eval echo configure:6959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6959   rm -rf conftest*
6960   eval "ac_cv_func_$ac_func=yes"
6961 else
6962   echo "configure: failed program was:" >&5
6963   cat conftest.$ac_ext >&5
6964   rm -rf conftest*
6965   eval "ac_cv_func_$ac_func=no"
6966 fi
6967 rm -f conftest*
6968 fi
6969
6970 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6971   echo "$ac_t""yes" 1>&6
6972     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6973   cat >> confdefs.h <<EOF
6974 #define $ac_tr_func 1
6975 EOF
6976  
6977 else
6978   echo "$ac_t""no" 1>&6
6979 fi
6980 done
6981  ;;
6982   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
6983 echo "configure:6984: checking for set_auth_parameters in -lsec" >&5
6984 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
6985 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6986   echo $ac_n "(cached) $ac_c" 1>&6
6987 else
6988   ac_save_LIBS="$LIBS"
6989 LIBS="-lsec  $LIBS"
6990 cat > conftest.$ac_ext <<EOF
6991 #line 6992 "configure"
6992 #include "confdefs.h"
6993 /* Override any gcc2 internal prototype to avoid an error.  */
6994 /* We use char because int might match the return type of a gcc2
6995     builtin and then its argument prototype would still apply.  */
6996 char set_auth_parameters();
6997
6998 int main() {
6999 set_auth_parameters()
7000 ; return 0; }
7001 EOF
7002 if { (eval echo configure:7003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7003   rm -rf conftest*
7004   eval "ac_cv_lib_$ac_lib_var=yes"
7005 else
7006   echo "configure: failed program was:" >&5
7007   cat conftest.$ac_ext >&5
7008   rm -rf conftest*
7009   eval "ac_cv_lib_$ac_lib_var=no"
7010 fi
7011 rm -f conftest*
7012 LIBS="$ac_save_LIBS"
7013
7014 fi
7015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7016   echo "$ac_t""yes" 1>&6
7017     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7018     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7019   cat >> confdefs.h <<EOF
7020 #define $ac_tr_lib 1
7021 EOF
7022
7023   LIBS="-lsec $LIBS"
7024
7025 else
7026   echo "$ac_t""no" 1>&6
7027 fi
7028  
7029      for ac_func in set_auth_parameters
7030 do
7031 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7032 echo "configure:7033: checking for $ac_func" >&5
7033 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7034   echo $ac_n "(cached) $ac_c" 1>&6
7035 else
7036   cat > conftest.$ac_ext <<EOF
7037 #line 7038 "configure"
7038 #include "confdefs.h"
7039 /* System header to define __stub macros and hopefully few prototypes,
7040     which can conflict with char $ac_func(); below.  */
7041 #include <assert.h>
7042 /* Override any gcc2 internal prototype to avoid an error.  */
7043 /* We use char because int might match the return type of a gcc2
7044     builtin and then its argument prototype would still apply.  */
7045 char $ac_func();
7046
7047 int main() {
7048
7049 /* The GNU C library defines this for functions which it implements
7050     to always fail with ENOSYS.  Some functions are actually named
7051     something starting with __ and the normal name is an alias.  */
7052 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7053 choke me
7054 #else
7055 $ac_func();
7056 #endif
7057
7058 ; return 0; }
7059 EOF
7060 if { (eval echo configure:7061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7061   rm -rf conftest*
7062   eval "ac_cv_func_$ac_func=yes"
7063 else
7064   echo "configure: failed program was:" >&5
7065   cat conftest.$ac_ext >&5
7066   rm -rf conftest*
7067   eval "ac_cv_func_$ac_func=no"
7068 fi
7069 rm -f conftest*
7070 fi
7071
7072 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7073   echo "$ac_t""yes" 1>&6
7074     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7075   cat >> confdefs.h <<EOF
7076 #define $ac_tr_func 1
7077 EOF
7078  
7079 else
7080   echo "$ac_t""no" 1>&6
7081 fi
7082 done
7083
7084   ;;
7085   esac
7086
7087
7088 # UnixWare 7.x has its getspnam in -lgen
7089 case "$LIBS" in
7090   *-lgen*) for ac_func in getspnam
7091 do
7092 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7093 echo "configure:7094: checking for $ac_func" >&5
7094 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7095   echo $ac_n "(cached) $ac_c" 1>&6
7096 else
7097   cat > conftest.$ac_ext <<EOF
7098 #line 7099 "configure"
7099 #include "confdefs.h"
7100 /* System header to define __stub macros and hopefully few prototypes,
7101     which can conflict with char $ac_func(); below.  */
7102 #include <assert.h>
7103 /* Override any gcc2 internal prototype to avoid an error.  */
7104 /* We use char because int might match the return type of a gcc2
7105     builtin and then its argument prototype would still apply.  */
7106 char $ac_func();
7107
7108 int main() {
7109
7110 /* The GNU C library defines this for functions which it implements
7111     to always fail with ENOSYS.  Some functions are actually named
7112     something starting with __ and the normal name is an alias.  */
7113 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7114 choke me
7115 #else
7116 $ac_func();
7117 #endif
7118
7119 ; return 0; }
7120 EOF
7121 if { (eval echo configure:7122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7122   rm -rf conftest*
7123   eval "ac_cv_func_$ac_func=yes"
7124 else
7125   echo "configure: failed program was:" >&5
7126   cat conftest.$ac_ext >&5
7127   rm -rf conftest*
7128   eval "ac_cv_func_$ac_func=no"
7129 fi
7130 rm -f conftest*
7131 fi
7132
7133 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7134   echo "$ac_t""yes" 1>&6
7135     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7136   cat >> confdefs.h <<EOF
7137 #define $ac_tr_func 1
7138 EOF
7139  
7140 else
7141   echo "$ac_t""no" 1>&6
7142 fi
7143 done
7144  ;;
7145   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7146 echo "configure:7147: checking for getspnam in -lgen" >&5
7147 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7148 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7149   echo $ac_n "(cached) $ac_c" 1>&6
7150 else
7151   ac_save_LIBS="$LIBS"
7152 LIBS="-lgen  $LIBS"
7153 cat > conftest.$ac_ext <<EOF
7154 #line 7155 "configure"
7155 #include "confdefs.h"
7156 /* Override any gcc2 internal prototype to avoid an error.  */
7157 /* We use char because int might match the return type of a gcc2
7158     builtin and then its argument prototype would still apply.  */
7159 char getspnam();
7160
7161 int main() {
7162 getspnam()
7163 ; return 0; }
7164 EOF
7165 if { (eval echo configure:7166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7166   rm -rf conftest*
7167   eval "ac_cv_lib_$ac_lib_var=yes"
7168 else
7169   echo "configure: failed program was:" >&5
7170   cat conftest.$ac_ext >&5
7171   rm -rf conftest*
7172   eval "ac_cv_lib_$ac_lib_var=no"
7173 fi
7174 rm -f conftest*
7175 LIBS="$ac_save_LIBS"
7176
7177 fi
7178 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7179   echo "$ac_t""yes" 1>&6
7180     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7181     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7182   cat >> confdefs.h <<EOF
7183 #define $ac_tr_lib 1
7184 EOF
7185
7186   LIBS="-lgen $LIBS"
7187
7188 else
7189   echo "$ac_t""no" 1>&6
7190 fi
7191  
7192      for ac_func in getspnam
7193 do
7194 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7195 echo "configure:7196: checking for $ac_func" >&5
7196 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7197   echo $ac_n "(cached) $ac_c" 1>&6
7198 else
7199   cat > conftest.$ac_ext <<EOF
7200 #line 7201 "configure"
7201 #include "confdefs.h"
7202 /* System header to define __stub macros and hopefully few prototypes,
7203     which can conflict with char $ac_func(); below.  */
7204 #include <assert.h>
7205 /* Override any gcc2 internal prototype to avoid an error.  */
7206 /* We use char because int might match the return type of a gcc2
7207     builtin and then its argument prototype would still apply.  */
7208 char $ac_func();
7209
7210 int main() {
7211
7212 /* The GNU C library defines this for functions which it implements
7213     to always fail with ENOSYS.  Some functions are actually named
7214     something starting with __ and the normal name is an alias.  */
7215 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7216 choke me
7217 #else
7218 $ac_func();
7219 #endif
7220
7221 ; return 0; }
7222 EOF
7223 if { (eval echo configure:7224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7224   rm -rf conftest*
7225   eval "ac_cv_func_$ac_func=yes"
7226 else
7227   echo "configure: failed program was:" >&5
7228   cat conftest.$ac_ext >&5
7229   rm -rf conftest*
7230   eval "ac_cv_func_$ac_func=no"
7231 fi
7232 rm -f conftest*
7233 fi
7234
7235 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7236   echo "$ac_t""yes" 1>&6
7237     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7238   cat >> confdefs.h <<EOF
7239 #define $ac_tr_func 1
7240 EOF
7241  
7242 else
7243   echo "$ac_t""no" 1>&6
7244 fi
7245 done
7246
7247   ;;
7248   esac
7249
7250
7251 case "$LIBS" in
7252   *-lsecurity*) for ac_func in getspnam
7253 do
7254 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7255 echo "configure:7256: checking for $ac_func" >&5
7256 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7257   echo $ac_n "(cached) $ac_c" 1>&6
7258 else
7259   cat > conftest.$ac_ext <<EOF
7260 #line 7261 "configure"
7261 #include "confdefs.h"
7262 /* System header to define __stub macros and hopefully few prototypes,
7263     which can conflict with char $ac_func(); below.  */
7264 #include <assert.h>
7265 /* Override any gcc2 internal prototype to avoid an error.  */
7266 /* We use char because int might match the return type of a gcc2
7267     builtin and then its argument prototype would still apply.  */
7268 char $ac_func();
7269
7270 int main() {
7271
7272 /* The GNU C library defines this for functions which it implements
7273     to always fail with ENOSYS.  Some functions are actually named
7274     something starting with __ and the normal name is an alias.  */
7275 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7276 choke me
7277 #else
7278 $ac_func();
7279 #endif
7280
7281 ; return 0; }
7282 EOF
7283 if { (eval echo configure:7284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7284   rm -rf conftest*
7285   eval "ac_cv_func_$ac_func=yes"
7286 else
7287   echo "configure: failed program was:" >&5
7288   cat conftest.$ac_ext >&5
7289   rm -rf conftest*
7290   eval "ac_cv_func_$ac_func=no"
7291 fi
7292 rm -f conftest*
7293 fi
7294
7295 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7296   echo "$ac_t""yes" 1>&6
7297     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7298   cat >> confdefs.h <<EOF
7299 #define $ac_tr_func 1
7300 EOF
7301  
7302 else
7303   echo "$ac_t""no" 1>&6
7304 fi
7305 done
7306  ;;
7307   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7308 echo "configure:7309: checking for getspnam in -lsecurity" >&5
7309 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7310 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7311   echo $ac_n "(cached) $ac_c" 1>&6
7312 else
7313   ac_save_LIBS="$LIBS"
7314 LIBS="-lsecurity  $LIBS"
7315 cat > conftest.$ac_ext <<EOF
7316 #line 7317 "configure"
7317 #include "confdefs.h"
7318 /* Override any gcc2 internal prototype to avoid an error.  */
7319 /* We use char because int might match the return type of a gcc2
7320     builtin and then its argument prototype would still apply.  */
7321 char getspnam();
7322
7323 int main() {
7324 getspnam()
7325 ; return 0; }
7326 EOF
7327 if { (eval echo configure:7328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7328   rm -rf conftest*
7329   eval "ac_cv_lib_$ac_lib_var=yes"
7330 else
7331   echo "configure: failed program was:" >&5
7332   cat conftest.$ac_ext >&5
7333   rm -rf conftest*
7334   eval "ac_cv_lib_$ac_lib_var=no"
7335 fi
7336 rm -f conftest*
7337 LIBS="$ac_save_LIBS"
7338
7339 fi
7340 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7341   echo "$ac_t""yes" 1>&6
7342     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7343     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7344   cat >> confdefs.h <<EOF
7345 #define $ac_tr_lib 1
7346 EOF
7347
7348   LIBS="-lsecurity $LIBS"
7349
7350 else
7351   echo "$ac_t""no" 1>&6
7352 fi
7353  
7354      for ac_func in getspnam
7355 do
7356 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7357 echo "configure:7358: checking for $ac_func" >&5
7358 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7359   echo $ac_n "(cached) $ac_c" 1>&6
7360 else
7361   cat > conftest.$ac_ext <<EOF
7362 #line 7363 "configure"
7363 #include "confdefs.h"
7364 /* System header to define __stub macros and hopefully few prototypes,
7365     which can conflict with char $ac_func(); below.  */
7366 #include <assert.h>
7367 /* Override any gcc2 internal prototype to avoid an error.  */
7368 /* We use char because int might match the return type of a gcc2
7369     builtin and then its argument prototype would still apply.  */
7370 char $ac_func();
7371
7372 int main() {
7373
7374 /* The GNU C library defines this for functions which it implements
7375     to always fail with ENOSYS.  Some functions are actually named
7376     something starting with __ and the normal name is an alias.  */
7377 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7378 choke me
7379 #else
7380 $ac_func();
7381 #endif
7382
7383 ; return 0; }
7384 EOF
7385 if { (eval echo configure:7386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7386   rm -rf conftest*
7387   eval "ac_cv_func_$ac_func=yes"
7388 else
7389   echo "configure: failed program was:" >&5
7390   cat conftest.$ac_ext >&5
7391   rm -rf conftest*
7392   eval "ac_cv_func_$ac_func=no"
7393 fi
7394 rm -f conftest*
7395 fi
7396
7397 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7398   echo "$ac_t""yes" 1>&6
7399     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7400   cat >> confdefs.h <<EOF
7401 #define $ac_tr_func 1
7402 EOF
7403  
7404 else
7405   echo "$ac_t""no" 1>&6
7406 fi
7407 done
7408
7409   ;;
7410   esac
7411
7412 case "$LIBS" in
7413   *-lsec*) for ac_func in getspnam
7414 do
7415 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7416 echo "configure:7417: checking for $ac_func" >&5
7417 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7418   echo $ac_n "(cached) $ac_c" 1>&6
7419 else
7420   cat > conftest.$ac_ext <<EOF
7421 #line 7422 "configure"
7422 #include "confdefs.h"
7423 /* System header to define __stub macros and hopefully few prototypes,
7424     which can conflict with char $ac_func(); below.  */
7425 #include <assert.h>
7426 /* Override any gcc2 internal prototype to avoid an error.  */
7427 /* We use char because int might match the return type of a gcc2
7428     builtin and then its argument prototype would still apply.  */
7429 char $ac_func();
7430
7431 int main() {
7432
7433 /* The GNU C library defines this for functions which it implements
7434     to always fail with ENOSYS.  Some functions are actually named
7435     something starting with __ and the normal name is an alias.  */
7436 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7437 choke me
7438 #else
7439 $ac_func();
7440 #endif
7441
7442 ; return 0; }
7443 EOF
7444 if { (eval echo configure:7445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7445   rm -rf conftest*
7446   eval "ac_cv_func_$ac_func=yes"
7447 else
7448   echo "configure: failed program was:" >&5
7449   cat conftest.$ac_ext >&5
7450   rm -rf conftest*
7451   eval "ac_cv_func_$ac_func=no"
7452 fi
7453 rm -f conftest*
7454 fi
7455
7456 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7457   echo "$ac_t""yes" 1>&6
7458     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7459   cat >> confdefs.h <<EOF
7460 #define $ac_tr_func 1
7461 EOF
7462  
7463 else
7464   echo "$ac_t""no" 1>&6
7465 fi
7466 done
7467  ;;
7468   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7469 echo "configure:7470: checking for getspnam in -lsec" >&5
7470 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7471 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7472   echo $ac_n "(cached) $ac_c" 1>&6
7473 else
7474   ac_save_LIBS="$LIBS"
7475 LIBS="-lsec  $LIBS"
7476 cat > conftest.$ac_ext <<EOF
7477 #line 7478 "configure"
7478 #include "confdefs.h"
7479 /* Override any gcc2 internal prototype to avoid an error.  */
7480 /* We use char because int might match the return type of a gcc2
7481     builtin and then its argument prototype would still apply.  */
7482 char getspnam();
7483
7484 int main() {
7485 getspnam()
7486 ; return 0; }
7487 EOF
7488 if { (eval echo configure:7489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7489   rm -rf conftest*
7490   eval "ac_cv_lib_$ac_lib_var=yes"
7491 else
7492   echo "configure: failed program was:" >&5
7493   cat conftest.$ac_ext >&5
7494   rm -rf conftest*
7495   eval "ac_cv_lib_$ac_lib_var=no"
7496 fi
7497 rm -f conftest*
7498 LIBS="$ac_save_LIBS"
7499
7500 fi
7501 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7502   echo "$ac_t""yes" 1>&6
7503     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7504     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7505   cat >> confdefs.h <<EOF
7506 #define $ac_tr_lib 1
7507 EOF
7508
7509   LIBS="-lsec $LIBS"
7510
7511 else
7512   echo "$ac_t""no" 1>&6
7513 fi
7514  
7515      for ac_func in getspnam
7516 do
7517 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7518 echo "configure:7519: checking for $ac_func" >&5
7519 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7520   echo $ac_n "(cached) $ac_c" 1>&6
7521 else
7522   cat > conftest.$ac_ext <<EOF
7523 #line 7524 "configure"
7524 #include "confdefs.h"
7525 /* System header to define __stub macros and hopefully few prototypes,
7526     which can conflict with char $ac_func(); below.  */
7527 #include <assert.h>
7528 /* Override any gcc2 internal prototype to avoid an error.  */
7529 /* We use char because int might match the return type of a gcc2
7530     builtin and then its argument prototype would still apply.  */
7531 char $ac_func();
7532
7533 int main() {
7534
7535 /* The GNU C library defines this for functions which it implements
7536     to always fail with ENOSYS.  Some functions are actually named
7537     something starting with __ and the normal name is an alias.  */
7538 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7539 choke me
7540 #else
7541 $ac_func();
7542 #endif
7543
7544 ; return 0; }
7545 EOF
7546 if { (eval echo configure:7547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7547   rm -rf conftest*
7548   eval "ac_cv_func_$ac_func=yes"
7549 else
7550   echo "configure: failed program was:" >&5
7551   cat conftest.$ac_ext >&5
7552   rm -rf conftest*
7553   eval "ac_cv_func_$ac_func=no"
7554 fi
7555 rm -f conftest*
7556 fi
7557
7558 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7559   echo "$ac_t""yes" 1>&6
7560     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7561   cat >> confdefs.h <<EOF
7562 #define $ac_tr_func 1
7563 EOF
7564  
7565 else
7566   echo "$ac_t""no" 1>&6
7567 fi
7568 done
7569
7570   ;;
7571   esac
7572
7573
7574 case "$LIBS" in
7575   *-lsecurity*) for ac_func in bigcrypt
7576 do
7577 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7578 echo "configure:7579: checking for $ac_func" >&5
7579 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7580   echo $ac_n "(cached) $ac_c" 1>&6
7581 else
7582   cat > conftest.$ac_ext <<EOF
7583 #line 7584 "configure"
7584 #include "confdefs.h"
7585 /* System header to define __stub macros and hopefully few prototypes,
7586     which can conflict with char $ac_func(); below.  */
7587 #include <assert.h>
7588 /* Override any gcc2 internal prototype to avoid an error.  */
7589 /* We use char because int might match the return type of a gcc2
7590     builtin and then its argument prototype would still apply.  */
7591 char $ac_func();
7592
7593 int main() {
7594
7595 /* The GNU C library defines this for functions which it implements
7596     to always fail with ENOSYS.  Some functions are actually named
7597     something starting with __ and the normal name is an alias.  */
7598 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7599 choke me
7600 #else
7601 $ac_func();
7602 #endif
7603
7604 ; return 0; }
7605 EOF
7606 if { (eval echo configure:7607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7607   rm -rf conftest*
7608   eval "ac_cv_func_$ac_func=yes"
7609 else
7610   echo "configure: failed program was:" >&5
7611   cat conftest.$ac_ext >&5
7612   rm -rf conftest*
7613   eval "ac_cv_func_$ac_func=no"
7614 fi
7615 rm -f conftest*
7616 fi
7617
7618 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7619   echo "$ac_t""yes" 1>&6
7620     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7621   cat >> confdefs.h <<EOF
7622 #define $ac_tr_func 1
7623 EOF
7624  
7625 else
7626   echo "$ac_t""no" 1>&6
7627 fi
7628 done
7629  ;;
7630   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
7631 echo "configure:7632: checking for bigcrypt in -lsecurity" >&5
7632 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
7633 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7634   echo $ac_n "(cached) $ac_c" 1>&6
7635 else
7636   ac_save_LIBS="$LIBS"
7637 LIBS="-lsecurity  $LIBS"
7638 cat > conftest.$ac_ext <<EOF
7639 #line 7640 "configure"
7640 #include "confdefs.h"
7641 /* Override any gcc2 internal prototype to avoid an error.  */
7642 /* We use char because int might match the return type of a gcc2
7643     builtin and then its argument prototype would still apply.  */
7644 char bigcrypt();
7645
7646 int main() {
7647 bigcrypt()
7648 ; return 0; }
7649 EOF
7650 if { (eval echo configure:7651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7651   rm -rf conftest*
7652   eval "ac_cv_lib_$ac_lib_var=yes"
7653 else
7654   echo "configure: failed program was:" >&5
7655   cat conftest.$ac_ext >&5
7656   rm -rf conftest*
7657   eval "ac_cv_lib_$ac_lib_var=no"
7658 fi
7659 rm -f conftest*
7660 LIBS="$ac_save_LIBS"
7661
7662 fi
7663 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7664   echo "$ac_t""yes" 1>&6
7665     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7666     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7667   cat >> confdefs.h <<EOF
7668 #define $ac_tr_lib 1
7669 EOF
7670
7671   LIBS="-lsecurity $LIBS"
7672
7673 else
7674   echo "$ac_t""no" 1>&6
7675 fi
7676  
7677      for ac_func in bigcrypt
7678 do
7679 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7680 echo "configure:7681: checking for $ac_func" >&5
7681 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7682   echo $ac_n "(cached) $ac_c" 1>&6
7683 else
7684   cat > conftest.$ac_ext <<EOF
7685 #line 7686 "configure"
7686 #include "confdefs.h"
7687 /* System header to define __stub macros and hopefully few prototypes,
7688     which can conflict with char $ac_func(); below.  */
7689 #include <assert.h>
7690 /* Override any gcc2 internal prototype to avoid an error.  */
7691 /* We use char because int might match the return type of a gcc2
7692     builtin and then its argument prototype would still apply.  */
7693 char $ac_func();
7694
7695 int main() {
7696
7697 /* The GNU C library defines this for functions which it implements
7698     to always fail with ENOSYS.  Some functions are actually named
7699     something starting with __ and the normal name is an alias.  */
7700 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7701 choke me
7702 #else
7703 $ac_func();
7704 #endif
7705
7706 ; return 0; }
7707 EOF
7708 if { (eval echo configure:7709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7709   rm -rf conftest*
7710   eval "ac_cv_func_$ac_func=yes"
7711 else
7712   echo "configure: failed program was:" >&5
7713   cat conftest.$ac_ext >&5
7714   rm -rf conftest*
7715   eval "ac_cv_func_$ac_func=no"
7716 fi
7717 rm -f conftest*
7718 fi
7719
7720 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7721   echo "$ac_t""yes" 1>&6
7722     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7723   cat >> confdefs.h <<EOF
7724 #define $ac_tr_func 1
7725 EOF
7726  
7727 else
7728   echo "$ac_t""no" 1>&6
7729 fi
7730 done
7731
7732   ;;
7733   esac
7734
7735 case "$LIBS" in
7736   *-lsec*) for ac_func in bigcrypt
7737 do
7738 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7739 echo "configure:7740: checking for $ac_func" >&5
7740 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7741   echo $ac_n "(cached) $ac_c" 1>&6
7742 else
7743   cat > conftest.$ac_ext <<EOF
7744 #line 7745 "configure"
7745 #include "confdefs.h"
7746 /* System header to define __stub macros and hopefully few prototypes,
7747     which can conflict with char $ac_func(); below.  */
7748 #include <assert.h>
7749 /* Override any gcc2 internal prototype to avoid an error.  */
7750 /* We use char because int might match the return type of a gcc2
7751     builtin and then its argument prototype would still apply.  */
7752 char $ac_func();
7753
7754 int main() {
7755
7756 /* The GNU C library defines this for functions which it implements
7757     to always fail with ENOSYS.  Some functions are actually named
7758     something starting with __ and the normal name is an alias.  */
7759 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7760 choke me
7761 #else
7762 $ac_func();
7763 #endif
7764
7765 ; return 0; }
7766 EOF
7767 if { (eval echo configure:7768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7768   rm -rf conftest*
7769   eval "ac_cv_func_$ac_func=yes"
7770 else
7771   echo "configure: failed program was:" >&5
7772   cat conftest.$ac_ext >&5
7773   rm -rf conftest*
7774   eval "ac_cv_func_$ac_func=no"
7775 fi
7776 rm -f conftest*
7777 fi
7778
7779 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7780   echo "$ac_t""yes" 1>&6
7781     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7782   cat >> confdefs.h <<EOF
7783 #define $ac_tr_func 1
7784 EOF
7785  
7786 else
7787   echo "$ac_t""no" 1>&6
7788 fi
7789 done
7790  ;;
7791   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
7792 echo "configure:7793: checking for bigcrypt in -lsec" >&5
7793 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
7794 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7795   echo $ac_n "(cached) $ac_c" 1>&6
7796 else
7797   ac_save_LIBS="$LIBS"
7798 LIBS="-lsec  $LIBS"
7799 cat > conftest.$ac_ext <<EOF
7800 #line 7801 "configure"
7801 #include "confdefs.h"
7802 /* Override any gcc2 internal prototype to avoid an error.  */
7803 /* We use char because int might match the return type of a gcc2
7804     builtin and then its argument prototype would still apply.  */
7805 char bigcrypt();
7806
7807 int main() {
7808 bigcrypt()
7809 ; return 0; }
7810 EOF
7811 if { (eval echo configure:7812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7812   rm -rf conftest*
7813   eval "ac_cv_lib_$ac_lib_var=yes"
7814 else
7815   echo "configure: failed program was:" >&5
7816   cat conftest.$ac_ext >&5
7817   rm -rf conftest*
7818   eval "ac_cv_lib_$ac_lib_var=no"
7819 fi
7820 rm -f conftest*
7821 LIBS="$ac_save_LIBS"
7822
7823 fi
7824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7825   echo "$ac_t""yes" 1>&6
7826     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7827     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7828   cat >> confdefs.h <<EOF
7829 #define $ac_tr_lib 1
7830 EOF
7831
7832   LIBS="-lsec $LIBS"
7833
7834 else
7835   echo "$ac_t""no" 1>&6
7836 fi
7837  
7838      for ac_func in bigcrypt
7839 do
7840 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7841 echo "configure:7842: checking for $ac_func" >&5
7842 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7843   echo $ac_n "(cached) $ac_c" 1>&6
7844 else
7845   cat > conftest.$ac_ext <<EOF
7846 #line 7847 "configure"
7847 #include "confdefs.h"
7848 /* System header to define __stub macros and hopefully few prototypes,
7849     which can conflict with char $ac_func(); below.  */
7850 #include <assert.h>
7851 /* Override any gcc2 internal prototype to avoid an error.  */
7852 /* We use char because int might match the return type of a gcc2
7853     builtin and then its argument prototype would still apply.  */
7854 char $ac_func();
7855
7856 int main() {
7857
7858 /* The GNU C library defines this for functions which it implements
7859     to always fail with ENOSYS.  Some functions are actually named
7860     something starting with __ and the normal name is an alias.  */
7861 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7862 choke me
7863 #else
7864 $ac_func();
7865 #endif
7866
7867 ; return 0; }
7868 EOF
7869 if { (eval echo configure:7870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7870   rm -rf conftest*
7871   eval "ac_cv_func_$ac_func=yes"
7872 else
7873   echo "configure: failed program was:" >&5
7874   cat conftest.$ac_ext >&5
7875   rm -rf conftest*
7876   eval "ac_cv_func_$ac_func=no"
7877 fi
7878 rm -f conftest*
7879 fi
7880
7881 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7882   echo "$ac_t""yes" 1>&6
7883     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7884   cat >> confdefs.h <<EOF
7885 #define $ac_tr_func 1
7886 EOF
7887  
7888 else
7889   echo "$ac_t""no" 1>&6
7890 fi
7891 done
7892
7893   ;;
7894   esac
7895
7896
7897 case "$LIBS" in
7898   *-lsecurity*) for ac_func in getprpwnam
7899 do
7900 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7901 echo "configure:7902: checking for $ac_func" >&5
7902 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7903   echo $ac_n "(cached) $ac_c" 1>&6
7904 else
7905   cat > conftest.$ac_ext <<EOF
7906 #line 7907 "configure"
7907 #include "confdefs.h"
7908 /* System header to define __stub macros and hopefully few prototypes,
7909     which can conflict with char $ac_func(); below.  */
7910 #include <assert.h>
7911 /* Override any gcc2 internal prototype to avoid an error.  */
7912 /* We use char because int might match the return type of a gcc2
7913     builtin and then its argument prototype would still apply.  */
7914 char $ac_func();
7915
7916 int main() {
7917
7918 /* The GNU C library defines this for functions which it implements
7919     to always fail with ENOSYS.  Some functions are actually named
7920     something starting with __ and the normal name is an alias.  */
7921 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7922 choke me
7923 #else
7924 $ac_func();
7925 #endif
7926
7927 ; return 0; }
7928 EOF
7929 if { (eval echo configure:7930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7930   rm -rf conftest*
7931   eval "ac_cv_func_$ac_func=yes"
7932 else
7933   echo "configure: failed program was:" >&5
7934   cat conftest.$ac_ext >&5
7935   rm -rf conftest*
7936   eval "ac_cv_func_$ac_func=no"
7937 fi
7938 rm -f conftest*
7939 fi
7940
7941 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7942   echo "$ac_t""yes" 1>&6
7943     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7944   cat >> confdefs.h <<EOF
7945 #define $ac_tr_func 1
7946 EOF
7947  
7948 else
7949   echo "$ac_t""no" 1>&6
7950 fi
7951 done
7952  ;;
7953   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
7954 echo "configure:7955: checking for getprpwnam in -lsecurity" >&5
7955 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
7956 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7957   echo $ac_n "(cached) $ac_c" 1>&6
7958 else
7959   ac_save_LIBS="$LIBS"
7960 LIBS="-lsecurity  $LIBS"
7961 cat > conftest.$ac_ext <<EOF
7962 #line 7963 "configure"
7963 #include "confdefs.h"
7964 /* Override any gcc2 internal prototype to avoid an error.  */
7965 /* We use char because int might match the return type of a gcc2
7966     builtin and then its argument prototype would still apply.  */
7967 char getprpwnam();
7968
7969 int main() {
7970 getprpwnam()
7971 ; return 0; }
7972 EOF
7973 if { (eval echo configure:7974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7974   rm -rf conftest*
7975   eval "ac_cv_lib_$ac_lib_var=yes"
7976 else
7977   echo "configure: failed program was:" >&5
7978   cat conftest.$ac_ext >&5
7979   rm -rf conftest*
7980   eval "ac_cv_lib_$ac_lib_var=no"
7981 fi
7982 rm -f conftest*
7983 LIBS="$ac_save_LIBS"
7984
7985 fi
7986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7987   echo "$ac_t""yes" 1>&6
7988     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7989     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7990   cat >> confdefs.h <<EOF
7991 #define $ac_tr_lib 1
7992 EOF
7993
7994   LIBS="-lsecurity $LIBS"
7995
7996 else
7997   echo "$ac_t""no" 1>&6
7998 fi
7999  
8000      for ac_func in getprpwnam
8001 do
8002 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8003 echo "configure:8004: checking for $ac_func" >&5
8004 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8005   echo $ac_n "(cached) $ac_c" 1>&6
8006 else
8007   cat > conftest.$ac_ext <<EOF
8008 #line 8009 "configure"
8009 #include "confdefs.h"
8010 /* System header to define __stub macros and hopefully few prototypes,
8011     which can conflict with char $ac_func(); below.  */
8012 #include <assert.h>
8013 /* Override any gcc2 internal prototype to avoid an error.  */
8014 /* We use char because int might match the return type of a gcc2
8015     builtin and then its argument prototype would still apply.  */
8016 char $ac_func();
8017
8018 int main() {
8019
8020 /* The GNU C library defines this for functions which it implements
8021     to always fail with ENOSYS.  Some functions are actually named
8022     something starting with __ and the normal name is an alias.  */
8023 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8024 choke me
8025 #else
8026 $ac_func();
8027 #endif
8028
8029 ; return 0; }
8030 EOF
8031 if { (eval echo configure:8032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8032   rm -rf conftest*
8033   eval "ac_cv_func_$ac_func=yes"
8034 else
8035   echo "configure: failed program was:" >&5
8036   cat conftest.$ac_ext >&5
8037   rm -rf conftest*
8038   eval "ac_cv_func_$ac_func=no"
8039 fi
8040 rm -f conftest*
8041 fi
8042
8043 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8044   echo "$ac_t""yes" 1>&6
8045     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8046   cat >> confdefs.h <<EOF
8047 #define $ac_tr_func 1
8048 EOF
8049  
8050 else
8051   echo "$ac_t""no" 1>&6
8052 fi
8053 done
8054
8055   ;;
8056   esac
8057
8058 case "$LIBS" in
8059   *-lsec*) for ac_func in getprpwnam
8060 do
8061 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8062 echo "configure:8063: checking for $ac_func" >&5
8063 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8064   echo $ac_n "(cached) $ac_c" 1>&6
8065 else
8066   cat > conftest.$ac_ext <<EOF
8067 #line 8068 "configure"
8068 #include "confdefs.h"
8069 /* System header to define __stub macros and hopefully few prototypes,
8070     which can conflict with char $ac_func(); below.  */
8071 #include <assert.h>
8072 /* Override any gcc2 internal prototype to avoid an error.  */
8073 /* We use char because int might match the return type of a gcc2
8074     builtin and then its argument prototype would still apply.  */
8075 char $ac_func();
8076
8077 int main() {
8078
8079 /* The GNU C library defines this for functions which it implements
8080     to always fail with ENOSYS.  Some functions are actually named
8081     something starting with __ and the normal name is an alias.  */
8082 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8083 choke me
8084 #else
8085 $ac_func();
8086 #endif
8087
8088 ; return 0; }
8089 EOF
8090 if { (eval echo configure:8091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8091   rm -rf conftest*
8092   eval "ac_cv_func_$ac_func=yes"
8093 else
8094   echo "configure: failed program was:" >&5
8095   cat conftest.$ac_ext >&5
8096   rm -rf conftest*
8097   eval "ac_cv_func_$ac_func=no"
8098 fi
8099 rm -f conftest*
8100 fi
8101
8102 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8103   echo "$ac_t""yes" 1>&6
8104     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8105   cat >> confdefs.h <<EOF
8106 #define $ac_tr_func 1
8107 EOF
8108  
8109 else
8110   echo "$ac_t""no" 1>&6
8111 fi
8112 done
8113  ;;
8114   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8115 echo "configure:8116: checking for getprpwnam in -lsec" >&5
8116 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8117 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8118   echo $ac_n "(cached) $ac_c" 1>&6
8119 else
8120   ac_save_LIBS="$LIBS"
8121 LIBS="-lsec  $LIBS"
8122 cat > conftest.$ac_ext <<EOF
8123 #line 8124 "configure"
8124 #include "confdefs.h"
8125 /* Override any gcc2 internal prototype to avoid an error.  */
8126 /* We use char because int might match the return type of a gcc2
8127     builtin and then its argument prototype would still apply.  */
8128 char getprpwnam();
8129
8130 int main() {
8131 getprpwnam()
8132 ; return 0; }
8133 EOF
8134 if { (eval echo configure:8135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8135   rm -rf conftest*
8136   eval "ac_cv_lib_$ac_lib_var=yes"
8137 else
8138   echo "configure: failed program was:" >&5
8139   cat conftest.$ac_ext >&5
8140   rm -rf conftest*
8141   eval "ac_cv_lib_$ac_lib_var=no"
8142 fi
8143 rm -f conftest*
8144 LIBS="$ac_save_LIBS"
8145
8146 fi
8147 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8148   echo "$ac_t""yes" 1>&6
8149     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8150     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8151   cat >> confdefs.h <<EOF
8152 #define $ac_tr_lib 1
8153 EOF
8154
8155   LIBS="-lsec $LIBS"
8156
8157 else
8158   echo "$ac_t""no" 1>&6
8159 fi
8160  
8161      for ac_func in getprpwnam
8162 do
8163 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8164 echo "configure:8165: checking for $ac_func" >&5
8165 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8166   echo $ac_n "(cached) $ac_c" 1>&6
8167 else
8168   cat > conftest.$ac_ext <<EOF
8169 #line 8170 "configure"
8170 #include "confdefs.h"
8171 /* System header to define __stub macros and hopefully few prototypes,
8172     which can conflict with char $ac_func(); below.  */
8173 #include <assert.h>
8174 /* Override any gcc2 internal prototype to avoid an error.  */
8175 /* We use char because int might match the return type of a gcc2
8176     builtin and then its argument prototype would still apply.  */
8177 char $ac_func();
8178
8179 int main() {
8180
8181 /* The GNU C library defines this for functions which it implements
8182     to always fail with ENOSYS.  Some functions are actually named
8183     something starting with __ and the normal name is an alias.  */
8184 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8185 choke me
8186 #else
8187 $ac_func();
8188 #endif
8189
8190 ; return 0; }
8191 EOF
8192 if { (eval echo configure:8193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8193   rm -rf conftest*
8194   eval "ac_cv_func_$ac_func=yes"
8195 else
8196   echo "configure: failed program was:" >&5
8197   cat conftest.$ac_ext >&5
8198   rm -rf conftest*
8199   eval "ac_cv_func_$ac_func=no"
8200 fi
8201 rm -f conftest*
8202 fi
8203
8204 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8205   echo "$ac_t""yes" 1>&6
8206     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8207   cat >> confdefs.h <<EOF
8208 #define $ac_tr_func 1
8209 EOF
8210  
8211 else
8212   echo "$ac_t""no" 1>&6
8213 fi
8214 done
8215
8216   ;;
8217   esac
8218
8219
8220 # this bit needs to be modified for each OS that is suported by
8221 # smbwrapper. You need to specify how to created a shared library and
8222 # how to compile C code to produce PIC object files
8223
8224 # these are the defaults, good for lots of systems
8225 HOST_OS="$host_os"
8226 LDSHFLAGS="-shared"
8227 SHLD="\${CC}"
8228 PICFLAG=""
8229 PICSUFFIX="po"
8230 POBAD_CC="#"
8231 SHLIBEXT="so"
8232 BLDSHARED="false"
8233
8234 # and these are for particular systems
8235 case "$host_os" in
8236                 *linux*)   cat >> confdefs.h <<\EOF
8237 #define LINUX 1
8238 EOF
8239
8240                         BLDSHARED="true"
8241                         LDSHFLAGS="-shared" 
8242                         PICFLAG="-fPIC"
8243                 ;;
8244                 *solaris*) cat >> confdefs.h <<\EOF
8245 #define SUNOS5 1
8246 EOF
8247
8248                         BLDSHARED="true"
8249                         LDSHFLAGS="-Wl,-h,\$@.so -G"
8250                         if test "${ac_cv_prog_CC}" = "gcc"; then
8251                                 PICFLAG="-fPIC"
8252                         else
8253                                 PICFLAG="-KPIC -xO4"
8254                                 POBAD_CC=""
8255                                 PICSUFFIX="po.o"
8256                         fi
8257                 ;;
8258                 *sunos*) cat >> confdefs.h <<\EOF
8259 #define SUNOS4 1
8260 EOF
8261
8262                         BLDSHARED="true"
8263                         LDSHFLAGS="-Wl,-h,\$@ -G"
8264                         PICFLAG="-KPIC -O2"   # Is this correct for SunOS
8265                 ;;
8266                 *bsd*)  BLDSHARED="true"
8267                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8268                         PICFLAG="-fPIC -O2"
8269                 ;;
8270                 *irix*) cat >> confdefs.h <<\EOF
8271 #define IRIX 1
8272 EOF
8273
8274                         case "$host_os" in
8275                         *irix6*) cat >> confdefs.h <<\EOF
8276 #define IRIX6 1
8277 EOF
8278
8279                         ;;
8280                         esac
8281                         ATTEMPT_WRAP32_BUILD=yes
8282                         BLDSHARED="true"
8283                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8284                         if test "${ac_cv_prog_CC}" = "gcc"; then
8285                                 PICFLAG="-fPIC"
8286                         else 
8287                                 PICFLAG="-KPIC"
8288                         fi
8289                 ;;
8290                 *aix*) cat >> confdefs.h <<\EOF
8291 #define AIX 1
8292 EOF
8293
8294                         BLDSHARED="true"
8295                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8296                         PICFLAG="-O2 -qmaxmem=6000"
8297                 ;;
8298                 *hpux*) cat >> confdefs.h <<\EOF
8299 #define HPUX 1
8300 EOF
8301
8302                         SHLIBEXT="sl"
8303                         # Use special PIC flags for the native HP-UX compiler.
8304                         if test $ac_cv_prog_cc_Ae = yes; then
8305                                 BLDSHARED="true"
8306                                 LDSHFLAGS="-b -z +h \$@"
8307                                 PICFLAG="+z"
8308                         fi
8309                 ;;
8310                 *qnx*) cat >> confdefs.h <<\EOF
8311 #define QNX 1
8312 EOF
8313 ;;
8314                 *osf*) cat >> confdefs.h <<\EOF
8315 #define OSF1 1
8316 EOF
8317
8318                         BLDSHARED="true"
8319                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8320                         PICFLAG="-fPIC"
8321                 ;;
8322                 *sco*) cat >> confdefs.h <<\EOF
8323 #define SCO 1
8324 EOF
8325 ;;
8326                 *unixware*) cat >> confdefs.h <<\EOF
8327 #define UNIXWARE 1
8328 EOF
8329
8330                         BLDSHARED="true"
8331                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8332                         PICFLAG="-KPIC"
8333                 ;;
8334                 *next2*) cat >> confdefs.h <<\EOF
8335 #define NEXT2 1
8336 EOF
8337 ;;
8338                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8339 set dummy groff; ac_word=$2
8340 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8341 echo "configure:8342: checking for $ac_word" >&5
8342 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8343   echo $ac_n "(cached) $ac_c" 1>&6
8344 else
8345   if test -n "$ROFF"; then
8346   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8347 else
8348   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8349   ac_dummy="$PATH"
8350   for ac_dir in $ac_dummy; do
8351     test -z "$ac_dir" && ac_dir=.
8352     if test -f $ac_dir/$ac_word; then
8353       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8354       break
8355     fi
8356   done
8357   IFS="$ac_save_ifs"
8358 fi
8359 fi
8360 ROFF="$ac_cv_prog_ROFF"
8361 if test -n "$ROFF"; then
8362   echo "$ac_t""$ROFF" 1>&6
8363 else
8364   echo "$ac_t""no" 1>&6
8365 fi
8366 ;;
8367                 *sysv4*)
8368                         case "$host" in
8369                                 *-univel-*)     if  test "$GCC" != yes ; then
8370                                                                         cat >> confdefs.h <<\EOF
8371 #define HAVE_MEMSET 1
8372 EOF
8373
8374                                                                 fi
8375                                                                 LDSHFLAGS="-G"
8376                                 ;;
8377                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
8378 #define RELIANTUNIX 1
8379 EOF
8380 ;;
8381                         esac
8382                         ;;
8383                 *sysv5*)
8384                         if  test "$GCC" != yes ; then
8385                                 cat >> confdefs.h <<\EOF
8386 #define HAVE_MEMSET 1
8387 EOF
8388
8389                         fi
8390                         LDSHFLAGS="-G"
8391                         ;;
8392 esac
8393
8394 ################
8395
8396 echo $ac_n "checking for long long""... $ac_c" 1>&6
8397 echo "configure:8398: checking for long long" >&5
8398 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8399   echo $ac_n "(cached) $ac_c" 1>&6
8400 else
8401   
8402 if test "$cross_compiling" = yes; then
8403   samba_cv_have_longlong=cross
8404 else
8405   cat > conftest.$ac_ext <<EOF
8406 #line 8407 "configure"
8407 #include "confdefs.h"
8408 #include <stdio.h>
8409 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8410 EOF
8411 if { (eval echo configure:8412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8412 then
8413   samba_cv_have_longlong=yes
8414 else
8415   echo "configure: failed program was:" >&5
8416   cat conftest.$ac_ext >&5
8417   rm -fr conftest*
8418   samba_cv_have_longlong=no
8419 fi
8420 rm -fr conftest*
8421 fi
8422
8423 fi
8424
8425 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8426 if test x"$samba_cv_have_longlong" = x"yes"; then
8427     cat >> confdefs.h <<\EOF
8428 #define HAVE_LONGLONG 1
8429 EOF
8430
8431 fi
8432
8433 #
8434 # Check if the compiler supports the LL prefix on long long integers.
8435 # AIX needs this.
8436
8437 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8438 echo "configure:8439: checking for LL suffix on long long integers" >&5
8439 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8440   echo $ac_n "(cached) $ac_c" 1>&6
8441 else
8442   
8443     cat > conftest.$ac_ext <<EOF
8444 #line 8445 "configure"
8445 #include "confdefs.h"
8446 #include <stdio.h>
8447 int main() {
8448 long long i = 0x8000000000LL
8449 ; return 0; }
8450 EOF
8451 if { (eval echo configure:8452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8452   rm -rf conftest*
8453   samba_cv_compiler_supports_ll=yes
8454 else
8455   echo "configure: failed program was:" >&5
8456   cat conftest.$ac_ext >&5
8457   rm -rf conftest*
8458   samba_cv_compiler_supports_ll=no
8459 fi
8460 rm -f conftest*
8461 fi
8462
8463 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8464 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8465    cat >> confdefs.h <<\EOF
8466 #define COMPILER_SUPPORTS_LL 1
8467 EOF
8468
8469 fi
8470
8471   
8472 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8473 echo "configure:8474: checking for 64 bit off_t" >&5
8474 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8475   echo $ac_n "(cached) $ac_c" 1>&6
8476 else
8477   
8478 if test "$cross_compiling" = yes; then
8479   samba_cv_SIZEOF_OFF_T=cross
8480 else
8481   cat > conftest.$ac_ext <<EOF
8482 #line 8483 "configure"
8483 #include "confdefs.h"
8484 #include <stdio.h>
8485 #include <sys/stat.h>
8486 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8487 EOF
8488 if { (eval echo configure:8489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8489 then
8490   samba_cv_SIZEOF_OFF_T=yes
8491 else
8492   echo "configure: failed program was:" >&5
8493   cat conftest.$ac_ext >&5
8494   rm -fr conftest*
8495   samba_cv_SIZEOF_OFF_T=no
8496 fi
8497 rm -fr conftest*
8498 fi
8499
8500 fi
8501
8502 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8503 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8504     cat >> confdefs.h <<\EOF
8505 #define SIZEOF_OFF_T 8
8506 EOF
8507
8508 fi
8509
8510 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8511 echo "configure:8512: checking for off64_t" >&5
8512 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8513   echo $ac_n "(cached) $ac_c" 1>&6
8514 else
8515   
8516 if test "$cross_compiling" = yes; then
8517   samba_cv_HAVE_OFF64_T=cross
8518 else
8519   cat > conftest.$ac_ext <<EOF
8520 #line 8521 "configure"
8521 #include "confdefs.h"
8522
8523 #if defined(HAVE_UNISTD_H)
8524 #include <unistd.h>
8525 #endif
8526 #include <stdio.h>
8527 #include <sys/stat.h>
8528 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8529 EOF
8530 if { (eval echo configure:8531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8531 then
8532   samba_cv_HAVE_OFF64_T=yes
8533 else
8534   echo "configure: failed program was:" >&5
8535   cat conftest.$ac_ext >&5
8536   rm -fr conftest*
8537   samba_cv_HAVE_OFF64_T=no
8538 fi
8539 rm -fr conftest*
8540 fi
8541
8542 fi
8543
8544 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8545 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8546     cat >> confdefs.h <<\EOF
8547 #define HAVE_OFF64_T 1
8548 EOF
8549
8550 fi
8551
8552 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8553 echo "configure:8554: checking for 64 bit ino_t" >&5
8554 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8555   echo $ac_n "(cached) $ac_c" 1>&6
8556 else
8557   
8558 if test "$cross_compiling" = yes; then
8559   samba_cv_SIZEOF_INO_T=cross
8560 else
8561   cat > conftest.$ac_ext <<EOF
8562 #line 8563 "configure"
8563 #include "confdefs.h"
8564 #include <stdio.h>
8565 #include <sys/stat.h>
8566 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8567 EOF
8568 if { (eval echo configure:8569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8569 then
8570   samba_cv_SIZEOF_INO_T=yes
8571 else
8572   echo "configure: failed program was:" >&5
8573   cat conftest.$ac_ext >&5
8574   rm -fr conftest*
8575   samba_cv_SIZEOF_INO_T=no
8576 fi
8577 rm -fr conftest*
8578 fi
8579
8580 fi
8581
8582 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8583 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8584     cat >> confdefs.h <<\EOF
8585 #define SIZEOF_INO_T 8
8586 EOF
8587
8588 fi
8589
8590 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
8591 echo "configure:8592: checking for ino64_t" >&5
8592 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
8593   echo $ac_n "(cached) $ac_c" 1>&6
8594 else
8595   
8596 if test "$cross_compiling" = yes; then
8597   samba_cv_HAVE_INO64_T=cross
8598 else
8599   cat > conftest.$ac_ext <<EOF
8600 #line 8601 "configure"
8601 #include "confdefs.h"
8602
8603 #if defined(HAVE_UNISTD_H)
8604 #include <unistd.h>
8605 #endif
8606 #include <stdio.h>
8607 #include <sys/stat.h>
8608 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8609 EOF
8610 if { (eval echo configure:8611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8611 then
8612   samba_cv_HAVE_INO64_T=yes
8613 else
8614   echo "configure: failed program was:" >&5
8615   cat conftest.$ac_ext >&5
8616   rm -fr conftest*
8617   samba_cv_HAVE_INO64_T=no
8618 fi
8619 rm -fr conftest*
8620 fi
8621
8622 fi
8623
8624 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
8625 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
8626     cat >> confdefs.h <<\EOF
8627 #define HAVE_INO64_T 1
8628 EOF
8629
8630 fi
8631
8632 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
8633 echo "configure:8634: checking for struct dirent64" >&5
8634 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
8635   echo $ac_n "(cached) $ac_c" 1>&6
8636 else
8637   
8638 cat > conftest.$ac_ext <<EOF
8639 #line 8640 "configure"
8640 #include "confdefs.h"
8641
8642 #if defined(HAVE_UNISTD_H)
8643 #include <unistd.h>
8644 #endif
8645 #include <sys/types.h>
8646 #include <dirent.h>
8647 int main() {
8648 struct dirent64 de;
8649 ; return 0; }
8650 EOF
8651 if { (eval echo configure:8652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8652   rm -rf conftest*
8653   samba_cv_HAVE_STRUCT_DIRENT64=yes
8654 else
8655   echo "configure: failed program was:" >&5
8656   cat conftest.$ac_ext >&5
8657   rm -rf conftest*
8658   samba_cv_HAVE_STRUCT_DIRENT64=no
8659 fi
8660 rm -f conftest*
8661 fi
8662
8663 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
8664 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
8665     cat >> confdefs.h <<\EOF
8666 #define HAVE_STRUCT_DIRENT64 1
8667 EOF
8668
8669 fi
8670
8671 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
8672 echo "configure:8673: checking for unsigned char" >&5
8673 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
8674   echo $ac_n "(cached) $ac_c" 1>&6
8675 else
8676   
8677 if test "$cross_compiling" = yes; then
8678   samba_cv_HAVE_UNSIGNED_CHAR=cross
8679 else
8680   cat > conftest.$ac_ext <<EOF
8681 #line 8682 "configure"
8682 #include "confdefs.h"
8683 #include <stdio.h>
8684 main() { char c; c=250; exit((c > 0)?0:1); }
8685 EOF
8686 if { (eval echo configure:8687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8687 then
8688   samba_cv_HAVE_UNSIGNED_CHAR=yes
8689 else
8690   echo "configure: failed program was:" >&5
8691   cat conftest.$ac_ext >&5
8692   rm -fr conftest*
8693   samba_cv_HAVE_UNSIGNED_CHAR=no
8694 fi
8695 rm -fr conftest*
8696 fi
8697
8698 fi
8699
8700 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
8701 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
8702     cat >> confdefs.h <<\EOF
8703 #define HAVE_UNSIGNED_CHAR 1
8704 EOF
8705
8706 fi
8707
8708 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
8709 echo "configure:8710: checking for sin_len in sock" >&5
8710 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
8711   echo $ac_n "(cached) $ac_c" 1>&6
8712 else
8713   
8714 cat > conftest.$ac_ext <<EOF
8715 #line 8716 "configure"
8716 #include "confdefs.h"
8717 #include <sys/types.h>
8718 #include <sys/socket.h>
8719 #include <netinet/in.h>
8720 int main() {
8721 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
8722 ; return 0; }
8723 EOF
8724 if { (eval echo configure:8725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8725   rm -rf conftest*
8726   samba_cv_HAVE_SOCK_SIN_LEN=yes
8727 else
8728   echo "configure: failed program was:" >&5
8729   cat conftest.$ac_ext >&5
8730   rm -rf conftest*
8731   samba_cv_HAVE_SOCK_SIN_LEN=no
8732 fi
8733 rm -f conftest*
8734 fi
8735
8736 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
8737 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
8738     cat >> confdefs.h <<\EOF
8739 #define HAVE_SOCK_SIN_LEN 1
8740 EOF
8741
8742 fi
8743
8744 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
8745 echo "configure:8746: checking whether seekdir returns void" >&5
8746 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
8747   echo $ac_n "(cached) $ac_c" 1>&6
8748 else
8749   
8750 cat > conftest.$ac_ext <<EOF
8751 #line 8752 "configure"
8752 #include "confdefs.h"
8753 #include <sys/types.h>
8754 #include <dirent.h>
8755 void seekdir(DIR *d, long loc) { return; }
8756 int main() {
8757 return 0;
8758 ; return 0; }
8759 EOF
8760 if { (eval echo configure:8761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8761   rm -rf conftest*
8762   samba_cv_SEEKDIR_RETURNS_VOID=yes
8763 else
8764   echo "configure: failed program was:" >&5
8765   cat conftest.$ac_ext >&5
8766   rm -rf conftest*
8767   samba_cv_SEEKDIR_RETURNS_VOID=no
8768 fi
8769 rm -f conftest*
8770 fi
8771
8772 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
8773 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
8774     cat >> confdefs.h <<\EOF
8775 #define SEEKDIR_RETURNS_VOID 1
8776 EOF
8777
8778 fi
8779
8780 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
8781 echo "configure:8782: checking for __FILE__ macro" >&5
8782 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
8783   echo $ac_n "(cached) $ac_c" 1>&6
8784 else
8785   
8786 cat > conftest.$ac_ext <<EOF
8787 #line 8788 "configure"
8788 #include "confdefs.h"
8789 #include <stdio.h>
8790 int main() {
8791 printf("%s\n", __FILE__);
8792 ; return 0; }
8793 EOF
8794 if { (eval echo configure:8795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8795   rm -rf conftest*
8796   samba_cv_HAVE_FILE_MACRO=yes
8797 else
8798   echo "configure: failed program was:" >&5
8799   cat conftest.$ac_ext >&5
8800   rm -rf conftest*
8801   samba_cv_HAVE_FILE_MACRO=no
8802 fi
8803 rm -f conftest*
8804 fi
8805
8806 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
8807 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
8808     cat >> confdefs.h <<\EOF
8809 #define HAVE_FILE_MACRO 1
8810 EOF
8811
8812 fi
8813
8814 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
8815 echo "configure:8816: checking for __FUNCTION__ macro" >&5
8816 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
8817   echo $ac_n "(cached) $ac_c" 1>&6
8818 else
8819   
8820 cat > conftest.$ac_ext <<EOF
8821 #line 8822 "configure"
8822 #include "confdefs.h"
8823 #include <stdio.h>
8824 int main() {
8825 printf("%s\n", __FUNCTION__);
8826 ; return 0; }
8827 EOF
8828 if { (eval echo configure:8829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8829   rm -rf conftest*
8830   samba_cv_HAVE_FUNCTION_MACRO=yes
8831 else
8832   echo "configure: failed program was:" >&5
8833   cat conftest.$ac_ext >&5
8834   rm -rf conftest*
8835   samba_cv_HAVE_FUNCTION_MACRO=no
8836 fi
8837 rm -f conftest*
8838 fi
8839
8840 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
8841 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
8842     cat >> confdefs.h <<\EOF
8843 #define HAVE_FUNCTION_MACRO 1
8844 EOF
8845
8846 fi
8847
8848 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
8849 echo "configure:8850: checking if gettimeofday takes tz argument" >&5
8850 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
8851   echo $ac_n "(cached) $ac_c" 1>&6
8852 else
8853   
8854 if test "$cross_compiling" = yes; then
8855   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
8856 else
8857   cat > conftest.$ac_ext <<EOF
8858 #line 8859 "configure"
8859 #include "confdefs.h"
8860
8861 #include <sys/time.h>
8862 #include <unistd.h>
8863 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
8864 EOF
8865 if { (eval echo configure:8866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8866 then
8867   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
8868 else
8869   echo "configure: failed program was:" >&5
8870   cat conftest.$ac_ext >&5
8871   rm -fr conftest*
8872   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
8873 fi
8874 rm -fr conftest*
8875 fi
8876
8877 fi
8878
8879 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
8880 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
8881     cat >> confdefs.h <<\EOF
8882 #define HAVE_GETTIMEOFDAY_TZ 1
8883 EOF
8884
8885 fi
8886
8887 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
8888 echo "configure:8889: checking for C99 vsnprintf" >&5
8889 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
8890   echo $ac_n "(cached) $ac_c" 1>&6
8891 else
8892   
8893 if test "$cross_compiling" = yes; then
8894   samba_cv_HAVE_C99_VSNPRINTF=cross
8895 else
8896   cat > conftest.$ac_ext <<EOF
8897 #line 8898 "configure"
8898 #include "confdefs.h"
8899
8900 #include <sys/types.h>
8901 #include <stdarg.h>
8902 void foo(const char *format, ...) { 
8903        va_list ap;
8904        int len;
8905        char buf[5];
8906
8907        va_start(ap, format);
8908        len = vsnprintf(0, 0, format, ap);
8909        va_end(ap);
8910        if (len != 5) exit(1);
8911
8912        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
8913
8914        exit(0);
8915 }
8916 main() { foo("hello"); }
8917
8918 EOF
8919 if { (eval echo configure:8920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8920 then
8921   samba_cv_HAVE_C99_VSNPRINTF=yes
8922 else
8923   echo "configure: failed program was:" >&5
8924   cat conftest.$ac_ext >&5
8925   rm -fr conftest*
8926   samba_cv_HAVE_C99_VSNPRINTF=no
8927 fi
8928 rm -fr conftest*
8929 fi
8930
8931 fi
8932
8933 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
8934 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
8935     cat >> confdefs.h <<\EOF
8936 #define HAVE_C99_VSNPRINTF 1
8937 EOF
8938
8939 fi
8940
8941 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
8942 echo "configure:8943: checking for broken readdir" >&5
8943 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
8944   echo $ac_n "(cached) $ac_c" 1>&6
8945 else
8946   
8947 if test "$cross_compiling" = yes; then
8948   samba_cv_HAVE_BROKEN_READDIR=cross
8949 else
8950   cat > conftest.$ac_ext <<EOF
8951 #line 8952 "configure"
8952 #include "confdefs.h"
8953 #include <sys/types.h>
8954 #include <dirent.h>
8955 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
8956 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
8957 di->d_name[0] == 0) exit(0); exit(1);} 
8958 EOF
8959 if { (eval echo configure:8960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8960 then
8961   samba_cv_HAVE_BROKEN_READDIR=yes
8962 else
8963   echo "configure: failed program was:" >&5
8964   cat conftest.$ac_ext >&5
8965   rm -fr conftest*
8966   samba_cv_HAVE_BROKEN_READDIR=no
8967 fi
8968 rm -fr conftest*
8969 fi
8970
8971 fi
8972
8973 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
8974 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
8975     cat >> confdefs.h <<\EOF
8976 #define HAVE_BROKEN_READDIR 1
8977 EOF
8978
8979 fi
8980
8981 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
8982 echo "configure:8983: checking for utimbuf" >&5
8983 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
8984   echo $ac_n "(cached) $ac_c" 1>&6
8985 else
8986   
8987 cat > conftest.$ac_ext <<EOF
8988 #line 8989 "configure"
8989 #include "confdefs.h"
8990 #include <sys/types.h>
8991 #include <utime.h>
8992 int main() {
8993 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
8994 ; return 0; }
8995 EOF
8996 if { (eval echo configure:8997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8997   rm -rf conftest*
8998   samba_cv_HAVE_UTIMBUF=yes
8999 else
9000   echo "configure: failed program was:" >&5
9001   cat conftest.$ac_ext >&5
9002   rm -rf conftest*
9003   samba_cv_HAVE_UTIMBUF=no
9004 fi
9005 rm -f conftest*
9006 fi
9007
9008 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9009 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9010     cat >> confdefs.h <<\EOF
9011 #define HAVE_UTIMBUF 1
9012 EOF
9013
9014 fi
9015
9016
9017 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9018 do
9019 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9020 echo "configure:9021: checking for $ac_func" >&5
9021 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9022   echo $ac_n "(cached) $ac_c" 1>&6
9023 else
9024   cat > conftest.$ac_ext <<EOF
9025 #line 9026 "configure"
9026 #include "confdefs.h"
9027 /* System header to define __stub macros and hopefully few prototypes,
9028     which can conflict with char $ac_func(); below.  */
9029 #include <assert.h>
9030 /* Override any gcc2 internal prototype to avoid an error.  */
9031 /* We use char because int might match the return type of a gcc2
9032     builtin and then its argument prototype would still apply.  */
9033 char $ac_func();
9034
9035 int main() {
9036
9037 /* The GNU C library defines this for functions which it implements
9038     to always fail with ENOSYS.  Some functions are actually named
9039     something starting with __ and the normal name is an alias.  */
9040 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9041 choke me
9042 #else
9043 $ac_func();
9044 #endif
9045
9046 ; return 0; }
9047 EOF
9048 if { (eval echo configure:9049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9049   rm -rf conftest*
9050   eval "ac_cv_func_$ac_func=yes"
9051 else
9052   echo "configure: failed program was:" >&5
9053   cat conftest.$ac_ext >&5
9054   rm -rf conftest*
9055   eval "ac_cv_func_$ac_func=no"
9056 fi
9057 rm -f conftest*
9058 fi
9059
9060 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9061   echo "$ac_t""yes" 1>&6
9062     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9063   cat >> confdefs.h <<EOF
9064 #define $ac_tr_func 1
9065 EOF
9066  
9067 else
9068   echo "$ac_t""no" 1>&6
9069 fi
9070 done
9071
9072
9073 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9074 echo "configure:9075: checking for ut_name in utmp" >&5
9075 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9076   echo $ac_n "(cached) $ac_c" 1>&6
9077 else
9078   
9079 cat > conftest.$ac_ext <<EOF
9080 #line 9081 "configure"
9081 #include "confdefs.h"
9082 #include <sys/types.h>
9083 #include <utmp.h>
9084 int main() {
9085 struct utmp ut;  ut.ut_name[0] = 'a';
9086 ; return 0; }
9087 EOF
9088 if { (eval echo configure:9089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9089   rm -rf conftest*
9090   samba_cv_HAVE_UT_UT_NAME=yes
9091 else
9092   echo "configure: failed program was:" >&5
9093   cat conftest.$ac_ext >&5
9094   rm -rf conftest*
9095   samba_cv_HAVE_UT_UT_NAME=no
9096 fi
9097 rm -f conftest*
9098 fi
9099
9100 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9101 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9102     cat >> confdefs.h <<\EOF
9103 #define HAVE_UT_UT_NAME 1
9104 EOF
9105
9106 fi 
9107
9108 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9109 echo "configure:9110: checking for ut_user in utmp" >&5
9110 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9111   echo $ac_n "(cached) $ac_c" 1>&6
9112 else
9113   
9114 cat > conftest.$ac_ext <<EOF
9115 #line 9116 "configure"
9116 #include "confdefs.h"
9117 #include <sys/types.h>
9118 #include <utmp.h>
9119 int main() {
9120 struct utmp ut;  ut.ut_user[0] = 'a';
9121 ; return 0; }
9122 EOF
9123 if { (eval echo configure:9124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9124   rm -rf conftest*
9125   samba_cv_HAVE_UT_UT_USER=yes
9126 else
9127   echo "configure: failed program was:" >&5
9128   cat conftest.$ac_ext >&5
9129   rm -rf conftest*
9130   samba_cv_HAVE_UT_UT_USER=no
9131 fi
9132 rm -f conftest*
9133 fi
9134
9135 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9136 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9137     cat >> confdefs.h <<\EOF
9138 #define HAVE_UT_UT_USER 1
9139 EOF
9140
9141 fi 
9142
9143 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9144 echo "configure:9145: checking for ut_id in utmp" >&5
9145 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9146   echo $ac_n "(cached) $ac_c" 1>&6
9147 else
9148   
9149 cat > conftest.$ac_ext <<EOF
9150 #line 9151 "configure"
9151 #include "confdefs.h"
9152 #include <sys/types.h>
9153 #include <utmp.h>
9154 int main() {
9155 struct utmp ut;  ut.ut_id[0] = 'a';
9156 ; return 0; }
9157 EOF
9158 if { (eval echo configure:9159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9159   rm -rf conftest*
9160   samba_cv_HAVE_UT_UT_ID=yes
9161 else
9162   echo "configure: failed program was:" >&5
9163   cat conftest.$ac_ext >&5
9164   rm -rf conftest*
9165   samba_cv_HAVE_UT_UT_ID=no
9166 fi
9167 rm -f conftest*
9168 fi
9169
9170 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9171 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9172     cat >> confdefs.h <<\EOF
9173 #define HAVE_UT_UT_ID 1
9174 EOF
9175
9176 fi 
9177
9178 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9179 echo "configure:9180: checking for ut_host in utmp" >&5
9180 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9181   echo $ac_n "(cached) $ac_c" 1>&6
9182 else
9183   
9184 cat > conftest.$ac_ext <<EOF
9185 #line 9186 "configure"
9186 #include "confdefs.h"
9187 #include <sys/types.h>
9188 #include <utmp.h>
9189 int main() {
9190 struct utmp ut;  ut.ut_host[0] = 'a';
9191 ; return 0; }
9192 EOF
9193 if { (eval echo configure:9194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9194   rm -rf conftest*
9195   samba_cv_HAVE_UT_UT_HOST=yes
9196 else
9197   echo "configure: failed program was:" >&5
9198   cat conftest.$ac_ext >&5
9199   rm -rf conftest*
9200   samba_cv_HAVE_UT_UT_HOST=no
9201 fi
9202 rm -f conftest*
9203 fi
9204
9205 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9206 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9207     cat >> confdefs.h <<\EOF
9208 #define HAVE_UT_UT_HOST 1
9209 EOF
9210
9211 fi 
9212
9213 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9214 echo "configure:9215: checking for ut_time in utmp" >&5
9215 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9216   echo $ac_n "(cached) $ac_c" 1>&6
9217 else
9218   
9219 cat > conftest.$ac_ext <<EOF
9220 #line 9221 "configure"
9221 #include "confdefs.h"
9222 #include <sys/types.h>
9223 #include <utmp.h>
9224 int main() {
9225 struct utmp ut;  time_t t; ut.ut_time = t;
9226 ; return 0; }
9227 EOF
9228 if { (eval echo configure:9229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9229   rm -rf conftest*
9230   samba_cv_HAVE_UT_UT_TIME=yes
9231 else
9232   echo "configure: failed program was:" >&5
9233   cat conftest.$ac_ext >&5
9234   rm -rf conftest*
9235   samba_cv_HAVE_UT_UT_TIME=no
9236 fi
9237 rm -f conftest*
9238 fi
9239
9240 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9241 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9242     cat >> confdefs.h <<\EOF
9243 #define HAVE_UT_UT_TIME 1
9244 EOF
9245
9246 fi 
9247
9248 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9249 echo "configure:9250: checking for ut_tv in utmp" >&5
9250 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9251   echo $ac_n "(cached) $ac_c" 1>&6
9252 else
9253   
9254 cat > conftest.$ac_ext <<EOF
9255 #line 9256 "configure"
9256 #include "confdefs.h"
9257 #include <sys/types.h>
9258 #include <utmp.h>
9259 int main() {
9260 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9261 ; return 0; }
9262 EOF
9263 if { (eval echo configure:9264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9264   rm -rf conftest*
9265   samba_cv_HAVE_UT_UT_TV=yes
9266 else
9267   echo "configure: failed program was:" >&5
9268   cat conftest.$ac_ext >&5
9269   rm -rf conftest*
9270   samba_cv_HAVE_UT_UT_TV=no
9271 fi
9272 rm -f conftest*
9273 fi
9274
9275 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9276 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9277     cat >> confdefs.h <<\EOF
9278 #define HAVE_UT_UT_TV 1
9279 EOF
9280
9281 fi 
9282
9283 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9284 echo "configure:9285: checking for ut_type in utmp" >&5
9285 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9286   echo $ac_n "(cached) $ac_c" 1>&6
9287 else
9288   
9289 cat > conftest.$ac_ext <<EOF
9290 #line 9291 "configure"
9291 #include "confdefs.h"
9292 #include <sys/types.h>
9293 #include <utmp.h>
9294 int main() {
9295 struct utmp ut;  ut.ut_type = 0;
9296 ; return 0; }
9297 EOF
9298 if { (eval echo configure:9299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9299   rm -rf conftest*
9300   samba_cv_HAVE_UT_UT_TYPE=yes
9301 else
9302   echo "configure: failed program was:" >&5
9303   cat conftest.$ac_ext >&5
9304   rm -rf conftest*
9305   samba_cv_HAVE_UT_UT_TYPE=no
9306 fi
9307 rm -f conftest*
9308 fi
9309
9310 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9311 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9312     cat >> confdefs.h <<\EOF
9313 #define HAVE_UT_UT_TYPE 1
9314 EOF
9315
9316 fi 
9317
9318 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9319 echo "configure:9320: checking for ut_pid in utmp" >&5
9320 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9321   echo $ac_n "(cached) $ac_c" 1>&6
9322 else
9323   
9324 cat > conftest.$ac_ext <<EOF
9325 #line 9326 "configure"
9326 #include "confdefs.h"
9327 #include <sys/types.h>
9328 #include <utmp.h>
9329 int main() {
9330 struct utmp ut;  ut.ut_pid = 0;
9331 ; return 0; }
9332 EOF
9333 if { (eval echo configure:9334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9334   rm -rf conftest*
9335   samba_cv_HAVE_UT_UT_PID=yes
9336 else
9337   echo "configure: failed program was:" >&5
9338   cat conftest.$ac_ext >&5
9339   rm -rf conftest*
9340   samba_cv_HAVE_UT_UT_PID=no
9341 fi
9342 rm -f conftest*
9343 fi
9344
9345 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9346 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9347     cat >> confdefs.h <<\EOF
9348 #define HAVE_UT_UT_PID 1
9349 EOF
9350
9351 fi 
9352
9353 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9354 echo "configure:9355: checking for ut_exit in utmp" >&5
9355 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9356   echo $ac_n "(cached) $ac_c" 1>&6
9357 else
9358   
9359 cat > conftest.$ac_ext <<EOF
9360 #line 9361 "configure"
9361 #include "confdefs.h"
9362 #include <sys/types.h>
9363 #include <utmp.h>
9364 int main() {
9365 struct utmp ut;  ut.ut_exit.e_exit = 0;
9366 ; return 0; }
9367 EOF
9368 if { (eval echo configure:9369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9369   rm -rf conftest*
9370   samba_cv_HAVE_UT_UT_EXIT=yes
9371 else
9372   echo "configure: failed program was:" >&5
9373   cat conftest.$ac_ext >&5
9374   rm -rf conftest*
9375   samba_cv_HAVE_UT_UT_EXIT=no
9376 fi
9377 rm -f conftest*
9378 fi
9379
9380 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9381 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9382     cat >> confdefs.h <<\EOF
9383 #define HAVE_UT_UT_EXIT 1
9384 EOF
9385
9386 fi 
9387
9388 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9389 echo "configure:9390: checking for ut_addr in utmp" >&5
9390 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9391   echo $ac_n "(cached) $ac_c" 1>&6
9392 else
9393   
9394 cat > conftest.$ac_ext <<EOF
9395 #line 9396 "configure"
9396 #include "confdefs.h"
9397 #include <sys/types.h>
9398 #include <utmp.h>
9399 int main() {
9400 struct utmp ut;  ut.ut_addr = 0;
9401 ; return 0; }
9402 EOF
9403 if { (eval echo configure:9404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9404   rm -rf conftest*
9405   samba_cv_HAVE_UT_UT_ADDR=yes
9406 else
9407   echo "configure: failed program was:" >&5
9408   cat conftest.$ac_ext >&5
9409   rm -rf conftest*
9410   samba_cv_HAVE_UT_UT_ADDR=no
9411 fi
9412 rm -f conftest*
9413 fi
9414
9415 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9416 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9417     cat >> confdefs.h <<\EOF
9418 #define HAVE_UT_UT_ADDR 1
9419 EOF
9420
9421 fi 
9422
9423 if test x$ac_cv_func_pututline = xyes ; then
9424   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9425 echo "configure:9426: checking whether pututline returns pointer" >&5
9426 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9427   echo $ac_n "(cached) $ac_c" 1>&6
9428 else
9429   
9430   cat > conftest.$ac_ext <<EOF
9431 #line 9432 "configure"
9432 #include "confdefs.h"
9433 #include <sys/types.h>
9434 #include <utmp.h>
9435 int main() {
9436 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9437 ; return 0; }
9438 EOF
9439 if { (eval echo configure:9440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9440   rm -rf conftest*
9441   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9442 else
9443   echo "configure: failed program was:" >&5
9444   cat conftest.$ac_ext >&5
9445   rm -rf conftest*
9446   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9447 fi
9448 rm -f conftest*
9449 fi
9450
9451 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9452   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9453       cat >> confdefs.h <<\EOF
9454 #define PUTUTLINE_RETURNS_UTMP 1
9455 EOF
9456
9457   fi
9458 fi
9459
9460 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9461 echo "configure:9462: checking for ut_syslen in utmpx" >&5
9462 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9463   echo $ac_n "(cached) $ac_c" 1>&6
9464 else
9465   
9466 cat > conftest.$ac_ext <<EOF
9467 #line 9468 "configure"
9468 #include "confdefs.h"
9469 #include <sys/types.h>
9470 #include <utmpx.h>
9471 int main() {
9472 struct utmpx ux;  ux.ut_syslen = 0;
9473 ; return 0; }
9474 EOF
9475 if { (eval echo configure:9476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9476   rm -rf conftest*
9477   samba_cv_HAVE_UX_UT_SYSLEN=yes
9478 else
9479   echo "configure: failed program was:" >&5
9480   cat conftest.$ac_ext >&5
9481   rm -rf conftest*
9482   samba_cv_HAVE_UX_UT_SYSLEN=no
9483 fi
9484 rm -f conftest*
9485 fi
9486
9487 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
9488 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
9489     cat >> confdefs.h <<\EOF
9490 #define HAVE_UX_UT_SYSLEN 1
9491 EOF
9492
9493 fi 
9494
9495
9496 #################################################
9497 # check for libiconv support
9498 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
9499 echo "configure:9500: checking whether to use libiconv" >&5
9500 # Check whether --with-libiconv or --without-libiconv was given.
9501 if test "${with_libiconv+set}" = set; then
9502   withval="$with_libiconv"
9503    case "$withval" in
9504   no)
9505     echo "$ac_t""no" 1>&6
9506     ;;
9507   *)
9508     echo "$ac_t""yes" 1>&6
9509     CFLAGS="$CFLAGS -I$withval/include"
9510     LDFLAGS="$LDFLAGS -L$withval/lib"
9511     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
9512 echo "configure:9513: checking for iconv_open in -liconv" >&5
9513 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
9514 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9515   echo $ac_n "(cached) $ac_c" 1>&6
9516 else
9517   ac_save_LIBS="$LIBS"
9518 LIBS="-liconv  $LIBS"
9519 cat > conftest.$ac_ext <<EOF
9520 #line 9521 "configure"
9521 #include "confdefs.h"
9522 /* Override any gcc2 internal prototype to avoid an error.  */
9523 /* We use char because int might match the return type of a gcc2
9524     builtin and then its argument prototype would still apply.  */
9525 char iconv_open();
9526
9527 int main() {
9528 iconv_open()
9529 ; return 0; }
9530 EOF
9531 if { (eval echo configure:9532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9532   rm -rf conftest*
9533   eval "ac_cv_lib_$ac_lib_var=yes"
9534 else
9535   echo "configure: failed program was:" >&5
9536   cat conftest.$ac_ext >&5
9537   rm -rf conftest*
9538   eval "ac_cv_lib_$ac_lib_var=no"
9539 fi
9540 rm -f conftest*
9541 LIBS="$ac_save_LIBS"
9542
9543 fi
9544 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9545   echo "$ac_t""yes" 1>&6
9546     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9547     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9548   cat >> confdefs.h <<EOF
9549 #define $ac_tr_lib 1
9550 EOF
9551
9552   LIBS="-liconv $LIBS"
9553
9554 else
9555   echo "$ac_t""no" 1>&6
9556 fi
9557
9558     ;;
9559   esac 
9560 else
9561   echo "$ac_t""no" 1>&6
9562
9563 fi
9564
9565
9566
9567 ############
9568 # check for iconv in libc
9569 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
9570 echo "configure:9571: checking for working iconv" >&5
9571 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
9572   echo $ac_n "(cached) $ac_c" 1>&6
9573 else
9574   
9575 if test "$cross_compiling" = yes; then
9576   samba_cv_HAVE_NATIVE_ICONV=cross
9577 else
9578   cat > conftest.$ac_ext <<EOF
9579 #line 9580 "configure"
9580 #include "confdefs.h"
9581
9582 #include <iconv.h>
9583 main() {
9584        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
9585        if (cd == 0 || cd == (iconv_t)-1) return -1;
9586        return 0;
9587 }
9588
9589 EOF
9590 if { (eval echo configure:9591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9591 then
9592   samba_cv_HAVE_NATIVE_ICONV=yes
9593 else
9594   echo "configure: failed program was:" >&5
9595   cat conftest.$ac_ext >&5
9596   rm -fr conftest*
9597   samba_cv_HAVE_NATIVE_ICONV=no
9598 fi
9599 rm -fr conftest*
9600 fi
9601
9602 fi
9603
9604 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
9605 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
9606     cat >> confdefs.h <<\EOF
9607 #define HAVE_NATIVE_ICONV 1
9608 EOF
9609
9610 fi
9611
9612
9613 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
9614 echo "configure:9615: checking for Linux kernel oplocks" >&5
9615 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
9616   echo $ac_n "(cached) $ac_c" 1>&6
9617 else
9618   
9619 if test "$cross_compiling" = yes; then
9620   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
9621 else
9622   cat > conftest.$ac_ext <<EOF
9623 #line 9624 "configure"
9624 #include "confdefs.h"
9625
9626 #include <sys/types.h>
9627 #include <fcntl.h>
9628 #ifndef F_GETLEASE
9629 #define F_GETLEASE      1025
9630 #endif
9631 main() {
9632        int fd = open("/dev/null", O_RDONLY);
9633        return fcntl(fd, F_GETLEASE, 0) == -1;
9634 }
9635
9636 EOF
9637 if { (eval echo configure:9638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9638 then
9639   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
9640 else
9641   echo "configure: failed program was:" >&5
9642   cat conftest.$ac_ext >&5
9643   rm -fr conftest*
9644   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
9645 fi
9646 rm -fr conftest*
9647 fi
9648
9649 fi
9650
9651 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
9652 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
9653     cat >> confdefs.h <<\EOF
9654 #define HAVE_KERNEL_OPLOCKS_LINUX 1
9655 EOF
9656
9657 fi
9658
9659 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
9660 echo "configure:9661: checking for kernel change notify support" >&5
9661 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
9662   echo $ac_n "(cached) $ac_c" 1>&6
9663 else
9664   
9665 if test "$cross_compiling" = yes; then
9666   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
9667 else
9668   cat > conftest.$ac_ext <<EOF
9669 #line 9670 "configure"
9670 #include "confdefs.h"
9671
9672 #include <sys/types.h>
9673 #include <fcntl.h>
9674 #include <signal.h>
9675 #ifndef F_NOTIFY
9676 #define F_NOTIFY 1026
9677 #endif
9678 main() {
9679         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
9680 }
9681
9682 EOF
9683 if { (eval echo configure:9684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9684 then
9685   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
9686 else
9687   echo "configure: failed program was:" >&5
9688   cat conftest.$ac_ext >&5
9689   rm -fr conftest*
9690   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
9691 fi
9692 rm -fr conftest*
9693 fi
9694
9695 fi
9696
9697 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
9698 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
9699     cat >> confdefs.h <<\EOF
9700 #define HAVE_KERNEL_CHANGE_NOTIFY 1
9701 EOF
9702
9703 fi
9704
9705 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
9706 echo "configure:9707: checking for kernel share modes" >&5
9707 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
9708   echo $ac_n "(cached) $ac_c" 1>&6
9709 else
9710   
9711 if test "$cross_compiling" = yes; then
9712   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
9713 else
9714   cat > conftest.$ac_ext <<EOF
9715 #line 9716 "configure"
9716 #include "confdefs.h"
9717
9718 #include <sys/types.h>
9719 #include <fcntl.h>
9720 #include <signal.h>
9721 #include <sys/file.h>
9722 #ifndef LOCK_MAND
9723 #define LOCK_MAND       32
9724 #define LOCK_READ       64
9725 #endif
9726 main() {
9727         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
9728 }
9729
9730 EOF
9731 if { (eval echo configure:9732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9732 then
9733   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
9734 else
9735   echo "configure: failed program was:" >&5
9736   cat conftest.$ac_ext >&5
9737   rm -fr conftest*
9738   samba_cv_HAVE_KERNEL_SHARE_MODES=no
9739 fi
9740 rm -fr conftest*
9741 fi
9742
9743 fi
9744
9745 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
9746 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
9747     cat >> confdefs.h <<\EOF
9748 #define HAVE_KERNEL_SHARE_MODES 1
9749 EOF
9750
9751 fi
9752
9753
9754
9755
9756 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
9757 echo "configure:9758: checking for IRIX kernel oplock type definitions" >&5
9758 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
9759   echo $ac_n "(cached) $ac_c" 1>&6
9760 else
9761   
9762 cat > conftest.$ac_ext <<EOF
9763 #line 9764 "configure"
9764 #include "confdefs.h"
9765 #include <sys/types.h>
9766 #include <fcntl.h>
9767 int main() {
9768 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
9769 ; return 0; }
9770 EOF
9771 if { (eval echo configure:9772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9772   rm -rf conftest*
9773   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
9774 else
9775   echo "configure: failed program was:" >&5
9776   cat conftest.$ac_ext >&5
9777   rm -rf conftest*
9778   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
9779 fi
9780 rm -f conftest*
9781 fi
9782
9783 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
9784 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
9785     cat >> confdefs.h <<\EOF
9786 #define HAVE_KERNEL_OPLOCKS_IRIX 1
9787 EOF
9788
9789 fi
9790
9791 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
9792 echo "configure:9793: checking for irix specific capabilities" >&5
9793 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
9794   echo $ac_n "(cached) $ac_c" 1>&6
9795 else
9796   
9797 if test "$cross_compiling" = yes; then
9798   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
9799 else
9800   cat > conftest.$ac_ext <<EOF
9801 #line 9802 "configure"
9802 #include "confdefs.h"
9803 #include <sys/types.h>
9804 #include <sys/capability.h>
9805 main() {
9806  cap_t cap;
9807  if ((cap = cap_get_proc()) == NULL)
9808    exit(1);
9809  cap->cap_effective |= CAP_NETWORK_MGT;
9810  cap->cap_inheritable |= CAP_NETWORK_MGT;
9811  cap_set_proc(cap);
9812  exit(0);
9813 }
9814
9815 EOF
9816 if { (eval echo configure:9817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9817 then
9818   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
9819 else
9820   echo "configure: failed program was:" >&5
9821   cat conftest.$ac_ext >&5
9822   rm -fr conftest*
9823   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
9824 fi
9825 rm -fr conftest*
9826 fi
9827
9828 fi
9829
9830 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
9831 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
9832     cat >> confdefs.h <<\EOF
9833 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
9834 EOF
9835
9836 fi
9837
9838 #
9839 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
9840 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
9841 #
9842
9843 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9844 echo "configure:9845: checking for int16 typedef included by rpc/rpc.h" >&5
9845 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
9846   echo $ac_n "(cached) $ac_c" 1>&6
9847 else
9848   
9849 cat > conftest.$ac_ext <<EOF
9850 #line 9851 "configure"
9851 #include "confdefs.h"
9852 #include <sys/types.h>
9853 #if defined(HAVE_RPC_RPC_H)
9854 #include <rpc/rpc.h>
9855 #endif
9856 int main() {
9857 int16 testvar;
9858 ; return 0; }
9859 EOF
9860 if { (eval echo configure:9861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9861   rm -rf conftest*
9862   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
9863 else
9864   echo "configure: failed program was:" >&5
9865   cat conftest.$ac_ext >&5
9866   rm -rf conftest*
9867   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
9868 fi
9869 rm -f conftest*
9870 fi
9871
9872 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
9873 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
9874     cat >> confdefs.h <<\EOF
9875 #define HAVE_INT16_FROM_RPC_RPC_H 1
9876 EOF
9877
9878 fi
9879
9880 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9881 echo "configure:9882: checking for uint16 typedef included by rpc/rpc.h" >&5
9882 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
9883   echo $ac_n "(cached) $ac_c" 1>&6
9884 else
9885   
9886 cat > conftest.$ac_ext <<EOF
9887 #line 9888 "configure"
9888 #include "confdefs.h"
9889 #include <sys/types.h>
9890 #if defined(HAVE_RPC_RPC_H)
9891 #include <rpc/rpc.h>
9892 #endif
9893 int main() {
9894 uint16 testvar;
9895 ; return 0; }
9896 EOF
9897 if { (eval echo configure:9898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9898   rm -rf conftest*
9899   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
9900 else
9901   echo "configure: failed program was:" >&5
9902   cat conftest.$ac_ext >&5
9903   rm -rf conftest*
9904   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
9905 fi
9906 rm -f conftest*
9907 fi
9908
9909 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
9910 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
9911     cat >> confdefs.h <<\EOF
9912 #define HAVE_UINT16_FROM_RPC_RPC_H 1
9913 EOF
9914
9915 fi
9916
9917 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9918 echo "configure:9919: checking for int32 typedef included by rpc/rpc.h" >&5
9919 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
9920   echo $ac_n "(cached) $ac_c" 1>&6
9921 else
9922   
9923 cat > conftest.$ac_ext <<EOF
9924 #line 9925 "configure"
9925 #include "confdefs.h"
9926 #include <sys/types.h>
9927 #if defined(HAVE_RPC_RPC_H)
9928 #include <rpc/rpc.h>
9929 #endif
9930 int main() {
9931 int32 testvar;
9932 ; return 0; }
9933 EOF
9934 if { (eval echo configure:9935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9935   rm -rf conftest*
9936   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
9937 else
9938   echo "configure: failed program was:" >&5
9939   cat conftest.$ac_ext >&5
9940   rm -rf conftest*
9941   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
9942 fi
9943 rm -f conftest*
9944 fi
9945
9946 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
9947 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
9948     cat >> confdefs.h <<\EOF
9949 #define HAVE_INT32_FROM_RPC_RPC_H 1
9950 EOF
9951
9952 fi
9953
9954 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9955 echo "configure:9956: checking for uint32 typedef included by rpc/rpc.h" >&5
9956 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
9957   echo $ac_n "(cached) $ac_c" 1>&6
9958 else
9959   
9960 cat > conftest.$ac_ext <<EOF
9961 #line 9962 "configure"
9962 #include "confdefs.h"
9963 #include <sys/types.h>
9964 #if defined(HAVE_RPC_RPC_H)
9965 #include <rpc/rpc.h>
9966 #endif
9967 int main() {
9968 uint32 testvar;
9969 ; return 0; }
9970 EOF
9971 if { (eval echo configure:9972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9972   rm -rf conftest*
9973   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
9974 else
9975   echo "configure: failed program was:" >&5
9976   cat conftest.$ac_ext >&5
9977   rm -rf conftest*
9978   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
9979 fi
9980 rm -f conftest*
9981 fi
9982
9983 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
9984 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
9985     cat >> confdefs.h <<\EOF
9986 #define HAVE_UINT32_FROM_RPC_RPC_H 1
9987 EOF
9988
9989 fi
9990
9991
9992 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
9993 echo "configure:9994: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
9994 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
9995   echo $ac_n "(cached) $ac_c" 1>&6
9996 else
9997   
9998 cat > conftest.$ac_ext <<EOF
9999 #line 10000 "configure"
10000 #include "confdefs.h"
10001 #include <sys/types.h>
10002 #ifdef HAVE_SYS_SECURITY_H
10003 #include <sys/security.h>
10004 #include <prot.h>
10005 #endif  /* HAVE_SYS_SECURITY_H */
10006 #if defined(HAVE_RPC_RPC_H)
10007 #include <rpc/rpc.h>
10008 #endif
10009 int main() {
10010 int testvar;
10011 ; return 0; }
10012 EOF
10013 if { (eval echo configure:10014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10014   rm -rf conftest*
10015   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10016 else
10017   echo "configure: failed program was:" >&5
10018   cat conftest.$ac_ext >&5
10019   rm -rf conftest*
10020   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10021 fi
10022 rm -f conftest*
10023 fi
10024
10025 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10026 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10027     cat >> confdefs.h <<\EOF
10028 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10029 EOF
10030
10031 fi
10032
10033 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10034 echo "configure:10035: checking for test routines" >&5
10035 if test "$cross_compiling" = yes; then
10036   echo "configure: warning: cannot run when cross-compiling" 1>&2
10037 else
10038   cat > conftest.$ac_ext <<EOF
10039 #line 10040 "configure"
10040 #include "confdefs.h"
10041 #include "${srcdir-.}/tests/trivial.c"
10042 EOF
10043 if { (eval echo configure:10044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10044 then
10045   echo "$ac_t""yes" 1>&6
10046 else
10047   echo "configure: failed program was:" >&5
10048   cat conftest.$ac_ext >&5
10049   rm -fr conftest*
10050   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10051 fi
10052 rm -fr conftest*
10053 fi
10054
10055
10056 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10057 echo "configure:10058: checking for ftruncate extend" >&5
10058 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10059   echo $ac_n "(cached) $ac_c" 1>&6
10060 else
10061   
10062 if test "$cross_compiling" = yes; then
10063   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10064 else
10065   cat > conftest.$ac_ext <<EOF
10066 #line 10067 "configure"
10067 #include "confdefs.h"
10068 #include "${srcdir-.}/tests/ftruncate.c"
10069 EOF
10070 if { (eval echo configure:10071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10071 then
10072   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10073 else
10074   echo "configure: failed program was:" >&5
10075   cat conftest.$ac_ext >&5
10076   rm -fr conftest*
10077   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10078 fi
10079 rm -fr conftest*
10080 fi
10081
10082 fi
10083
10084 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10085 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10086     cat >> confdefs.h <<\EOF
10087 #define HAVE_FTRUNCATE_EXTEND 1
10088 EOF
10089
10090 fi
10091
10092 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10093 echo "configure:10094: checking for AF_LOCAL socket support" >&5
10094 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10095   echo $ac_n "(cached) $ac_c" 1>&6
10096 else
10097   
10098 if test "$cross_compiling" = yes; then
10099   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10100 else
10101   cat > conftest.$ac_ext <<EOF
10102 #line 10103 "configure"
10103 #include "confdefs.h"
10104 #include "${srcdir-.}/tests/unixsock.c"
10105 EOF
10106 if { (eval echo configure:10107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10107 then
10108   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10109 else
10110   echo "configure: failed program was:" >&5
10111   cat conftest.$ac_ext >&5
10112   rm -fr conftest*
10113   samba_cv_HAVE_WORKING_AF_LOCAL=no
10114 fi
10115 rm -fr conftest*
10116 fi
10117
10118 fi
10119
10120 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10121 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10122 then
10123     cat >> confdefs.h <<\EOF
10124 #define HAVE_WORKING_AF_LOCAL 1
10125 EOF
10126
10127 fi
10128
10129 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10130 echo "configure:10131: checking for broken getgroups" >&5
10131 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10132   echo $ac_n "(cached) $ac_c" 1>&6
10133 else
10134   
10135 if test "$cross_compiling" = yes; then
10136   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10137 else
10138   cat > conftest.$ac_ext <<EOF
10139 #line 10140 "configure"
10140 #include "confdefs.h"
10141 #include "${srcdir-.}/tests/getgroups.c"
10142 EOF
10143 if { (eval echo configure:10144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10144 then
10145   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10146 else
10147   echo "configure: failed program was:" >&5
10148   cat conftest.$ac_ext >&5
10149   rm -fr conftest*
10150   samba_cv_HAVE_BROKEN_GETGROUPS=no
10151 fi
10152 rm -fr conftest*
10153 fi
10154
10155 fi
10156
10157 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10158 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10159     cat >> confdefs.h <<\EOF
10160 #define HAVE_BROKEN_GETGROUPS 1
10161 EOF
10162
10163 fi
10164
10165 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10166 echo "configure:10167: checking whether getpass should be replaced" >&5
10167 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10168   echo $ac_n "(cached) $ac_c" 1>&6
10169 else
10170   
10171 SAVE_CPPFLAGS="$CPPFLAGS"
10172 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10173 cat > conftest.$ac_ext <<EOF
10174 #line 10175 "configure"
10175 #include "confdefs.h"
10176
10177 #define REPLACE_GETPASS 1
10178 #define NO_CONFIG_H 1
10179 #define main dont_declare_main
10180 #include "${srcdir-.}/lib/getsmbpass.c"
10181 #undef main
10182
10183 int main() {
10184
10185 ; return 0; }
10186 EOF
10187 if { (eval echo configure:10188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10188   rm -rf conftest*
10189   samba_cv_REPLACE_GETPASS=yes
10190 else
10191   echo "configure: failed program was:" >&5
10192   cat conftest.$ac_ext >&5
10193   rm -rf conftest*
10194   samba_cv_REPLACE_GETPASS=no
10195 fi
10196 rm -f conftest*
10197 CPPFLAGS="$SAVE_CPPFLAGS"
10198
10199 fi
10200
10201 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10202 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10203         cat >> confdefs.h <<\EOF
10204 #define REPLACE_GETPASS 1
10205 EOF
10206
10207 fi
10208
10209 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10210 echo "configure:10211: checking for broken inet_ntoa" >&5
10211 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10212   echo $ac_n "(cached) $ac_c" 1>&6
10213 else
10214   
10215 if test "$cross_compiling" = yes; then
10216   samba_cv_REPLACE_INET_NTOA=cross
10217 else
10218   cat > conftest.$ac_ext <<EOF
10219 #line 10220 "configure"
10220 #include "confdefs.h"
10221
10222 #include <stdio.h>
10223 #include <sys/types.h>
10224 #include <netinet/in.h>
10225 #ifdef HAVE_ARPA_INET_H
10226 #include <arpa/inet.h>
10227 #endif
10228 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10229 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10230     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10231 exit(1);}
10232 EOF
10233 if { (eval echo configure:10234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10234 then
10235   samba_cv_REPLACE_INET_NTOA=yes
10236 else
10237   echo "configure: failed program was:" >&5
10238   cat conftest.$ac_ext >&5
10239   rm -fr conftest*
10240   samba_cv_REPLACE_INET_NTOA=no
10241 fi
10242 rm -fr conftest*
10243 fi
10244
10245 fi
10246
10247 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10248 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10249     cat >> confdefs.h <<\EOF
10250 #define REPLACE_INET_NTOA 1
10251 EOF
10252
10253 fi
10254
10255 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10256 echo "configure:10257: checking for secure mkstemp" >&5
10257 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10258   echo $ac_n "(cached) $ac_c" 1>&6
10259 else
10260   
10261 if test "$cross_compiling" = yes; then
10262   samba_cv_HAVE_SECURE_MKSTEMP=cross
10263 else
10264   cat > conftest.$ac_ext <<EOF
10265 #line 10266 "configure"
10266 #include "confdefs.h"
10267 #include <stdlib.h>
10268 #include <sys/types.h>
10269 #include <sys/stat.h>
10270 #include <unistd.h>
10271 main() { 
10272   struct stat st;
10273   char tpl[20]="/tmp/test.XXXXXX"; 
10274   int fd = mkstemp(tpl); 
10275   if (fd == -1) exit(1);
10276   unlink(tpl);
10277   if (fstat(fd, &st) != 0) exit(1);
10278   if ((st.st_mode & 0777) != 0600) exit(1);
10279   exit(0);
10280 }
10281 EOF
10282 if { (eval echo configure:10283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10283 then
10284   samba_cv_HAVE_SECURE_MKSTEMP=yes
10285 else
10286   echo "configure: failed program was:" >&5
10287   cat conftest.$ac_ext >&5
10288   rm -fr conftest*
10289   samba_cv_HAVE_SECURE_MKSTEMP=no
10290 fi
10291 rm -fr conftest*
10292 fi
10293
10294 fi
10295
10296 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10297 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10298     cat >> confdefs.h <<\EOF
10299 #define HAVE_SECURE_MKSTEMP 1
10300 EOF
10301
10302 fi
10303
10304 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10305 echo "configure:10306: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10306 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+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_SYSCONF_SC_NGROUPS_MAX=cross
10312 else
10313   cat > conftest.$ac_ext <<EOF
10314 #line 10315 "configure"
10315 #include "confdefs.h"
10316 #include <unistd.h>
10317 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10318 EOF
10319 if { (eval echo configure:10320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10320 then
10321   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10322 else
10323   echo "configure: failed program was:" >&5
10324   cat conftest.$ac_ext >&5
10325   rm -fr conftest*
10326   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10327 fi
10328 rm -fr conftest*
10329 fi
10330
10331 fi
10332
10333 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10334 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10335     cat >> confdefs.h <<\EOF
10336 #define SYSCONF_SC_NGROUPS_MAX 1
10337 EOF
10338
10339 fi
10340
10341 echo $ac_n "checking for root""... $ac_c" 1>&6
10342 echo "configure:10343: checking for root" >&5
10343 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10344   echo $ac_n "(cached) $ac_c" 1>&6
10345 else
10346   
10347 if test "$cross_compiling" = yes; then
10348   samba_cv_HAVE_ROOT=cross
10349 else
10350   cat > conftest.$ac_ext <<EOF
10351 #line 10352 "configure"
10352 #include "confdefs.h"
10353 main() { exit(getuid() != 0); }
10354 EOF
10355 if { (eval echo configure:10356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10356 then
10357   samba_cv_HAVE_ROOT=yes
10358 else
10359   echo "configure: failed program was:" >&5
10360   cat conftest.$ac_ext >&5
10361   rm -fr conftest*
10362   samba_cv_HAVE_ROOT=no
10363 fi
10364 rm -fr conftest*
10365 fi
10366
10367 fi
10368
10369 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10370 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10371     cat >> confdefs.h <<\EOF
10372 #define HAVE_ROOT 1
10373 EOF
10374
10375 else
10376     echo "configure: warning: running as non-root will disable some tests" 1>&2
10377 fi
10378
10379 ##################
10380 # look for a method of finding the list of network interfaces
10381 iface=no;
10382 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10383 echo "configure:10384: checking for iface AIX" >&5
10384 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10385   echo $ac_n "(cached) $ac_c" 1>&6
10386 else
10387   
10388 if test "$cross_compiling" = yes; then
10389   samba_cv_HAVE_IFACE_AIX=cross
10390 else
10391   cat > conftest.$ac_ext <<EOF
10392 #line 10393 "configure"
10393 #include "confdefs.h"
10394
10395 #define HAVE_IFACE_AIX 1
10396 #define AUTOCONF_TEST 1
10397 #include "confdefs.h"
10398 #include "${srcdir-.}/lib/interfaces.c"
10399 EOF
10400 if { (eval echo configure:10401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10401 then
10402   samba_cv_HAVE_IFACE_AIX=yes
10403 else
10404   echo "configure: failed program was:" >&5
10405   cat conftest.$ac_ext >&5
10406   rm -fr conftest*
10407   samba_cv_HAVE_IFACE_AIX=no
10408 fi
10409 rm -fr conftest*
10410 fi
10411
10412 fi
10413
10414 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10415 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10416     iface=yes;cat >> confdefs.h <<\EOF
10417 #define HAVE_IFACE_AIX 1
10418 EOF
10419
10420 fi
10421
10422 if test $iface = no; then
10423 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10424 echo "configure:10425: checking for iface ifconf" >&5
10425 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10426   echo $ac_n "(cached) $ac_c" 1>&6
10427 else
10428   
10429 if test "$cross_compiling" = yes; then
10430   samba_cv_HAVE_IFACE_IFCONF=cross
10431 else
10432   cat > conftest.$ac_ext <<EOF
10433 #line 10434 "configure"
10434 #include "confdefs.h"
10435
10436 #define HAVE_IFACE_IFCONF 1
10437 #define AUTOCONF_TEST 1
10438 #include "confdefs.h"
10439 #include "${srcdir-.}/lib/interfaces.c"
10440 EOF
10441 if { (eval echo configure:10442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10442 then
10443   samba_cv_HAVE_IFACE_IFCONF=yes
10444 else
10445   echo "configure: failed program was:" >&5
10446   cat conftest.$ac_ext >&5
10447   rm -fr conftest*
10448   samba_cv_HAVE_IFACE_IFCONF=no
10449 fi
10450 rm -fr conftest*
10451 fi
10452
10453 fi
10454
10455 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10456 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10457     iface=yes;cat >> confdefs.h <<\EOF
10458 #define HAVE_IFACE_IFCONF 1
10459 EOF
10460
10461 fi
10462 fi
10463
10464 if test $iface = no; then
10465 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
10466 echo "configure:10467: checking for iface ifreq" >&5
10467 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
10468   echo $ac_n "(cached) $ac_c" 1>&6
10469 else
10470   
10471 if test "$cross_compiling" = yes; then
10472   samba_cv_HAVE_IFACE_IFREQ=cross
10473 else
10474   cat > conftest.$ac_ext <<EOF
10475 #line 10476 "configure"
10476 #include "confdefs.h"
10477
10478 #define HAVE_IFACE_IFREQ 1
10479 #define AUTOCONF_TEST 1
10480 #include "confdefs.h"
10481 #include "${srcdir-.}/lib/interfaces.c"
10482 EOF
10483 if { (eval echo configure:10484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10484 then
10485   samba_cv_HAVE_IFACE_IFREQ=yes
10486 else
10487   echo "configure: failed program was:" >&5
10488   cat conftest.$ac_ext >&5
10489   rm -fr conftest*
10490   samba_cv_HAVE_IFACE_IFREQ=no
10491 fi
10492 rm -fr conftest*
10493 fi
10494
10495 fi
10496
10497 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
10498 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
10499     iface=yes;cat >> confdefs.h <<\EOF
10500 #define HAVE_IFACE_IFREQ 1
10501 EOF
10502
10503 fi
10504 fi
10505
10506
10507 ################################################
10508 # look for a method of setting the effective uid
10509 seteuid=no;
10510 if test $seteuid = no; then
10511 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
10512 echo "configure:10513: checking for setresuid" >&5
10513 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
10514   echo $ac_n "(cached) $ac_c" 1>&6
10515 else
10516   
10517 if test "$cross_compiling" = yes; then
10518   samba_cv_USE_SETRESUID=cross
10519 else
10520   cat > conftest.$ac_ext <<EOF
10521 #line 10522 "configure"
10522 #include "confdefs.h"
10523
10524 #define AUTOCONF_TEST 1
10525 #define USE_SETRESUID 1
10526 #include "confdefs.h"
10527 #include "${srcdir-.}/lib/util_sec.c"
10528 EOF
10529 if { (eval echo configure:10530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10530 then
10531   samba_cv_USE_SETRESUID=yes
10532 else
10533   echo "configure: failed program was:" >&5
10534   cat conftest.$ac_ext >&5
10535   rm -fr conftest*
10536   samba_cv_USE_SETRESUID=no
10537 fi
10538 rm -fr conftest*
10539 fi
10540
10541 fi
10542
10543 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
10544 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
10545     seteuid=yes;cat >> confdefs.h <<\EOF
10546 #define USE_SETRESUID 1
10547 EOF
10548
10549 fi
10550 fi
10551
10552
10553 if test $seteuid = no; then
10554 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
10555 echo "configure:10556: checking for setreuid" >&5
10556 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
10557   echo $ac_n "(cached) $ac_c" 1>&6
10558 else
10559   
10560 if test "$cross_compiling" = yes; then
10561   samba_cv_USE_SETREUID=cross
10562 else
10563   cat > conftest.$ac_ext <<EOF
10564 #line 10565 "configure"
10565 #include "confdefs.h"
10566
10567 #define AUTOCONF_TEST 1
10568 #define USE_SETREUID 1
10569 #include "confdefs.h"
10570 #include "${srcdir-.}/lib/util_sec.c"
10571 EOF
10572 if { (eval echo configure:10573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10573 then
10574   samba_cv_USE_SETREUID=yes
10575 else
10576   echo "configure: failed program was:" >&5
10577   cat conftest.$ac_ext >&5
10578   rm -fr conftest*
10579   samba_cv_USE_SETREUID=no
10580 fi
10581 rm -fr conftest*
10582 fi
10583
10584 fi
10585
10586 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
10587 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
10588     seteuid=yes;cat >> confdefs.h <<\EOF
10589 #define USE_SETREUID 1
10590 EOF
10591
10592 fi
10593 fi
10594
10595 if test $seteuid = no; then
10596 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
10597 echo "configure:10598: checking for seteuid" >&5
10598 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
10599   echo $ac_n "(cached) $ac_c" 1>&6
10600 else
10601   
10602 if test "$cross_compiling" = yes; then
10603   samba_cv_USE_SETEUID=cross
10604 else
10605   cat > conftest.$ac_ext <<EOF
10606 #line 10607 "configure"
10607 #include "confdefs.h"
10608
10609 #define AUTOCONF_TEST 1
10610 #define USE_SETEUID 1
10611 #include "confdefs.h"
10612 #include "${srcdir-.}/lib/util_sec.c"
10613 EOF
10614 if { (eval echo configure:10615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10615 then
10616   samba_cv_USE_SETEUID=yes
10617 else
10618   echo "configure: failed program was:" >&5
10619   cat conftest.$ac_ext >&5
10620   rm -fr conftest*
10621   samba_cv_USE_SETEUID=no
10622 fi
10623 rm -fr conftest*
10624 fi
10625
10626 fi
10627
10628 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
10629 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
10630     seteuid=yes;cat >> confdefs.h <<\EOF
10631 #define USE_SETEUID 1
10632 EOF
10633
10634 fi
10635 fi
10636
10637 if test $seteuid = no; then
10638 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
10639 echo "configure:10640: checking for setuidx" >&5
10640 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
10641   echo $ac_n "(cached) $ac_c" 1>&6
10642 else
10643   
10644 if test "$cross_compiling" = yes; then
10645   samba_cv_USE_SETUIDX=cross
10646 else
10647   cat > conftest.$ac_ext <<EOF
10648 #line 10649 "configure"
10649 #include "confdefs.h"
10650
10651 #define AUTOCONF_TEST 1
10652 #define USE_SETUIDX 1
10653 #include "confdefs.h"
10654 #include "${srcdir-.}/lib/util_sec.c"
10655 EOF
10656 if { (eval echo configure:10657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10657 then
10658   samba_cv_USE_SETUIDX=yes
10659 else
10660   echo "configure: failed program was:" >&5
10661   cat conftest.$ac_ext >&5
10662   rm -fr conftest*
10663   samba_cv_USE_SETUIDX=no
10664 fi
10665 rm -fr conftest*
10666 fi
10667
10668 fi
10669
10670 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
10671 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
10672     seteuid=yes;cat >> confdefs.h <<\EOF
10673 #define USE_SETUIDX 1
10674 EOF
10675
10676 fi
10677 fi
10678
10679
10680 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10681 echo "configure:10682: checking for working mmap" >&5
10682 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
10683   echo $ac_n "(cached) $ac_c" 1>&6
10684 else
10685   
10686 if test "$cross_compiling" = yes; then
10687   samba_cv_HAVE_MMAP=cross
10688 else
10689   cat > conftest.$ac_ext <<EOF
10690 #line 10691 "configure"
10691 #include "confdefs.h"
10692 #include "${srcdir-.}/tests/shared_mmap.c"
10693 EOF
10694 if { (eval echo configure:10695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10695 then
10696   samba_cv_HAVE_MMAP=yes
10697 else
10698   echo "configure: failed program was:" >&5
10699   cat conftest.$ac_ext >&5
10700   rm -fr conftest*
10701   samba_cv_HAVE_MMAP=no
10702 fi
10703 rm -fr conftest*
10704 fi
10705
10706 fi
10707
10708 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
10709 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
10710     cat >> confdefs.h <<\EOF
10711 #define HAVE_MMAP 1
10712 EOF
10713
10714 fi
10715
10716 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
10717 echo "configure:10718: checking for ftruncate needs root" >&5
10718 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
10719   echo $ac_n "(cached) $ac_c" 1>&6
10720 else
10721   
10722 if test "$cross_compiling" = yes; then
10723   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
10724 else
10725   cat > conftest.$ac_ext <<EOF
10726 #line 10727 "configure"
10727 #include "confdefs.h"
10728 #include "${srcdir-.}/tests/ftruncroot.c"
10729 EOF
10730 if { (eval echo configure:10731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10731 then
10732   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
10733 else
10734   echo "configure: failed program was:" >&5
10735   cat conftest.$ac_ext >&5
10736   rm -fr conftest*
10737   samba_cv_FTRUNCATE_NEEDS_ROOT=no
10738 fi
10739 rm -fr conftest*
10740 fi
10741
10742 fi
10743
10744 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
10745 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
10746     cat >> confdefs.h <<\EOF
10747 #define FTRUNCATE_NEEDS_ROOT 1
10748 EOF
10749
10750 fi
10751
10752 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
10753 echo "configure:10754: checking for fcntl locking" >&5
10754 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
10755   echo $ac_n "(cached) $ac_c" 1>&6
10756 else
10757   
10758 if test "$cross_compiling" = yes; then
10759   samba_cv_HAVE_FCNTL_LOCK=cross
10760 else
10761   cat > conftest.$ac_ext <<EOF
10762 #line 10763 "configure"
10763 #include "confdefs.h"
10764 #include "${srcdir-.}/tests/fcntl_lock.c"
10765 EOF
10766 if { (eval echo configure:10767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10767 then
10768   samba_cv_HAVE_FCNTL_LOCK=yes
10769 else
10770   echo "configure: failed program was:" >&5
10771   cat conftest.$ac_ext >&5
10772   rm -fr conftest*
10773   samba_cv_HAVE_FCNTL_LOCK=no
10774 fi
10775 rm -fr conftest*
10776 fi
10777
10778 fi
10779
10780 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
10781 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
10782     cat >> confdefs.h <<\EOF
10783 #define HAVE_FCNTL_LOCK 1
10784 EOF
10785
10786 fi
10787
10788 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
10789 echo "configure:10790: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
10790 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
10791   echo $ac_n "(cached) $ac_c" 1>&6
10792 else
10793   
10794 if test "$cross_compiling" = yes; then
10795   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
10796 else
10797   cat > conftest.$ac_ext <<EOF
10798 #line 10799 "configure"
10799 #include "confdefs.h"
10800 #include "${srcdir-.}/tests/fcntl_lock64.c"
10801 EOF
10802 if { (eval echo configure:10803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10803 then
10804   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
10805 else
10806   echo "configure: failed program was:" >&5
10807   cat conftest.$ac_ext >&5
10808   rm -fr conftest*
10809   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
10810 fi
10811 rm -fr conftest*
10812 fi
10813
10814 fi
10815
10816 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
10817 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
10818     cat >> confdefs.h <<\EOF
10819 #define HAVE_BROKEN_FCNTL64_LOCKS 1
10820 EOF
10821
10822
10823 else
10824
10825
10826   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
10827 echo "configure:10828: checking for 64 bit fcntl locking" >&5
10828 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
10829   echo $ac_n "(cached) $ac_c" 1>&6
10830 else
10831   
10832   if test "$cross_compiling" = yes; then
10833   samba_cv_HAVE_STRUCT_FLOCK64=cross
10834 else
10835   cat > conftest.$ac_ext <<EOF
10836 #line 10837 "configure"
10837 #include "confdefs.h"
10838
10839 #if defined(HAVE_UNISTD_H)
10840 #include <unistd.h>
10841 #endif
10842 #include <stdio.h>
10843 #include <stdlib.h>
10844
10845 #ifdef HAVE_FCNTL_H
10846 #include <fcntl.h>
10847 #endif
10848
10849 #ifdef HAVE_SYS_FCNTL_H
10850 #include <sys/fcntl.h>
10851 #endif
10852 main() { struct flock64 fl64;
10853 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
10854 exit(0);
10855 #else
10856 exit(1);
10857 #endif
10858 }
10859 EOF
10860 if { (eval echo configure:10861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10861 then
10862   samba_cv_HAVE_STRUCT_FLOCK64=yes
10863 else
10864   echo "configure: failed program was:" >&5
10865   cat conftest.$ac_ext >&5
10866   rm -fr conftest*
10867   samba_cv_HAVE_STRUCT_FLOCK64=no
10868 fi
10869 rm -fr conftest*
10870 fi
10871
10872 fi
10873
10874 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
10875
10876   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
10877       cat >> confdefs.h <<\EOF
10878 #define HAVE_STRUCT_FLOCK64 1
10879 EOF
10880
10881   fi
10882 fi
10883
10884 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
10885 echo "configure:10886: checking for a crypt that needs truncated salt" >&5
10886 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
10887   echo $ac_n "(cached) $ac_c" 1>&6
10888 else
10889   
10890 if test "$cross_compiling" = yes; then
10891   samba_cv_HAVE_TRUNCATED_SALT=cross
10892 else
10893   cat > conftest.$ac_ext <<EOF
10894 #line 10895 "configure"
10895 #include "confdefs.h"
10896 #include "${srcdir-.}/tests/crypttest.c"
10897 EOF
10898 if { (eval echo configure:10899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10899 then
10900   samba_cv_HAVE_TRUNCATED_SALT=no
10901 else
10902   echo "configure: failed program was:" >&5
10903   cat conftest.$ac_ext >&5
10904   rm -fr conftest*
10905   samba_cv_HAVE_TRUNCATED_SALT=yes
10906 fi
10907 rm -fr conftest*
10908 fi
10909
10910 fi
10911
10912 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
10913 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
10914     cat >> confdefs.h <<\EOF
10915 #define HAVE_TRUNCATED_SALT 1
10916 EOF
10917
10918 fi
10919
10920 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
10921 echo "configure:10922: checking for broken nisplus include files" >&5
10922 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
10923   echo $ac_n "(cached) $ac_c" 1>&6
10924 else
10925   
10926 cat > conftest.$ac_ext <<EOF
10927 #line 10928 "configure"
10928 #include "confdefs.h"
10929 #include <sys/acl.h>
10930 #if defined(HAVE_RPCSVC_NIS_H)
10931 #include <rpcsvc/nis.h>
10932 #endif
10933 int main() {
10934 return 0;
10935 ; return 0; }
10936 EOF
10937 if { (eval echo configure:10938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10938   rm -rf conftest*
10939   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
10940 else
10941   echo "configure: failed program was:" >&5
10942   cat conftest.$ac_ext >&5
10943   rm -rf conftest*
10944   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
10945 fi
10946 rm -f conftest*
10947 fi
10948
10949 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
10950 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
10951     cat >> confdefs.h <<\EOF
10952 #define BROKEN_NISPLUS_INCLUDE_FILES 1
10953 EOF
10954
10955 fi
10956
10957
10958 #################################################
10959 # check for smbwrapper support
10960 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
10961 echo "configure:10962: checking whether to use smbwrapper" >&5
10962 # Check whether --with-smbwrapper or --without-smbwrapper was given.
10963 if test "${with_smbwrapper+set}" = set; then
10964   withval="$with_smbwrapper"
10965    case "$withval" in
10966   yes)
10967     echo "$ac_t""yes" 1>&6
10968     cat >> confdefs.h <<\EOF
10969 #define WITH_SMBWRAPPER 1
10970 EOF
10971
10972         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
10973
10974         if test x$ATTEMPT_WRAP32_BUILD = x; then
10975                 WRAP32=""
10976         else
10977                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
10978         fi
10979
10980 # Conditions under which smbwrapper should not be built.
10981
10982         if test x$PICFLAG = x; then
10983            echo No support for PIC code - disabling smbwrapper and smbsh
10984            WRAP=""
10985            WRAP32=""
10986         elif test x$ac_cv_func_syscall = xno; then
10987            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
10988            WRAP=""
10989            WRAP32=""
10990         fi
10991     ;;
10992   *)
10993     echo "$ac_t""no" 1>&6
10994     ;;
10995   esac 
10996 else
10997   echo "$ac_t""no" 1>&6
10998
10999 fi
11000
11001
11002 #################################################
11003 # check for the AFS filesystem
11004 echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
11005 echo "configure:11006: checking whether to use AFS" >&5
11006 # Check whether --with-afs or --without-afs was given.
11007 if test "${with_afs+set}" = set; then
11008   withval="$with_afs"
11009    case "$withval" in
11010   yes)
11011     echo "$ac_t""yes" 1>&6
11012     cat >> confdefs.h <<\EOF
11013 #define WITH_AFS 1
11014 EOF
11015
11016     ;;
11017   *)
11018     echo "$ac_t""no" 1>&6
11019     ;;
11020   esac 
11021 else
11022   echo "$ac_t""no" 1>&6
11023
11024 fi
11025
11026
11027
11028 #################################################
11029 # check for the DFS auth system
11030 echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
11031 echo "configure:11032: checking whether to use DFS auth" >&5
11032 # Check whether --with-dfs or --without-dfs was given.
11033 if test "${with_dfs+set}" = set; then
11034   withval="$with_dfs"
11035    case "$withval" in
11036   yes)
11037     echo "$ac_t""yes" 1>&6
11038     cat >> confdefs.h <<\EOF
11039 #define WITH_DFS 1
11040 EOF
11041
11042     ;;
11043   *)
11044     echo "$ac_t""no" 1>&6
11045     ;;
11046   esac 
11047 else
11048   echo "$ac_t""no" 1>&6
11049
11050 fi
11051
11052
11053 #################################################
11054 # check for Kerberos IV auth system
11055 echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
11056 echo "configure:11057: checking whether to use Kerberos IV" >&5
11057 # Check whether --with-krb4 or --without-krb4 was given.
11058 if test "${with_krb4+set}" = set; then
11059   withval="$with_krb4"
11060    case "$withval" in
11061   yes)
11062     echo "$ac_t""yes" 1>&6
11063     cat >> confdefs.h <<\EOF
11064 #define KRB4_AUTH 1
11065 EOF
11066
11067     echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
11068 echo "configure:11069: checking for dn_expand in -lresolv" >&5
11069 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
11070 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11071   echo $ac_n "(cached) $ac_c" 1>&6
11072 else
11073   ac_save_LIBS="$LIBS"
11074 LIBS="-lresolv  $LIBS"
11075 cat > conftest.$ac_ext <<EOF
11076 #line 11077 "configure"
11077 #include "confdefs.h"
11078 /* Override any gcc2 internal prototype to avoid an error.  */
11079 /* We use char because int might match the return type of a gcc2
11080     builtin and then its argument prototype would still apply.  */
11081 char dn_expand();
11082
11083 int main() {
11084 dn_expand()
11085 ; return 0; }
11086 EOF
11087 if { (eval echo configure:11088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11088   rm -rf conftest*
11089   eval "ac_cv_lib_$ac_lib_var=yes"
11090 else
11091   echo "configure: failed program was:" >&5
11092   cat conftest.$ac_ext >&5
11093   rm -rf conftest*
11094   eval "ac_cv_lib_$ac_lib_var=no"
11095 fi
11096 rm -f conftest*
11097 LIBS="$ac_save_LIBS"
11098
11099 fi
11100 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11101   echo "$ac_t""yes" 1>&6
11102     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11103     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11104   cat >> confdefs.h <<EOF
11105 #define $ac_tr_lib 1
11106 EOF
11107
11108   LIBS="-lresolv $LIBS"
11109
11110 else
11111   echo "$ac_t""no" 1>&6
11112 fi
11113
11114     LIBS="$LIBS -lkrb -ldes"
11115     CFLAGS="$CFLAGS -I$withval/include"
11116     LDFLAGS="$LDFLAGS -L$withval/lib"
11117     ;;
11118   *)
11119     echo "$ac_t""no" 1>&6
11120     ;;
11121   esac 
11122 else
11123   echo "$ac_t""no" 1>&6
11124
11125 fi
11126
11127
11128 #################################################
11129 # check for Kerberos 5 auth system
11130 echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6
11131 echo "configure:11132: checking whether to use Kerberos 5" >&5
11132 # Check whether --with-krb5 or --without-krb5 was given.
11133 if test "${with_krb5+set}" = set; then
11134   withval="$with_krb5"
11135    case "$withval" in
11136   yes)
11137     echo "$ac_t""yes" 1>&6
11138     cat >> confdefs.h <<\EOF
11139 #define KRB5_AUTH 1
11140 EOF
11141
11142     LIBS="$LIBS -ldes425 -lkrb5 -lcrypto -lcom_err"
11143     CFLAGS="$CFLAGS -I$withval/include"
11144     LDFLAGS="$LDFLAGS -L$withval/lib"
11145     ;;
11146   *)
11147     echo "$ac_t""no" 1>&6
11148     ;;
11149   esac 
11150 else
11151   echo "$ac_t""no" 1>&6
11152
11153 fi
11154
11155
11156 #################################################
11157 # check for automount support
11158 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
11159 echo "configure:11160: checking whether to use AUTOMOUNT" >&5
11160 # Check whether --with-automount or --without-automount was given.
11161 if test "${with_automount+set}" = set; then
11162   withval="$with_automount"
11163    case "$withval" in
11164   yes)
11165     echo "$ac_t""yes" 1>&6
11166     cat >> confdefs.h <<\EOF
11167 #define WITH_AUTOMOUNT 1
11168 EOF
11169
11170     ;;
11171   *)
11172     echo "$ac_t""no" 1>&6
11173     ;;
11174   esac 
11175 else
11176   echo "$ac_t""no" 1>&6
11177
11178 fi
11179
11180
11181 #################################################
11182 # check for smbmount support
11183 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
11184 echo "configure:11185: checking whether to use SMBMOUNT" >&5
11185 # Check whether --with-smbmount or --without-smbmount was given.
11186 if test "${with_smbmount+set}" = set; then
11187   withval="$with_smbmount"
11188    case "$withval" in
11189   yes)
11190     echo "$ac_t""yes" 1>&6
11191     cat >> confdefs.h <<\EOF
11192 #define WITH_SMBMOUNT 1
11193 EOF
11194
11195     MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
11196     ;;
11197   *)
11198     echo "$ac_t""no" 1>&6
11199     MPROGS=
11200     ;;
11201   esac 
11202 else
11203   echo "$ac_t""no" 1>&6
11204   MPROGS=
11205
11206 fi
11207
11208
11209
11210 #################################################
11211 # check for a PAM password database
11212
11213 echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6
11214 echo "configure:11215: checking whether to use PAM password database" >&5
11215 # Check whether --with-pam or --without-pam was given.
11216 if test "${with_pam+set}" = set; then
11217   withval="$with_pam"
11218    case "$withval" in
11219   yes)
11220     echo "$ac_t""yes" 1>&6
11221     cat >> confdefs.h <<\EOF
11222 #define WITH_PAM 1
11223 EOF
11224
11225     LIBS="$LIBS -lpam"
11226     ;;
11227   *)
11228     echo "$ac_t""no" 1>&6
11229     ;;
11230   esac 
11231 else
11232   echo "$ac_t""no" 1>&6
11233
11234 fi
11235
11236
11237 # we can't build a pam module if we don't have pam.
11238 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
11239 echo "configure:11240: checking for pam_get_data in -lpam" >&5
11240 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
11241 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11242   echo $ac_n "(cached) $ac_c" 1>&6
11243 else
11244   ac_save_LIBS="$LIBS"
11245 LIBS="-lpam  $LIBS"
11246 cat > conftest.$ac_ext <<EOF
11247 #line 11248 "configure"
11248 #include "confdefs.h"
11249 /* Override any gcc2 internal prototype to avoid an error.  */
11250 /* We use char because int might match the return type of a gcc2
11251     builtin and then its argument prototype would still apply.  */
11252 char pam_get_data();
11253
11254 int main() {
11255 pam_get_data()
11256 ; return 0; }
11257 EOF
11258 if { (eval echo configure:11259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11259   rm -rf conftest*
11260   eval "ac_cv_lib_$ac_lib_var=yes"
11261 else
11262   echo "configure: failed program was:" >&5
11263   cat conftest.$ac_ext >&5
11264   rm -rf conftest*
11265   eval "ac_cv_lib_$ac_lib_var=no"
11266 fi
11267 rm -f conftest*
11268 LIBS="$ac_save_LIBS"
11269
11270 fi
11271 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11272   echo "$ac_t""yes" 1>&6
11273   cat >> confdefs.h <<\EOF
11274 #define HAVE_LIBPAM 1
11275 EOF
11276
11277 else
11278   echo "$ac_t""no" 1>&6
11279 fi
11280
11281
11282 #################################################
11283 # check for pam_smbpass support
11284 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
11285 echo "configure:11286: checking whether to use pam_smbpass" >&5
11286 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
11287 if test "${with_pam_smbpass+set}" = set; then
11288   withval="$with_pam_smbpass"
11289    case "$withval" in
11290   yes)
11291     echo "$ac_t""yes" 1>&6
11292
11293 # Conditions under which pam_smbpass should not be built.
11294
11295        if test x$PICFLAG = x; then
11296           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
11297           PAM_MOD=""
11298        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
11299           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
11300           PAM_MOD=""
11301        else
11302           cat >> confdefs.h <<\EOF
11303 #define WITH_PAM_SMBPASS 1
11304 EOF
11305
11306           PAM_MOD="bin/pam_smbpass.so"
11307        fi
11308     ;;
11309   *)
11310     echo "$ac_t""no" 1>&6
11311     ;;
11312   esac 
11313 else
11314   echo "$ac_t""no" 1>&6
11315
11316 fi
11317
11318
11319
11320 ###############################################
11321 # test for where we get crypt() from, but only
11322 # if not using PAM
11323 if test "$with_pam" != yes; then
11324 for ac_func in crypt
11325 do
11326 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11327 echo "configure:11328: checking for $ac_func" >&5
11328 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11329   echo $ac_n "(cached) $ac_c" 1>&6
11330 else
11331   cat > conftest.$ac_ext <<EOF
11332 #line 11333 "configure"
11333 #include "confdefs.h"
11334 /* System header to define __stub macros and hopefully few prototypes,
11335     which can conflict with char $ac_func(); below.  */
11336 #include <assert.h>
11337 /* Override any gcc2 internal prototype to avoid an error.  */
11338 /* We use char because int might match the return type of a gcc2
11339     builtin and then its argument prototype would still apply.  */
11340 char $ac_func();
11341
11342 int main() {
11343
11344 /* The GNU C library defines this for functions which it implements
11345     to always fail with ENOSYS.  Some functions are actually named
11346     something starting with __ and the normal name is an alias.  */
11347 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11348 choke me
11349 #else
11350 $ac_func();
11351 #endif
11352
11353 ; return 0; }
11354 EOF
11355 if { (eval echo configure:11356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11356   rm -rf conftest*
11357   eval "ac_cv_func_$ac_func=yes"
11358 else
11359   echo "configure: failed program was:" >&5
11360   cat conftest.$ac_ext >&5
11361   rm -rf conftest*
11362   eval "ac_cv_func_$ac_func=no"
11363 fi
11364 rm -f conftest*
11365 fi
11366
11367 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11368   echo "$ac_t""yes" 1>&6
11369     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11370   cat >> confdefs.h <<EOF
11371 #define $ac_tr_func 1
11372 EOF
11373  
11374 else
11375   echo "$ac_t""no" 1>&6
11376 fi
11377 done
11378
11379 if test x"$ac_cv_func_crypt" = x"no"; then
11380     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
11381 echo "configure:11382: checking for crypt in -lcrypt" >&5
11382 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
11383 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11384   echo $ac_n "(cached) $ac_c" 1>&6
11385 else
11386   ac_save_LIBS="$LIBS"
11387 LIBS="-lcrypt  $LIBS"
11388 cat > conftest.$ac_ext <<EOF
11389 #line 11390 "configure"
11390 #include "confdefs.h"
11391 /* Override any gcc2 internal prototype to avoid an error.  */
11392 /* We use char because int might match the return type of a gcc2
11393     builtin and then its argument prototype would still apply.  */
11394 char crypt();
11395
11396 int main() {
11397 crypt()
11398 ; return 0; }
11399 EOF
11400 if { (eval echo configure:11401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11401   rm -rf conftest*
11402   eval "ac_cv_lib_$ac_lib_var=yes"
11403 else
11404   echo "configure: failed program was:" >&5
11405   cat conftest.$ac_ext >&5
11406   rm -rf conftest*
11407   eval "ac_cv_lib_$ac_lib_var=no"
11408 fi
11409 rm -f conftest*
11410 LIBS="$ac_save_LIBS"
11411
11412 fi
11413 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11414   echo "$ac_t""yes" 1>&6
11415   LIBS="$LIBS -lcrypt";
11416         cat >> confdefs.h <<\EOF
11417 #define HAVE_CRYPT 1
11418 EOF
11419
11420 else
11421   echo "$ac_t""no" 1>&6
11422 fi
11423
11424 fi
11425 fi
11426
11427
11428 #################################################
11429 # check for a TDB password database
11430 echo $ac_n "checking whether to use TDB password database""... $ac_c" 1>&6
11431 echo "configure:11432: checking whether to use TDB password database" >&5
11432 # Check whether --with-tdbsam or --without-tdbsam was given.
11433 if test "${with_tdbsam+set}" = set; then
11434   withval="$with_tdbsam"
11435    case "$withval" in
11436   yes)
11437     echo "$ac_t""yes" 1>&6
11438     cat >> confdefs.h <<\EOF
11439 #define WITH_TDBPWD 1
11440 EOF
11441
11442 #    AC_MSG_ERROR([TDB password database not supported in this version.])
11443     ;;
11444   *)
11445     echo "$ac_t""no" 1>&6
11446     ;;
11447   esac 
11448 else
11449   echo "$ac_t""no" 1>&6
11450
11451 fi
11452
11453
11454 #################################################
11455 # check for a LDAP password database
11456 echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6
11457 echo "configure:11458: checking whether to use LDAP password database" >&5
11458 # Check whether --with-ldap or --without-ldap was given.
11459 if test "${with_ldap+set}" = set; then
11460   withval="$with_ldap"
11461    case "$withval" in
11462   yes)
11463     echo "$ac_t""yes" 1>&6
11464     cat >> confdefs.h <<\EOF
11465 #define WITH_LDAP 1
11466 EOF
11467
11468     { echo "configure: error: LDAP password database not supported in this version." 1>&2; exit 1; }
11469     ;;
11470   *)
11471     echo "$ac_t""no" 1>&6
11472     ;;
11473   esac 
11474 else
11475   echo "$ac_t""no" 1>&6
11476
11477 fi
11478
11479
11480 #################################################
11481 # check for a NISPLUS password database
11482 echo $ac_n "checking whether to use NISPLUS password database""... $ac_c" 1>&6
11483 echo "configure:11484: checking whether to use NISPLUS password database" >&5
11484 # Check whether --with-nisplus or --without-nisplus was given.
11485 if test "${with_nisplus+set}" = set; then
11486   withval="$with_nisplus"
11487    case "$withval" in
11488   yes)
11489     echo "$ac_t""yes" 1>&6
11490     cat >> confdefs.h <<\EOF
11491 #define WITH_NISPLUS 1
11492 EOF
11493
11494     ;;
11495   *)
11496     echo "$ac_t""no" 1>&6
11497     ;;
11498   esac 
11499 else
11500   echo "$ac_t""no" 1>&6
11501
11502 fi
11503
11504
11505 #################################################
11506 # check for a NISPLUS_HOME support 
11507 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
11508 echo "configure:11509: checking whether to use NISPLUS_HOME" >&5
11509 # Check whether --with-nisplus-home or --without-nisplus-home was given.
11510 if test "${with_nisplus_home+set}" = set; then
11511   withval="$with_nisplus_home"
11512    case "$withval" in
11513   yes)
11514     echo "$ac_t""yes" 1>&6
11515     cat >> confdefs.h <<\EOF
11516 #define WITH_NISPLUS_HOME 1
11517 EOF
11518
11519     ;;
11520   *)
11521     echo "$ac_t""no" 1>&6
11522     ;;
11523   esac 
11524 else
11525   echo "$ac_t""no" 1>&6
11526
11527 fi
11528
11529
11530 #################################################
11531 # check for the secure socket layer
11532 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
11533 echo "configure:11534: checking whether to use SSL" >&5
11534 # Check whether --with-ssl or --without-ssl was given.
11535 if test "${with_ssl+set}" = set; then
11536   withval="$with_ssl"
11537    case "$withval" in
11538   yes)
11539     echo "$ac_t""yes" 1>&6
11540     cat >> confdefs.h <<\EOF
11541 #define WITH_SSL 1
11542 EOF
11543
11544     withval="/usr/local/ssl"     # default
11545
11546     if test "${with_sslinc+set}" = set; then
11547
11548         withval="$with_sslinc"
11549         case "$withval" in
11550         yes|no)
11551           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
11552           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
11553           LIBS="-lssl -lcrypto $LIBS"
11554           LDFLAGS="=L/usr/local/ssl/lib $LDFLAGS"
11555         ;;
11556         * )
11557           CFLAGS="-I${withval} $CFLAGS"
11558           LIBS="-lssl -lcrypto $LIBS"
11559           LDFLAGS="-L${withval}/lib $LDFLAGS"
11560         ;;
11561         esac
11562
11563     else
11564
11565         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
11566         LIBS="-lssl -lcrypto $LIBS"
11567         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
11568
11569     fi
11570
11571     if test ! -d ${withval}; then
11572       echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
11573       exit 1
11574     fi 
11575
11576     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
11577
11578     ;;
11579   *)
11580     echo "$ac_t""no" 1>&6
11581     ;;
11582   esac 
11583 else
11584   echo "$ac_t""no" 1>&6
11585
11586 fi
11587
11588
11589 #################################################
11590 # check for syslog logging
11591 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
11592 echo "configure:11593: checking whether to use syslog logging" >&5
11593 # Check whether --with-syslog or --without-syslog was given.
11594 if test "${with_syslog+set}" = set; then
11595   withval="$with_syslog"
11596    case "$withval" in
11597   yes)
11598     echo "$ac_t""yes" 1>&6
11599     cat >> confdefs.h <<\EOF
11600 #define WITH_SYSLOG 1
11601 EOF
11602
11603     ;;
11604   *)
11605     echo "$ac_t""no" 1>&6
11606     ;;
11607   esac 
11608 else
11609   echo "$ac_t""no" 1>&6
11610
11611 fi
11612
11613
11614 #################################################
11615 # check for a shared memory profiling support
11616 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
11617 echo "configure:11618: checking whether to use profiling" >&5
11618 # Check whether --with-profile or --without-profile was given.
11619 if test "${with_profile+set}" = set; then
11620   withval="$with_profile"
11621    case "$withval" in
11622   yes)
11623     echo "$ac_t""yes" 1>&6
11624     cat >> confdefs.h <<\EOF
11625 #define WITH_PROFILE 1
11626 EOF
11627
11628     ;;
11629   *)
11630     echo "$ac_t""no" 1>&6
11631     ;;
11632   esac 
11633 else
11634   echo "$ac_t""no" 1>&6
11635
11636 fi
11637
11638
11639
11640 #################################################
11641 # check for experimental netatalk resource fork support
11642 echo $ac_n "checking whether to support netatalk""... $ac_c" 1>&6
11643 echo "configure:11644: checking whether to support netatalk" >&5
11644 # Check whether --with-netatalk or --without-netatalk was given.
11645 if test "${with_netatalk+set}" = set; then
11646   withval="$with_netatalk"
11647    case "$withval" in
11648   yes)
11649     echo "$ac_t""yes" 1>&6
11650     cat >> confdefs.h <<\EOF
11651 #define WITH_NETATALK 1
11652 EOF
11653
11654     ;;
11655   *)
11656     echo "$ac_t""no" 1>&6
11657     ;;
11658   esac 
11659 else
11660   echo "$ac_t""no" 1>&6
11661
11662 fi
11663
11664
11665 #################################################
11666 # check for experimental disk-quotas support
11667 QUOTAOBJS=smbd/noquotas.o
11668
11669 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
11670 echo "configure:11671: checking whether to support disk-quotas" >&5
11671 # Check whether --with-quotas or --without-quotas was given.
11672 if test "${with_quotas+set}" = set; then
11673   withval="$with_quotas"
11674    case "$withval" in
11675   yes)
11676     echo "$ac_t""yes" 1>&6
11677     QUOTAOBJS=smbd/quotas.o
11678     ;;
11679   *)
11680     echo "$ac_t""no" 1>&6
11681     ;;
11682   esac 
11683 else
11684   echo "$ac_t""no" 1>&6
11685
11686 fi
11687
11688
11689
11690 #################################################
11691 # check for experimental utmp accounting
11692
11693 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
11694 echo "configure:11695: checking whether to support utmp accounting" >&5
11695 # Check whether --with-utmp or --without-utmp was given.
11696 if test "${with_utmp+set}" = set; then
11697   withval="$with_utmp"
11698    case "$withval" in
11699   yes)
11700     echo "$ac_t""yes" 1>&6
11701     cat >> confdefs.h <<\EOF
11702 #define WITH_UTMP 1
11703 EOF
11704
11705     ;;
11706   *)
11707     echo "$ac_t""no" 1>&6
11708     ;;
11709   esac 
11710 else
11711   echo "$ac_t""no" 1>&6
11712
11713 fi
11714
11715
11716 #################################################
11717 # check for MS Dfs support
11718
11719 echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6
11720 echo "configure:11721: checking whether to support Microsoft Dfs" >&5
11721 # Check whether --with-msdfs or --without-msdfs was given.
11722 if test "${with_msdfs+set}" = set; then
11723   withval="$with_msdfs"
11724    case "$withval" in
11725   yes)
11726      echo "$ac_t""yes" 1>&6
11727      cat >> confdefs.h <<\EOF
11728 #define WITH_MSDFS 1
11729 EOF
11730
11731      ;;
11732   *)
11733     echo "$ac_t""no" 1>&6
11734     ;;
11735   esac 
11736 else
11737   echo "$ac_t""no" 1>&6
11738
11739 fi
11740
11741
11742 #################################################
11743 # set private directory location
11744 # Check whether --with-privatedir or --without-privatedir was given.
11745 if test "${with_privatedir+set}" = set; then
11746   withval="$with_privatedir"
11747    case "$withval" in
11748   yes|no)
11749   #
11750   # Just in case anybody calls it without argument
11751   #
11752     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
11753     privatedir='${prefix}/private'
11754   ;;
11755   * )
11756     privatedir="$withval"
11757     ;;
11758   esac
11759   
11760 else
11761   privatedir='${prefix}/private'
11762    
11763
11764 fi
11765
11766
11767 #################################################
11768 # set lock directory location
11769 # Check whether --with-lockdir or --without-lockdir was given.
11770 if test "${with_lockdir+set}" = set; then
11771   withval="$with_lockdir"
11772    case "$withval" in
11773   yes|no)
11774   #
11775   # Just in case anybody calls it without argument
11776   #
11777     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
11778     lockdir='$(VARDIR)/locks'
11779   ;;
11780   * )
11781     lockdir="$withval"
11782     ;;
11783   esac
11784   
11785 else
11786   lockdir='$(VARDIR)/locks'
11787    
11788
11789 fi
11790
11791
11792 #################################################
11793 # set SWAT directory location
11794 # Check whether --with-swatdir or --without-swatdir was given.
11795 if test "${with_swatdir+set}" = set; then
11796   withval="$with_swatdir"
11797    case "$withval" in
11798   yes|no)
11799   #
11800   # Just in case anybody does it
11801   #
11802     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
11803     swatdir='${prefix}/swat'
11804   ;;
11805   * )
11806     swatdir="$withval"
11807     ;;
11808   esac
11809   
11810 else
11811   swatdir='${prefix}/swat'
11812    
11813
11814 fi
11815
11816
11817 #################################################
11818 # these tests are taken from the GNU fileutils package
11819 echo "checking how to get filesystem space usage" 1>&6
11820 echo "configure:11821: checking how to get filesystem space usage" >&5
11821 space=no
11822
11823 # Test for statvfs64.
11824 if test $space = no; then
11825   # SVR4
11826   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
11827 echo "configure:11828: checking statvfs64 function (SVR4)" >&5
11828 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
11829   echo $ac_n "(cached) $ac_c" 1>&6
11830 else
11831   if test "$cross_compiling" = yes; then
11832   fu_cv_sys_stat_statvfs64=cross
11833 else
11834   cat > conftest.$ac_ext <<EOF
11835 #line 11836 "configure"
11836 #include "confdefs.h"
11837
11838 #if defined(HAVE_UNISTD_H)
11839 #include <unistd.h>
11840 #endif
11841 #include <sys/types.h>
11842 #include <sys/statvfs.h>
11843   main ()
11844   {
11845     struct statvfs64 fsd;
11846     exit (statvfs64 (".", &fsd));
11847   }
11848 EOF
11849 if { (eval echo configure:11850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11850 then
11851   fu_cv_sys_stat_statvfs64=yes
11852 else
11853   echo "configure: failed program was:" >&5
11854   cat conftest.$ac_ext >&5
11855   rm -fr conftest*
11856   fu_cv_sys_stat_statvfs64=no
11857 fi
11858 rm -fr conftest*
11859 fi
11860
11861 fi
11862
11863 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
11864   if test $fu_cv_sys_stat_statvfs64 = yes; then
11865     space=yes
11866     cat >> confdefs.h <<\EOF
11867 #define STAT_STATVFS64 1
11868 EOF
11869
11870   fi
11871 fi
11872
11873 # Perform only the link test since it seems there are no variants of the
11874 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
11875 # because that got a false positive on SCO OSR5.  Adding the declaration
11876 # of a `struct statvfs' causes this test to fail (as it should) on such
11877 # systems.  That system is reported to work fine with STAT_STATFS4 which
11878 # is what it gets when this test fails.
11879 if test $space = no; then
11880   # SVR4
11881   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
11882 echo "configure:11883: checking statvfs function (SVR4)" >&5
11883 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
11884   echo $ac_n "(cached) $ac_c" 1>&6
11885 else
11886   cat > conftest.$ac_ext <<EOF
11887 #line 11888 "configure"
11888 #include "confdefs.h"
11889 #include <sys/types.h>
11890 #include <sys/statvfs.h>
11891 int main() {
11892 struct statvfs fsd; statvfs (0, &fsd);
11893 ; return 0; }
11894 EOF
11895 if { (eval echo configure:11896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11896   rm -rf conftest*
11897   fu_cv_sys_stat_statvfs=yes
11898 else
11899   echo "configure: failed program was:" >&5
11900   cat conftest.$ac_ext >&5
11901   rm -rf conftest*
11902   fu_cv_sys_stat_statvfs=no
11903 fi
11904 rm -f conftest*
11905 fi
11906
11907 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
11908   if test $fu_cv_sys_stat_statvfs = yes; then
11909     space=yes
11910     cat >> confdefs.h <<\EOF
11911 #define STAT_STATVFS 1
11912 EOF
11913
11914   fi
11915 fi
11916
11917 if test $space = no; then
11918   # DEC Alpha running OSF/1
11919   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
11920 echo "configure:11921: checking for 3-argument statfs function (DEC OSF/1)" >&5
11921   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
11922   echo $ac_n "(cached) $ac_c" 1>&6
11923 else
11924   if test "$cross_compiling" = yes; then
11925   fu_cv_sys_stat_statfs3_osf1=no
11926 else
11927   cat > conftest.$ac_ext <<EOF
11928 #line 11929 "configure"
11929 #include "confdefs.h"
11930
11931 #include <sys/param.h>
11932 #include <sys/types.h>
11933 #include <sys/mount.h>
11934   main ()
11935   {
11936     struct statfs fsd;
11937     fsd.f_fsize = 0;
11938     exit (statfs (".", &fsd, sizeof (struct statfs)));
11939   }
11940 EOF
11941 if { (eval echo configure:11942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11942 then
11943   fu_cv_sys_stat_statfs3_osf1=yes
11944 else
11945   echo "configure: failed program was:" >&5
11946   cat conftest.$ac_ext >&5
11947   rm -fr conftest*
11948   fu_cv_sys_stat_statfs3_osf1=no
11949 fi
11950 rm -fr conftest*
11951 fi
11952
11953 fi
11954
11955   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
11956   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
11957     space=yes
11958     cat >> confdefs.h <<\EOF
11959 #define STAT_STATFS3_OSF1 1
11960 EOF
11961
11962   fi
11963 fi
11964
11965 if test $space = no; then
11966 # AIX
11967   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
11968 echo "configure:11969: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
11969   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
11970   echo $ac_n "(cached) $ac_c" 1>&6
11971 else
11972   if test "$cross_compiling" = yes; then
11973   fu_cv_sys_stat_statfs2_bsize=no
11974 else
11975   cat > conftest.$ac_ext <<EOF
11976 #line 11977 "configure"
11977 #include "confdefs.h"
11978
11979 #ifdef HAVE_SYS_PARAM_H
11980 #include <sys/param.h>
11981 #endif
11982 #ifdef HAVE_SYS_MOUNT_H
11983 #include <sys/mount.h>
11984 #endif
11985 #ifdef HAVE_SYS_VFS_H
11986 #include <sys/vfs.h>
11987 #endif
11988   main ()
11989   {
11990   struct statfs fsd;
11991   fsd.f_bsize = 0;
11992   exit (statfs (".", &fsd));
11993   }
11994 EOF
11995 if { (eval echo configure:11996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11996 then
11997   fu_cv_sys_stat_statfs2_bsize=yes
11998 else
11999   echo "configure: failed program was:" >&5
12000   cat conftest.$ac_ext >&5
12001   rm -fr conftest*
12002   fu_cv_sys_stat_statfs2_bsize=no
12003 fi
12004 rm -fr conftest*
12005 fi
12006
12007 fi
12008
12009   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
12010   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
12011     space=yes
12012     cat >> confdefs.h <<\EOF
12013 #define STAT_STATFS2_BSIZE 1
12014 EOF
12015
12016   fi
12017 fi
12018
12019 if test $space = no; then
12020 # SVR3
12021   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
12022 echo "configure:12023: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
12023   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
12024   echo $ac_n "(cached) $ac_c" 1>&6
12025 else
12026   if test "$cross_compiling" = yes; then
12027   fu_cv_sys_stat_statfs4=no
12028 else
12029   cat > conftest.$ac_ext <<EOF
12030 #line 12031 "configure"
12031 #include "confdefs.h"
12032 #include <sys/types.h>
12033 #include <sys/statfs.h>
12034   main ()
12035   {
12036   struct statfs fsd;
12037   exit (statfs (".", &fsd, sizeof fsd, 0));
12038   }
12039 EOF
12040 if { (eval echo configure:12041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12041 then
12042   fu_cv_sys_stat_statfs4=yes
12043 else
12044   echo "configure: failed program was:" >&5
12045   cat conftest.$ac_ext >&5
12046   rm -fr conftest*
12047   fu_cv_sys_stat_statfs4=no
12048 fi
12049 rm -fr conftest*
12050 fi
12051
12052 fi
12053
12054   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
12055   if test $fu_cv_sys_stat_statfs4 = yes; then
12056     space=yes
12057     cat >> confdefs.h <<\EOF
12058 #define STAT_STATFS4 1
12059 EOF
12060
12061   fi
12062 fi
12063
12064 if test $space = no; then
12065 # 4.4BSD and NetBSD
12066   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
12067 echo "configure:12068: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
12068   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
12069   echo $ac_n "(cached) $ac_c" 1>&6
12070 else
12071   if test "$cross_compiling" = yes; then
12072   fu_cv_sys_stat_statfs2_fsize=no
12073 else
12074   cat > conftest.$ac_ext <<EOF
12075 #line 12076 "configure"
12076 #include "confdefs.h"
12077 #include <sys/types.h>
12078 #ifdef HAVE_SYS_PARAM_H
12079 #include <sys/param.h>
12080 #endif
12081 #ifdef HAVE_SYS_MOUNT_H
12082 #include <sys/mount.h>
12083 #endif
12084   main ()
12085   {
12086   struct statfs fsd;
12087   fsd.f_fsize = 0;
12088   exit (statfs (".", &fsd));
12089   }
12090 EOF
12091 if { (eval echo configure:12092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12092 then
12093   fu_cv_sys_stat_statfs2_fsize=yes
12094 else
12095   echo "configure: failed program was:" >&5
12096   cat conftest.$ac_ext >&5
12097   rm -fr conftest*
12098   fu_cv_sys_stat_statfs2_fsize=no
12099 fi
12100 rm -fr conftest*
12101 fi
12102
12103 fi
12104
12105   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
12106   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
12107     space=yes
12108     cat >> confdefs.h <<\EOF
12109 #define STAT_STATFS2_FSIZE 1
12110 EOF
12111
12112   fi
12113 fi
12114
12115 if test $space = no; then
12116   # Ultrix
12117   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
12118 echo "configure:12119: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
12119   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
12120   echo $ac_n "(cached) $ac_c" 1>&6
12121 else
12122   if test "$cross_compiling" = yes; then
12123   fu_cv_sys_stat_fs_data=no
12124 else
12125   cat > conftest.$ac_ext <<EOF
12126 #line 12127 "configure"
12127 #include "confdefs.h"
12128 #include <sys/types.h>
12129 #ifdef HAVE_SYS_PARAM_H
12130 #include <sys/param.h>
12131 #endif
12132 #ifdef HAVE_SYS_MOUNT_H
12133 #include <sys/mount.h>
12134 #endif
12135 #ifdef HAVE_SYS_FS_TYPES_H
12136 #include <sys/fs_types.h>
12137 #endif
12138   main ()
12139   {
12140   struct fs_data fsd;
12141   /* Ultrix's statfs returns 1 for success,
12142      0 for not mounted, -1 for failure.  */
12143   exit (statfs (".", &fsd) != 1);
12144   }
12145 EOF
12146 if { (eval echo configure:12147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12147 then
12148   fu_cv_sys_stat_fs_data=yes
12149 else
12150   echo "configure: failed program was:" >&5
12151   cat conftest.$ac_ext >&5
12152   rm -fr conftest*
12153   fu_cv_sys_stat_fs_data=no
12154 fi
12155 rm -fr conftest*
12156 fi
12157
12158 fi
12159
12160   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
12161   if test $fu_cv_sys_stat_fs_data = yes; then
12162     space=yes
12163     cat >> confdefs.h <<\EOF
12164 #define STAT_STATFS2_FS_DATA 1
12165 EOF
12166
12167   fi
12168 fi
12169
12170 #
12171 # As a gating factor for large file support, in order to
12172 # use <4GB files we must have the following minimal support
12173 # available.
12174 # long long, and a 64 bit off_t or off64_t.
12175 # If we don't have all of these then disable large
12176 # file support.
12177 #
12178 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
12179 echo "configure:12180: checking if large file support can be enabled" >&5
12180 cat > conftest.$ac_ext <<EOF
12181 #line 12182 "configure"
12182 #include "confdefs.h"
12183
12184 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
12185 #include <sys/types.h>
12186 #else
12187 __COMPILE_ERROR_
12188 #endif
12189
12190 int main() {
12191 int i
12192 ; return 0; }
12193 EOF
12194 if { (eval echo configure:12195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12195   rm -rf conftest*
12196   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
12197 else
12198   echo "configure: failed program was:" >&5
12199   cat conftest.$ac_ext >&5
12200   rm -rf conftest*
12201   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
12202 fi
12203 rm -f conftest*
12204 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
12205     cat >> confdefs.h <<\EOF
12206 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
12207 EOF
12208
12209 fi
12210 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
12211
12212 # Check whether --with-spinlocks or --without-spinlocks was given.
12213 if test "${with_spinlocks+set}" = set; then
12214   withval="$with_spinlocks"
12215   :
12216 fi
12217
12218 if test "x$with_spinlocks" = "xyes"; then
12219     cat >> confdefs.h <<\EOF
12220 #define USE_SPINLOCKS 1
12221 EOF
12222
12223
12224     case "$host_cpu" in
12225         sparc)
12226             cat >> confdefs.h <<\EOF
12227 #define SPARC_SPINLOCKS 1
12228 EOF
12229
12230             ;;
12231
12232         i386|i486|i586|i686)
12233             cat >> confdefs.h <<\EOF
12234 #define INTEL_SPINLOCKS 1
12235 EOF
12236
12237             ;;
12238
12239         mips)
12240             cat >> confdefs.h <<\EOF
12241 #define MIPS_SPINLOCKS 1
12242 EOF
12243
12244             ;;
12245
12246         powerpc)
12247             cat >> confdefs.h <<\EOF
12248 #define POWERPC_SPINLOCKS 1
12249 EOF
12250
12251             ;;
12252     esac
12253 fi
12254
12255 #################################################
12256 # check for ACL support
12257
12258 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
12259 echo "configure:12260: checking whether to support ACLs" >&5
12260 # Check whether --with-acl-support or --without-acl-support was given.
12261 if test "${with_acl_support+set}" = set; then
12262   withval="$with_acl_support"
12263    case "$withval" in
12264   yes)
12265
12266         case "$host_os" in
12267         *sysv5*)
12268             echo "$ac_t""Using UnixWare ACLs" 1>&6
12269             cat >> confdefs.h <<\EOF
12270 #define HAVE_UNIXWARE_ACLS 1
12271 EOF
12272
12273             ;;
12274         *solaris*)
12275             echo "$ac_t""Using solaris ACLs" 1>&6
12276             cat >> confdefs.h <<\EOF
12277 #define HAVE_SOLARIS_ACLS 1
12278 EOF
12279
12280             ;;
12281                 *irix*)
12282                         echo "$ac_t""Using IRIX ACLs" 1>&6
12283                         cat >> confdefs.h <<\EOF
12284 #define HAVE_IRIX_ACLS 1
12285 EOF
12286
12287                         ;;
12288                 *aix*)
12289                         echo "$ac_t""Using AIX ACLs" 1>&6
12290                         cat >> confdefs.h <<\EOF
12291 #define HAVE_AIX_ACLS 1
12292 EOF
12293
12294                         ;;
12295         *)
12296                         echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
12297 echo "configure:12298: checking for acl_get_file in -lacl" >&5
12298 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
12299 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12300   echo $ac_n "(cached) $ac_c" 1>&6
12301 else
12302   ac_save_LIBS="$LIBS"
12303 LIBS="-lacl  $LIBS"
12304 cat > conftest.$ac_ext <<EOF
12305 #line 12306 "configure"
12306 #include "confdefs.h"
12307 /* Override any gcc2 internal prototype to avoid an error.  */
12308 /* We use char because int might match the return type of a gcc2
12309     builtin and then its argument prototype would still apply.  */
12310 char acl_get_file();
12311
12312 int main() {
12313 acl_get_file()
12314 ; return 0; }
12315 EOF
12316 if { (eval echo configure:12317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12317   rm -rf conftest*
12318   eval "ac_cv_lib_$ac_lib_var=yes"
12319 else
12320   echo "configure: failed program was:" >&5
12321   cat conftest.$ac_ext >&5
12322   rm -rf conftest*
12323   eval "ac_cv_lib_$ac_lib_var=no"
12324 fi
12325 rm -f conftest*
12326 LIBS="$ac_save_LIBS"
12327
12328 fi
12329 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12330   echo "$ac_t""yes" 1>&6
12331     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12332     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12333   cat >> confdefs.h <<EOF
12334 #define $ac_tr_lib 1
12335 EOF
12336
12337   LIBS="-lacl $LIBS"
12338
12339 else
12340   echo "$ac_t""no" 1>&6
12341 fi
12342
12343                         echo $ac_n "checking for ACL support""... $ac_c" 1>&6
12344 echo "configure:12345: checking for ACL support" >&5
12345 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
12346   echo $ac_n "(cached) $ac_c" 1>&6
12347 else
12348   
12349                         cat > conftest.$ac_ext <<EOF
12350 #line 12351 "configure"
12351 #include "confdefs.h"
12352 #include <sys/types.h>
12353 #include <sys/acl.h>
12354 int main() {
12355  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
12356 ; return 0; }
12357 EOF
12358 if { (eval echo configure:12359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12359   rm -rf conftest*
12360   samba_cv_HAVE_POSIX_ACLS=yes
12361 else
12362   echo "configure: failed program was:" >&5
12363   cat conftest.$ac_ext >&5
12364   rm -rf conftest*
12365   samba_cv_HAVE_POSIX_ACLS=no
12366 fi
12367 rm -f conftest*
12368 fi
12369
12370 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
12371                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
12372                                 echo "$ac_t""Using posix ACLs" 1>&6
12373                                 cat >> confdefs.h <<\EOF
12374 #define HAVE_POSIX_ACLS 1
12375 EOF
12376
12377                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
12378 echo "configure:12379: checking for acl_get_perm_np" >&5
12379 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
12380   echo $ac_n "(cached) $ac_c" 1>&6
12381 else
12382   
12383                                 cat > conftest.$ac_ext <<EOF
12384 #line 12385 "configure"
12385 #include "confdefs.h"
12386 #include <sys/types.h>
12387 #include <sys/acl.h>
12388 int main() {
12389  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
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   samba_cv_HAVE_ACL_GET_PERM_NP=yes
12395 else
12396   echo "configure: failed program was:" >&5
12397   cat conftest.$ac_ext >&5
12398   rm -rf conftest*
12399   samba_cv_HAVE_ACL_GET_PERM_NP=no
12400 fi
12401 rm -f conftest*
12402 fi
12403
12404 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
12405                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
12406                                         cat >> confdefs.h <<\EOF
12407 #define HAVE_ACL_GET_PERM_NP 1
12408 EOF
12409
12410                                 fi
12411                         fi
12412             ;;
12413         esac
12414         ;;
12415   *)
12416     echo "$ac_t""no" 1>&6
12417     cat >> confdefs.h <<\EOF
12418 #define HAVE_NO_ACLS 1
12419 EOF
12420
12421     ;;
12422   esac 
12423 else
12424   cat >> confdefs.h <<\EOF
12425 #define HAVE_NO_ACLS 1
12426 EOF
12427
12428   echo "$ac_t""no" 1>&6
12429
12430 fi
12431
12432
12433 #################################################
12434 # check whether winbind is supported on this platform
12435
12436 echo $ac_n "checking whether to compile winbind""... $ac_c" 1>&6
12437 echo "configure:12438: checking whether to compile winbind" >&5
12438
12439 case "$host_os" in 
12440         *linux*|*solaris*)
12441                 WINBIND_TARGETS="\$(WINBIND_PROGS)"
12442                 WINBIND_STARGETS="\$(WINBIND_SPROGS)"
12443                 case "$with_pam" in
12444                         yes)
12445                                 WINBIND_STARGETS="$WINBIND_STARGETS \$(WINBIND_PAM_PROGS)"
12446                         ;;
12447                         *)
12448                 esac
12449                 ;;
12450         *)
12451                 winbind_no_reason=", unsupported on $host_os"
12452                 ;;
12453 esac
12454
12455 # Check whether --with-winbind or --without-winbind was given.
12456 if test "${with_winbind+set}" = set; then
12457   withval="$with_winbind"
12458    
12459   case "$withval" in
12460         no)
12461                 WINBIND_TARGETS=""
12462                 WINBIND_STARGETS=""
12463                 winbind_reason=""
12464                 ;;
12465   esac 
12466 fi
12467
12468
12469 if test x"$WINBIND_TARGETS" = x; then
12470         echo "$ac_t""no$winbind_no_reason" 1>&6
12471 else
12472         echo "$ac_t""yes" 1>&6
12473 fi
12474
12475
12476
12477
12478 #################################################
12479 # final configure stuff
12480
12481 echo "checking configure summary"
12482 if test "$cross_compiling" = yes; then
12483   :
12484 else
12485   cat > conftest.$ac_ext <<EOF
12486 #line 12487 "configure"
12487 #include "confdefs.h"
12488 #include "${srcdir-.}/tests/summary.c"
12489 EOF
12490 if { (eval echo configure:12491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12491 then
12492   echo "configure OK";
12493 else
12494   echo "configure: failed program was:" >&5
12495   cat conftest.$ac_ext >&5
12496   rm -fr conftest*
12497   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
12498 fi
12499 rm -fr conftest*
12500 fi
12501
12502
12503 builddir=`pwd`
12504
12505
12506 trap '' 1 2 15
12507 cat > confcache <<\EOF
12508 # This file is a shell script that caches the results of configure
12509 # tests run on this system so they can be shared between configure
12510 # scripts and configure runs.  It is not useful on other systems.
12511 # If it contains results you don't want to keep, you may remove or edit it.
12512 #
12513 # By default, configure uses ./config.cache as the cache file,
12514 # creating it if it does not exist already.  You can give configure
12515 # the --cache-file=FILE option to use a different cache file; that is
12516 # what configure does when it calls configure scripts in
12517 # subdirectories, so they share the cache.
12518 # Giving --cache-file=/dev/null disables caching, for debugging configure.
12519 # config.status only pays attention to the cache file if you give it the
12520 # --recheck option to rerun configure.
12521 #
12522 EOF
12523 # The following way of writing the cache mishandles newlines in values,
12524 # but we know of no workaround that is simple, portable, and efficient.
12525 # So, don't put newlines in cache variables' values.
12526 # Ultrix sh set writes to stderr and can't be redirected directly,
12527 # and sets the high bit in the cache file unless we assign to the vars.
12528 (set) 2>&1 |
12529   case `(ac_space=' '; set | grep ac_space) 2>&1` in
12530   *ac_space=\ *)
12531     # `set' does not quote correctly, so add quotes (double-quote substitution
12532     # turns \\\\ into \\, and sed turns \\ into \).
12533     sed -n \
12534       -e "s/'/'\\\\''/g" \
12535       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
12536     ;;
12537   *)
12538     # `set' quotes correctly as required by POSIX, so do not add quotes.
12539     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
12540     ;;
12541   esac >> confcache
12542 if cmp -s $cache_file confcache; then
12543   :
12544 else
12545   if test -w $cache_file; then
12546     echo "updating cache $cache_file"
12547     cat confcache > $cache_file
12548   else
12549     echo "not updating unwritable cache $cache_file"
12550   fi
12551 fi
12552 rm -f confcache
12553
12554 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12555
12556 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12557 # Let make expand exec_prefix.
12558 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12559
12560 # Any assignment to VPATH causes Sun make to only execute
12561 # the first set of double-colon rules, so remove it if not needed.
12562 # If there is a colon in the path, we need to keep it.
12563 if test "x$srcdir" = x.; then
12564   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12565 fi
12566
12567 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12568
12569 DEFS=-DHAVE_CONFIG_H
12570
12571 # Without the "./", some shells look in PATH for config.status.
12572 : ${CONFIG_STATUS=./config.status}
12573
12574 echo creating $CONFIG_STATUS
12575 rm -f $CONFIG_STATUS
12576 cat > $CONFIG_STATUS <<EOF
12577 #! /bin/sh
12578 # Generated automatically by configure.
12579 # Run this file to recreate the current configuration.
12580 # This directory was configured as follows,
12581 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12582 #
12583 # $0 $ac_configure_args
12584 #
12585 # Compiler output produced by configure, useful for debugging
12586 # configure, is in ./config.log if it exists.
12587
12588 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12589 for ac_option
12590 do
12591   case "\$ac_option" in
12592   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12593     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12594     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12595   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12596     echo "$CONFIG_STATUS generated by autoconf version 2.13"
12597     exit 0 ;;
12598   -help | --help | --hel | --he | --h)
12599     echo "\$ac_cs_usage"; exit 0 ;;
12600   *) echo "\$ac_cs_usage"; exit 1 ;;
12601   esac
12602 done
12603
12604 ac_given_srcdir=$srcdir
12605 ac_given_INSTALL="$INSTALL"
12606
12607 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12608 EOF
12609 cat >> $CONFIG_STATUS <<EOF
12610
12611 # Protect against being on the right side of a sed subst in config.status.
12612 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12613  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12614 $ac_vpsub
12615 $extrasub
12616 s%@SHELL@%$SHELL%g
12617 s%@CFLAGS@%$CFLAGS%g
12618 s%@CPPFLAGS@%$CPPFLAGS%g
12619 s%@CXXFLAGS@%$CXXFLAGS%g
12620 s%@FFLAGS@%$FFLAGS%g
12621 s%@DEFS@%$DEFS%g
12622 s%@LDFLAGS@%$LDFLAGS%g
12623 s%@LIBS@%$LIBS%g
12624 s%@exec_prefix@%$exec_prefix%g
12625 s%@prefix@%$prefix%g
12626 s%@program_transform_name@%$program_transform_name%g
12627 s%@bindir@%$bindir%g
12628 s%@sbindir@%$sbindir%g
12629 s%@libexecdir@%$libexecdir%g
12630 s%@datadir@%$datadir%g
12631 s%@sysconfdir@%$sysconfdir%g
12632 s%@sharedstatedir@%$sharedstatedir%g
12633 s%@localstatedir@%$localstatedir%g
12634 s%@libdir@%$libdir%g
12635 s%@includedir@%$includedir%g
12636 s%@oldincludedir@%$oldincludedir%g
12637 s%@infodir@%$infodir%g
12638 s%@mandir@%$mandir%g
12639 s%@RUNPROG@%$RUNPROG%g
12640 s%@MPROGS@%$MPROGS%g
12641 s%@LDSHFLAGS@%$LDSHFLAGS%g
12642 s%@SHLD@%$SHLD%g
12643 s%@HOST_OS@%$HOST_OS%g
12644 s%@PAM_MOD@%$PAM_MOD%g
12645 s%@WRAP@%$WRAP%g
12646 s%@WRAP32@%$WRAP32%g
12647 s%@PICFLAG@%$PICFLAG%g
12648 s%@PICSUFFIX@%$PICSUFFIX%g
12649 s%@POBAD_CC@%$POBAD_CC%g
12650 s%@SHLIBEXT@%$SHLIBEXT%g
12651 s%@BLDSHARED@%$BLDSHARED%g
12652 s%@CC@%$CC%g
12653 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12654 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
12655 s%@INSTALL_DATA@%$INSTALL_DATA%g
12656 s%@AWK@%$AWK%g
12657 s%@BROKEN_CC@%$BROKEN_CC%g
12658 s%@host@%$host%g
12659 s%@host_alias@%$host_alias%g
12660 s%@host_cpu@%$host_cpu%g
12661 s%@host_vendor@%$host_vendor%g
12662 s%@host_os@%$host_os%g
12663 s%@target@%$target%g
12664 s%@target_alias@%$target_alias%g
12665 s%@target_cpu@%$target_cpu%g
12666 s%@target_vendor@%$target_vendor%g
12667 s%@target_os@%$target_os%g
12668 s%@build@%$build%g
12669 s%@build_alias@%$build_alias%g
12670 s%@build_cpu@%$build_cpu%g
12671 s%@build_vendor@%$build_vendor%g
12672 s%@build_os@%$build_os%g
12673 s%@CPP@%$CPP%g
12674 s%@LIBOBJS@%$LIBOBJS%g
12675 s%@TERMLIBS@%$TERMLIBS%g
12676 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
12677 s%@ROFF@%$ROFF%g
12678 s%@QUOTAOBJS@%$QUOTAOBJS%g
12679 s%@privatedir@%$privatedir%g
12680 s%@lockdir@%$lockdir%g
12681 s%@swatdir@%$swatdir%g
12682 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
12683 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
12684 s%@builddir@%$builddir%g
12685
12686 CEOF
12687 EOF
12688
12689 cat >> $CONFIG_STATUS <<\EOF
12690
12691 # Split the substitutions into bite-sized pieces for seds with
12692 # small command number limits, like on Digital OSF/1 and HP-UX.
12693 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
12694 ac_file=1 # Number of current file.
12695 ac_beg=1 # First line for current file.
12696 ac_end=$ac_max_sed_cmds # Line after last line for current file.
12697 ac_more_lines=:
12698 ac_sed_cmds=""
12699 while $ac_more_lines; do
12700   if test $ac_beg -gt 1; then
12701     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
12702   else
12703     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
12704   fi
12705   if test ! -s conftest.s$ac_file; then
12706     ac_more_lines=false
12707     rm -f conftest.s$ac_file
12708   else
12709     if test -z "$ac_sed_cmds"; then
12710       ac_sed_cmds="sed -f conftest.s$ac_file"
12711     else
12712       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
12713     fi
12714     ac_file=`expr $ac_file + 1`
12715     ac_beg=$ac_end
12716     ac_end=`expr $ac_end + $ac_max_sed_cmds`
12717   fi
12718 done
12719 if test -z "$ac_sed_cmds"; then
12720   ac_sed_cmds=cat
12721 fi
12722 EOF
12723
12724 cat >> $CONFIG_STATUS <<EOF
12725
12726 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
12727 EOF
12728 cat >> $CONFIG_STATUS <<\EOF
12729 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
12730   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12731   case "$ac_file" in
12732   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12733        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12734   *) ac_file_in="${ac_file}.in" ;;
12735   esac
12736
12737   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
12738
12739   # Remove last slash and all that follows it.  Not all systems have dirname.
12740   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12741   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12742     # The file is in a subdirectory.
12743     test ! -d "$ac_dir" && mkdir "$ac_dir"
12744     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
12745     # A "../" for each directory in $ac_dir_suffix.
12746     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
12747   else
12748     ac_dir_suffix= ac_dots=
12749   fi
12750
12751   case "$ac_given_srcdir" in
12752   .)  srcdir=.
12753       if test -z "$ac_dots"; then top_srcdir=.
12754       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
12755   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
12756   *) # Relative path.
12757     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
12758     top_srcdir="$ac_dots$ac_given_srcdir" ;;
12759   esac
12760
12761   case "$ac_given_INSTALL" in
12762   [/$]*) INSTALL="$ac_given_INSTALL" ;;
12763   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
12764   esac
12765
12766   echo creating "$ac_file"
12767   rm -f "$ac_file"
12768   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
12769   case "$ac_file" in
12770   *Makefile*) ac_comsub="1i\\
12771 # $configure_input" ;;
12772   *) ac_comsub= ;;
12773   esac
12774
12775   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12776   sed -e "$ac_comsub
12777 s%@configure_input@%$configure_input%g
12778 s%@srcdir@%$srcdir%g
12779 s%@top_srcdir@%$top_srcdir%g
12780 s%@INSTALL@%$INSTALL%g
12781 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
12782 fi; done
12783 rm -f conftest.s*
12784
12785 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12786 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12787 #
12788 # ac_d sets the value in "#define NAME VALUE" lines.
12789 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12790 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
12791 ac_dC='\3'
12792 ac_dD='%g'
12793 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12794 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12795 ac_uB='\([      ]\)%\1#\2define\3'
12796 ac_uC=' '
12797 ac_uD='\4%g'
12798 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12799 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12800 ac_eB='$%\1#\2define\3'
12801 ac_eC=' '
12802 ac_eD='%g'
12803
12804 if test "${CONFIG_HEADERS+set}" != set; then
12805 EOF
12806 cat >> $CONFIG_STATUS <<EOF
12807   CONFIG_HEADERS="include/config.h"
12808 EOF
12809 cat >> $CONFIG_STATUS <<\EOF
12810 fi
12811 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
12812   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12813   case "$ac_file" in
12814   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12815        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12816   *) ac_file_in="${ac_file}.in" ;;
12817   esac
12818
12819   echo creating $ac_file
12820
12821   rm -f conftest.frag conftest.in conftest.out
12822   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12823   cat $ac_file_inputs > conftest.in
12824
12825 EOF
12826
12827 # Transform confdefs.h into a sed script conftest.vals that substitutes
12828 # the proper values into config.h.in to produce config.h.  And first:
12829 # Protect against being on the right side of a sed subst in config.status.
12830 # Protect against being in an unquoted here document in config.status.
12831 rm -f conftest.vals
12832 cat > conftest.hdr <<\EOF
12833 s/[\\&%]/\\&/g
12834 s%[\\$`]%\\&%g
12835 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
12836 s%ac_d%ac_u%gp
12837 s%ac_u%ac_e%gp
12838 EOF
12839 sed -n -f conftest.hdr confdefs.h > conftest.vals
12840 rm -f conftest.hdr
12841
12842 # This sed command replaces #undef with comments.  This is necessary, for
12843 # example, in the case of _POSIX_SOURCE, which is predefined and required
12844 # on some systems where configure will not decide to define it.
12845 cat >> conftest.vals <<\EOF
12846 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
12847 EOF
12848
12849 # Break up conftest.vals because some shells have a limit on
12850 # the size of here documents, and old seds have small limits too.
12851
12852 rm -f conftest.tail
12853 while :
12854 do
12855   ac_lines=`grep -c . conftest.vals`
12856   # grep -c gives empty output for an empty file on some AIX systems.
12857   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
12858   # Write a limited-size here document to conftest.frag.
12859   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
12860   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
12861   echo 'CEOF
12862   sed -f conftest.frag conftest.in > conftest.out
12863   rm -f conftest.in
12864   mv conftest.out conftest.in
12865 ' >> $CONFIG_STATUS
12866   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12867   rm -f conftest.vals
12868   mv conftest.tail conftest.vals
12869 done
12870 rm -f conftest.vals
12871
12872 cat >> $CONFIG_STATUS <<\EOF
12873   rm -f conftest.frag conftest.h
12874   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
12875   cat conftest.in >> conftest.h
12876   rm -f conftest.in
12877   if cmp -s $ac_file conftest.h 2>/dev/null; then
12878     echo "$ac_file is unchanged"
12879     rm -f conftest.h
12880   else
12881     # Remove last slash and all that follows it.  Not all systems have dirname.
12882       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12883       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12884       # The file is in a subdirectory.
12885       test ! -d "$ac_dir" && mkdir "$ac_dir"
12886     fi
12887     rm -f $ac_file
12888     mv conftest.h $ac_file
12889   fi
12890 fi; done
12891
12892 EOF
12893 cat >> $CONFIG_STATUS <<EOF
12894
12895 EOF
12896 cat >> $CONFIG_STATUS <<\EOF
12897
12898 exit 0
12899 EOF
12900 chmod +x $CONFIG_STATUS
12901 rm -fr confdefs* $ac_clean_files
12902 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
12903