Reran autoconf.
[jra/samba/.git] / source / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/samba
15 ac_help="$ac_help
16   --enable-debug        turn on debugging [default=no]"
17 ac_help="$ac_help
18   --enable-shared[=PKGS]  build shared libraries [default=yes]"
19 ac_help="$ac_help
20   --enable-static[=PKGS]  build static libraries [default=yes]"
21 ac_help="$ac_help
22   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
23 ac_help="$ac_help
24   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
25 ac_help="$ac_help
26   --disable-libtool-lock  avoid locking (might break parallel builds)"
27 ac_help="$ac_help
28   --with-codepagedir=DIR     Where to put codepage files (\$libdir/codepages)"
29 ac_help="$ac_help
30   --with-readline[=DIR]   Look for readline include/libs in DIR
31   --without-readline      Don't include readline support"
32 ac_help="$ac_help
33   --with-smbwrapper     Include SMB wrapper support
34   --without-smbwrapper  Don't include SMB wrapper support (default)"
35 ac_help="$ac_help
36   --with-afs     Include AFS support
37   --without-afs  Don't include AFS support (default)"
38 ac_help="$ac_help
39   --with-dfs     Include DFS support
40   --without-dfs  Don't include DFS support (default)"
41 ac_help="$ac_help
42   --with-krb4=base-dir     Include Kerberos IV support
43   --without-krb4          Don't include Kerberos IV support (default)"
44 ac_help="$ac_help
45   --with-krb5=base-dir     Include Kerberos 5 support
46   --without-krb5          Don't include Kerberos 5 support (default)"
47 ac_help="$ac_help
48   --with-automount     Include AUTOMOUNT support
49   --without-automount  Don't include AUTOMOUNT support (default)"
50 ac_help="$ac_help
51   --with-smbmount     Include SMBMOUNT (Linux only) support
52   --without-smbmount  Don't include SMBMOUNT support (default)"
53 ac_help="$ac_help
54   --with-pam     Include PAM password database support
55   --without-pam  Don't include PAM password database support (default)"
56 ac_help="$ac_help
57   --with-pam_smbpass     Include the smbpass PAM module
58   --without-pam_smbpass  Don't include the smbpass PAM module (default)"
59 ac_help="$ac_help
60   --with-tdbsam   Include experimental TDB password database
61   --without-tdbsam  Don't include experimental TDB password database (default)"
62 ac_help="$ac_help
63   --with-ldap     Include LDAP support
64   --without-ldap  Don't include LDAP support (default)"
65 ac_help="$ac_help
66   --with-nisplus     Include NISPLUS password database support
67   --without-nisplus  Don't include NISPLUS password database support (default)"
68 ac_help="$ac_help
69   --with-nisplus-home     Include NISPLUS_HOME support
70   --without-nisplus-home  Don't include NISPLUS_HOME support (default)"
71 ac_help="$ac_help
72   --with-ssl     Include SSL support
73   --without-ssl  Don't include SSL support (default)
74   --with-sslinc=DIR Where the SSL includes are (defaults to /usr/local/ssl)"
75 ac_help="$ac_help
76   --with-syslog     Include experimental SYSLOG support
77   --without-syslog  Don't include SYSLOG support (default)"
78 ac_help="$ac_help
79   --with-profile     Include profile support
80   --without-profile  Don't include profile support (default)"
81 ac_help="$ac_help
82   --with-netatalk     Include experimental Netatalk support
83   --without-netatalk  Don't include experimental Netatalk support (default)"
84 ac_help="$ac_help
85   --with-quotas     Include experimental disk-quota support
86   --without-quotas  Don't include experimental disk-quota support (default)"
87 ac_help="$ac_help
88   --with-utmp     Include experimental utmp accounting
89   --without-utmp  Don't include experimental utmp accounting (default)"
90 ac_help="$ac_help
91   --with-msdfs          Include MS Dfs support
92   --without-msdfs       Don't include MS Dfs support (default)"
93 ac_help="$ac_help
94   --with-privatedir=DIR     Where to put smbpasswd ($ac_default_prefix/private)"
95 ac_help="$ac_help
96   --with-lockdir=DIR     Where to put lock files ($ac_default_prefix/var/locks)"
97 ac_help="$ac_help
98   --with-swatdir=DIR     Where to put SWAT files ($ac_default_prefix/swat)"
99 ac_help="$ac_help
100   --with-spinlocks        use spin locks instead of fcntl locks "
101 ac_help="$ac_help
102   --with-acl-support        Include ACL support
103   --without-acl-support  Don't include ACL support (default)"
104 ac_help="$ac_help
105   --with-winbind        Build winbind library (default, if supported by OS)
106   --without-winbind     Don't build winbind library"
107
108 # Initialize some variables set by options.
109 # The variables have the same names as the options, with
110 # dashes changed to underlines.
111 build=NONE
112 cache_file=./config.cache
113 exec_prefix=NONE
114 host=NONE
115 no_create=
116 nonopt=NONE
117 no_recursion=
118 prefix=NONE
119 program_prefix=NONE
120 program_suffix=NONE
121 program_transform_name=s,x,x,
122 silent=
123 site=
124 srcdir=
125 target=NONE
126 verbose=
127 x_includes=NONE
128 x_libraries=NONE
129 bindir='${exec_prefix}/bin'
130 sbindir='${exec_prefix}/sbin'
131 libexecdir='${exec_prefix}/libexec'
132 datadir='${prefix}/share'
133 sysconfdir='${prefix}/etc'
134 sharedstatedir='${prefix}/com'
135 localstatedir='${prefix}/var'
136 libdir='${exec_prefix}/lib'
137 includedir='${prefix}/include'
138 oldincludedir='/usr/include'
139 infodir='${prefix}/info'
140 mandir='${prefix}/man'
141
142 # Initialize some other variables.
143 subdirs=
144 MFLAGS= MAKEFLAGS=
145 SHELL=${CONFIG_SHELL-/bin/sh}
146 # Maximum number of lines to put in a shell here document.
147 ac_max_here_lines=12
148
149 ac_prev=
150 for ac_option
151 do
152
153   # If the previous option needs an argument, assign it.
154   if test -n "$ac_prev"; then
155     eval "$ac_prev=\$ac_option"
156     ac_prev=
157     continue
158   fi
159
160   case "$ac_option" in
161   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
162   *) ac_optarg= ;;
163   esac
164
165   # Accept the important Cygnus configure options, so we can diagnose typos.
166
167   case "$ac_option" in
168
169   -bindir | --bindir | --bindi | --bind | --bin | --bi)
170     ac_prev=bindir ;;
171   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
172     bindir="$ac_optarg" ;;
173
174   -build | --build | --buil | --bui | --bu)
175     ac_prev=build ;;
176   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
177     build="$ac_optarg" ;;
178
179   -cache-file | --cache-file | --cache-fil | --cache-fi \
180   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
181     ac_prev=cache_file ;;
182   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
183   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
184     cache_file="$ac_optarg" ;;
185
186   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
187     ac_prev=datadir ;;
188   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
189   | --da=*)
190     datadir="$ac_optarg" ;;
191
192   -disable-* | --disable-*)
193     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
194     # Reject names that are not valid shell variable names.
195     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
196       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
197     fi
198     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
199     eval "enable_${ac_feature}=no" ;;
200
201   -enable-* | --enable-*)
202     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
203     # Reject names that are not valid shell variable names.
204     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
205       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
206     fi
207     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
208     case "$ac_option" in
209       *=*) ;;
210       *) ac_optarg=yes ;;
211     esac
212     eval "enable_${ac_feature}='$ac_optarg'" ;;
213
214   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
215   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
216   | --exec | --exe | --ex)
217     ac_prev=exec_prefix ;;
218   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
219   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
220   | --exec=* | --exe=* | --ex=*)
221     exec_prefix="$ac_optarg" ;;
222
223   -gas | --gas | --ga | --g)
224     # Obsolete; use --with-gas.
225     with_gas=yes ;;
226
227   -help | --help | --hel | --he)
228     # Omit some internal or obsolete options to make the list less imposing.
229     # This message is too long to be a string in the A/UX 3.1 sh.
230     cat << EOF
231 Usage: configure [options] [host]
232 Options: [defaults in brackets after descriptions]
233 Configuration:
234   --cache-file=FILE       cache test results in FILE
235   --help                  print this message
236   --no-create             do not create output files
237   --quiet, --silent       do not print \`checking...' messages
238   --version               print the version of autoconf that created configure
239 Directory and file names:
240   --prefix=PREFIX         install architecture-independent files in PREFIX
241                           [$ac_default_prefix]
242   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
243                           [same as prefix]
244   --bindir=DIR            user executables in DIR [EPREFIX/bin]
245   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
246   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
247   --datadir=DIR           read-only architecture-independent data in DIR
248                           [PREFIX/share]
249   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
250   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
251                           [PREFIX/com]
252   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
253   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
254   --includedir=DIR        C header files in DIR [PREFIX/include]
255   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
256   --infodir=DIR           info documentation in DIR [PREFIX/info]
257   --mandir=DIR            man documentation in DIR [PREFIX/man]
258   --srcdir=DIR            find the sources in DIR [configure dir or ..]
259   --program-prefix=PREFIX prepend PREFIX to installed program names
260   --program-suffix=SUFFIX append SUFFIX to installed program names
261   --program-transform-name=PROGRAM
262                           run sed PROGRAM on installed program names
263 EOF
264     cat << EOF
265 Host type:
266   --build=BUILD           configure for building on BUILD [BUILD=HOST]
267   --host=HOST             configure for HOST [guessed]
268   --target=TARGET         configure for TARGET [TARGET=HOST]
269 Features and packages:
270   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
271   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
272   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
273   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
274   --x-includes=DIR        X include files are in DIR
275   --x-libraries=DIR       X library files are in DIR
276 EOF
277     if test -n "$ac_help"; then
278       echo "--enable and --with options recognized:$ac_help"
279     fi
280     exit 0 ;;
281
282   -host | --host | --hos | --ho)
283     ac_prev=host ;;
284   -host=* | --host=* | --hos=* | --ho=*)
285     host="$ac_optarg" ;;
286
287   -includedir | --includedir | --includedi | --included | --include \
288   | --includ | --inclu | --incl | --inc)
289     ac_prev=includedir ;;
290   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
291   | --includ=* | --inclu=* | --incl=* | --inc=*)
292     includedir="$ac_optarg" ;;
293
294   -infodir | --infodir | --infodi | --infod | --info | --inf)
295     ac_prev=infodir ;;
296   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
297     infodir="$ac_optarg" ;;
298
299   -libdir | --libdir | --libdi | --libd)
300     ac_prev=libdir ;;
301   -libdir=* | --libdir=* | --libdi=* | --libd=*)
302     libdir="$ac_optarg" ;;
303
304   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
305   | --libexe | --libex | --libe)
306     ac_prev=libexecdir ;;
307   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
308   | --libexe=* | --libex=* | --libe=*)
309     libexecdir="$ac_optarg" ;;
310
311   -localstatedir | --localstatedir | --localstatedi | --localstated \
312   | --localstate | --localstat | --localsta | --localst \
313   | --locals | --local | --loca | --loc | --lo)
314     ac_prev=localstatedir ;;
315   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
316   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
317   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
318     localstatedir="$ac_optarg" ;;
319
320   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
321     ac_prev=mandir ;;
322   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
323     mandir="$ac_optarg" ;;
324
325   -nfp | --nfp | --nf)
326     # Obsolete; use --without-fp.
327     with_fp=no ;;
328
329   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
330   | --no-cr | --no-c)
331     no_create=yes ;;
332
333   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
334   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
335     no_recursion=yes ;;
336
337   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
338   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
339   | --oldin | --oldi | --old | --ol | --o)
340     ac_prev=oldincludedir ;;
341   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
342   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
343   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
344     oldincludedir="$ac_optarg" ;;
345
346   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
347     ac_prev=prefix ;;
348   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
349     prefix="$ac_optarg" ;;
350
351   -program-prefix | --program-prefix | --program-prefi | --program-pref \
352   | --program-pre | --program-pr | --program-p)
353     ac_prev=program_prefix ;;
354   -program-prefix=* | --program-prefix=* | --program-prefi=* \
355   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
356     program_prefix="$ac_optarg" ;;
357
358   -program-suffix | --program-suffix | --program-suffi | --program-suff \
359   | --program-suf | --program-su | --program-s)
360     ac_prev=program_suffix ;;
361   -program-suffix=* | --program-suffix=* | --program-suffi=* \
362   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
363     program_suffix="$ac_optarg" ;;
364
365   -program-transform-name | --program-transform-name \
366   | --program-transform-nam | --program-transform-na \
367   | --program-transform-n | --program-transform- \
368   | --program-transform | --program-transfor \
369   | --program-transfo | --program-transf \
370   | --program-trans | --program-tran \
371   | --progr-tra | --program-tr | --program-t)
372     ac_prev=program_transform_name ;;
373   -program-transform-name=* | --program-transform-name=* \
374   | --program-transform-nam=* | --program-transform-na=* \
375   | --program-transform-n=* | --program-transform-=* \
376   | --program-transform=* | --program-transfor=* \
377   | --program-transfo=* | --program-transf=* \
378   | --program-trans=* | --program-tran=* \
379   | --progr-tra=* | --program-tr=* | --program-t=*)
380     program_transform_name="$ac_optarg" ;;
381
382   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
383   | -silent | --silent | --silen | --sile | --sil)
384     silent=yes ;;
385
386   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
387     ac_prev=sbindir ;;
388   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
389   | --sbi=* | --sb=*)
390     sbindir="$ac_optarg" ;;
391
392   -sharedstatedir | --sharedstatedir | --sharedstatedi \
393   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
394   | --sharedst | --shareds | --shared | --share | --shar \
395   | --sha | --sh)
396     ac_prev=sharedstatedir ;;
397   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
398   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
399   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
400   | --sha=* | --sh=*)
401     sharedstatedir="$ac_optarg" ;;
402
403   -site | --site | --sit)
404     ac_prev=site ;;
405   -site=* | --site=* | --sit=*)
406     site="$ac_optarg" ;;
407
408   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
409     ac_prev=srcdir ;;
410   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
411     srcdir="$ac_optarg" ;;
412
413   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
414   | --syscon | --sysco | --sysc | --sys | --sy)
415     ac_prev=sysconfdir ;;
416   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
417   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
418     sysconfdir="$ac_optarg" ;;
419
420   -target | --target | --targe | --targ | --tar | --ta | --t)
421     ac_prev=target ;;
422   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
423     target="$ac_optarg" ;;
424
425   -v | -verbose | --verbose | --verbos | --verbo | --verb)
426     verbose=yes ;;
427
428   -version | --version | --versio | --versi | --vers)
429     echo "configure generated by autoconf version 2.13"
430     exit 0 ;;
431
432   -with-* | --with-*)
433     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
434     # Reject names that are not valid shell variable names.
435     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
436       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
437     fi
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case "$ac_option" in
440       *=*) ;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_${ac_package}='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
447     # Reject names that are not valid shell variable names.
448     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
449       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
450     fi
451     ac_package=`echo $ac_package| sed 's/-/_/g'`
452     eval "with_${ac_package}=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes="$ac_optarg" ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries="$ac_optarg" ;;
471
472   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
473     ;;
474
475   *)
476     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
477       echo "configure: warning: $ac_option: invalid host type" 1>&2
478     fi
479     if test "x$nonopt" != xNONE; then
480       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
481     fi
482     nonopt="$ac_option"
483     ;;
484
485   esac
486 done
487
488 if test -n "$ac_prev"; then
489   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
490 fi
491
492 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
493
494 # File descriptor usage:
495 # 0 standard input
496 # 1 file creation
497 # 2 errors and warnings
498 # 3 some systems may open it to /dev/tty
499 # 4 used on the Kubota Titan
500 # 6 checking for... messages and results
501 # 5 compiler messages saved in config.log
502 if test "$silent" = yes; then
503   exec 6>/dev/null
504 else
505   exec 6>&1
506 fi
507 exec 5>./config.log
508
509 echo "\
510 This file contains any messages produced by compilers while
511 running configure, to aid debugging if configure makes a mistake.
512 " 1>&5
513
514 # Strip out --no-create and --no-recursion so they do not pile up.
515 # Also quote any args containing shell metacharacters.
516 ac_configure_args=
517 for ac_arg
518 do
519   case "$ac_arg" in
520   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
521   | --no-cr | --no-c) ;;
522   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
523   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
524   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
525   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
526   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
527   esac
528 done
529
530 # NLS nuisances.
531 # Only set these to C if already set.  These must not be set unconditionally
532 # because not all systems understand e.g. LANG=C (notably SCO).
533 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
534 # Non-C LC_CTYPE values break the ctype check.
535 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
536 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
537 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
538 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
539
540 # confdefs.h avoids OS command line length limits that DEFS can exceed.
541 rm -rf conftest* confdefs.h
542 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
543 echo > confdefs.h
544
545 # A filename unique to this package, relative to the directory that
546 # configure is in, which we can look for to find out if srcdir is correct.
547 ac_unique_file=include/includes.h
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
566   else
567     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
568   fi
569 fi
570 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
571
572 # Prefer explicitly selected file to automatically selected ones.
573 if test -z "$CONFIG_SITE"; then
574   if test "x$prefix" != xNONE; then
575     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
576   else
577     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
578   fi
579 fi
580 for ac_site_file in $CONFIG_SITE; do
581   if test -r "$ac_site_file"; then
582     echo "loading site script $ac_site_file"
583     . "$ac_site_file"
584   fi
585 done
586
587 if test -r "$cache_file"; then
588   echo "loading cache $cache_file"
589   . $cache_file
590 else
591   echo "creating cache $cache_file"
592   > $cache_file
593 fi
594
595 ac_ext=c
596 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
597 ac_cpp='$CPP $CPPFLAGS'
598 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
599 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
600 cross_compiling=$ac_cv_prog_cc_cross
601
602 ac_exeext=
603 ac_objext=o
604 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
605   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
606   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
607     ac_n= ac_c='
608 ' ac_t='        '
609   else
610     ac_n=-n ac_c= ac_t=
611   fi
612 else
613   ac_n= ac_c='\c' ac_t=
614 fi
615
616
617
618 # we want to be compatibe with older versions of Samba
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633 # compile with optimisation and without debugging by default
634 CFLAGS="-O ${CFLAGS}"
635
636 # Check whether --enable-debug or --disable-debug was given.
637 if test "${enable_debug+set}" = set; then
638   enableval="$enable_debug"
639   if eval "test x$enable_debug = xyes"; then
640         CFLAGS="${CFLAGS} -g"
641     fi
642 fi
643
644
645
646 # Extract the first word of "gcc", so it can be a program name with args.
647 set dummy gcc; ac_word=$2
648 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
649 echo "configure:650: checking for $ac_word" >&5
650 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
651   echo $ac_n "(cached) $ac_c" 1>&6
652 else
653   if test -n "$CC"; then
654   ac_cv_prog_CC="$CC" # Let the user override the test.
655 else
656   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
657   ac_dummy="$PATH"
658   for ac_dir in $ac_dummy; do
659     test -z "$ac_dir" && ac_dir=.
660     if test -f $ac_dir/$ac_word; then
661       ac_cv_prog_CC="gcc"
662       break
663     fi
664   done
665   IFS="$ac_save_ifs"
666 fi
667 fi
668 CC="$ac_cv_prog_CC"
669 if test -n "$CC"; then
670   echo "$ac_t""$CC" 1>&6
671 else
672   echo "$ac_t""no" 1>&6
673 fi
674
675 if test -z "$CC"; then
676   # Extract the first word of "cc", so it can be a program name with args.
677 set dummy cc; ac_word=$2
678 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
679 echo "configure:680: checking for $ac_word" >&5
680 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
681   echo $ac_n "(cached) $ac_c" 1>&6
682 else
683   if test -n "$CC"; then
684   ac_cv_prog_CC="$CC" # Let the user override the test.
685 else
686   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
687   ac_prog_rejected=no
688   ac_dummy="$PATH"
689   for ac_dir in $ac_dummy; do
690     test -z "$ac_dir" && ac_dir=.
691     if test -f $ac_dir/$ac_word; then
692       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
693         ac_prog_rejected=yes
694         continue
695       fi
696       ac_cv_prog_CC="cc"
697       break
698     fi
699   done
700   IFS="$ac_save_ifs"
701 if test $ac_prog_rejected = yes; then
702   # We found a bogon in the path, so make sure we never use it.
703   set dummy $ac_cv_prog_CC
704   shift
705   if test $# -gt 0; then
706     # We chose a different compiler from the bogus one.
707     # However, it has the same basename, so the bogon will be chosen
708     # first if we set CC to just the basename; use the full file name.
709     shift
710     set dummy "$ac_dir/$ac_word" "$@"
711     shift
712     ac_cv_prog_CC="$@"
713   fi
714 fi
715 fi
716 fi
717 CC="$ac_cv_prog_CC"
718 if test -n "$CC"; then
719   echo "$ac_t""$CC" 1>&6
720 else
721   echo "$ac_t""no" 1>&6
722 fi
723
724   if test -z "$CC"; then
725     case "`uname -s`" in
726     *win32* | *WIN32*)
727       # Extract the first word of "cl", so it can be a program name with args.
728 set dummy cl; ac_word=$2
729 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
730 echo "configure:731: checking for $ac_word" >&5
731 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
732   echo $ac_n "(cached) $ac_c" 1>&6
733 else
734   if test -n "$CC"; then
735   ac_cv_prog_CC="$CC" # Let the user override the test.
736 else
737   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
738   ac_dummy="$PATH"
739   for ac_dir in $ac_dummy; do
740     test -z "$ac_dir" && ac_dir=.
741     if test -f $ac_dir/$ac_word; then
742       ac_cv_prog_CC="cl"
743       break
744     fi
745   done
746   IFS="$ac_save_ifs"
747 fi
748 fi
749 CC="$ac_cv_prog_CC"
750 if test -n "$CC"; then
751   echo "$ac_t""$CC" 1>&6
752 else
753   echo "$ac_t""no" 1>&6
754 fi
755  ;;
756     esac
757   fi
758   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
759 fi
760
761 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
762 echo "configure:763: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
763
764 ac_ext=c
765 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
766 ac_cpp='$CPP $CPPFLAGS'
767 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
768 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
769 cross_compiling=$ac_cv_prog_cc_cross
770
771 cat > conftest.$ac_ext << EOF
772
773 #line 774 "configure"
774 #include "confdefs.h"
775
776 main(){return(0);}
777 EOF
778 if { (eval echo configure:779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
779   ac_cv_prog_cc_works=yes
780   # If we can't run a trivial program, we are probably using a cross compiler.
781   if (./conftest; exit) 2>/dev/null; then
782     ac_cv_prog_cc_cross=no
783   else
784     ac_cv_prog_cc_cross=yes
785   fi
786 else
787   echo "configure: failed program was:" >&5
788   cat conftest.$ac_ext >&5
789   ac_cv_prog_cc_works=no
790 fi
791 rm -fr conftest*
792 ac_ext=c
793 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
794 ac_cpp='$CPP $CPPFLAGS'
795 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
796 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
797 cross_compiling=$ac_cv_prog_cc_cross
798
799 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
800 if test $ac_cv_prog_cc_works = no; then
801   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
802 fi
803 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
804 echo "configure:805: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
805 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
806 cross_compiling=$ac_cv_prog_cc_cross
807
808 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
809 echo "configure:810: checking whether we are using GNU C" >&5
810 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
811   echo $ac_n "(cached) $ac_c" 1>&6
812 else
813   cat > conftest.c <<EOF
814 #ifdef __GNUC__
815   yes;
816 #endif
817 EOF
818 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
819   ac_cv_prog_gcc=yes
820 else
821   ac_cv_prog_gcc=no
822 fi
823 fi
824
825 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
826
827 if test $ac_cv_prog_gcc = yes; then
828   GCC=yes
829 else
830   GCC=
831 fi
832
833 ac_test_CFLAGS="${CFLAGS+set}"
834 ac_save_CFLAGS="$CFLAGS"
835 CFLAGS=
836 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
837 echo "configure:838: checking whether ${CC-cc} accepts -g" >&5
838 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
839   echo $ac_n "(cached) $ac_c" 1>&6
840 else
841   echo 'void f(){}' > conftest.c
842 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
843   ac_cv_prog_cc_g=yes
844 else
845   ac_cv_prog_cc_g=no
846 fi
847 rm -f conftest*
848
849 fi
850
851 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
852 if test "$ac_test_CFLAGS" = set; then
853   CFLAGS="$ac_save_CFLAGS"
854 elif test $ac_cv_prog_cc_g = yes; then
855   if test "$GCC" = yes; then
856     CFLAGS="-g -O2"
857   else
858     CFLAGS="-g"
859   fi
860 else
861   if test "$GCC" = yes; then
862     CFLAGS="-O2"
863   else
864     CFLAGS=
865   fi
866 fi
867
868 ac_aux_dir=
869 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
870   if 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   elif test -f $ac_dir/install.sh; then
875     ac_aux_dir=$ac_dir
876     ac_install_sh="$ac_aux_dir/install.sh -c"
877     break
878   fi
879 done
880 if test -z "$ac_aux_dir"; then
881   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
882 fi
883 ac_config_guess=$ac_aux_dir/config.guess
884 ac_config_sub=$ac_aux_dir/config.sub
885 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
886
887 # Find a good install program.  We prefer a C program (faster),
888 # so one script is as good as another.  But avoid the broken or
889 # incompatible versions:
890 # SysV /etc/install, /usr/sbin/install
891 # SunOS /usr/etc/install
892 # IRIX /sbin/install
893 # AIX /bin/install
894 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
895 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
896 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
897 # ./install, which can be erroneously created by make from ./install.sh.
898 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
899 echo "configure:900: checking for a BSD compatible install" >&5
900 if test -z "$INSTALL"; then
901 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
902   echo $ac_n "(cached) $ac_c" 1>&6
903 else
904     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
905   for ac_dir in $PATH; do
906     # Account for people who put trailing slashes in PATH elements.
907     case "$ac_dir/" in
908     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
909     *)
910       # OSF1 and SCO ODT 3.0 have their own names for install.
911       # Don't use installbsd from OSF since it installs stuff as root
912       # by default.
913       for ac_prog in ginstall scoinst install; do
914         if test -f $ac_dir/$ac_prog; then
915           if test $ac_prog = install &&
916             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
917             # AIX install.  It has an incompatible calling convention.
918             :
919           else
920             ac_cv_path_install="$ac_dir/$ac_prog -c"
921             break 2
922           fi
923         fi
924       done
925       ;;
926     esac
927   done
928   IFS="$ac_save_IFS"
929
930 fi
931   if test "${ac_cv_path_install+set}" = set; then
932     INSTALL="$ac_cv_path_install"
933   else
934     # As a last resort, use the slow shell script.  We don't cache a
935     # path for INSTALL within a source directory, because that will
936     # break other packages using the cache if that directory is
937     # removed, or if the path is relative.
938     INSTALL="$ac_install_sh"
939   fi
940 fi
941 echo "$ac_t""$INSTALL" 1>&6
942
943 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
944 # It thinks the first close brace ends the variable substitution.
945 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
946
947 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
948
949 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
950
951 for ac_prog in mawk gawk nawk awk
952 do
953 # Extract the first word of "$ac_prog", so it can be a program name with args.
954 set dummy $ac_prog; ac_word=$2
955 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
956 echo "configure:957: checking for $ac_word" >&5
957 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
958   echo $ac_n "(cached) $ac_c" 1>&6
959 else
960   if test -n "$AWK"; then
961   ac_cv_prog_AWK="$AWK" # Let the user override the test.
962 else
963   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
964   ac_dummy="$PATH"
965   for ac_dir in $ac_dummy; do
966     test -z "$ac_dir" && ac_dir=.
967     if test -f $ac_dir/$ac_word; then
968       ac_cv_prog_AWK="$ac_prog"
969       break
970     fi
971   done
972   IFS="$ac_save_ifs"
973 fi
974 fi
975 AWK="$ac_cv_prog_AWK"
976 if test -n "$AWK"; then
977   echo "$ac_t""$AWK" 1>&6
978 else
979   echo "$ac_t""no" 1>&6
980 fi
981
982 test -n "$AWK" && break
983 done
984
985 # Check whether --enable-shared or --disable-shared was given.
986 if test "${enable_shared+set}" = set; then
987   enableval="$enable_shared"
988   p=${PACKAGE-default}
989 case "$enableval" in
990 yes) enable_shared=yes ;;
991 no) enable_shared=no ;;
992 *)
993   enable_shared=no
994   # Look at the argument we got.  We use all the common list separators.
995   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
996   for pkg in $enableval; do
997     if test "X$pkg" = "X$p"; then
998       enable_shared=yes
999     fi
1000   done
1001   IFS="$ac_save_ifs"
1002   ;;
1003 esac
1004 else
1005   enable_shared=yes
1006 fi
1007
1008 # Check whether --enable-static or --disable-static was given.
1009 if test "${enable_static+set}" = set; then
1010   enableval="$enable_static"
1011   p=${PACKAGE-default}
1012 case "$enableval" in
1013 yes) enable_static=yes ;;
1014 no) enable_static=no ;;
1015 *)
1016   enable_static=no
1017   # Look at the argument we got.  We use all the common list separators.
1018   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1019   for pkg in $enableval; do
1020     if test "X$pkg" = "X$p"; then
1021       enable_static=yes
1022     fi
1023   done
1024   IFS="$ac_save_ifs"
1025   ;;
1026 esac
1027 else
1028   enable_static=yes
1029 fi
1030
1031 # Check whether --enable-fast-install or --disable-fast-install was given.
1032 if test "${enable_fast_install+set}" = set; then
1033   enableval="$enable_fast_install"
1034   p=${PACKAGE-default}
1035 case "$enableval" in
1036 yes) enable_fast_install=yes ;;
1037 no) enable_fast_install=no ;;
1038 *)
1039   enable_fast_install=no
1040   # Look at the argument we got.  We use all the common list separators.
1041   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1042   for pkg in $enableval; do
1043     if test "X$pkg" = "X$p"; then
1044       enable_fast_install=yes
1045     fi
1046   done
1047   IFS="$ac_save_ifs"
1048   ;;
1049 esac
1050 else
1051   enable_fast_install=yes
1052 fi
1053
1054
1055 # Make sure we can run config.sub.
1056 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1057 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1058 fi
1059
1060 echo $ac_n "checking host system type""... $ac_c" 1>&6
1061 echo "configure:1062: checking host system type" >&5
1062
1063 host_alias=$host
1064 case "$host_alias" in
1065 NONE)
1066   case $nonopt in
1067   NONE)
1068     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1069     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1070     fi ;;
1071   *) host_alias=$nonopt ;;
1072   esac ;;
1073 esac
1074
1075 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1076 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1077 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1078 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1079 echo "$ac_t""$host" 1>&6
1080
1081 echo $ac_n "checking build system type""... $ac_c" 1>&6
1082 echo "configure:1083: checking build system type" >&5
1083
1084 build_alias=$build
1085 case "$build_alias" in
1086 NONE)
1087   case $nonopt in
1088   NONE) build_alias=$host_alias ;;
1089   *) build_alias=$nonopt ;;
1090   esac ;;
1091 esac
1092
1093 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1094 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1095 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1096 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1097 echo "$ac_t""$build" 1>&6
1098
1099 # Extract the first word of "ranlib", so it can be a program name with args.
1100 set dummy ranlib; ac_word=$2
1101 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1102 echo "configure:1103: checking for $ac_word" >&5
1103 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1104   echo $ac_n "(cached) $ac_c" 1>&6
1105 else
1106   if test -n "$RANLIB"; then
1107   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1108 else
1109   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1110   ac_dummy="$PATH"
1111   for ac_dir in $ac_dummy; do
1112     test -z "$ac_dir" && ac_dir=.
1113     if test -f $ac_dir/$ac_word; then
1114       ac_cv_prog_RANLIB="ranlib"
1115       break
1116     fi
1117   done
1118   IFS="$ac_save_ifs"
1119   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1120 fi
1121 fi
1122 RANLIB="$ac_cv_prog_RANLIB"
1123 if test -n "$RANLIB"; then
1124   echo "$ac_t""$RANLIB" 1>&6
1125 else
1126   echo "$ac_t""no" 1>&6
1127 fi
1128
1129 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1130 if test "${with_gnu_ld+set}" = set; then
1131   withval="$with_gnu_ld"
1132   test "$withval" = no || with_gnu_ld=yes
1133 else
1134   with_gnu_ld=no
1135 fi
1136
1137 ac_prog=ld
1138 if test "$ac_cv_prog_gcc" = yes; then
1139   # Check if gcc -print-prog-name=ld gives a path.
1140   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1141 echo "configure:1142: checking for ld used by GCC" >&5
1142   ac_prog=`($CC -print-prog-name=ld) 2>&5`
1143   case "$ac_prog" in
1144     # Accept absolute paths.
1145     [\\/]* | [A-Za-z]:[\\/]*)
1146       re_direlt='/[^/][^/]*/\.\./'
1147       # Canonicalize the path of ld
1148       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1149       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1150         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1151       done
1152       test -z "$LD" && LD="$ac_prog"
1153       ;;
1154   "")
1155     # If it fails, then pretend we aren't using GCC.
1156     ac_prog=ld
1157     ;;
1158   *)
1159     # If it is relative, then search for the first ld in PATH.
1160     with_gnu_ld=unknown
1161     ;;
1162   esac
1163 elif test "$with_gnu_ld" = yes; then
1164   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1165 echo "configure:1166: checking for GNU ld" >&5
1166 else
1167   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1168 echo "configure:1169: checking for non-GNU ld" >&5
1169 fi
1170 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1171   echo $ac_n "(cached) $ac_c" 1>&6
1172 else
1173   if test -z "$LD"; then
1174   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1175   for ac_dir in $PATH; do
1176     test -z "$ac_dir" && ac_dir=.
1177     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1178       ac_cv_path_LD="$ac_dir/$ac_prog"
1179       # Check to see if the program is GNU ld.  I'd rather use --version,
1180       # but apparently some GNU ld's only accept -v.
1181       # Break only if it was the GNU/non-GNU ld that we prefer.
1182       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1183         test "$with_gnu_ld" != no && break
1184       else
1185         test "$with_gnu_ld" != yes && break
1186       fi
1187     fi
1188   done
1189   IFS="$ac_save_ifs"
1190 else
1191   ac_cv_path_LD="$LD" # Let the user override the test with a path.
1192 fi
1193 fi
1194
1195 LD="$ac_cv_path_LD"
1196 if test -n "$LD"; then
1197   echo "$ac_t""$LD" 1>&6
1198 else
1199   echo "$ac_t""no" 1>&6
1200 fi
1201 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1202 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1203 echo "configure:1204: checking if the linker ($LD) is GNU ld" >&5
1204 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1205   echo $ac_n "(cached) $ac_c" 1>&6
1206 else
1207   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1208 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1209   ac_cv_prog_gnu_ld=yes
1210 else
1211   ac_cv_prog_gnu_ld=no
1212 fi
1213 fi
1214
1215 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1216
1217
1218 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1219 echo "configure:1220: checking for BSD-compatible nm" >&5
1220 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1221   echo $ac_n "(cached) $ac_c" 1>&6
1222 else
1223   if test -n "$NM"; then
1224   # Let the user override the test.
1225   ac_cv_path_NM="$NM"
1226 else
1227   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1228   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1229     test -z "$ac_dir" && ac_dir=.
1230     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
1231       # Check to see if the nm accepts a BSD-compat flag.
1232       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1233       #   nm: unknown option "B" ignored
1234       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1235         ac_cv_path_NM="$ac_dir/nm -B"
1236         break
1237       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1238         ac_cv_path_NM="$ac_dir/nm -p"
1239         break
1240       else
1241         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1242         continue # so that we can try to find one that supports BSD flags
1243       fi
1244     fi
1245   done
1246   IFS="$ac_save_ifs"
1247   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1248 fi
1249 fi
1250
1251 NM="$ac_cv_path_NM"
1252 echo "$ac_t""$NM" 1>&6
1253
1254 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1255 echo "configure:1256: checking whether ln -s works" >&5
1256 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1257   echo $ac_n "(cached) $ac_c" 1>&6
1258 else
1259   rm -f conftestdata
1260 if ln -s X conftestdata 2>/dev/null
1261 then
1262   rm -f conftestdata
1263   ac_cv_prog_LN_S="ln -s"
1264 else
1265   ac_cv_prog_LN_S=ln
1266 fi
1267 fi
1268 LN_S="$ac_cv_prog_LN_S"
1269 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1270   echo "$ac_t""yes" 1>&6
1271 else
1272   echo "$ac_t""no" 1>&6
1273 fi
1274
1275
1276 case "$target" in
1277 NONE) lt_target="$host" ;;
1278 *) lt_target="$target" ;;
1279 esac
1280
1281 # Check for any special flags to pass to ltconfig.
1282 libtool_flags="--cache-file=$cache_file"
1283 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1284 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1285 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1286 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1287 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1288
1289
1290 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1291 if test "${enable_libtool_lock+set}" = set; then
1292   enableval="$enable_libtool_lock"
1293   :
1294 fi
1295
1296 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1297 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1298
1299 # Some flags need to be propagated to the compiler or linker for good
1300 # libtool support.
1301 case "$lt_target" in
1302 *-*-irix6*)
1303   # Find out which ABI we are using.
1304   echo '#line 1305 "configure"' > conftest.$ac_ext
1305   if { (eval echo configure:1306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1306     case "`/usr/bin/file conftest.o`" in
1307     *32-bit*)
1308       LD="${LD-ld} -32"
1309       ;;
1310     *N32*)
1311       LD="${LD-ld} -n32"
1312       ;;
1313     *64-bit*)
1314       LD="${LD-ld} -64"
1315       ;;
1316     esac
1317   fi
1318   rm -rf conftest*
1319   ;;
1320
1321 *-*-sco3.2v5*)
1322   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1323   SAVE_CFLAGS="$CFLAGS"
1324   CFLAGS="$CFLAGS -belf"
1325   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1326 echo "configure:1327: checking whether the C compiler needs -belf" >&5
1327 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1328   echo $ac_n "(cached) $ac_c" 1>&6
1329 else
1330   cat > conftest.$ac_ext <<EOF
1331 #line 1332 "configure"
1332 #include "confdefs.h"
1333
1334 int main() {
1335
1336 ; return 0; }
1337 EOF
1338 if { (eval echo configure:1339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1339   rm -rf conftest*
1340   lt_cv_cc_needs_belf=yes
1341 else
1342   echo "configure: failed program was:" >&5
1343   cat conftest.$ac_ext >&5
1344   rm -rf conftest*
1345   lt_cv_cc_needs_belf=no
1346 fi
1347 rm -f conftest*
1348 fi
1349
1350 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1351   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1352     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1353     CFLAGS="$SAVE_CFLAGS"
1354   fi
1355   ;;
1356
1357
1358 esac
1359
1360
1361 # Save cache, so that ltconfig can load it
1362 cat > confcache <<\EOF
1363 # This file is a shell script that caches the results of configure
1364 # tests run on this system so they can be shared between configure
1365 # scripts and configure runs.  It is not useful on other systems.
1366 # If it contains results you don't want to keep, you may remove or edit it.
1367 #
1368 # By default, configure uses ./config.cache as the cache file,
1369 # creating it if it does not exist already.  You can give configure
1370 # the --cache-file=FILE option to use a different cache file; that is
1371 # what configure does when it calls configure scripts in
1372 # subdirectories, so they share the cache.
1373 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1374 # config.status only pays attention to the cache file if you give it the
1375 # --recheck option to rerun configure.
1376 #
1377 EOF
1378 # The following way of writing the cache mishandles newlines in values,
1379 # but we know of no workaround that is simple, portable, and efficient.
1380 # So, don't put newlines in cache variables' values.
1381 # Ultrix sh set writes to stderr and can't be redirected directly,
1382 # and sets the high bit in the cache file unless we assign to the vars.
1383 (set) 2>&1 |
1384   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1385   *ac_space=\ *)
1386     # `set' does not quote correctly, so add quotes (double-quote substitution
1387     # turns \\\\ into \\, and sed turns \\ into \).
1388     sed -n \
1389       -e "s/'/'\\\\''/g" \
1390       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1391     ;;
1392   *)
1393     # `set' quotes correctly as required by POSIX, so do not add quotes.
1394     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1395     ;;
1396   esac >> confcache
1397 if cmp -s $cache_file confcache; then
1398   :
1399 else
1400   if test -w $cache_file; then
1401     echo "updating cache $cache_file"
1402     cat confcache > $cache_file
1403   else
1404     echo "not updating unwritable cache $cache_file"
1405   fi
1406 fi
1407 rm -f confcache
1408
1409
1410 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
1411 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1412 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1413 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1414 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
1415 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1416 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
1417 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1418
1419 # Reload cache, that may have been modified by ltconfig
1420 if test -r "$cache_file"; then
1421   echo "loading cache $cache_file"
1422   . $cache_file
1423 else
1424   echo "creating cache $cache_file"
1425   > $cache_file
1426 fi
1427
1428
1429 # This can be used to rebuild libtool when needed
1430 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1431
1432 # Always use our own libtool.
1433 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1434
1435 # Redirect the config.log output again, so that the ltconfig log is not
1436 # clobbered by the next message.
1437 exec 5>>./config.log
1438
1439
1440
1441 if test "x$CC" != xcc; then
1442   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1443 echo "configure:1444: checking whether $CC and cc understand -c and -o together" >&5
1444 else
1445   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1446 echo "configure:1447: checking whether cc understands -c and -o together" >&5
1447 fi
1448 set dummy $CC; ac_cc="`echo $2 |
1449                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1450 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1451   echo $ac_n "(cached) $ac_c" 1>&6
1452 else
1453   echo 'foo(){}' > conftest.c
1454 # Make sure it works both with $CC and with simple cc.
1455 # We do the test twice because some compilers refuse to overwrite an
1456 # existing .o file with -o, though they will create one.
1457 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1458 if { (eval echo configure:1459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1459    test -f conftest.o && { (eval echo configure:1460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1460 then
1461   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1462   if test "x$CC" != xcc; then
1463     # Test first that cc exists at all.
1464     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1465       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1466       if { (eval echo configure:1467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1467          test -f conftest.o && { (eval echo configure:1468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1468       then
1469         # cc works too.
1470         :
1471       else
1472         # cc exists but doesn't like -o.
1473         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1474       fi
1475     fi
1476   fi
1477 else
1478   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1479 fi
1480 rm -f conftest*
1481
1482 fi
1483 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1484   echo "$ac_t""yes" 1>&6
1485 else
1486   echo "$ac_t""no" 1>&6
1487   cat >> confdefs.h <<\EOF
1488 #define NO_MINUS_C_MINUS_O 1
1489 EOF
1490
1491 fi
1492
1493 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1494       BROKEN_CC=
1495 else
1496       BROKEN_CC=#
1497 fi
1498
1499
1500 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1501 echo "configure:1502: checking that the C compiler understands volatile" >&5
1502 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1503   echo $ac_n "(cached) $ac_c" 1>&6
1504 else
1505   
1506     cat > conftest.$ac_ext <<EOF
1507 #line 1508 "configure"
1508 #include "confdefs.h"
1509 #include <sys/types.h>
1510 int main() {
1511 volatile int i = 0
1512 ; return 0; }
1513 EOF
1514 if { (eval echo configure:1515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1515   rm -rf conftest*
1516   samba_cv_volatile=yes
1517 else
1518   echo "configure: failed program was:" >&5
1519   cat conftest.$ac_ext >&5
1520   rm -rf conftest*
1521   samba_cv_volatile=no
1522 fi
1523 rm -f conftest*
1524 fi
1525
1526 echo "$ac_t""$samba_cv_volatile" 1>&6
1527 if test x"$samba_cv_volatile" = x"yes"; then
1528    cat >> confdefs.h <<\EOF
1529 #define HAVE_VOLATILE 1
1530 EOF
1531
1532 fi
1533
1534
1535 #################################################
1536 # set codepage directory location
1537 # Check whether --with-codepagedir or --without-codepagedir was given.
1538 if test "${with_codepagedir+set}" = set; then
1539   withval="$with_codepagedir"
1540    case "$withval" in
1541   yes|no)
1542   #
1543   # Just in case anybody does it
1544   #
1545     echo "configure: warning: --with-codepagedir called without argument - will use default" 1>&2
1546   ;;
1547   * )
1548     codepagedir="$withval"
1549     ;;
1550   esac
1551 fi
1552
1553
1554
1555
1556 # Do some error checking and defaulting for the host and target type.
1557 # The inputs are:
1558 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1559 #
1560 # The rules are:
1561 # 1. You are not allowed to specify --host, --target, and nonopt at the
1562 #    same time.
1563 # 2. Host defaults to nonopt.
1564 # 3. If nonopt is not specified, then host defaults to the current host,
1565 #    as determined by config.guess.
1566 # 4. Target and build default to nonopt.
1567 # 5. If nonopt is not specified, then target and build default to host.
1568
1569 # The aliases save the names the user supplied, while $host etc.
1570 # will get canonicalized.
1571 case $host---$target---$nonopt in
1572 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1573 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1574 esac
1575
1576
1577 # Make sure we can run config.sub.
1578 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1579 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1580 fi
1581
1582 echo $ac_n "checking host system type""... $ac_c" 1>&6
1583 echo "configure:1584: checking host system type" >&5
1584
1585 host_alias=$host
1586 case "$host_alias" in
1587 NONE)
1588   case $nonopt in
1589   NONE)
1590     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1591     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1592     fi ;;
1593   *) host_alias=$nonopt ;;
1594   esac ;;
1595 esac
1596
1597 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1598 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1599 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1600 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1601 echo "$ac_t""$host" 1>&6
1602
1603 echo $ac_n "checking target system type""... $ac_c" 1>&6
1604 echo "configure:1605: checking target system type" >&5
1605
1606 target_alias=$target
1607 case "$target_alias" in
1608 NONE)
1609   case $nonopt in
1610   NONE) target_alias=$host_alias ;;
1611   *) target_alias=$nonopt ;;
1612   esac ;;
1613 esac
1614
1615 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1616 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1617 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1618 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1619 echo "$ac_t""$target" 1>&6
1620
1621 echo $ac_n "checking build system type""... $ac_c" 1>&6
1622 echo "configure:1623: checking build system type" >&5
1623
1624 build_alias=$build
1625 case "$build_alias" in
1626 NONE)
1627   case $nonopt in
1628   NONE) build_alias=$host_alias ;;
1629   *) build_alias=$nonopt ;;
1630   esac ;;
1631 esac
1632
1633 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1634 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1635 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1636 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1637 echo "$ac_t""$build" 1>&6
1638
1639 test "$host_alias" != "$target_alias" &&
1640   test "$program_prefix$program_suffix$program_transform_name" = \
1641     NONENONEs,x,x, &&
1642   program_prefix=${target_alias}-
1643
1644
1645   case "$host_os" in
1646         *irix6*) cat >> confdefs.h <<\EOF
1647 #include <standards.h>
1648 EOF
1649
1650         ;;
1651 esac
1652
1653
1654     
1655     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1656 echo "configure:1657: checking config.cache system type" >&5
1657     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1658          test x"$ac_cv_host_system_type" != x"$host"; } ||
1659        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1660          test x"$ac_cv_build_system_type" != x"$build"; } ||
1661        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1662          test x"$ac_cv_target_system_type" != x"$target"; }; then
1663         echo "$ac_t""different" 1>&6
1664         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1665     else
1666         echo "$ac_t""same" 1>&6
1667     fi
1668     ac_cv_host_system_type="$host"
1669     ac_cv_build_system_type="$build"
1670     ac_cv_target_system_type="$target"
1671
1672
1673 #
1674 # Config CPPFLAG settings for strange OS's that must be set
1675 # before other tests.
1676 #
1677 case "$host_os" in
1678 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1679     *hpux*)
1680       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1681 echo "configure:1682: checking whether ${CC-cc} accepts -Ae" >&5
1682 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1683   echo $ac_n "(cached) $ac_c" 1>&6
1684 else
1685   echo 'void f(){}' > conftest.c
1686 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1687   ac_cv_prog_cc_Ae=yes
1688 else
1689   ac_cv_prog_cc_Ae=no
1690 fi
1691 rm -f conftest*
1692
1693 fi
1694
1695 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1696       if test $ac_cv_prog_cc_Ae = yes; then
1697         CPPFLAGS="$CPPFLAGS -Ae"
1698       fi
1699 #
1700 # Defines needed for HPUX support.
1701 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1702 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1703 #
1704       case `uname -r` in
1705                         *9*|*10*)
1706                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
1707                                 cat >> confdefs.h <<\EOF
1708 #define USE_BOTH_CRYPT_CALLS 1
1709 EOF
1710
1711                                 ;;
1712                         *11*)
1713                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
1714                                 cat >> confdefs.h <<\EOF
1715 #define USE_BOTH_CRYPT_CALLS 1
1716 EOF
1717
1718                                 ;;
1719       esac
1720       ;;
1721 #
1722 # AIX4.x doesn't even admit to having large
1723 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1724 #
1725     *aix4*)
1726           echo "$ac_t""enabling large file support" 1>&6
1727       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1728       ;;    
1729 #
1730 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1731 # to the existance of large files..
1732 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1733 # recommendations on large file support, however it makes the
1734 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1735 # recommendation makes the compile fail on gcc2.7. JRA.
1736 #
1737         *solaris*)
1738                 case `uname -r` in
1739                         5.6*|5.7*)
1740                         echo "$ac_t""enabling large file support" 1>&6
1741                         if test "$ac_cv_prog_gcc" = yes; then
1742                                 ${CC-cc} -v >conftest.c 2>&1
1743                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1744                                 rm -fr conftest.c
1745                                 case "$ac_cv_gcc_compiler_version_number" in
1746                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1747                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1748                                                 ;;
1749                                         *)
1750                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1751                                                 ;;
1752                                 esac
1753                         else
1754                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1755                         fi
1756                         ;;
1757                 esac
1758                 ;;
1759 #
1760 # Tests needed for SINIX large file support.
1761 #
1762     *sysv4*)
1763       if test $host = mips-sni-sysv4 ; then
1764         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1765 echo "configure:1766: checking for LFS support" >&5
1766         old_CPPFLAGS="$CPPFLAGS"
1767         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1768         if test "$cross_compiling" = yes; then
1769   SINIX_LFS_SUPPORT=cross
1770 else
1771   cat > conftest.$ac_ext <<EOF
1772 #line 1773 "configure"
1773 #include "confdefs.h"
1774
1775 #include <unistd.h>
1776 main () {
1777 #if _LFS64_LARGEFILE == 1
1778 exit(0);
1779 #else
1780 exit(1);
1781 #endif
1782 }
1783 EOF
1784 if { (eval echo configure:1785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1785 then
1786   SINIX_LFS_SUPPORT=yes
1787 else
1788   echo "configure: failed program was:" >&5
1789   cat conftest.$ac_ext >&5
1790   rm -fr conftest*
1791   SINIX_LFS_SUPPORT=no
1792 fi
1793 rm -fr conftest*
1794 fi
1795
1796         CPPFLAGS="$old_CPPFLAGS"
1797         if test x$SINIX_LFS_SUPPORT = xyes ; then
1798           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1799           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1800           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1801           LIBS="`getconf LFS64_LIBS` $LIBS"
1802         fi
1803       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1804       fi
1805     ;;
1806
1807 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1808 #
1809     *linux*)
1810         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1811 echo "configure:1812: checking for LFS support" >&5
1812         old_CPPFLAGS="$CPPFLAGS"
1813         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1814        if test "$cross_compiling" = yes; then
1815   LINUX_LFS_SUPPORT=cross
1816 else
1817   cat > conftest.$ac_ext <<EOF
1818 #line 1819 "configure"
1819 #include "confdefs.h"
1820
1821 #include <unistd.h>
1822 #include <sys/utsname.h>
1823 main() {
1824 #if _LFS64_LARGEFILE == 1
1825        struct utsname uts;
1826        char *release;
1827        int major, minor;
1828
1829        /* Ensure this is glibc 2.2 or higher */
1830 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1831        int libc_major = __GLIBC__;
1832        int libc_minor = __GLIBC_MINOR__;
1833
1834        if (libc_major < 2)
1835               exit(1);
1836        if (libc_minor < 2)
1837               exit(1);
1838 #endif
1839
1840        /* Ensure this is kernel 2.4 or higher */
1841
1842        uname(&uts);
1843        release = uts.release;
1844        major = atoi(strsep(&release, "."));
1845        minor = atoi(strsep(&release, "."));
1846
1847        if (major > 2 || (major == 2 && minor > 3))
1848                exit(0);
1849        exit(1);
1850 #else
1851        exit(1);
1852 #endif
1853 }
1854
1855 EOF
1856 if { (eval echo configure:1857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1857 then
1858   LINUX_LFS_SUPPORT=yes
1859 else
1860   echo "configure: failed program was:" >&5
1861   cat conftest.$ac_ext >&5
1862   rm -fr conftest*
1863   LINUX_LFS_SUPPORT=no
1864 fi
1865 rm -fr conftest*
1866 fi
1867
1868         CPPFLAGS="$old_CPPFLAGS"
1869         if test x$LINUX_LFS_SUPPORT = xyes ; then
1870           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1871         fi
1872        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1873                 ;;
1874
1875     *hurd*)
1876         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1877 echo "configure:1878: checking for LFS support" >&5
1878         old_CPPFLAGS="$CPPFLAGS"
1879         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1880         if test "$cross_compiling" = yes; then
1881   GLIBC_LFS_SUPPORT=cross
1882 else
1883   cat > conftest.$ac_ext <<EOF
1884 #line 1885 "configure"
1885 #include "confdefs.h"
1886
1887 #include <unistd.h>
1888 main () {
1889 #if _LFS64_LARGEFILE == 1
1890 exit(0);
1891 #else
1892 exit(1);
1893 #endif
1894 }
1895 EOF
1896 if { (eval echo configure:1897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1897 then
1898   GLIBC_LFS_SUPPORT=yes
1899 else
1900   echo "configure: failed program was:" >&5
1901   cat conftest.$ac_ext >&5
1902   rm -fr conftest*
1903   GLIBC_LFS_SUPPORT=no
1904 fi
1905 rm -fr conftest*
1906 fi
1907
1908         CPPFLAGS="$old_CPPFLAGS"
1909         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1910           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1911         fi
1912       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1913     ;;
1914
1915 esac
1916
1917 echo $ac_n "checking for inline""... $ac_c" 1>&6
1918 echo "configure:1919: checking for inline" >&5
1919 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1920   echo $ac_n "(cached) $ac_c" 1>&6
1921 else
1922   ac_cv_c_inline=no
1923 for ac_kw in inline __inline__ __inline; do
1924   cat > conftest.$ac_ext <<EOF
1925 #line 1926 "configure"
1926 #include "confdefs.h"
1927
1928 int main() {
1929 } $ac_kw foo() {
1930 ; return 0; }
1931 EOF
1932 if { (eval echo configure:1933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1933   rm -rf conftest*
1934   ac_cv_c_inline=$ac_kw; break
1935 else
1936   echo "configure: failed program was:" >&5
1937   cat conftest.$ac_ext >&5
1938 fi
1939 rm -f conftest*
1940 done
1941
1942 fi
1943
1944 echo "$ac_t""$ac_cv_c_inline" 1>&6
1945 case "$ac_cv_c_inline" in
1946   inline | yes) ;;
1947   no) cat >> confdefs.h <<\EOF
1948 #define inline 
1949 EOF
1950  ;;
1951   *)  cat >> confdefs.h <<EOF
1952 #define inline $ac_cv_c_inline
1953 EOF
1954  ;;
1955 esac
1956
1957 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1958 echo "configure:1959: checking how to run the C preprocessor" >&5
1959 # On Suns, sometimes $CPP names a directory.
1960 if test -n "$CPP" && test -d "$CPP"; then
1961   CPP=
1962 fi
1963 if test -z "$CPP"; then
1964 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1965   echo $ac_n "(cached) $ac_c" 1>&6
1966 else
1967     # This must be in double quotes, not single quotes, because CPP may get
1968   # substituted into the Makefile and "${CC-cc}" will confuse make.
1969   CPP="${CC-cc} -E"
1970   # On the NeXT, cc -E runs the code through the compiler's parser,
1971   # not just through cpp.
1972   cat > conftest.$ac_ext <<EOF
1973 #line 1974 "configure"
1974 #include "confdefs.h"
1975 #include <assert.h>
1976 Syntax Error
1977 EOF
1978 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1979 { (eval echo configure:1980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1980 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1981 if test -z "$ac_err"; then
1982   :
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   CPP="${CC-cc} -E -traditional-cpp"
1989   cat > conftest.$ac_ext <<EOF
1990 #line 1991 "configure"
1991 #include "confdefs.h"
1992 #include <assert.h>
1993 Syntax Error
1994 EOF
1995 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1996 { (eval echo configure:1997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1997 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1998 if test -z "$ac_err"; then
1999   :
2000 else
2001   echo "$ac_err" >&5
2002   echo "configure: failed program was:" >&5
2003   cat conftest.$ac_ext >&5
2004   rm -rf conftest*
2005   CPP="${CC-cc} -nologo -E"
2006   cat > conftest.$ac_ext <<EOF
2007 #line 2008 "configure"
2008 #include "confdefs.h"
2009 #include <assert.h>
2010 Syntax Error
2011 EOF
2012 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2013 { (eval echo configure:2014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2014 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2015 if test -z "$ac_err"; then
2016   :
2017 else
2018   echo "$ac_err" >&5
2019   echo "configure: failed program was:" >&5
2020   cat conftest.$ac_ext >&5
2021   rm -rf conftest*
2022   CPP=/lib/cpp
2023 fi
2024 rm -f conftest*
2025 fi
2026 rm -f conftest*
2027 fi
2028 rm -f conftest*
2029   ac_cv_prog_CPP="$CPP"
2030 fi
2031   CPP="$ac_cv_prog_CPP"
2032 else
2033   ac_cv_prog_CPP="$CPP"
2034 fi
2035 echo "$ac_t""$CPP" 1>&6
2036
2037 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2038 echo "configure:2039: checking for ANSI C header files" >&5
2039 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2040   echo $ac_n "(cached) $ac_c" 1>&6
2041 else
2042   cat > conftest.$ac_ext <<EOF
2043 #line 2044 "configure"
2044 #include "confdefs.h"
2045 #include <stdlib.h>
2046 #include <stdarg.h>
2047 #include <string.h>
2048 #include <float.h>
2049 EOF
2050 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2051 { (eval echo configure:2052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2052 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2053 if test -z "$ac_err"; then
2054   rm -rf conftest*
2055   ac_cv_header_stdc=yes
2056 else
2057   echo "$ac_err" >&5
2058   echo "configure: failed program was:" >&5
2059   cat conftest.$ac_ext >&5
2060   rm -rf conftest*
2061   ac_cv_header_stdc=no
2062 fi
2063 rm -f conftest*
2064
2065 if test $ac_cv_header_stdc = yes; then
2066   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2067 cat > conftest.$ac_ext <<EOF
2068 #line 2069 "configure"
2069 #include "confdefs.h"
2070 #include <string.h>
2071 EOF
2072 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2073   egrep "memchr" >/dev/null 2>&1; then
2074   :
2075 else
2076   rm -rf conftest*
2077   ac_cv_header_stdc=no
2078 fi
2079 rm -f conftest*
2080
2081 fi
2082
2083 if test $ac_cv_header_stdc = yes; then
2084   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2085 cat > conftest.$ac_ext <<EOF
2086 #line 2087 "configure"
2087 #include "confdefs.h"
2088 #include <stdlib.h>
2089 EOF
2090 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2091   egrep "free" >/dev/null 2>&1; then
2092   :
2093 else
2094   rm -rf conftest*
2095   ac_cv_header_stdc=no
2096 fi
2097 rm -f conftest*
2098
2099 fi
2100
2101 if test $ac_cv_header_stdc = yes; then
2102   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2103 if test "$cross_compiling" = yes; then
2104   :
2105 else
2106   cat > conftest.$ac_ext <<EOF
2107 #line 2108 "configure"
2108 #include "confdefs.h"
2109 #include <ctype.h>
2110 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2111 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2112 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2113 int main () { int i; for (i = 0; i < 256; i++)
2114 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2115 exit (0); }
2116
2117 EOF
2118 if { (eval echo configure:2119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2119 then
2120   :
2121 else
2122   echo "configure: failed program was:" >&5
2123   cat conftest.$ac_ext >&5
2124   rm -fr conftest*
2125   ac_cv_header_stdc=no
2126 fi
2127 rm -fr conftest*
2128 fi
2129
2130 fi
2131 fi
2132
2133 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2134 if test $ac_cv_header_stdc = yes; then
2135   cat >> confdefs.h <<\EOF
2136 #define STDC_HEADERS 1
2137 EOF
2138
2139 fi
2140
2141 ac_header_dirent=no
2142 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2143 do
2144 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2145 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
2146 echo "configure:2147: checking for $ac_hdr that defines DIR" >&5
2147 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2148   echo $ac_n "(cached) $ac_c" 1>&6
2149 else
2150   cat > conftest.$ac_ext <<EOF
2151 #line 2152 "configure"
2152 #include "confdefs.h"
2153 #include <sys/types.h>
2154 #include <$ac_hdr>
2155 int main() {
2156 DIR *dirp = 0;
2157 ; return 0; }
2158 EOF
2159 if { (eval echo configure:2160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2160   rm -rf conftest*
2161   eval "ac_cv_header_dirent_$ac_safe=yes"
2162 else
2163   echo "configure: failed program was:" >&5
2164   cat conftest.$ac_ext >&5
2165   rm -rf conftest*
2166   eval "ac_cv_header_dirent_$ac_safe=no"
2167 fi
2168 rm -f conftest*
2169 fi
2170 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2171   echo "$ac_t""yes" 1>&6
2172     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2173   cat >> confdefs.h <<EOF
2174 #define $ac_tr_hdr 1
2175 EOF
2176  ac_header_dirent=$ac_hdr; break
2177 else
2178   echo "$ac_t""no" 1>&6
2179 fi
2180 done
2181 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2182 if test $ac_header_dirent = dirent.h; then
2183 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2184 echo "configure:2185: checking for opendir in -ldir" >&5
2185 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2186 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2187   echo $ac_n "(cached) $ac_c" 1>&6
2188 else
2189   ac_save_LIBS="$LIBS"
2190 LIBS="-ldir  $LIBS"
2191 cat > conftest.$ac_ext <<EOF
2192 #line 2193 "configure"
2193 #include "confdefs.h"
2194 /* Override any gcc2 internal prototype to avoid an error.  */
2195 /* We use char because int might match the return type of a gcc2
2196     builtin and then its argument prototype would still apply.  */
2197 char opendir();
2198
2199 int main() {
2200 opendir()
2201 ; return 0; }
2202 EOF
2203 if { (eval echo configure:2204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2204   rm -rf conftest*
2205   eval "ac_cv_lib_$ac_lib_var=yes"
2206 else
2207   echo "configure: failed program was:" >&5
2208   cat conftest.$ac_ext >&5
2209   rm -rf conftest*
2210   eval "ac_cv_lib_$ac_lib_var=no"
2211 fi
2212 rm -f conftest*
2213 LIBS="$ac_save_LIBS"
2214
2215 fi
2216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2217   echo "$ac_t""yes" 1>&6
2218   LIBS="$LIBS -ldir"
2219 else
2220   echo "$ac_t""no" 1>&6
2221 fi
2222
2223 else
2224 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2225 echo "configure:2226: checking for opendir in -lx" >&5
2226 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2227 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2228   echo $ac_n "(cached) $ac_c" 1>&6
2229 else
2230   ac_save_LIBS="$LIBS"
2231 LIBS="-lx  $LIBS"
2232 cat > conftest.$ac_ext <<EOF
2233 #line 2234 "configure"
2234 #include "confdefs.h"
2235 /* Override any gcc2 internal prototype to avoid an error.  */
2236 /* We use char because int might match the return type of a gcc2
2237     builtin and then its argument prototype would still apply.  */
2238 char opendir();
2239
2240 int main() {
2241 opendir()
2242 ; return 0; }
2243 EOF
2244 if { (eval echo configure:2245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2245   rm -rf conftest*
2246   eval "ac_cv_lib_$ac_lib_var=yes"
2247 else
2248   echo "configure: failed program was:" >&5
2249   cat conftest.$ac_ext >&5
2250   rm -rf conftest*
2251   eval "ac_cv_lib_$ac_lib_var=no"
2252 fi
2253 rm -f conftest*
2254 LIBS="$ac_save_LIBS"
2255
2256 fi
2257 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2258   echo "$ac_t""yes" 1>&6
2259   LIBS="$LIBS -lx"
2260 else
2261   echo "$ac_t""no" 1>&6
2262 fi
2263
2264 fi
2265
2266 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2267 echo "configure:2268: checking whether time.h and sys/time.h may both be included" >&5
2268 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2269   echo $ac_n "(cached) $ac_c" 1>&6
2270 else
2271   cat > conftest.$ac_ext <<EOF
2272 #line 2273 "configure"
2273 #include "confdefs.h"
2274 #include <sys/types.h>
2275 #include <sys/time.h>
2276 #include <time.h>
2277 int main() {
2278 struct tm *tp;
2279 ; return 0; }
2280 EOF
2281 if { (eval echo configure:2282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2282   rm -rf conftest*
2283   ac_cv_header_time=yes
2284 else
2285   echo "configure: failed program was:" >&5
2286   cat conftest.$ac_ext >&5
2287   rm -rf conftest*
2288   ac_cv_header_time=no
2289 fi
2290 rm -f conftest*
2291 fi
2292
2293 echo "$ac_t""$ac_cv_header_time" 1>&6
2294 if test $ac_cv_header_time = yes; then
2295   cat >> confdefs.h <<\EOF
2296 #define TIME_WITH_SYS_TIME 1
2297 EOF
2298
2299 fi
2300
2301 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2302 echo "configure:2303: checking for sys/wait.h that is POSIX.1 compatible" >&5
2303 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2304   echo $ac_n "(cached) $ac_c" 1>&6
2305 else
2306   cat > conftest.$ac_ext <<EOF
2307 #line 2308 "configure"
2308 #include "confdefs.h"
2309 #include <sys/types.h>
2310 #include <sys/wait.h>
2311 #ifndef WEXITSTATUS
2312 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2313 #endif
2314 #ifndef WIFEXITED
2315 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2316 #endif
2317 int main() {
2318 int s;
2319 wait (&s);
2320 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2321 ; return 0; }
2322 EOF
2323 if { (eval echo configure:2324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2324   rm -rf conftest*
2325   ac_cv_header_sys_wait_h=yes
2326 else
2327   echo "configure: failed program was:" >&5
2328   cat conftest.$ac_ext >&5
2329   rm -rf conftest*
2330   ac_cv_header_sys_wait_h=no
2331 fi
2332 rm -f conftest*
2333 fi
2334
2335 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2336 if test $ac_cv_header_sys_wait_h = yes; then
2337   cat >> confdefs.h <<\EOF
2338 #define HAVE_SYS_WAIT_H 1
2339 EOF
2340
2341 fi
2342
2343 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
2344 do
2345 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2346 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2347 echo "configure:2348: checking for $ac_hdr" >&5
2348 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2349   echo $ac_n "(cached) $ac_c" 1>&6
2350 else
2351   cat > conftest.$ac_ext <<EOF
2352 #line 2353 "configure"
2353 #include "confdefs.h"
2354 #include <$ac_hdr>
2355 EOF
2356 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2357 { (eval echo configure:2358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2358 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2359 if test -z "$ac_err"; then
2360   rm -rf conftest*
2361   eval "ac_cv_header_$ac_safe=yes"
2362 else
2363   echo "$ac_err" >&5
2364   echo "configure: failed program was:" >&5
2365   cat conftest.$ac_ext >&5
2366   rm -rf conftest*
2367   eval "ac_cv_header_$ac_safe=no"
2368 fi
2369 rm -f conftest*
2370 fi
2371 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2372   echo "$ac_t""yes" 1>&6
2373     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2374   cat >> confdefs.h <<EOF
2375 #define $ac_tr_hdr 1
2376 EOF
2377  
2378 else
2379   echo "$ac_t""no" 1>&6
2380 fi
2381 done
2382
2383 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
2384 do
2385 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2386 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2387 echo "configure:2388: checking for $ac_hdr" >&5
2388 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2389   echo $ac_n "(cached) $ac_c" 1>&6
2390 else
2391   cat > conftest.$ac_ext <<EOF
2392 #line 2393 "configure"
2393 #include "confdefs.h"
2394 #include <$ac_hdr>
2395 EOF
2396 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2397 { (eval echo configure:2398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2398 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2399 if test -z "$ac_err"; then
2400   rm -rf conftest*
2401   eval "ac_cv_header_$ac_safe=yes"
2402 else
2403   echo "$ac_err" >&5
2404   echo "configure: failed program was:" >&5
2405   cat conftest.$ac_ext >&5
2406   rm -rf conftest*
2407   eval "ac_cv_header_$ac_safe=no"
2408 fi
2409 rm -f conftest*
2410 fi
2411 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2412   echo "$ac_t""yes" 1>&6
2413     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2414   cat >> confdefs.h <<EOF
2415 #define $ac_tr_hdr 1
2416 EOF
2417  
2418 else
2419   echo "$ac_t""no" 1>&6
2420 fi
2421 done
2422
2423 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
2424 do
2425 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2426 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2427 echo "configure:2428: checking for $ac_hdr" >&5
2428 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2429   echo $ac_n "(cached) $ac_c" 1>&6
2430 else
2431   cat > conftest.$ac_ext <<EOF
2432 #line 2433 "configure"
2433 #include "confdefs.h"
2434 #include <$ac_hdr>
2435 EOF
2436 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2437 { (eval echo configure:2438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2438 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2439 if test -z "$ac_err"; then
2440   rm -rf conftest*
2441   eval "ac_cv_header_$ac_safe=yes"
2442 else
2443   echo "$ac_err" >&5
2444   echo "configure: failed program was:" >&5
2445   cat conftest.$ac_ext >&5
2446   rm -rf conftest*
2447   eval "ac_cv_header_$ac_safe=no"
2448 fi
2449 rm -f conftest*
2450 fi
2451 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2452   echo "$ac_t""yes" 1>&6
2453     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2454   cat >> confdefs.h <<EOF
2455 #define $ac_tr_hdr 1
2456 EOF
2457  
2458 else
2459   echo "$ac_t""no" 1>&6
2460 fi
2461 done
2462
2463 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
2464 do
2465 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2466 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2467 echo "configure:2468: checking for $ac_hdr" >&5
2468 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2469   echo $ac_n "(cached) $ac_c" 1>&6
2470 else
2471   cat > conftest.$ac_ext <<EOF
2472 #line 2473 "configure"
2473 #include "confdefs.h"
2474 #include <$ac_hdr>
2475 EOF
2476 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2477 { (eval echo configure:2478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2478 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2479 if test -z "$ac_err"; then
2480   rm -rf conftest*
2481   eval "ac_cv_header_$ac_safe=yes"
2482 else
2483   echo "$ac_err" >&5
2484   echo "configure: failed program was:" >&5
2485   cat conftest.$ac_ext >&5
2486   rm -rf conftest*
2487   eval "ac_cv_header_$ac_safe=no"
2488 fi
2489 rm -f conftest*
2490 fi
2491 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2492   echo "$ac_t""yes" 1>&6
2493     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2494   cat >> confdefs.h <<EOF
2495 #define $ac_tr_hdr 1
2496 EOF
2497  
2498 else
2499   echo "$ac_t""no" 1>&6
2500 fi
2501 done
2502
2503 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
2504 do
2505 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2506 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2507 echo "configure:2508: checking for $ac_hdr" >&5
2508 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2509   echo $ac_n "(cached) $ac_c" 1>&6
2510 else
2511   cat > conftest.$ac_ext <<EOF
2512 #line 2513 "configure"
2513 #include "confdefs.h"
2514 #include <$ac_hdr>
2515 EOF
2516 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2517 { (eval echo configure:2518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2518 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2519 if test -z "$ac_err"; then
2520   rm -rf conftest*
2521   eval "ac_cv_header_$ac_safe=yes"
2522 else
2523   echo "$ac_err" >&5
2524   echo "configure: failed program was:" >&5
2525   cat conftest.$ac_ext >&5
2526   rm -rf conftest*
2527   eval "ac_cv_header_$ac_safe=no"
2528 fi
2529 rm -f conftest*
2530 fi
2531 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2532   echo "$ac_t""yes" 1>&6
2533     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2534   cat >> confdefs.h <<EOF
2535 #define $ac_tr_hdr 1
2536 EOF
2537  
2538 else
2539   echo "$ac_t""no" 1>&6
2540 fi
2541 done
2542
2543 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2544 do
2545 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2546 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2547 echo "configure:2548: checking for $ac_hdr" >&5
2548 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2549   echo $ac_n "(cached) $ac_c" 1>&6
2550 else
2551   cat > conftest.$ac_ext <<EOF
2552 #line 2553 "configure"
2553 #include "confdefs.h"
2554 #include <$ac_hdr>
2555 EOF
2556 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2557 { (eval echo configure:2558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2558 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2559 if test -z "$ac_err"; then
2560   rm -rf conftest*
2561   eval "ac_cv_header_$ac_safe=yes"
2562 else
2563   echo "$ac_err" >&5
2564   echo "configure: failed program was:" >&5
2565   cat conftest.$ac_ext >&5
2566   rm -rf conftest*
2567   eval "ac_cv_header_$ac_safe=no"
2568 fi
2569 rm -f conftest*
2570 fi
2571 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2572   echo "$ac_t""yes" 1>&6
2573     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2574   cat >> confdefs.h <<EOF
2575 #define $ac_tr_hdr 1
2576 EOF
2577  
2578 else
2579   echo "$ac_t""no" 1>&6
2580 fi
2581 done
2582
2583 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2584 do
2585 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2586 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2587 echo "configure:2588: checking for $ac_hdr" >&5
2588 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2589   echo $ac_n "(cached) $ac_c" 1>&6
2590 else
2591   cat > conftest.$ac_ext <<EOF
2592 #line 2593 "configure"
2593 #include "confdefs.h"
2594 #include <$ac_hdr>
2595 EOF
2596 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2597 { (eval echo configure:2598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2598 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2599 if test -z "$ac_err"; then
2600   rm -rf conftest*
2601   eval "ac_cv_header_$ac_safe=yes"
2602 else
2603   echo "$ac_err" >&5
2604   echo "configure: failed program was:" >&5
2605   cat conftest.$ac_ext >&5
2606   rm -rf conftest*
2607   eval "ac_cv_header_$ac_safe=no"
2608 fi
2609 rm -f conftest*
2610 fi
2611 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2612   echo "$ac_t""yes" 1>&6
2613     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2614   cat >> confdefs.h <<EOF
2615 #define $ac_tr_hdr 1
2616 EOF
2617  
2618 else
2619   echo "$ac_t""no" 1>&6
2620 fi
2621 done
2622
2623 for ac_hdr in security/pam_modules.h security/_pam_macros.h
2624 do
2625 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2626 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2627 echo "configure:2628: checking for $ac_hdr" >&5
2628 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2629   echo $ac_n "(cached) $ac_c" 1>&6
2630 else
2631   cat > conftest.$ac_ext <<EOF
2632 #line 2633 "configure"
2633 #include "confdefs.h"
2634 #include <$ac_hdr>
2635 EOF
2636 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2637 { (eval echo configure:2638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2638 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2639 if test -z "$ac_err"; then
2640   rm -rf conftest*
2641   eval "ac_cv_header_$ac_safe=yes"
2642 else
2643   echo "$ac_err" >&5
2644   echo "configure: failed program was:" >&5
2645   cat conftest.$ac_ext >&5
2646   rm -rf conftest*
2647   eval "ac_cv_header_$ac_safe=no"
2648 fi
2649 rm -f conftest*
2650 fi
2651 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2652   echo "$ac_t""yes" 1>&6
2653     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2654   cat >> confdefs.h <<EOF
2655 #define $ac_tr_hdr 1
2656 EOF
2657  
2658 else
2659   echo "$ac_t""no" 1>&6
2660 fi
2661 done
2662
2663
2664 #
2665 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2666 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2667 #
2668 case "$host_os" in
2669     *hpux*)
2670                 cat > conftest.$ac_ext <<EOF
2671 #line 2672 "configure"
2672 #include "confdefs.h"
2673 #include <shadow.h>
2674 int main() {
2675 struct spwd testme
2676 ; return 0; }
2677 EOF
2678 if { (eval echo configure:2679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2679   rm -rf conftest*
2680   ac_cv_header_shadow_h=yes
2681 else
2682   echo "configure: failed program was:" >&5
2683   cat conftest.$ac_ext >&5
2684   rm -rf conftest*
2685   ac_cv_header_shadow_h=no
2686 fi
2687 rm -f conftest*
2688                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2689                    cat >> confdefs.h <<\EOF
2690 #define HAVE_SHADOW_H 1
2691 EOF
2692
2693                 fi
2694         ;;
2695 esac
2696 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2697 do
2698 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2699 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2700 echo "configure:2701: checking for $ac_hdr" >&5
2701 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2702   echo $ac_n "(cached) $ac_c" 1>&6
2703 else
2704   cat > conftest.$ac_ext <<EOF
2705 #line 2706 "configure"
2706 #include "confdefs.h"
2707 #include <$ac_hdr>
2708 EOF
2709 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2710 { (eval echo configure:2711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2711 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2712 if test -z "$ac_err"; then
2713   rm -rf conftest*
2714   eval "ac_cv_header_$ac_safe=yes"
2715 else
2716   echo "$ac_err" >&5
2717   echo "configure: failed program was:" >&5
2718   cat conftest.$ac_ext >&5
2719   rm -rf conftest*
2720   eval "ac_cv_header_$ac_safe=no"
2721 fi
2722 rm -f conftest*
2723 fi
2724 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2725   echo "$ac_t""yes" 1>&6
2726     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2727   cat >> confdefs.h <<EOF
2728 #define $ac_tr_hdr 1
2729 EOF
2730  
2731 else
2732   echo "$ac_t""no" 1>&6
2733 fi
2734 done
2735
2736 for ac_hdr in nss.h nss_common.h sys/security.h security/pam_appl.h security/pam_modules.h
2737 do
2738 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2739 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2740 echo "configure:2741: checking for $ac_hdr" >&5
2741 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2742   echo $ac_n "(cached) $ac_c" 1>&6
2743 else
2744   cat > conftest.$ac_ext <<EOF
2745 #line 2746 "configure"
2746 #include "confdefs.h"
2747 #include <$ac_hdr>
2748 EOF
2749 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2750 { (eval echo configure:2751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2751 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2752 if test -z "$ac_err"; then
2753   rm -rf conftest*
2754   eval "ac_cv_header_$ac_safe=yes"
2755 else
2756   echo "$ac_err" >&5
2757   echo "configure: failed program was:" >&5
2758   cat conftest.$ac_ext >&5
2759   rm -rf conftest*
2760   eval "ac_cv_header_$ac_safe=no"
2761 fi
2762 rm -f conftest*
2763 fi
2764 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2765   echo "$ac_t""yes" 1>&6
2766     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2767   cat >> confdefs.h <<EOF
2768 #define $ac_tr_hdr 1
2769 EOF
2770  
2771 else
2772   echo "$ac_t""no" 1>&6
2773 fi
2774 done
2775
2776 for ac_hdr in stropts.h poll.h
2777 do
2778 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2779 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2780 echo "configure:2781: checking for $ac_hdr" >&5
2781 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2782   echo $ac_n "(cached) $ac_c" 1>&6
2783 else
2784   cat > conftest.$ac_ext <<EOF
2785 #line 2786 "configure"
2786 #include "confdefs.h"
2787 #include <$ac_hdr>
2788 EOF
2789 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2790 { (eval echo configure:2791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2791 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2792 if test -z "$ac_err"; then
2793   rm -rf conftest*
2794   eval "ac_cv_header_$ac_safe=yes"
2795 else
2796   echo "$ac_err" >&5
2797   echo "configure: failed program was:" >&5
2798   cat conftest.$ac_ext >&5
2799   rm -rf conftest*
2800   eval "ac_cv_header_$ac_safe=no"
2801 fi
2802 rm -f conftest*
2803 fi
2804 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2805   echo "$ac_t""yes" 1>&6
2806     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2807   cat >> confdefs.h <<EOF
2808 #define $ac_tr_hdr 1
2809 EOF
2810  
2811 else
2812   echo "$ac_t""no" 1>&6
2813 fi
2814 done
2815
2816 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2817 do
2818 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2819 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2820 echo "configure:2821: checking for $ac_hdr" >&5
2821 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2822   echo $ac_n "(cached) $ac_c" 1>&6
2823 else
2824   cat > conftest.$ac_ext <<EOF
2825 #line 2826 "configure"
2826 #include "confdefs.h"
2827 #include <$ac_hdr>
2828 EOF
2829 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2830 { (eval echo configure:2831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2831 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2832 if test -z "$ac_err"; then
2833   rm -rf conftest*
2834   eval "ac_cv_header_$ac_safe=yes"
2835 else
2836   echo "$ac_err" >&5
2837   echo "configure: failed program was:" >&5
2838   cat conftest.$ac_ext >&5
2839   rm -rf conftest*
2840   eval "ac_cv_header_$ac_safe=no"
2841 fi
2842 rm -f conftest*
2843 fi
2844 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2845   echo "$ac_t""yes" 1>&6
2846     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2847   cat >> confdefs.h <<EOF
2848 #define $ac_tr_hdr 1
2849 EOF
2850  
2851 else
2852   echo "$ac_t""no" 1>&6
2853 fi
2854 done
2855
2856 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2857 do
2858 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2859 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2860 echo "configure:2861: checking for $ac_hdr" >&5
2861 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2862   echo $ac_n "(cached) $ac_c" 1>&6
2863 else
2864   cat > conftest.$ac_ext <<EOF
2865 #line 2866 "configure"
2866 #include "confdefs.h"
2867 #include <$ac_hdr>
2868 EOF
2869 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2870 { (eval echo configure:2871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2871 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2872 if test -z "$ac_err"; then
2873   rm -rf conftest*
2874   eval "ac_cv_header_$ac_safe=yes"
2875 else
2876   echo "$ac_err" >&5
2877   echo "configure: failed program was:" >&5
2878   cat conftest.$ac_ext >&5
2879   rm -rf conftest*
2880   eval "ac_cv_header_$ac_safe=no"
2881 fi
2882 rm -f conftest*
2883 fi
2884 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2885   echo "$ac_t""yes" 1>&6
2886     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2887   cat >> confdefs.h <<EOF
2888 #define $ac_tr_hdr 1
2889 EOF
2890  
2891 else
2892   echo "$ac_t""no" 1>&6
2893 fi
2894 done
2895
2896
2897 # For experimental utmp support (lastlog on some BSD-like systems)
2898 for ac_hdr in utmp.h utmpx.h lastlog.h
2899 do
2900 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2901 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2902 echo "configure:2903: checking for $ac_hdr" >&5
2903 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2904   echo $ac_n "(cached) $ac_c" 1>&6
2905 else
2906   cat > conftest.$ac_ext <<EOF
2907 #line 2908 "configure"
2908 #include "confdefs.h"
2909 #include <$ac_hdr>
2910 EOF
2911 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2912 { (eval echo configure:2913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2913 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2914 if test -z "$ac_err"; then
2915   rm -rf conftest*
2916   eval "ac_cv_header_$ac_safe=yes"
2917 else
2918   echo "$ac_err" >&5
2919   echo "configure: failed program was:" >&5
2920   cat conftest.$ac_ext >&5
2921   rm -rf conftest*
2922   eval "ac_cv_header_$ac_safe=no"
2923 fi
2924 rm -f conftest*
2925 fi
2926 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2927   echo "$ac_t""yes" 1>&6
2928     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2929   cat >> confdefs.h <<EOF
2930 #define $ac_tr_hdr 1
2931 EOF
2932  
2933 else
2934   echo "$ac_t""no" 1>&6
2935 fi
2936 done
2937
2938  
2939 # For quotas on Veritas VxFS filesystems
2940 for ac_hdr in sys/fs/vx_quota.h
2941 do
2942 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2943 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2944 echo "configure:2945: checking for $ac_hdr" >&5
2945 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2946   echo $ac_n "(cached) $ac_c" 1>&6
2947 else
2948   cat > conftest.$ac_ext <<EOF
2949 #line 2950 "configure"
2950 #include "confdefs.h"
2951 #include <$ac_hdr>
2952 EOF
2953 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2954 { (eval echo configure:2955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2955 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2956 if test -z "$ac_err"; then
2957   rm -rf conftest*
2958   eval "ac_cv_header_$ac_safe=yes"
2959 else
2960   echo "$ac_err" >&5
2961   echo "configure: failed program was:" >&5
2962   cat conftest.$ac_ext >&5
2963   rm -rf conftest*
2964   eval "ac_cv_header_$ac_safe=no"
2965 fi
2966 rm -f conftest*
2967 fi
2968 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2969   echo "$ac_t""yes" 1>&6
2970     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2971   cat >> confdefs.h <<EOF
2972 #define $ac_tr_hdr 1
2973 EOF
2974  
2975 else
2976   echo "$ac_t""no" 1>&6
2977 fi
2978 done
2979
2980
2981 echo $ac_n "checking size of int""... $ac_c" 1>&6
2982 echo "configure:2983: checking size of int" >&5
2983 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2984   echo $ac_n "(cached) $ac_c" 1>&6
2985 else
2986   if test "$cross_compiling" = yes; then
2987   ac_cv_sizeof_int=cross
2988 else
2989   cat > conftest.$ac_ext <<EOF
2990 #line 2991 "configure"
2991 #include "confdefs.h"
2992 #include <stdio.h>
2993 #include <sys/types.h>
2994 main()
2995 {
2996   FILE *f=fopen("conftestval", "w");
2997   if (!f) exit(1);
2998   fprintf(f, "%d\n", sizeof(int));
2999   exit(0);
3000 }
3001 EOF
3002 if { (eval echo configure:3003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3003 then
3004   ac_cv_sizeof_int=`cat conftestval`
3005 else
3006   echo "configure: failed program was:" >&5
3007   cat conftest.$ac_ext >&5
3008   rm -fr conftest*
3009   ac_cv_sizeof_int=0
3010 fi
3011 rm -fr conftest*
3012 fi
3013
3014 fi
3015 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
3016 cat >> confdefs.h <<EOF
3017 #define SIZEOF_INT $ac_cv_sizeof_int
3018 EOF
3019
3020
3021 echo $ac_n "checking size of long""... $ac_c" 1>&6
3022 echo "configure:3023: checking size of long" >&5
3023 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
3024   echo $ac_n "(cached) $ac_c" 1>&6
3025 else
3026   if test "$cross_compiling" = yes; then
3027   ac_cv_sizeof_long=cross
3028 else
3029   cat > conftest.$ac_ext <<EOF
3030 #line 3031 "configure"
3031 #include "confdefs.h"
3032 #include <stdio.h>
3033 #include <sys/types.h>
3034 main()
3035 {
3036   FILE *f=fopen("conftestval", "w");
3037   if (!f) exit(1);
3038   fprintf(f, "%d\n", sizeof(long));
3039   exit(0);
3040 }
3041 EOF
3042 if { (eval echo configure:3043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3043 then
3044   ac_cv_sizeof_long=`cat conftestval`
3045 else
3046   echo "configure: failed program was:" >&5
3047   cat conftest.$ac_ext >&5
3048   rm -fr conftest*
3049   ac_cv_sizeof_long=0
3050 fi
3051 rm -fr conftest*
3052 fi
3053
3054 fi
3055 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
3056 cat >> confdefs.h <<EOF
3057 #define SIZEOF_LONG $ac_cv_sizeof_long
3058 EOF
3059
3060
3061 echo $ac_n "checking size of short""... $ac_c" 1>&6
3062 echo "configure:3063: checking size of short" >&5
3063 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
3064   echo $ac_n "(cached) $ac_c" 1>&6
3065 else
3066   if test "$cross_compiling" = yes; then
3067   ac_cv_sizeof_short=cross
3068 else
3069   cat > conftest.$ac_ext <<EOF
3070 #line 3071 "configure"
3071 #include "confdefs.h"
3072 #include <stdio.h>
3073 #include <sys/types.h>
3074 main()
3075 {
3076   FILE *f=fopen("conftestval", "w");
3077   if (!f) exit(1);
3078   fprintf(f, "%d\n", sizeof(short));
3079   exit(0);
3080 }
3081 EOF
3082 if { (eval echo configure:3083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3083 then
3084   ac_cv_sizeof_short=`cat conftestval`
3085 else
3086   echo "configure: failed program was:" >&5
3087   cat conftest.$ac_ext >&5
3088   rm -fr conftest*
3089   ac_cv_sizeof_short=0
3090 fi
3091 rm -fr conftest*
3092 fi
3093
3094 fi
3095 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3096 cat >> confdefs.h <<EOF
3097 #define SIZEOF_SHORT $ac_cv_sizeof_short
3098 EOF
3099
3100
3101
3102 echo $ac_n "checking for working const""... $ac_c" 1>&6
3103 echo "configure:3104: checking for working const" >&5
3104 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3105   echo $ac_n "(cached) $ac_c" 1>&6
3106 else
3107   cat > conftest.$ac_ext <<EOF
3108 #line 3109 "configure"
3109 #include "confdefs.h"
3110
3111 int main() {
3112
3113 /* Ultrix mips cc rejects this.  */
3114 typedef int charset[2]; const charset x;
3115 /* SunOS 4.1.1 cc rejects this.  */
3116 char const *const *ccp;
3117 char **p;
3118 /* NEC SVR4.0.2 mips cc rejects this.  */
3119 struct point {int x, y;};
3120 static struct point const zero = {0,0};
3121 /* AIX XL C 1.02.0.0 rejects this.
3122    It does not let you subtract one const X* pointer from another in an arm
3123    of an if-expression whose if-part is not a constant expression */
3124 const char *g = "string";
3125 ccp = &g + (g ? g-g : 0);
3126 /* HPUX 7.0 cc rejects these. */
3127 ++ccp;
3128 p = (char**) ccp;
3129 ccp = (char const *const *) p;
3130 { /* SCO 3.2v4 cc rejects this.  */
3131   char *t;
3132   char const *s = 0 ? (char *) 0 : (char const *) 0;
3133
3134   *t++ = 0;
3135 }
3136 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3137   int x[] = {25, 17};
3138   const int *foo = &x[0];
3139   ++foo;
3140 }
3141 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3142   typedef const int *iptr;
3143   iptr p = 0;
3144   ++p;
3145 }
3146 { /* AIX XL C 1.02.0.0 rejects this saying
3147      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3148   struct s { int j; const int *ap[3]; };
3149   struct s *b; b->j = 5;
3150 }
3151 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3152   const int foo = 10;
3153 }
3154
3155 ; return 0; }
3156 EOF
3157 if { (eval echo configure:3158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3158   rm -rf conftest*
3159   ac_cv_c_const=yes
3160 else
3161   echo "configure: failed program was:" >&5
3162   cat conftest.$ac_ext >&5
3163   rm -rf conftest*
3164   ac_cv_c_const=no
3165 fi
3166 rm -f conftest*
3167 fi
3168
3169 echo "$ac_t""$ac_cv_c_const" 1>&6
3170 if test $ac_cv_c_const = no; then
3171   cat >> confdefs.h <<\EOF
3172 #define const 
3173 EOF
3174
3175 fi
3176
3177 echo $ac_n "checking for inline""... $ac_c" 1>&6
3178 echo "configure:3179: checking for inline" >&5
3179 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3180   echo $ac_n "(cached) $ac_c" 1>&6
3181 else
3182   ac_cv_c_inline=no
3183 for ac_kw in inline __inline__ __inline; do
3184   cat > conftest.$ac_ext <<EOF
3185 #line 3186 "configure"
3186 #include "confdefs.h"
3187
3188 int main() {
3189 } $ac_kw foo() {
3190 ; return 0; }
3191 EOF
3192 if { (eval echo configure:3193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3193   rm -rf conftest*
3194   ac_cv_c_inline=$ac_kw; break
3195 else
3196   echo "configure: failed program was:" >&5
3197   cat conftest.$ac_ext >&5
3198 fi
3199 rm -f conftest*
3200 done
3201
3202 fi
3203
3204 echo "$ac_t""$ac_cv_c_inline" 1>&6
3205 case "$ac_cv_c_inline" in
3206   inline | yes) ;;
3207   no) cat >> confdefs.h <<\EOF
3208 #define inline 
3209 EOF
3210  ;;
3211   *)  cat >> confdefs.h <<EOF
3212 #define inline $ac_cv_c_inline
3213 EOF
3214  ;;
3215 esac
3216
3217 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3218 echo "configure:3219: checking whether byte ordering is bigendian" >&5
3219 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3220   echo $ac_n "(cached) $ac_c" 1>&6
3221 else
3222   ac_cv_c_bigendian=unknown
3223 # See if sys/param.h defines the BYTE_ORDER macro.
3224 cat > conftest.$ac_ext <<EOF
3225 #line 3226 "configure"
3226 #include "confdefs.h"
3227 #include <sys/types.h>
3228 #include <sys/param.h>
3229 int main() {
3230
3231 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3232  bogus endian macros
3233 #endif
3234 ; return 0; }
3235 EOF
3236 if { (eval echo configure:3237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3237   rm -rf conftest*
3238   # It does; now see whether it defined to BIG_ENDIAN or not.
3239 cat > conftest.$ac_ext <<EOF
3240 #line 3241 "configure"
3241 #include "confdefs.h"
3242 #include <sys/types.h>
3243 #include <sys/param.h>
3244 int main() {
3245
3246 #if BYTE_ORDER != BIG_ENDIAN
3247  not big endian
3248 #endif
3249 ; return 0; }
3250 EOF
3251 if { (eval echo configure:3252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3252   rm -rf conftest*
3253   ac_cv_c_bigendian=yes
3254 else
3255   echo "configure: failed program was:" >&5
3256   cat conftest.$ac_ext >&5
3257   rm -rf conftest*
3258   ac_cv_c_bigendian=no
3259 fi
3260 rm -f conftest*
3261 else
3262   echo "configure: failed program was:" >&5
3263   cat conftest.$ac_ext >&5
3264 fi
3265 rm -f conftest*
3266 if test $ac_cv_c_bigendian = unknown; then
3267 if test "$cross_compiling" = yes; then
3268     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3269 else
3270   cat > conftest.$ac_ext <<EOF
3271 #line 3272 "configure"
3272 #include "confdefs.h"
3273 main () {
3274   /* Are we little or big endian?  From Harbison&Steele.  */
3275   union
3276   {
3277     long l;
3278     char c[sizeof (long)];
3279   } u;
3280   u.l = 1;
3281   exit (u.c[sizeof (long) - 1] == 1);
3282 }
3283 EOF
3284 if { (eval echo configure:3285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3285 then
3286   ac_cv_c_bigendian=no
3287 else
3288   echo "configure: failed program was:" >&5
3289   cat conftest.$ac_ext >&5
3290   rm -fr conftest*
3291   ac_cv_c_bigendian=yes
3292 fi
3293 rm -fr conftest*
3294 fi
3295
3296 fi
3297 fi
3298
3299 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3300 if test $ac_cv_c_bigendian = yes; then
3301   cat >> confdefs.h <<\EOF
3302 #define WORDS_BIGENDIAN 1
3303 EOF
3304
3305 fi
3306
3307 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
3308 echo "configure:3309: checking whether char is unsigned" >&5
3309 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3310   echo $ac_n "(cached) $ac_c" 1>&6
3311 else
3312   if test "$GCC" = yes; then
3313   # GCC predefines this symbol on systems where it applies.
3314 cat > conftest.$ac_ext <<EOF
3315 #line 3316 "configure"
3316 #include "confdefs.h"
3317 #ifdef __CHAR_UNSIGNED__
3318   yes
3319 #endif
3320
3321 EOF
3322 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3323   egrep "yes" >/dev/null 2>&1; then
3324   rm -rf conftest*
3325   ac_cv_c_char_unsigned=yes
3326 else
3327   rm -rf conftest*
3328   ac_cv_c_char_unsigned=no
3329 fi
3330 rm -f conftest*
3331
3332 else
3333 if test "$cross_compiling" = yes; then
3334     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3335 else
3336   cat > conftest.$ac_ext <<EOF
3337 #line 3338 "configure"
3338 #include "confdefs.h"
3339 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
3340 #if !defined(__STDC__) || __STDC__ != 1
3341 #define volatile
3342 #endif
3343 main() {
3344   volatile char c = 255; exit(c < 0);
3345 }
3346 EOF
3347 if { (eval echo configure:3348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3348 then
3349   ac_cv_c_char_unsigned=yes
3350 else
3351   echo "configure: failed program was:" >&5
3352   cat conftest.$ac_ext >&5
3353   rm -fr conftest*
3354   ac_cv_c_char_unsigned=no
3355 fi
3356 rm -fr conftest*
3357 fi
3358
3359 fi
3360 fi
3361
3362 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
3363 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3364   cat >> confdefs.h <<\EOF
3365 #define __CHAR_UNSIGNED__ 1
3366 EOF
3367
3368 fi
3369
3370
3371 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3372 echo "configure:3373: checking return type of signal handlers" >&5
3373 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3374   echo $ac_n "(cached) $ac_c" 1>&6
3375 else
3376   cat > conftest.$ac_ext <<EOF
3377 #line 3378 "configure"
3378 #include "confdefs.h"
3379 #include <sys/types.h>
3380 #include <signal.h>
3381 #ifdef signal
3382 #undef signal
3383 #endif
3384 #ifdef __cplusplus
3385 extern "C" void (*signal (int, void (*)(int)))(int);
3386 #else
3387 void (*signal ()) ();
3388 #endif
3389
3390 int main() {
3391 int i;
3392 ; return 0; }
3393 EOF
3394 if { (eval echo configure:3395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3395   rm -rf conftest*
3396   ac_cv_type_signal=void
3397 else
3398   echo "configure: failed program was:" >&5
3399   cat conftest.$ac_ext >&5
3400   rm -rf conftest*
3401   ac_cv_type_signal=int
3402 fi
3403 rm -f conftest*
3404 fi
3405
3406 echo "$ac_t""$ac_cv_type_signal" 1>&6
3407 cat >> confdefs.h <<EOF
3408 #define RETSIGTYPE $ac_cv_type_signal
3409 EOF
3410
3411
3412 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3413 echo "configure:3414: checking for uid_t in sys/types.h" >&5
3414 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3415   echo $ac_n "(cached) $ac_c" 1>&6
3416 else
3417   cat > conftest.$ac_ext <<EOF
3418 #line 3419 "configure"
3419 #include "confdefs.h"
3420 #include <sys/types.h>
3421 EOF
3422 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3423   egrep "uid_t" >/dev/null 2>&1; then
3424   rm -rf conftest*
3425   ac_cv_type_uid_t=yes
3426 else
3427   rm -rf conftest*
3428   ac_cv_type_uid_t=no
3429 fi
3430 rm -f conftest*
3431
3432 fi
3433
3434 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3435 if test $ac_cv_type_uid_t = no; then
3436   cat >> confdefs.h <<\EOF
3437 #define uid_t int
3438 EOF
3439
3440   cat >> confdefs.h <<\EOF
3441 #define gid_t int
3442 EOF
3443
3444 fi
3445
3446 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3447 echo "configure:3448: checking for mode_t" >&5
3448 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3449   echo $ac_n "(cached) $ac_c" 1>&6
3450 else
3451   cat > conftest.$ac_ext <<EOF
3452 #line 3453 "configure"
3453 #include "confdefs.h"
3454 #include <sys/types.h>
3455 #if STDC_HEADERS
3456 #include <stdlib.h>
3457 #include <stddef.h>
3458 #endif
3459 EOF
3460 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3461   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3462   rm -rf conftest*
3463   ac_cv_type_mode_t=yes
3464 else
3465   rm -rf conftest*
3466   ac_cv_type_mode_t=no
3467 fi
3468 rm -f conftest*
3469
3470 fi
3471 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3472 if test $ac_cv_type_mode_t = no; then
3473   cat >> confdefs.h <<\EOF
3474 #define mode_t int
3475 EOF
3476
3477 fi
3478
3479 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3480 echo "configure:3481: checking for off_t" >&5
3481 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3482   echo $ac_n "(cached) $ac_c" 1>&6
3483 else
3484   cat > conftest.$ac_ext <<EOF
3485 #line 3486 "configure"
3486 #include "confdefs.h"
3487 #include <sys/types.h>
3488 #if STDC_HEADERS
3489 #include <stdlib.h>
3490 #include <stddef.h>
3491 #endif
3492 EOF
3493 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3494   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3495   rm -rf conftest*
3496   ac_cv_type_off_t=yes
3497 else
3498   rm -rf conftest*
3499   ac_cv_type_off_t=no
3500 fi
3501 rm -f conftest*
3502
3503 fi
3504 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3505 if test $ac_cv_type_off_t = no; then
3506   cat >> confdefs.h <<\EOF
3507 #define off_t long
3508 EOF
3509
3510 fi
3511
3512 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3513 echo "configure:3514: checking for size_t" >&5
3514 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3515   echo $ac_n "(cached) $ac_c" 1>&6
3516 else
3517   cat > conftest.$ac_ext <<EOF
3518 #line 3519 "configure"
3519 #include "confdefs.h"
3520 #include <sys/types.h>
3521 #if STDC_HEADERS
3522 #include <stdlib.h>
3523 #include <stddef.h>
3524 #endif
3525 EOF
3526 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3527   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3528   rm -rf conftest*
3529   ac_cv_type_size_t=yes
3530 else
3531   rm -rf conftest*
3532   ac_cv_type_size_t=no
3533 fi
3534 rm -f conftest*
3535
3536 fi
3537 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3538 if test $ac_cv_type_size_t = no; then
3539   cat >> confdefs.h <<\EOF
3540 #define size_t unsigned
3541 EOF
3542
3543 fi
3544
3545 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3546 echo "configure:3547: checking for pid_t" >&5
3547 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3548   echo $ac_n "(cached) $ac_c" 1>&6
3549 else
3550   cat > conftest.$ac_ext <<EOF
3551 #line 3552 "configure"
3552 #include "confdefs.h"
3553 #include <sys/types.h>
3554 #if STDC_HEADERS
3555 #include <stdlib.h>
3556 #include <stddef.h>
3557 #endif
3558 EOF
3559 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3560   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3561   rm -rf conftest*
3562   ac_cv_type_pid_t=yes
3563 else
3564   rm -rf conftest*
3565   ac_cv_type_pid_t=no
3566 fi
3567 rm -f conftest*
3568
3569 fi
3570 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3571 if test $ac_cv_type_pid_t = no; then
3572   cat >> confdefs.h <<\EOF
3573 #define pid_t int
3574 EOF
3575
3576 fi
3577
3578 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3579 echo "configure:3580: checking for st_rdev in struct stat" >&5
3580 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3581   echo $ac_n "(cached) $ac_c" 1>&6
3582 else
3583   cat > conftest.$ac_ext <<EOF
3584 #line 3585 "configure"
3585 #include "confdefs.h"
3586 #include <sys/types.h>
3587 #include <sys/stat.h>
3588 int main() {
3589 struct stat s; s.st_rdev;
3590 ; return 0; }
3591 EOF
3592 if { (eval echo configure:3593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3593   rm -rf conftest*
3594   ac_cv_struct_st_rdev=yes
3595 else
3596   echo "configure: failed program was:" >&5
3597   cat conftest.$ac_ext >&5
3598   rm -rf conftest*
3599   ac_cv_struct_st_rdev=no
3600 fi
3601 rm -f conftest*
3602 fi
3603
3604 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3605 if test $ac_cv_struct_st_rdev = yes; then
3606   cat >> confdefs.h <<\EOF
3607 #define HAVE_ST_RDEV 1
3608 EOF
3609
3610 fi
3611
3612 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3613 echo "configure:3614: checking for d_off in dirent" >&5
3614 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3615   echo $ac_n "(cached) $ac_c" 1>&6
3616 else
3617   cat > conftest.$ac_ext <<EOF
3618 #line 3619 "configure"
3619 #include "confdefs.h"
3620
3621 #include <unistd.h>
3622 #include <sys/types.h>
3623 #include <dirent.h>
3624 int main() {
3625 struct dirent d; d.d_off;
3626 ; return 0; }
3627 EOF
3628 if { (eval echo configure:3629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3629   rm -rf conftest*
3630   ac_cv_dirent_d_off=yes
3631 else
3632   echo "configure: failed program was:" >&5
3633   cat conftest.$ac_ext >&5
3634   rm -rf conftest*
3635   ac_cv_dirent_d_off=no
3636 fi
3637 rm -f conftest*
3638 fi
3639
3640 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3641 if test $ac_cv_dirent_d_off = yes; then
3642   cat >> confdefs.h <<\EOF
3643 #define HAVE_DIRENT_D_OFF 1
3644 EOF
3645
3646 fi
3647
3648 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3649 echo "configure:3650: checking for ino_t" >&5
3650 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3651   echo $ac_n "(cached) $ac_c" 1>&6
3652 else
3653   cat > conftest.$ac_ext <<EOF
3654 #line 3655 "configure"
3655 #include "confdefs.h"
3656 #include <sys/types.h>
3657 #if STDC_HEADERS
3658 #include <stdlib.h>
3659 #include <stddef.h>
3660 #endif
3661 EOF
3662 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3663   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3664   rm -rf conftest*
3665   ac_cv_type_ino_t=yes
3666 else
3667   rm -rf conftest*
3668   ac_cv_type_ino_t=no
3669 fi
3670 rm -f conftest*
3671
3672 fi
3673 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3674 if test $ac_cv_type_ino_t = no; then
3675   cat >> confdefs.h <<\EOF
3676 #define ino_t unsigned
3677 EOF
3678
3679 fi
3680
3681 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3682 echo "configure:3683: checking for loff_t" >&5
3683 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3684   echo $ac_n "(cached) $ac_c" 1>&6
3685 else
3686   cat > conftest.$ac_ext <<EOF
3687 #line 3688 "configure"
3688 #include "confdefs.h"
3689 #include <sys/types.h>
3690 #if STDC_HEADERS
3691 #include <stdlib.h>
3692 #include <stddef.h>
3693 #endif
3694 EOF
3695 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3696   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3697   rm -rf conftest*
3698   ac_cv_type_loff_t=yes
3699 else
3700   rm -rf conftest*
3701   ac_cv_type_loff_t=no
3702 fi
3703 rm -f conftest*
3704
3705 fi
3706 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3707 if test $ac_cv_type_loff_t = no; then
3708   cat >> confdefs.h <<\EOF
3709 #define loff_t off_t
3710 EOF
3711
3712 fi
3713
3714 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3715 echo "configure:3716: checking for offset_t" >&5
3716 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3717   echo $ac_n "(cached) $ac_c" 1>&6
3718 else
3719   cat > conftest.$ac_ext <<EOF
3720 #line 3721 "configure"
3721 #include "confdefs.h"
3722 #include <sys/types.h>
3723 #if STDC_HEADERS
3724 #include <stdlib.h>
3725 #include <stddef.h>
3726 #endif
3727 EOF
3728 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3729   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3730   rm -rf conftest*
3731   ac_cv_type_offset_t=yes
3732 else
3733   rm -rf conftest*
3734   ac_cv_type_offset_t=no
3735 fi
3736 rm -f conftest*
3737
3738 fi
3739 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3740 if test $ac_cv_type_offset_t = no; then
3741   cat >> confdefs.h <<\EOF
3742 #define offset_t loff_t
3743 EOF
3744
3745 fi
3746
3747 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3748 echo "configure:3749: checking for ssize_t" >&5
3749 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3750   echo $ac_n "(cached) $ac_c" 1>&6
3751 else
3752   cat > conftest.$ac_ext <<EOF
3753 #line 3754 "configure"
3754 #include "confdefs.h"
3755 #include <sys/types.h>
3756 #if STDC_HEADERS
3757 #include <stdlib.h>
3758 #include <stddef.h>
3759 #endif
3760 EOF
3761 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3762   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3763   rm -rf conftest*
3764   ac_cv_type_ssize_t=yes
3765 else
3766   rm -rf conftest*
3767   ac_cv_type_ssize_t=no
3768 fi
3769 rm -f conftest*
3770
3771 fi
3772 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3773 if test $ac_cv_type_ssize_t = no; then
3774   cat >> confdefs.h <<\EOF
3775 #define ssize_t int
3776 EOF
3777
3778 fi
3779
3780 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3781 echo "configure:3782: checking for wchar_t" >&5
3782 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3783   echo $ac_n "(cached) $ac_c" 1>&6
3784 else
3785   cat > conftest.$ac_ext <<EOF
3786 #line 3787 "configure"
3787 #include "confdefs.h"
3788 #include <sys/types.h>
3789 #if STDC_HEADERS
3790 #include <stdlib.h>
3791 #include <stddef.h>
3792 #endif
3793 EOF
3794 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3795   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3796   rm -rf conftest*
3797   ac_cv_type_wchar_t=yes
3798 else
3799   rm -rf conftest*
3800   ac_cv_type_wchar_t=no
3801 fi
3802 rm -f conftest*
3803
3804 fi
3805 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3806 if test $ac_cv_type_wchar_t = no; then
3807   cat >> confdefs.h <<\EOF
3808 #define wchar_t unsigned short
3809 EOF
3810
3811 fi
3812
3813
3814 # we need libcups for CUPS support...
3815 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3816 echo "configure:3817: checking for httpConnect in -lcups" >&5
3817 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3818 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3819   echo $ac_n "(cached) $ac_c" 1>&6
3820 else
3821   ac_save_LIBS="$LIBS"
3822 LIBS="-lcups  $LIBS"
3823 cat > conftest.$ac_ext <<EOF
3824 #line 3825 "configure"
3825 #include "confdefs.h"
3826 /* Override any gcc2 internal prototype to avoid an error.  */
3827 /* We use char because int might match the return type of a gcc2
3828     builtin and then its argument prototype would still apply.  */
3829 char httpConnect();
3830
3831 int main() {
3832 httpConnect()
3833 ; return 0; }
3834 EOF
3835 if { (eval echo configure:3836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3836   rm -rf conftest*
3837   eval "ac_cv_lib_$ac_lib_var=yes"
3838 else
3839   echo "configure: failed program was:" >&5
3840   cat conftest.$ac_ext >&5
3841   rm -rf conftest*
3842   eval "ac_cv_lib_$ac_lib_var=no"
3843 fi
3844 rm -f conftest*
3845 LIBS="$ac_save_LIBS"
3846
3847 fi
3848 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3849   echo "$ac_t""yes" 1>&6
3850     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3851     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3852   cat >> confdefs.h <<EOF
3853 #define $ac_tr_lib 1
3854 EOF
3855
3856   LIBS="-lcups $LIBS"
3857
3858 else
3859   echo "$ac_t""no" 1>&6
3860 fi
3861
3862
3863 # we need libdl for PAM and the new VFS code
3864 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3865 echo "configure:3866: checking for dlopen in -ldl" >&5
3866 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3867 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3868   echo $ac_n "(cached) $ac_c" 1>&6
3869 else
3870   ac_save_LIBS="$LIBS"
3871 LIBS="-ldl  $LIBS"
3872 cat > conftest.$ac_ext <<EOF
3873 #line 3874 "configure"
3874 #include "confdefs.h"
3875 /* Override any gcc2 internal prototype to avoid an error.  */
3876 /* We use char because int might match the return type of a gcc2
3877     builtin and then its argument prototype would still apply.  */
3878 char dlopen();
3879
3880 int main() {
3881 dlopen()
3882 ; return 0; }
3883 EOF
3884 if { (eval echo configure:3885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3885   rm -rf conftest*
3886   eval "ac_cv_lib_$ac_lib_var=yes"
3887 else
3888   echo "configure: failed program was:" >&5
3889   cat conftest.$ac_ext >&5
3890   rm -rf conftest*
3891   eval "ac_cv_lib_$ac_lib_var=no"
3892 fi
3893 rm -f conftest*
3894 LIBS="$ac_save_LIBS"
3895
3896 fi
3897 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3898   echo "$ac_t""yes" 1>&6
3899   LIBS="$LIBS -ldl";
3900         cat >> confdefs.h <<\EOF
3901 #define HAVE_LIBDL 1
3902 EOF
3903
3904 else
3905   echo "$ac_t""no" 1>&6
3906 fi
3907
3908
3909 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3910 echo "configure:3911: checking for socklen_t type" >&5
3911 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3912   echo $ac_n "(cached) $ac_c" 1>&6
3913 else
3914   
3915     cat > conftest.$ac_ext <<EOF
3916 #line 3917 "configure"
3917 #include "confdefs.h"
3918
3919 #include <sys/types.h>
3920 #if STDC_HEADERS
3921 #include <stdlib.h>
3922 #include <stddef.h>
3923 #endif
3924 #include <sys/socket.h>
3925 int main() {
3926 socklen_t i = 0
3927 ; return 0; }
3928 EOF
3929 if { (eval echo configure:3930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3930   rm -rf conftest*
3931   samba_cv_socklen_t=yes
3932 else
3933   echo "configure: failed program was:" >&5
3934   cat conftest.$ac_ext >&5
3935   rm -rf conftest*
3936   samba_cv_socklen_t=no
3937 fi
3938 rm -f conftest*
3939 fi
3940
3941 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3942 if test x"$samba_cv_socklen_t" = x"yes"; then
3943    cat >> confdefs.h <<\EOF
3944 #define HAVE_SOCKLEN_T_TYPE 1
3945 EOF
3946
3947 fi
3948
3949 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3950 echo "configure:3951: checking for sig_atomic_t type" >&5
3951 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3952   echo $ac_n "(cached) $ac_c" 1>&6
3953 else
3954   
3955     cat > conftest.$ac_ext <<EOF
3956 #line 3957 "configure"
3957 #include "confdefs.h"
3958
3959 #include <sys/types.h>
3960 #if STDC_HEADERS
3961 #include <stdlib.h>
3962 #include <stddef.h>
3963 #endif
3964 #include <signal.h>
3965 int main() {
3966 sig_atomic_t i = 0
3967 ; return 0; }
3968 EOF
3969 if { (eval echo configure:3970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3970   rm -rf conftest*
3971   samba_cv_sig_atomic_t=yes
3972 else
3973   echo "configure: failed program was:" >&5
3974   cat conftest.$ac_ext >&5
3975   rm -rf conftest*
3976   samba_cv_sig_atomic_t=no
3977 fi
3978 rm -f conftest*
3979 fi
3980
3981 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3982 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3983    cat >> confdefs.h <<\EOF
3984 #define HAVE_SIG_ATOMIC_T_TYPE 1
3985 EOF
3986
3987 fi
3988
3989 # stupid headers have the functions but no declaration. grrrr.
3990
3991  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
3992 echo "configure:3993: checking for errno declaration" >&5
3993 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
3994   echo $ac_n "(cached) $ac_c" 1>&6
3995 else
3996   
3997     cat > conftest.$ac_ext <<EOF
3998 #line 3999 "configure"
3999 #include "confdefs.h"
4000 #include <errno.h>
4001 int main() {
4002 int i = (int)errno
4003 ; return 0; }
4004 EOF
4005 if { (eval echo configure:4006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4006   rm -rf conftest*
4007   ac_cv_have_errno_decl=yes
4008 else
4009   echo "configure: failed program was:" >&5
4010   cat conftest.$ac_ext >&5
4011   rm -rf conftest*
4012   ac_cv_have_errno_decl=no
4013 fi
4014 rm -f conftest*
4015 fi
4016
4017 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
4018  if test x"$ac_cv_have_errno_decl" = x"yes"; then
4019     cat >> confdefs.h <<\EOF
4020 #define HAVE_ERRNO_DECL 1
4021 EOF
4022
4023  fi
4024
4025
4026  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
4027 echo "configure:4028: checking for setresuid declaration" >&5
4028 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
4029   echo $ac_n "(cached) $ac_c" 1>&6
4030 else
4031   
4032     cat > conftest.$ac_ext <<EOF
4033 #line 4034 "configure"
4034 #include "confdefs.h"
4035 #include <unistd.h>
4036 int main() {
4037 int i = (int)setresuid
4038 ; return 0; }
4039 EOF
4040 if { (eval echo configure:4041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4041   rm -rf conftest*
4042   ac_cv_have_setresuid_decl=yes
4043 else
4044   echo "configure: failed program was:" >&5
4045   cat conftest.$ac_ext >&5
4046   rm -rf conftest*
4047   ac_cv_have_setresuid_decl=no
4048 fi
4049 rm -f conftest*
4050 fi
4051
4052 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
4053  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
4054     cat >> confdefs.h <<\EOF
4055 #define HAVE_SETRESUID_DECL 1
4056 EOF
4057
4058  fi
4059
4060
4061  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
4062 echo "configure:4063: checking for setresgid declaration" >&5
4063 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
4064   echo $ac_n "(cached) $ac_c" 1>&6
4065 else
4066   
4067     cat > conftest.$ac_ext <<EOF
4068 #line 4069 "configure"
4069 #include "confdefs.h"
4070 #include <unistd.h>
4071 int main() {
4072 int i = (int)setresgid
4073 ; return 0; }
4074 EOF
4075 if { (eval echo configure:4076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4076   rm -rf conftest*
4077   ac_cv_have_setresgid_decl=yes
4078 else
4079   echo "configure: failed program was:" >&5
4080   cat conftest.$ac_ext >&5
4081   rm -rf conftest*
4082   ac_cv_have_setresgid_decl=no
4083 fi
4084 rm -f conftest*
4085 fi
4086
4087 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
4088  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
4089     cat >> confdefs.h <<\EOF
4090 #define HAVE_SETRESGID_DECL 1
4091 EOF
4092
4093  fi
4094
4095
4096  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
4097 echo "configure:4098: checking for asprintf declaration" >&5
4098 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
4099   echo $ac_n "(cached) $ac_c" 1>&6
4100 else
4101   
4102     cat > conftest.$ac_ext <<EOF
4103 #line 4104 "configure"
4104 #include "confdefs.h"
4105 #include <stdio.h>
4106 int main() {
4107 int i = (int)asprintf
4108 ; return 0; }
4109 EOF
4110 if { (eval echo configure:4111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4111   rm -rf conftest*
4112   ac_cv_have_asprintf_decl=yes
4113 else
4114   echo "configure: failed program was:" >&5
4115   cat conftest.$ac_ext >&5
4116   rm -rf conftest*
4117   ac_cv_have_asprintf_decl=no
4118 fi
4119 rm -f conftest*
4120 fi
4121
4122 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
4123  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
4124     cat >> confdefs.h <<\EOF
4125 #define HAVE_ASPRINTF_DECL 1
4126 EOF
4127
4128  fi
4129
4130
4131  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
4132 echo "configure:4133: checking for vasprintf declaration" >&5
4133 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
4134   echo $ac_n "(cached) $ac_c" 1>&6
4135 else
4136   
4137     cat > conftest.$ac_ext <<EOF
4138 #line 4139 "configure"
4139 #include "confdefs.h"
4140 #include <stdio.h>
4141 int main() {
4142 int i = (int)vasprintf
4143 ; return 0; }
4144 EOF
4145 if { (eval echo configure:4146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4146   rm -rf conftest*
4147   ac_cv_have_vasprintf_decl=yes
4148 else
4149   echo "configure: failed program was:" >&5
4150   cat conftest.$ac_ext >&5
4151   rm -rf conftest*
4152   ac_cv_have_vasprintf_decl=no
4153 fi
4154 rm -f conftest*
4155 fi
4156
4157 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
4158  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
4159     cat >> confdefs.h <<\EOF
4160 #define HAVE_VASPRINTF_DECL 1
4161 EOF
4162
4163  fi
4164
4165
4166  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
4167 echo "configure:4168: checking for vsnprintf declaration" >&5
4168 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
4169   echo $ac_n "(cached) $ac_c" 1>&6
4170 else
4171   
4172     cat > conftest.$ac_ext <<EOF
4173 #line 4174 "configure"
4174 #include "confdefs.h"
4175 #include <stdio.h>
4176 int main() {
4177 int i = (int)vsnprintf
4178 ; return 0; }
4179 EOF
4180 if { (eval echo configure:4181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4181   rm -rf conftest*
4182   ac_cv_have_vsnprintf_decl=yes
4183 else
4184   echo "configure: failed program was:" >&5
4185   cat conftest.$ac_ext >&5
4186   rm -rf conftest*
4187   ac_cv_have_vsnprintf_decl=no
4188 fi
4189 rm -f conftest*
4190 fi
4191
4192 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
4193  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
4194     cat >> confdefs.h <<\EOF
4195 #define HAVE_VSNPRINTF_DECL 1
4196 EOF
4197
4198  fi
4199
4200
4201  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
4202 echo "configure:4203: checking for snprintf declaration" >&5
4203 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
4204   echo $ac_n "(cached) $ac_c" 1>&6
4205 else
4206   
4207     cat > conftest.$ac_ext <<EOF
4208 #line 4209 "configure"
4209 #include "confdefs.h"
4210 #include <stdio.h>
4211 int main() {
4212 int i = (int)snprintf
4213 ; return 0; }
4214 EOF
4215 if { (eval echo configure:4216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4216   rm -rf conftest*
4217   ac_cv_have_snprintf_decl=yes
4218 else
4219   echo "configure: failed program was:" >&5
4220   cat conftest.$ac_ext >&5
4221   rm -rf conftest*
4222   ac_cv_have_snprintf_decl=no
4223 fi
4224 rm -f conftest*
4225 fi
4226
4227 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
4228  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
4229     cat >> confdefs.h <<\EOF
4230 #define HAVE_SNPRINTF_DECL 1
4231 EOF
4232
4233  fi
4234
4235
4236 # and glibc has setresuid under linux but the function does
4237 # nothing until kernel 2.1.44! very dumb.
4238 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
4239 echo "configure:4240: checking for real setresuid" >&5
4240 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
4241   echo $ac_n "(cached) $ac_c" 1>&6
4242 else
4243   
4244     if test "$cross_compiling" = yes; then
4245   samba_cv_have_setresuid=cross
4246 else
4247   cat > conftest.$ac_ext <<EOF
4248 #line 4249 "configure"
4249 #include "confdefs.h"
4250 #include <errno.h>
4251 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4252 EOF
4253 if { (eval echo configure:4254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4254 then
4255   samba_cv_have_setresuid=yes
4256 else
4257   echo "configure: failed program was:" >&5
4258   cat conftest.$ac_ext >&5
4259   rm -fr conftest*
4260   samba_cv_have_setresuid=no
4261 fi
4262 rm -fr conftest*
4263 fi
4264
4265 fi
4266
4267 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4268 if test x"$samba_cv_have_setresuid" = x"yes"; then
4269     cat >> confdefs.h <<\EOF
4270 #define HAVE_SETRESUID 1
4271 EOF
4272
4273 fi
4274
4275 # Do the same check for setresguid...
4276 #
4277 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4278 echo "configure:4279: checking for real setresgid" >&5
4279 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4280   echo $ac_n "(cached) $ac_c" 1>&6
4281 else
4282   
4283     if test "$cross_compiling" = yes; then
4284   samba_cv_have_setresgid=cross
4285 else
4286   cat > conftest.$ac_ext <<EOF
4287 #line 4288 "configure"
4288 #include "confdefs.h"
4289 #include <unistd.h>
4290 #include <errno.h>
4291 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4292 EOF
4293 if { (eval echo configure:4294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4294 then
4295   samba_cv_have_setresgid=yes
4296 else
4297   echo "configure: failed program was:" >&5
4298   cat conftest.$ac_ext >&5
4299   rm -fr conftest*
4300   samba_cv_have_setresgid=no
4301 fi
4302 rm -fr conftest*
4303 fi
4304
4305 fi
4306
4307 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4308 if test x"$samba_cv_have_setresgid" = x"yes"; then
4309     cat >> confdefs.h <<\EOF
4310 #define HAVE_SETRESGID 1
4311 EOF
4312
4313 fi
4314
4315 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4316 echo "configure:4317: checking for 8-bit clean memcmp" >&5
4317 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4318   echo $ac_n "(cached) $ac_c" 1>&6
4319 else
4320   if test "$cross_compiling" = yes; then
4321   ac_cv_func_memcmp_clean=no
4322 else
4323   cat > conftest.$ac_ext <<EOF
4324 #line 4325 "configure"
4325 #include "confdefs.h"
4326
4327 main()
4328 {
4329   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4330   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4331 }
4332
4333 EOF
4334 if { (eval echo configure:4335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4335 then
4336   ac_cv_func_memcmp_clean=yes
4337 else
4338   echo "configure: failed program was:" >&5
4339   cat conftest.$ac_ext >&5
4340   rm -fr conftest*
4341   ac_cv_func_memcmp_clean=no
4342 fi
4343 rm -fr conftest*
4344 fi
4345
4346 fi
4347
4348 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4349 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4350
4351
4352 ###############################################
4353 # test for where we get crypt() from
4354 for ac_func in crypt
4355 do
4356 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4357 echo "configure:4358: checking for $ac_func" >&5
4358 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4359   echo $ac_n "(cached) $ac_c" 1>&6
4360 else
4361   cat > conftest.$ac_ext <<EOF
4362 #line 4363 "configure"
4363 #include "confdefs.h"
4364 /* System header to define __stub macros and hopefully few prototypes,
4365     which can conflict with char $ac_func(); below.  */
4366 #include <assert.h>
4367 /* Override any gcc2 internal prototype to avoid an error.  */
4368 /* We use char because int might match the return type of a gcc2
4369     builtin and then its argument prototype would still apply.  */
4370 char $ac_func();
4371
4372 int main() {
4373
4374 /* The GNU C library defines this for functions which it implements
4375     to always fail with ENOSYS.  Some functions are actually named
4376     something starting with __ and the normal name is an alias.  */
4377 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4378 choke me
4379 #else
4380 $ac_func();
4381 #endif
4382
4383 ; return 0; }
4384 EOF
4385 if { (eval echo configure:4386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4386   rm -rf conftest*
4387   eval "ac_cv_func_$ac_func=yes"
4388 else
4389   echo "configure: failed program was:" >&5
4390   cat conftest.$ac_ext >&5
4391   rm -rf conftest*
4392   eval "ac_cv_func_$ac_func=no"
4393 fi
4394 rm -f conftest*
4395 fi
4396
4397 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4398   echo "$ac_t""yes" 1>&6
4399     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4400   cat >> confdefs.h <<EOF
4401 #define $ac_tr_func 1
4402 EOF
4403  
4404 else
4405   echo "$ac_t""no" 1>&6
4406 fi
4407 done
4408
4409 if test x"$ac_cv_func_crypt" = x"no"; then
4410     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4411 echo "configure:4412: checking for crypt in -lcrypt" >&5
4412 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4413 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4414   echo $ac_n "(cached) $ac_c" 1>&6
4415 else
4416   ac_save_LIBS="$LIBS"
4417 LIBS="-lcrypt  $LIBS"
4418 cat > conftest.$ac_ext <<EOF
4419 #line 4420 "configure"
4420 #include "confdefs.h"
4421 /* Override any gcc2 internal prototype to avoid an error.  */
4422 /* We use char because int might match the return type of a gcc2
4423     builtin and then its argument prototype would still apply.  */
4424 char crypt();
4425
4426 int main() {
4427 crypt()
4428 ; return 0; }
4429 EOF
4430 if { (eval echo configure:4431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4431   rm -rf conftest*
4432   eval "ac_cv_lib_$ac_lib_var=yes"
4433 else
4434   echo "configure: failed program was:" >&5
4435   cat conftest.$ac_ext >&5
4436   rm -rf conftest*
4437   eval "ac_cv_lib_$ac_lib_var=no"
4438 fi
4439 rm -f conftest*
4440 LIBS="$ac_save_LIBS"
4441
4442 fi
4443 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4444   echo "$ac_t""yes" 1>&6
4445   LIBS="$LIBS -lcrypt";
4446         cat >> confdefs.h <<\EOF
4447 #define HAVE_CRYPT 1
4448 EOF
4449
4450 else
4451   echo "$ac_t""no" 1>&6
4452 fi
4453
4454 fi
4455
4456
4457 ###############################################
4458 # Readline included by default unless explicitly asked not to
4459 test "${with_readline+set}" != "set" && with_readline=yes
4460
4461 # test for where we get readline() from
4462 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4463 echo "configure:4464: checking whether to use readline" >&5
4464 # Check whether --with-readline or --without-readline was given.
4465 if test "${with_readline+set}" = set; then
4466   withval="$with_readline"
4467     case "$with_readline" in
4468   yes)
4469     echo "$ac_t""yes" 1>&6
4470
4471     for ac_hdr in readline.h history.h readline/readline.h
4472 do
4473 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4474 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4475 echo "configure:4476: checking for $ac_hdr" >&5
4476 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4477   echo $ac_n "(cached) $ac_c" 1>&6
4478 else
4479   cat > conftest.$ac_ext <<EOF
4480 #line 4481 "configure"
4481 #include "confdefs.h"
4482 #include <$ac_hdr>
4483 EOF
4484 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4485 { (eval echo configure:4486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4486 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4487 if test -z "$ac_err"; then
4488   rm -rf conftest*
4489   eval "ac_cv_header_$ac_safe=yes"
4490 else
4491   echo "$ac_err" >&5
4492   echo "configure: failed program was:" >&5
4493   cat conftest.$ac_ext >&5
4494   rm -rf conftest*
4495   eval "ac_cv_header_$ac_safe=no"
4496 fi
4497 rm -f conftest*
4498 fi
4499 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4500   echo "$ac_t""yes" 1>&6
4501     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4502   cat >> confdefs.h <<EOF
4503 #define $ac_tr_hdr 1
4504 EOF
4505  
4506 else
4507   echo "$ac_t""no" 1>&6
4508 fi
4509 done
4510
4511     for ac_hdr in readline/history.h
4512 do
4513 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4514 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4515 echo "configure:4516: checking for $ac_hdr" >&5
4516 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4517   echo $ac_n "(cached) $ac_c" 1>&6
4518 else
4519   cat > conftest.$ac_ext <<EOF
4520 #line 4521 "configure"
4521 #include "confdefs.h"
4522 #include <$ac_hdr>
4523 EOF
4524 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4525 { (eval echo configure:4526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4526 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4527 if test -z "$ac_err"; then
4528   rm -rf conftest*
4529   eval "ac_cv_header_$ac_safe=yes"
4530 else
4531   echo "$ac_err" >&5
4532   echo "configure: failed program was:" >&5
4533   cat conftest.$ac_ext >&5
4534   rm -rf conftest*
4535   eval "ac_cv_header_$ac_safe=no"
4536 fi
4537 rm -f conftest*
4538 fi
4539 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4540   echo "$ac_t""yes" 1>&6
4541     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4542   cat >> confdefs.h <<EOF
4543 #define $ac_tr_hdr 1
4544 EOF
4545  
4546 else
4547   echo "$ac_t""no" 1>&6
4548 fi
4549 done
4550
4551
4552     for ac_hdr in readline.h readline/readline.h
4553 do
4554 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4555 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4556 echo "configure:4557: checking for $ac_hdr" >&5
4557 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4558   echo $ac_n "(cached) $ac_c" 1>&6
4559 else
4560   cat > conftest.$ac_ext <<EOF
4561 #line 4562 "configure"
4562 #include "confdefs.h"
4563 #include <$ac_hdr>
4564 EOF
4565 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4566 { (eval echo configure:4567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4567 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4568 if test -z "$ac_err"; then
4569   rm -rf conftest*
4570   eval "ac_cv_header_$ac_safe=yes"
4571 else
4572   echo "$ac_err" >&5
4573   echo "configure: failed program was:" >&5
4574   cat conftest.$ac_ext >&5
4575   rm -rf conftest*
4576   eval "ac_cv_header_$ac_safe=no"
4577 fi
4578 rm -f conftest*
4579 fi
4580 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4581   echo "$ac_t""yes" 1>&6
4582     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4583   cat >> confdefs.h <<EOF
4584 #define $ac_tr_hdr 1
4585 EOF
4586  
4587       for termlib in ncurses curses termcap terminfo termlib; do
4588        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4589 echo "configure:4590: checking for tgetent in -l${termlib}" >&5
4590 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4591 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4592   echo $ac_n "(cached) $ac_c" 1>&6
4593 else
4594   ac_save_LIBS="$LIBS"
4595 LIBS="-l${termlib}  $LIBS"
4596 cat > conftest.$ac_ext <<EOF
4597 #line 4598 "configure"
4598 #include "confdefs.h"
4599 /* Override any gcc2 internal prototype to avoid an error.  */
4600 /* We use char because int might match the return type of a gcc2
4601     builtin and then its argument prototype would still apply.  */
4602 char tgetent();
4603
4604 int main() {
4605 tgetent()
4606 ; return 0; }
4607 EOF
4608 if { (eval echo configure:4609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4609   rm -rf conftest*
4610   eval "ac_cv_lib_$ac_lib_var=yes"
4611 else
4612   echo "configure: failed program was:" >&5
4613   cat conftest.$ac_ext >&5
4614   rm -rf conftest*
4615   eval "ac_cv_lib_$ac_lib_var=no"
4616 fi
4617 rm -f conftest*
4618 LIBS="$ac_save_LIBS"
4619
4620 fi
4621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4622   echo "$ac_t""yes" 1>&6
4623   TERMLIBS="-l${termlib}"; break
4624 else
4625   echo "$ac_t""no" 1>&6
4626 fi
4627
4628       done
4629       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4630 echo "configure:4631: checking for rl_callback_handler_install in -lreadline" >&5
4631 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4632 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4633   echo $ac_n "(cached) $ac_c" 1>&6
4634 else
4635   ac_save_LIBS="$LIBS"
4636 LIBS="-lreadline $TERMLIBS $LIBS"
4637 cat > conftest.$ac_ext <<EOF
4638 #line 4639 "configure"
4639 #include "confdefs.h"
4640 /* Override any gcc2 internal prototype to avoid an error.  */
4641 /* We use char because int might match the return type of a gcc2
4642     builtin and then its argument prototype would still apply.  */
4643 char rl_callback_handler_install();
4644
4645 int main() {
4646 rl_callback_handler_install()
4647 ; return 0; }
4648 EOF
4649 if { (eval echo configure:4650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4650   rm -rf conftest*
4651   eval "ac_cv_lib_$ac_lib_var=yes"
4652 else
4653   echo "configure: failed program was:" >&5
4654   cat conftest.$ac_ext >&5
4655   rm -rf conftest*
4656   eval "ac_cv_lib_$ac_lib_var=no"
4657 fi
4658 rm -f conftest*
4659 LIBS="$ac_save_LIBS"
4660
4661 fi
4662 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4663   echo "$ac_t""yes" 1>&6
4664   TERMLIBS="-lreadline $TERMLIBS"
4665        cat >> confdefs.h <<\EOF
4666 #define HAVE_LIBREADLINE 1
4667 EOF
4668
4669        break
4670 else
4671   echo "$ac_t""no" 1>&6
4672 TERMLIBS=
4673 fi
4674
4675 else
4676   echo "$ac_t""no" 1>&6
4677 fi
4678 done
4679
4680     ;;
4681   no)
4682     echo "$ac_t""no" 1>&6
4683     ;;
4684   *)
4685     echo "$ac_t""yes" 1>&6
4686
4687     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4688     # alternate readline path
4689     _ldflags=${LDFLAGS}
4690     _cppflags=${CPPFLAGS}
4691
4692     # Add additional search path
4693     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4694     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4695
4696     for ac_hdr in readline.h history.h readline/readline.h
4697 do
4698 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4699 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4700 echo "configure:4701: checking for $ac_hdr" >&5
4701 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4702   echo $ac_n "(cached) $ac_c" 1>&6
4703 else
4704   cat > conftest.$ac_ext <<EOF
4705 #line 4706 "configure"
4706 #include "confdefs.h"
4707 #include <$ac_hdr>
4708 EOF
4709 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4710 { (eval echo configure:4711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4711 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4712 if test -z "$ac_err"; then
4713   rm -rf conftest*
4714   eval "ac_cv_header_$ac_safe=yes"
4715 else
4716   echo "$ac_err" >&5
4717   echo "configure: failed program was:" >&5
4718   cat conftest.$ac_ext >&5
4719   rm -rf conftest*
4720   eval "ac_cv_header_$ac_safe=no"
4721 fi
4722 rm -f conftest*
4723 fi
4724 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4725   echo "$ac_t""yes" 1>&6
4726     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4727   cat >> confdefs.h <<EOF
4728 #define $ac_tr_hdr 1
4729 EOF
4730  
4731 else
4732   echo "$ac_t""no" 1>&6
4733 fi
4734 done
4735
4736     for ac_hdr in readline/history.h
4737 do
4738 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4739 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4740 echo "configure:4741: checking for $ac_hdr" >&5
4741 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4742   echo $ac_n "(cached) $ac_c" 1>&6
4743 else
4744   cat > conftest.$ac_ext <<EOF
4745 #line 4746 "configure"
4746 #include "confdefs.h"
4747 #include <$ac_hdr>
4748 EOF
4749 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4750 { (eval echo configure:4751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4751 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4752 if test -z "$ac_err"; then
4753   rm -rf conftest*
4754   eval "ac_cv_header_$ac_safe=yes"
4755 else
4756   echo "$ac_err" >&5
4757   echo "configure: failed program was:" >&5
4758   cat conftest.$ac_ext >&5
4759   rm -rf conftest*
4760   eval "ac_cv_header_$ac_safe=no"
4761 fi
4762 rm -f conftest*
4763 fi
4764 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4765   echo "$ac_t""yes" 1>&6
4766     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4767   cat >> confdefs.h <<EOF
4768 #define $ac_tr_hdr 1
4769 EOF
4770  
4771 else
4772   echo "$ac_t""no" 1>&6
4773 fi
4774 done
4775
4776
4777     for ac_hdr in readline.h readline/readline.h
4778 do
4779 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4780 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4781 echo "configure:4782: checking for $ac_hdr" >&5
4782 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4783   echo $ac_n "(cached) $ac_c" 1>&6
4784 else
4785   cat > conftest.$ac_ext <<EOF
4786 #line 4787 "configure"
4787 #include "confdefs.h"
4788 #include <$ac_hdr>
4789 EOF
4790 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4791 { (eval echo configure:4792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4792 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4793 if test -z "$ac_err"; then
4794   rm -rf conftest*
4795   eval "ac_cv_header_$ac_safe=yes"
4796 else
4797   echo "$ac_err" >&5
4798   echo "configure: failed program was:" >&5
4799   cat conftest.$ac_ext >&5
4800   rm -rf conftest*
4801   eval "ac_cv_header_$ac_safe=no"
4802 fi
4803 rm -f conftest*
4804 fi
4805 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4806   echo "$ac_t""yes" 1>&6
4807     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4808   cat >> confdefs.h <<EOF
4809 #define $ac_tr_hdr 1
4810 EOF
4811  
4812       for termlib in ncurses curses termcap terminfo termlib; do
4813        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4814 echo "configure:4815: checking for tgetent in -l${termlib}" >&5
4815 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4816 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4817   echo $ac_n "(cached) $ac_c" 1>&6
4818 else
4819   ac_save_LIBS="$LIBS"
4820 LIBS="-l${termlib}  $LIBS"
4821 cat > conftest.$ac_ext <<EOF
4822 #line 4823 "configure"
4823 #include "confdefs.h"
4824 /* Override any gcc2 internal prototype to avoid an error.  */
4825 /* We use char because int might match the return type of a gcc2
4826     builtin and then its argument prototype would still apply.  */
4827 char tgetent();
4828
4829 int main() {
4830 tgetent()
4831 ; return 0; }
4832 EOF
4833 if { (eval echo configure:4834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4834   rm -rf conftest*
4835   eval "ac_cv_lib_$ac_lib_var=yes"
4836 else
4837   echo "configure: failed program was:" >&5
4838   cat conftest.$ac_ext >&5
4839   rm -rf conftest*
4840   eval "ac_cv_lib_$ac_lib_var=no"
4841 fi
4842 rm -f conftest*
4843 LIBS="$ac_save_LIBS"
4844
4845 fi
4846 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4847   echo "$ac_t""yes" 1>&6
4848   TERMLIBS="-l${termlib}"; break
4849 else
4850   echo "$ac_t""no" 1>&6
4851 fi
4852
4853       done
4854       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4855 echo "configure:4856: checking for rl_callback_handler_install in -lreadline" >&5
4856 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4857 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4858   echo $ac_n "(cached) $ac_c" 1>&6
4859 else
4860   ac_save_LIBS="$LIBS"
4861 LIBS="-lreadline $TERMLIBS $LIBS"
4862 cat > conftest.$ac_ext <<EOF
4863 #line 4864 "configure"
4864 #include "confdefs.h"
4865 /* Override any gcc2 internal prototype to avoid an error.  */
4866 /* We use char because int might match the return type of a gcc2
4867     builtin and then its argument prototype would still apply.  */
4868 char rl_callback_handler_install();
4869
4870 int main() {
4871 rl_callback_handler_install()
4872 ; return 0; }
4873 EOF
4874 if { (eval echo configure:4875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4875   rm -rf conftest*
4876   eval "ac_cv_lib_$ac_lib_var=yes"
4877 else
4878   echo "configure: failed program was:" >&5
4879   cat conftest.$ac_ext >&5
4880   rm -rf conftest*
4881   eval "ac_cv_lib_$ac_lib_var=no"
4882 fi
4883 rm -f conftest*
4884 LIBS="$ac_save_LIBS"
4885
4886 fi
4887 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4888   echo "$ac_t""yes" 1>&6
4889   TERMLDFLAGS="-L$with_readline/lib"
4890        TERMCPPFLAGS="-I$with_readline/include"
4891        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4892        TERMLIBS="-lreadline $TERMLIBS"
4893        cat >> confdefs.h <<\EOF
4894 #define HAVE_LIBREADLINE 1
4895 EOF
4896
4897        break
4898 else
4899   echo "$ac_t""no" 1>&6
4900 TERMLIBS= CPPFLAGS=$_cppflags
4901 fi
4902
4903 else
4904   echo "$ac_t""no" 1>&6
4905 fi
4906 done
4907
4908
4909     LDFLAGS=$_ldflags
4910     ;;
4911   esac
4912 else
4913   echo "$ac_t""no" 1>&6
4914
4915 fi
4916
4917
4918
4919
4920 # The following test taken from the cvs sources
4921 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4922 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4923 # libsocket.so which has a bad implementation of gethostbyname (it
4924 # only looks in /etc/hosts), so we only look for -lsocket if we need
4925 # it.
4926 for ac_func in connect
4927 do
4928 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4929 echo "configure:4930: checking for $ac_func" >&5
4930 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4931   echo $ac_n "(cached) $ac_c" 1>&6
4932 else
4933   cat > conftest.$ac_ext <<EOF
4934 #line 4935 "configure"
4935 #include "confdefs.h"
4936 /* System header to define __stub macros and hopefully few prototypes,
4937     which can conflict with char $ac_func(); below.  */
4938 #include <assert.h>
4939 /* Override any gcc2 internal prototype to avoid an error.  */
4940 /* We use char because int might match the return type of a gcc2
4941     builtin and then its argument prototype would still apply.  */
4942 char $ac_func();
4943
4944 int main() {
4945
4946 /* The GNU C library defines this for functions which it implements
4947     to always fail with ENOSYS.  Some functions are actually named
4948     something starting with __ and the normal name is an alias.  */
4949 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4950 choke me
4951 #else
4952 $ac_func();
4953 #endif
4954
4955 ; return 0; }
4956 EOF
4957 if { (eval echo configure:4958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4958   rm -rf conftest*
4959   eval "ac_cv_func_$ac_func=yes"
4960 else
4961   echo "configure: failed program was:" >&5
4962   cat conftest.$ac_ext >&5
4963   rm -rf conftest*
4964   eval "ac_cv_func_$ac_func=no"
4965 fi
4966 rm -f conftest*
4967 fi
4968
4969 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4970   echo "$ac_t""yes" 1>&6
4971     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4972   cat >> confdefs.h <<EOF
4973 #define $ac_tr_func 1
4974 EOF
4975  
4976 else
4977   echo "$ac_t""no" 1>&6
4978 fi
4979 done
4980
4981 if test x"$ac_cv_func_connect" = x"no"; then
4982     case "$LIBS" in
4983     *-lnsl*) ;;
4984     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4985 echo "configure:4986: checking for printf in -lnsl_s" >&5
4986 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4987 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4988   echo $ac_n "(cached) $ac_c" 1>&6
4989 else
4990   ac_save_LIBS="$LIBS"
4991 LIBS="-lnsl_s  $LIBS"
4992 cat > conftest.$ac_ext <<EOF
4993 #line 4994 "configure"
4994 #include "confdefs.h"
4995 /* Override any gcc2 internal prototype to avoid an error.  */
4996 /* We use char because int might match the return type of a gcc2
4997     builtin and then its argument prototype would still apply.  */
4998 char printf();
4999
5000 int main() {
5001 printf()
5002 ; return 0; }
5003 EOF
5004 if { (eval echo configure:5005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5005   rm -rf conftest*
5006   eval "ac_cv_lib_$ac_lib_var=yes"
5007 else
5008   echo "configure: failed program was:" >&5
5009   cat conftest.$ac_ext >&5
5010   rm -rf conftest*
5011   eval "ac_cv_lib_$ac_lib_var=no"
5012 fi
5013 rm -f conftest*
5014 LIBS="$ac_save_LIBS"
5015
5016 fi
5017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5018   echo "$ac_t""yes" 1>&6
5019     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5020     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5021   cat >> confdefs.h <<EOF
5022 #define $ac_tr_lib 1
5023 EOF
5024
5025   LIBS="-lnsl_s $LIBS"
5026
5027 else
5028   echo "$ac_t""no" 1>&6
5029 fi
5030  ;;
5031     esac
5032     case "$LIBS" in
5033     *-lnsl*) ;;
5034     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
5035 echo "configure:5036: checking for printf in -lnsl" >&5
5036 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
5037 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5038   echo $ac_n "(cached) $ac_c" 1>&6
5039 else
5040   ac_save_LIBS="$LIBS"
5041 LIBS="-lnsl  $LIBS"
5042 cat > conftest.$ac_ext <<EOF
5043 #line 5044 "configure"
5044 #include "confdefs.h"
5045 /* Override any gcc2 internal prototype to avoid an error.  */
5046 /* We use char because int might match the return type of a gcc2
5047     builtin and then its argument prototype would still apply.  */
5048 char printf();
5049
5050 int main() {
5051 printf()
5052 ; return 0; }
5053 EOF
5054 if { (eval echo configure:5055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5055   rm -rf conftest*
5056   eval "ac_cv_lib_$ac_lib_var=yes"
5057 else
5058   echo "configure: failed program was:" >&5
5059   cat conftest.$ac_ext >&5
5060   rm -rf conftest*
5061   eval "ac_cv_lib_$ac_lib_var=no"
5062 fi
5063 rm -f conftest*
5064 LIBS="$ac_save_LIBS"
5065
5066 fi
5067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5068   echo "$ac_t""yes" 1>&6
5069     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5070     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5071   cat >> confdefs.h <<EOF
5072 #define $ac_tr_lib 1
5073 EOF
5074
5075   LIBS="-lnsl $LIBS"
5076
5077 else
5078   echo "$ac_t""no" 1>&6
5079 fi
5080  ;;
5081     esac
5082     case "$LIBS" in
5083     *-lsocket*) ;;
5084     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5085 echo "configure:5086: checking for connect in -lsocket" >&5
5086 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5087 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5088   echo $ac_n "(cached) $ac_c" 1>&6
5089 else
5090   ac_save_LIBS="$LIBS"
5091 LIBS="-lsocket  $LIBS"
5092 cat > conftest.$ac_ext <<EOF
5093 #line 5094 "configure"
5094 #include "confdefs.h"
5095 /* Override any gcc2 internal prototype to avoid an error.  */
5096 /* We use char because int might match the return type of a gcc2
5097     builtin and then its argument prototype would still apply.  */
5098 char connect();
5099
5100 int main() {
5101 connect()
5102 ; return 0; }
5103 EOF
5104 if { (eval echo configure:5105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5105   rm -rf conftest*
5106   eval "ac_cv_lib_$ac_lib_var=yes"
5107 else
5108   echo "configure: failed program was:" >&5
5109   cat conftest.$ac_ext >&5
5110   rm -rf conftest*
5111   eval "ac_cv_lib_$ac_lib_var=no"
5112 fi
5113 rm -f conftest*
5114 LIBS="$ac_save_LIBS"
5115
5116 fi
5117 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5118   echo "$ac_t""yes" 1>&6
5119     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5120     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5121   cat >> confdefs.h <<EOF
5122 #define $ac_tr_lib 1
5123 EOF
5124
5125   LIBS="-lsocket $LIBS"
5126
5127 else
5128   echo "$ac_t""no" 1>&6
5129 fi
5130  ;;
5131     esac
5132     case "$LIBS" in
5133     *-linet*) ;;
5134     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
5135 echo "configure:5136: checking for connect in -linet" >&5
5136 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
5137 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5138   echo $ac_n "(cached) $ac_c" 1>&6
5139 else
5140   ac_save_LIBS="$LIBS"
5141 LIBS="-linet  $LIBS"
5142 cat > conftest.$ac_ext <<EOF
5143 #line 5144 "configure"
5144 #include "confdefs.h"
5145 /* Override any gcc2 internal prototype to avoid an error.  */
5146 /* We use char because int might match the return type of a gcc2
5147     builtin and then its argument prototype would still apply.  */
5148 char connect();
5149
5150 int main() {
5151 connect()
5152 ; return 0; }
5153 EOF
5154 if { (eval echo configure:5155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5155   rm -rf conftest*
5156   eval "ac_cv_lib_$ac_lib_var=yes"
5157 else
5158   echo "configure: failed program was:" >&5
5159   cat conftest.$ac_ext >&5
5160   rm -rf conftest*
5161   eval "ac_cv_lib_$ac_lib_var=no"
5162 fi
5163 rm -f conftest*
5164 LIBS="$ac_save_LIBS"
5165
5166 fi
5167 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5168   echo "$ac_t""yes" 1>&6
5169     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5170     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5171   cat >> confdefs.h <<EOF
5172 #define $ac_tr_lib 1
5173 EOF
5174
5175   LIBS="-linet $LIBS"
5176
5177 else
5178   echo "$ac_t""no" 1>&6
5179 fi
5180  ;;
5181     esac
5182             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
5183        test x"$ac_cv_lib_inet_connect" = x"yes"; then
5184         # ac_cv_func_connect=yes
5185         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
5186         cat >> confdefs.h <<\EOF
5187 #define HAVE_CONNECT 1
5188 EOF
5189
5190     fi
5191 fi
5192
5193 ###############################################
5194 # test for where we get get_yp_default_domain() from
5195 for ac_func in yp_get_default_domain
5196 do
5197 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5198 echo "configure:5199: checking for $ac_func" >&5
5199 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5200   echo $ac_n "(cached) $ac_c" 1>&6
5201 else
5202   cat > conftest.$ac_ext <<EOF
5203 #line 5204 "configure"
5204 #include "confdefs.h"
5205 /* System header to define __stub macros and hopefully few prototypes,
5206     which can conflict with char $ac_func(); below.  */
5207 #include <assert.h>
5208 /* Override any gcc2 internal prototype to avoid an error.  */
5209 /* We use char because int might match the return type of a gcc2
5210     builtin and then its argument prototype would still apply.  */
5211 char $ac_func();
5212
5213 int main() {
5214
5215 /* The GNU C library defines this for functions which it implements
5216     to always fail with ENOSYS.  Some functions are actually named
5217     something starting with __ and the normal name is an alias.  */
5218 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5219 choke me
5220 #else
5221 $ac_func();
5222 #endif
5223
5224 ; return 0; }
5225 EOF
5226 if { (eval echo configure:5227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5227   rm -rf conftest*
5228   eval "ac_cv_func_$ac_func=yes"
5229 else
5230   echo "configure: failed program was:" >&5
5231   cat conftest.$ac_ext >&5
5232   rm -rf conftest*
5233   eval "ac_cv_func_$ac_func=no"
5234 fi
5235 rm -f conftest*
5236 fi
5237
5238 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5239   echo "$ac_t""yes" 1>&6
5240     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5241   cat >> confdefs.h <<EOF
5242 #define $ac_tr_func 1
5243 EOF
5244  
5245 else
5246   echo "$ac_t""no" 1>&6
5247 fi
5248 done
5249
5250 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5251         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5252 echo "configure:5253: checking for yp_get_default_domain in -lnsl" >&5
5253 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5254 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5255   echo $ac_n "(cached) $ac_c" 1>&6
5256 else
5257   ac_save_LIBS="$LIBS"
5258 LIBS="-lnsl  $LIBS"
5259 cat > conftest.$ac_ext <<EOF
5260 #line 5261 "configure"
5261 #include "confdefs.h"
5262 /* Override any gcc2 internal prototype to avoid an error.  */
5263 /* We use char because int might match the return type of a gcc2
5264     builtin and then its argument prototype would still apply.  */
5265 char yp_get_default_domain();
5266
5267 int main() {
5268 yp_get_default_domain()
5269 ; return 0; }
5270 EOF
5271 if { (eval echo configure:5272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5272   rm -rf conftest*
5273   eval "ac_cv_lib_$ac_lib_var=yes"
5274 else
5275   echo "configure: failed program was:" >&5
5276   cat conftest.$ac_ext >&5
5277   rm -rf conftest*
5278   eval "ac_cv_lib_$ac_lib_var=no"
5279 fi
5280 rm -f conftest*
5281 LIBS="$ac_save_LIBS"
5282
5283 fi
5284 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5285   echo "$ac_t""yes" 1>&6
5286   LIBS="$LIBS -lnsl";
5287         cat >> confdefs.h <<\EOF
5288 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5289 EOF
5290
5291 else
5292   echo "$ac_t""no" 1>&6
5293 fi
5294  
5295 fi
5296
5297 # Check if we have execl, if not we need to compile smbrun.
5298 for ac_func in execl
5299 do
5300 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5301 echo "configure:5302: checking for $ac_func" >&5
5302 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5303   echo $ac_n "(cached) $ac_c" 1>&6
5304 else
5305   cat > conftest.$ac_ext <<EOF
5306 #line 5307 "configure"
5307 #include "confdefs.h"
5308 /* System header to define __stub macros and hopefully few prototypes,
5309     which can conflict with char $ac_func(); below.  */
5310 #include <assert.h>
5311 /* Override any gcc2 internal prototype to avoid an error.  */
5312 /* We use char because int might match the return type of a gcc2
5313     builtin and then its argument prototype would still apply.  */
5314 char $ac_func();
5315
5316 int main() {
5317
5318 /* The GNU C library defines this for functions which it implements
5319     to always fail with ENOSYS.  Some functions are actually named
5320     something starting with __ and the normal name is an alias.  */
5321 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5322 choke me
5323 #else
5324 $ac_func();
5325 #endif
5326
5327 ; return 0; }
5328 EOF
5329 if { (eval echo configure:5330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5330   rm -rf conftest*
5331   eval "ac_cv_func_$ac_func=yes"
5332 else
5333   echo "configure: failed program was:" >&5
5334   cat conftest.$ac_ext >&5
5335   rm -rf conftest*
5336   eval "ac_cv_func_$ac_func=no"
5337 fi
5338 rm -f conftest*
5339 fi
5340
5341 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5342   echo "$ac_t""yes" 1>&6
5343     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5344   cat >> confdefs.h <<EOF
5345 #define $ac_tr_func 1
5346 EOF
5347  
5348 else
5349   echo "$ac_t""no" 1>&6
5350 fi
5351 done
5352
5353 if test x"$ac_cv_func_execl" = x"no"; then
5354     RUNPROG="bin/smbrun"
5355 else
5356     RUNPROG=""
5357 fi
5358
5359 for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot
5360 do
5361 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5362 echo "configure:5363: checking for $ac_func" >&5
5363 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5364   echo $ac_n "(cached) $ac_c" 1>&6
5365 else
5366   cat > conftest.$ac_ext <<EOF
5367 #line 5368 "configure"
5368 #include "confdefs.h"
5369 /* System header to define __stub macros and hopefully few prototypes,
5370     which can conflict with char $ac_func(); below.  */
5371 #include <assert.h>
5372 /* Override any gcc2 internal prototype to avoid an error.  */
5373 /* We use char because int might match the return type of a gcc2
5374     builtin and then its argument prototype would still apply.  */
5375 char $ac_func();
5376
5377 int main() {
5378
5379 /* The GNU C library defines this for functions which it implements
5380     to always fail with ENOSYS.  Some functions are actually named
5381     something starting with __ and the normal name is an alias.  */
5382 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5383 choke me
5384 #else
5385 $ac_func();
5386 #endif
5387
5388 ; return 0; }
5389 EOF
5390 if { (eval echo configure:5391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5391   rm -rf conftest*
5392   eval "ac_cv_func_$ac_func=yes"
5393 else
5394   echo "configure: failed program was:" >&5
5395   cat conftest.$ac_ext >&5
5396   rm -rf conftest*
5397   eval "ac_cv_func_$ac_func=no"
5398 fi
5399 rm -f conftest*
5400 fi
5401
5402 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5403   echo "$ac_t""yes" 1>&6
5404     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5405   cat >> confdefs.h <<EOF
5406 #define $ac_tr_func 1
5407 EOF
5408  
5409 else
5410   echo "$ac_t""no" 1>&6
5411 fi
5412 done
5413
5414 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset
5415 do
5416 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5417 echo "configure:5418: checking for $ac_func" >&5
5418 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5419   echo $ac_n "(cached) $ac_c" 1>&6
5420 else
5421   cat > conftest.$ac_ext <<EOF
5422 #line 5423 "configure"
5423 #include "confdefs.h"
5424 /* System header to define __stub macros and hopefully few prototypes,
5425     which can conflict with char $ac_func(); below.  */
5426 #include <assert.h>
5427 /* Override any gcc2 internal prototype to avoid an error.  */
5428 /* We use char because int might match the return type of a gcc2
5429     builtin and then its argument prototype would still apply.  */
5430 char $ac_func();
5431
5432 int main() {
5433
5434 /* The GNU C library defines this for functions which it implements
5435     to always fail with ENOSYS.  Some functions are actually named
5436     something starting with __ and the normal name is an alias.  */
5437 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5438 choke me
5439 #else
5440 $ac_func();
5441 #endif
5442
5443 ; return 0; }
5444 EOF
5445 if { (eval echo configure:5446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5446   rm -rf conftest*
5447   eval "ac_cv_func_$ac_func=yes"
5448 else
5449   echo "configure: failed program was:" >&5
5450   cat conftest.$ac_ext >&5
5451   rm -rf conftest*
5452   eval "ac_cv_func_$ac_func=no"
5453 fi
5454 rm -f conftest*
5455 fi
5456
5457 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5458   echo "$ac_t""yes" 1>&6
5459     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5460   cat >> confdefs.h <<EOF
5461 #define $ac_tr_func 1
5462 EOF
5463  
5464 else
5465   echo "$ac_t""no" 1>&6
5466 fi
5467 done
5468
5469 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5470 do
5471 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5472 echo "configure:5473: checking for $ac_func" >&5
5473 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5474   echo $ac_n "(cached) $ac_c" 1>&6
5475 else
5476   cat > conftest.$ac_ext <<EOF
5477 #line 5478 "configure"
5478 #include "confdefs.h"
5479 /* System header to define __stub macros and hopefully few prototypes,
5480     which can conflict with char $ac_func(); below.  */
5481 #include <assert.h>
5482 /* Override any gcc2 internal prototype to avoid an error.  */
5483 /* We use char because int might match the return type of a gcc2
5484     builtin and then its argument prototype would still apply.  */
5485 char $ac_func();
5486
5487 int main() {
5488
5489 /* The GNU C library defines this for functions which it implements
5490     to always fail with ENOSYS.  Some functions are actually named
5491     something starting with __ and the normal name is an alias.  */
5492 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5493 choke me
5494 #else
5495 $ac_func();
5496 #endif
5497
5498 ; return 0; }
5499 EOF
5500 if { (eval echo configure:5501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5501   rm -rf conftest*
5502   eval "ac_cv_func_$ac_func=yes"
5503 else
5504   echo "configure: failed program was:" >&5
5505   cat conftest.$ac_ext >&5
5506   rm -rf conftest*
5507   eval "ac_cv_func_$ac_func=no"
5508 fi
5509 rm -f conftest*
5510 fi
5511
5512 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5513   echo "$ac_t""yes" 1>&6
5514     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5515   cat >> confdefs.h <<EOF
5516 #define $ac_tr_func 1
5517 EOF
5518  
5519 else
5520   echo "$ac_t""no" 1>&6
5521 fi
5522 done
5523
5524 for ac_func in strftime sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent
5525 do
5526 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5527 echo "configure:5528: checking for $ac_func" >&5
5528 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5529   echo $ac_n "(cached) $ac_c" 1>&6
5530 else
5531   cat > conftest.$ac_ext <<EOF
5532 #line 5533 "configure"
5533 #include "confdefs.h"
5534 /* System header to define __stub macros and hopefully few prototypes,
5535     which can conflict with char $ac_func(); below.  */
5536 #include <assert.h>
5537 /* Override any gcc2 internal prototype to avoid an error.  */
5538 /* We use char because int might match the return type of a gcc2
5539     builtin and then its argument prototype would still apply.  */
5540 char $ac_func();
5541
5542 int main() {
5543
5544 /* The GNU C library defines this for functions which it implements
5545     to always fail with ENOSYS.  Some functions are actually named
5546     something starting with __ and the normal name is an alias.  */
5547 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5548 choke me
5549 #else
5550 $ac_func();
5551 #endif
5552
5553 ; return 0; }
5554 EOF
5555 if { (eval echo configure:5556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5556   rm -rf conftest*
5557   eval "ac_cv_func_$ac_func=yes"
5558 else
5559   echo "configure: failed program was:" >&5
5560   cat conftest.$ac_ext >&5
5561   rm -rf conftest*
5562   eval "ac_cv_func_$ac_func=no"
5563 fi
5564 rm -f conftest*
5565 fi
5566
5567 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5568   echo "$ac_t""yes" 1>&6
5569     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5570   cat >> confdefs.h <<EOF
5571 #define $ac_tr_func 1
5572 EOF
5573  
5574 else
5575   echo "$ac_t""no" 1>&6
5576 fi
5577 done
5578
5579 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
5580 do
5581 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5582 echo "configure:5583: checking for $ac_func" >&5
5583 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5584   echo $ac_n "(cached) $ac_c" 1>&6
5585 else
5586   cat > conftest.$ac_ext <<EOF
5587 #line 5588 "configure"
5588 #include "confdefs.h"
5589 /* System header to define __stub macros and hopefully few prototypes,
5590     which can conflict with char $ac_func(); below.  */
5591 #include <assert.h>
5592 /* Override any gcc2 internal prototype to avoid an error.  */
5593 /* We use char because int might match the return type of a gcc2
5594     builtin and then its argument prototype would still apply.  */
5595 char $ac_func();
5596
5597 int main() {
5598
5599 /* The GNU C library defines this for functions which it implements
5600     to always fail with ENOSYS.  Some functions are actually named
5601     something starting with __ and the normal name is an alias.  */
5602 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5603 choke me
5604 #else
5605 $ac_func();
5606 #endif
5607
5608 ; return 0; }
5609 EOF
5610 if { (eval echo configure:5611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5611   rm -rf conftest*
5612   eval "ac_cv_func_$ac_func=yes"
5613 else
5614   echo "configure: failed program was:" >&5
5615   cat conftest.$ac_ext >&5
5616   rm -rf conftest*
5617   eval "ac_cv_func_$ac_func=no"
5618 fi
5619 rm -f conftest*
5620 fi
5621
5622 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5623   echo "$ac_t""yes" 1>&6
5624     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5625   cat >> confdefs.h <<EOF
5626 #define $ac_tr_func 1
5627 EOF
5628  
5629 else
5630   echo "$ac_t""no" 1>&6
5631 fi
5632 done
5633
5634 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5635 do
5636 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5637 echo "configure:5638: checking for $ac_func" >&5
5638 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5639   echo $ac_n "(cached) $ac_c" 1>&6
5640 else
5641   cat > conftest.$ac_ext <<EOF
5642 #line 5643 "configure"
5643 #include "confdefs.h"
5644 /* System header to define __stub macros and hopefully few prototypes,
5645     which can conflict with char $ac_func(); below.  */
5646 #include <assert.h>
5647 /* Override any gcc2 internal prototype to avoid an error.  */
5648 /* We use char because int might match the return type of a gcc2
5649     builtin and then its argument prototype would still apply.  */
5650 char $ac_func();
5651
5652 int main() {
5653
5654 /* The GNU C library defines this for functions which it implements
5655     to always fail with ENOSYS.  Some functions are actually named
5656     something starting with __ and the normal name is an alias.  */
5657 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5658 choke me
5659 #else
5660 $ac_func();
5661 #endif
5662
5663 ; return 0; }
5664 EOF
5665 if { (eval echo configure:5666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5666   rm -rf conftest*
5667   eval "ac_cv_func_$ac_func=yes"
5668 else
5669   echo "configure: failed program was:" >&5
5670   cat conftest.$ac_ext >&5
5671   rm -rf conftest*
5672   eval "ac_cv_func_$ac_func=no"
5673 fi
5674 rm -f conftest*
5675 fi
5676
5677 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5678   echo "$ac_t""yes" 1>&6
5679     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5680   cat >> confdefs.h <<EOF
5681 #define $ac_tr_func 1
5682 EOF
5683  
5684 else
5685   echo "$ac_t""no" 1>&6
5686 fi
5687 done
5688
5689 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5690 do
5691 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5692 echo "configure:5693: checking for $ac_func" >&5
5693 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5694   echo $ac_n "(cached) $ac_c" 1>&6
5695 else
5696   cat > conftest.$ac_ext <<EOF
5697 #line 5698 "configure"
5698 #include "confdefs.h"
5699 /* System header to define __stub macros and hopefully few prototypes,
5700     which can conflict with char $ac_func(); below.  */
5701 #include <assert.h>
5702 /* Override any gcc2 internal prototype to avoid an error.  */
5703 /* We use char because int might match the return type of a gcc2
5704     builtin and then its argument prototype would still apply.  */
5705 char $ac_func();
5706
5707 int main() {
5708
5709 /* The GNU C library defines this for functions which it implements
5710     to always fail with ENOSYS.  Some functions are actually named
5711     something starting with __ and the normal name is an alias.  */
5712 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5713 choke me
5714 #else
5715 $ac_func();
5716 #endif
5717
5718 ; return 0; }
5719 EOF
5720 if { (eval echo configure:5721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5721   rm -rf conftest*
5722   eval "ac_cv_func_$ac_func=yes"
5723 else
5724   echo "configure: failed program was:" >&5
5725   cat conftest.$ac_ext >&5
5726   rm -rf conftest*
5727   eval "ac_cv_func_$ac_func=no"
5728 fi
5729 rm -f conftest*
5730 fi
5731
5732 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5733   echo "$ac_t""yes" 1>&6
5734     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5735   cat >> confdefs.h <<EOF
5736 #define $ac_tr_func 1
5737 EOF
5738  
5739 else
5740   echo "$ac_t""no" 1>&6
5741 fi
5742 done
5743
5744 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5745 do
5746 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5747 echo "configure:5748: checking for $ac_func" >&5
5748 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5749   echo $ac_n "(cached) $ac_c" 1>&6
5750 else
5751   cat > conftest.$ac_ext <<EOF
5752 #line 5753 "configure"
5753 #include "confdefs.h"
5754 /* System header to define __stub macros and hopefully few prototypes,
5755     which can conflict with char $ac_func(); below.  */
5756 #include <assert.h>
5757 /* Override any gcc2 internal prototype to avoid an error.  */
5758 /* We use char because int might match the return type of a gcc2
5759     builtin and then its argument prototype would still apply.  */
5760 char $ac_func();
5761
5762 int main() {
5763
5764 /* The GNU C library defines this for functions which it implements
5765     to always fail with ENOSYS.  Some functions are actually named
5766     something starting with __ and the normal name is an alias.  */
5767 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5768 choke me
5769 #else
5770 $ac_func();
5771 #endif
5772
5773 ; return 0; }
5774 EOF
5775 if { (eval echo configure:5776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5776   rm -rf conftest*
5777   eval "ac_cv_func_$ac_func=yes"
5778 else
5779   echo "configure: failed program was:" >&5
5780   cat conftest.$ac_ext >&5
5781   rm -rf conftest*
5782   eval "ac_cv_func_$ac_func=no"
5783 fi
5784 rm -f conftest*
5785 fi
5786
5787 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5788   echo "$ac_t""yes" 1>&6
5789     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5790   cat >> confdefs.h <<EOF
5791 #define $ac_tr_func 1
5792 EOF
5793  
5794 else
5795   echo "$ac_t""no" 1>&6
5796 fi
5797 done
5798
5799 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5800 do
5801 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5802 echo "configure:5803: checking for $ac_func" >&5
5803 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5804   echo $ac_n "(cached) $ac_c" 1>&6
5805 else
5806   cat > conftest.$ac_ext <<EOF
5807 #line 5808 "configure"
5808 #include "confdefs.h"
5809 /* System header to define __stub macros and hopefully few prototypes,
5810     which can conflict with char $ac_func(); below.  */
5811 #include <assert.h>
5812 /* Override any gcc2 internal prototype to avoid an error.  */
5813 /* We use char because int might match the return type of a gcc2
5814     builtin and then its argument prototype would still apply.  */
5815 char $ac_func();
5816
5817 int main() {
5818
5819 /* The GNU C library defines this for functions which it implements
5820     to always fail with ENOSYS.  Some functions are actually named
5821     something starting with __ and the normal name is an alias.  */
5822 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5823 choke me
5824 #else
5825 $ac_func();
5826 #endif
5827
5828 ; return 0; }
5829 EOF
5830 if { (eval echo configure:5831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5831   rm -rf conftest*
5832   eval "ac_cv_func_$ac_func=yes"
5833 else
5834   echo "configure: failed program was:" >&5
5835   cat conftest.$ac_ext >&5
5836   rm -rf conftest*
5837   eval "ac_cv_func_$ac_func=no"
5838 fi
5839 rm -f conftest*
5840 fi
5841
5842 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5843   echo "$ac_t""yes" 1>&6
5844     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5845   cat >> confdefs.h <<EOF
5846 #define $ac_tr_func 1
5847 EOF
5848  
5849 else
5850   echo "$ac_t""no" 1>&6
5851 fi
5852 done
5853
5854 # setbuffer is needed for smbtorture
5855 for ac_func in setbuffer
5856 do
5857 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5858 echo "configure:5859: checking for $ac_func" >&5
5859 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5860   echo $ac_n "(cached) $ac_c" 1>&6
5861 else
5862   cat > conftest.$ac_ext <<EOF
5863 #line 5864 "configure"
5864 #include "confdefs.h"
5865 /* System header to define __stub macros and hopefully few prototypes,
5866     which can conflict with char $ac_func(); below.  */
5867 #include <assert.h>
5868 /* Override any gcc2 internal prototype to avoid an error.  */
5869 /* We use char because int might match the return type of a gcc2
5870     builtin and then its argument prototype would still apply.  */
5871 char $ac_func();
5872
5873 int main() {
5874
5875 /* The GNU C library defines this for functions which it implements
5876     to always fail with ENOSYS.  Some functions are actually named
5877     something starting with __ and the normal name is an alias.  */
5878 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5879 choke me
5880 #else
5881 $ac_func();
5882 #endif
5883
5884 ; return 0; }
5885 EOF
5886 if { (eval echo configure:5887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5887   rm -rf conftest*
5888   eval "ac_cv_func_$ac_func=yes"
5889 else
5890   echo "configure: failed program was:" >&5
5891   cat conftest.$ac_ext >&5
5892   rm -rf conftest*
5893   eval "ac_cv_func_$ac_func=no"
5894 fi
5895 rm -f conftest*
5896 fi
5897
5898 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5899   echo "$ac_t""yes" 1>&6
5900     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5901   cat >> confdefs.h <<EOF
5902 #define $ac_tr_func 1
5903 EOF
5904  
5905 else
5906   echo "$ac_t""no" 1>&6
5907 fi
5908 done
5909
5910
5911 # syscall() is needed for smbwrapper.
5912 for ac_func in syscall
5913 do
5914 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5915 echo "configure:5916: checking for $ac_func" >&5
5916 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5917   echo $ac_n "(cached) $ac_c" 1>&6
5918 else
5919   cat > conftest.$ac_ext <<EOF
5920 #line 5921 "configure"
5921 #include "confdefs.h"
5922 /* System header to define __stub macros and hopefully few prototypes,
5923     which can conflict with char $ac_func(); below.  */
5924 #include <assert.h>
5925 /* Override any gcc2 internal prototype to avoid an error.  */
5926 /* We use char because int might match the return type of a gcc2
5927     builtin and then its argument prototype would still apply.  */
5928 char $ac_func();
5929
5930 int main() {
5931
5932 /* The GNU C library defines this for functions which it implements
5933     to always fail with ENOSYS.  Some functions are actually named
5934     something starting with __ and the normal name is an alias.  */
5935 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5936 choke me
5937 #else
5938 $ac_func();
5939 #endif
5940
5941 ; return 0; }
5942 EOF
5943 if { (eval echo configure:5944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5944   rm -rf conftest*
5945   eval "ac_cv_func_$ac_func=yes"
5946 else
5947   echo "configure: failed program was:" >&5
5948   cat conftest.$ac_ext >&5
5949   rm -rf conftest*
5950   eval "ac_cv_func_$ac_func=no"
5951 fi
5952 rm -f conftest*
5953 fi
5954
5955 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5956   echo "$ac_t""yes" 1>&6
5957     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5958   cat >> confdefs.h <<EOF
5959 #define $ac_tr_func 1
5960 EOF
5961  
5962 else
5963   echo "$ac_t""no" 1>&6
5964 fi
5965 done
5966
5967
5968 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5969 do
5970 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5971 echo "configure:5972: checking for $ac_func" >&5
5972 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5973   echo $ac_n "(cached) $ac_c" 1>&6
5974 else
5975   cat > conftest.$ac_ext <<EOF
5976 #line 5977 "configure"
5977 #include "confdefs.h"
5978 /* System header to define __stub macros and hopefully few prototypes,
5979     which can conflict with char $ac_func(); below.  */
5980 #include <assert.h>
5981 /* Override any gcc2 internal prototype to avoid an error.  */
5982 /* We use char because int might match the return type of a gcc2
5983     builtin and then its argument prototype would still apply.  */
5984 char $ac_func();
5985
5986 int main() {
5987
5988 /* The GNU C library defines this for functions which it implements
5989     to always fail with ENOSYS.  Some functions are actually named
5990     something starting with __ and the normal name is an alias.  */
5991 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5992 choke me
5993 #else
5994 $ac_func();
5995 #endif
5996
5997 ; return 0; }
5998 EOF
5999 if { (eval echo configure:6000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6000   rm -rf conftest*
6001   eval "ac_cv_func_$ac_func=yes"
6002 else
6003   echo "configure: failed program was:" >&5
6004   cat conftest.$ac_ext >&5
6005   rm -rf conftest*
6006   eval "ac_cv_func_$ac_func=no"
6007 fi
6008 rm -f conftest*
6009 fi
6010
6011 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6012   echo "$ac_t""yes" 1>&6
6013     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6014   cat >> confdefs.h <<EOF
6015 #define $ac_tr_func 1
6016 EOF
6017  
6018 else
6019   echo "$ac_t""no" 1>&6
6020 fi
6021 done
6022
6023 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
6024 do
6025 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6026 echo "configure:6027: checking for $ac_func" >&5
6027 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6028   echo $ac_n "(cached) $ac_c" 1>&6
6029 else
6030   cat > conftest.$ac_ext <<EOF
6031 #line 6032 "configure"
6032 #include "confdefs.h"
6033 /* System header to define __stub macros and hopefully few prototypes,
6034     which can conflict with char $ac_func(); below.  */
6035 #include <assert.h>
6036 /* Override any gcc2 internal prototype to avoid an error.  */
6037 /* We use char because int might match the return type of a gcc2
6038     builtin and then its argument prototype would still apply.  */
6039 char $ac_func();
6040
6041 int main() {
6042
6043 /* The GNU C library defines this for functions which it implements
6044     to always fail with ENOSYS.  Some functions are actually named
6045     something starting with __ and the normal name is an alias.  */
6046 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6047 choke me
6048 #else
6049 $ac_func();
6050 #endif
6051
6052 ; return 0; }
6053 EOF
6054 if { (eval echo configure:6055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6055   rm -rf conftest*
6056   eval "ac_cv_func_$ac_func=yes"
6057 else
6058   echo "configure: failed program was:" >&5
6059   cat conftest.$ac_ext >&5
6060   rm -rf conftest*
6061   eval "ac_cv_func_$ac_func=no"
6062 fi
6063 rm -f conftest*
6064 fi
6065
6066 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6067   echo "$ac_t""yes" 1>&6
6068     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6069   cat >> confdefs.h <<EOF
6070 #define $ac_tr_func 1
6071 EOF
6072  
6073 else
6074   echo "$ac_t""no" 1>&6
6075 fi
6076 done
6077
6078 for ac_func in __getcwd _getcwd
6079 do
6080 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6081 echo "configure:6082: checking for $ac_func" >&5
6082 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6083   echo $ac_n "(cached) $ac_c" 1>&6
6084 else
6085   cat > conftest.$ac_ext <<EOF
6086 #line 6087 "configure"
6087 #include "confdefs.h"
6088 /* System header to define __stub macros and hopefully few prototypes,
6089     which can conflict with char $ac_func(); below.  */
6090 #include <assert.h>
6091 /* Override any gcc2 internal prototype to avoid an error.  */
6092 /* We use char because int might match the return type of a gcc2
6093     builtin and then its argument prototype would still apply.  */
6094 char $ac_func();
6095
6096 int main() {
6097
6098 /* The GNU C library defines this for functions which it implements
6099     to always fail with ENOSYS.  Some functions are actually named
6100     something starting with __ and the normal name is an alias.  */
6101 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6102 choke me
6103 #else
6104 $ac_func();
6105 #endif
6106
6107 ; return 0; }
6108 EOF
6109 if { (eval echo configure:6110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6110   rm -rf conftest*
6111   eval "ac_cv_func_$ac_func=yes"
6112 else
6113   echo "configure: failed program was:" >&5
6114   cat conftest.$ac_ext >&5
6115   rm -rf conftest*
6116   eval "ac_cv_func_$ac_func=no"
6117 fi
6118 rm -f conftest*
6119 fi
6120
6121 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6122   echo "$ac_t""yes" 1>&6
6123     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6124   cat >> confdefs.h <<EOF
6125 #define $ac_tr_func 1
6126 EOF
6127  
6128 else
6129   echo "$ac_t""no" 1>&6
6130 fi
6131 done
6132
6133 for ac_func in __xstat __fxstat __lxstat
6134 do
6135 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6136 echo "configure:6137: checking for $ac_func" >&5
6137 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6138   echo $ac_n "(cached) $ac_c" 1>&6
6139 else
6140   cat > conftest.$ac_ext <<EOF
6141 #line 6142 "configure"
6142 #include "confdefs.h"
6143 /* System header to define __stub macros and hopefully few prototypes,
6144     which can conflict with char $ac_func(); below.  */
6145 #include <assert.h>
6146 /* Override any gcc2 internal prototype to avoid an error.  */
6147 /* We use char because int might match the return type of a gcc2
6148     builtin and then its argument prototype would still apply.  */
6149 char $ac_func();
6150
6151 int main() {
6152
6153 /* The GNU C library defines this for functions which it implements
6154     to always fail with ENOSYS.  Some functions are actually named
6155     something starting with __ and the normal name is an alias.  */
6156 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6157 choke me
6158 #else
6159 $ac_func();
6160 #endif
6161
6162 ; return 0; }
6163 EOF
6164 if { (eval echo configure:6165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6165   rm -rf conftest*
6166   eval "ac_cv_func_$ac_func=yes"
6167 else
6168   echo "configure: failed program was:" >&5
6169   cat conftest.$ac_ext >&5
6170   rm -rf conftest*
6171   eval "ac_cv_func_$ac_func=no"
6172 fi
6173 rm -f conftest*
6174 fi
6175
6176 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6177   echo "$ac_t""yes" 1>&6
6178     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6179   cat >> confdefs.h <<EOF
6180 #define $ac_tr_func 1
6181 EOF
6182  
6183 else
6184   echo "$ac_t""no" 1>&6
6185 fi
6186 done
6187
6188 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6189 do
6190 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6191 echo "configure:6192: checking for $ac_func" >&5
6192 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6193   echo $ac_n "(cached) $ac_c" 1>&6
6194 else
6195   cat > conftest.$ac_ext <<EOF
6196 #line 6197 "configure"
6197 #include "confdefs.h"
6198 /* System header to define __stub macros and hopefully few prototypes,
6199     which can conflict with char $ac_func(); below.  */
6200 #include <assert.h>
6201 /* Override any gcc2 internal prototype to avoid an error.  */
6202 /* We use char because int might match the return type of a gcc2
6203     builtin and then its argument prototype would still apply.  */
6204 char $ac_func();
6205
6206 int main() {
6207
6208 /* The GNU C library defines this for functions which it implements
6209     to always fail with ENOSYS.  Some functions are actually named
6210     something starting with __ and the normal name is an alias.  */
6211 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6212 choke me
6213 #else
6214 $ac_func();
6215 #endif
6216
6217 ; return 0; }
6218 EOF
6219 if { (eval echo configure:6220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6220   rm -rf conftest*
6221   eval "ac_cv_func_$ac_func=yes"
6222 else
6223   echo "configure: failed program was:" >&5
6224   cat conftest.$ac_ext >&5
6225   rm -rf conftest*
6226   eval "ac_cv_func_$ac_func=no"
6227 fi
6228 rm -f conftest*
6229 fi
6230
6231 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6232   echo "$ac_t""yes" 1>&6
6233     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6234   cat >> confdefs.h <<EOF
6235 #define $ac_tr_func 1
6236 EOF
6237  
6238 else
6239   echo "$ac_t""no" 1>&6
6240 fi
6241 done
6242
6243 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6244 do
6245 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6246 echo "configure:6247: checking for $ac_func" >&5
6247 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6248   echo $ac_n "(cached) $ac_c" 1>&6
6249 else
6250   cat > conftest.$ac_ext <<EOF
6251 #line 6252 "configure"
6252 #include "confdefs.h"
6253 /* System header to define __stub macros and hopefully few prototypes,
6254     which can conflict with char $ac_func(); below.  */
6255 #include <assert.h>
6256 /* Override any gcc2 internal prototype to avoid an error.  */
6257 /* We use char because int might match the return type of a gcc2
6258     builtin and then its argument prototype would still apply.  */
6259 char $ac_func();
6260
6261 int main() {
6262
6263 /* The GNU C library defines this for functions which it implements
6264     to always fail with ENOSYS.  Some functions are actually named
6265     something starting with __ and the normal name is an alias.  */
6266 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6267 choke me
6268 #else
6269 $ac_func();
6270 #endif
6271
6272 ; return 0; }
6273 EOF
6274 if { (eval echo configure:6275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6275   rm -rf conftest*
6276   eval "ac_cv_func_$ac_func=yes"
6277 else
6278   echo "configure: failed program was:" >&5
6279   cat conftest.$ac_ext >&5
6280   rm -rf conftest*
6281   eval "ac_cv_func_$ac_func=no"
6282 fi
6283 rm -f conftest*
6284 fi
6285
6286 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6287   echo "$ac_t""yes" 1>&6
6288     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6289   cat >> confdefs.h <<EOF
6290 #define $ac_tr_func 1
6291 EOF
6292  
6293 else
6294   echo "$ac_t""no" 1>&6
6295 fi
6296 done
6297
6298 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6299 do
6300 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6301 echo "configure:6302: checking for $ac_func" >&5
6302 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6303   echo $ac_n "(cached) $ac_c" 1>&6
6304 else
6305   cat > conftest.$ac_ext <<EOF
6306 #line 6307 "configure"
6307 #include "confdefs.h"
6308 /* System header to define __stub macros and hopefully few prototypes,
6309     which can conflict with char $ac_func(); below.  */
6310 #include <assert.h>
6311 /* Override any gcc2 internal prototype to avoid an error.  */
6312 /* We use char because int might match the return type of a gcc2
6313     builtin and then its argument prototype would still apply.  */
6314 char $ac_func();
6315
6316 int main() {
6317
6318 /* The GNU C library defines this for functions which it implements
6319     to always fail with ENOSYS.  Some functions are actually named
6320     something starting with __ and the normal name is an alias.  */
6321 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6322 choke me
6323 #else
6324 $ac_func();
6325 #endif
6326
6327 ; return 0; }
6328 EOF
6329 if { (eval echo configure:6330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6330   rm -rf conftest*
6331   eval "ac_cv_func_$ac_func=yes"
6332 else
6333   echo "configure: failed program was:" >&5
6334   cat conftest.$ac_ext >&5
6335   rm -rf conftest*
6336   eval "ac_cv_func_$ac_func=no"
6337 fi
6338 rm -f conftest*
6339 fi
6340
6341 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6342   echo "$ac_t""yes" 1>&6
6343     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6344   cat >> confdefs.h <<EOF
6345 #define $ac_tr_func 1
6346 EOF
6347  
6348 else
6349   echo "$ac_t""no" 1>&6
6350 fi
6351 done
6352
6353 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6354 do
6355 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6356 echo "configure:6357: checking for $ac_func" >&5
6357 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6358   echo $ac_n "(cached) $ac_c" 1>&6
6359 else
6360   cat > conftest.$ac_ext <<EOF
6361 #line 6362 "configure"
6362 #include "confdefs.h"
6363 /* System header to define __stub macros and hopefully few prototypes,
6364     which can conflict with char $ac_func(); below.  */
6365 #include <assert.h>
6366 /* Override any gcc2 internal prototype to avoid an error.  */
6367 /* We use char because int might match the return type of a gcc2
6368     builtin and then its argument prototype would still apply.  */
6369 char $ac_func();
6370
6371 int main() {
6372
6373 /* The GNU C library defines this for functions which it implements
6374     to always fail with ENOSYS.  Some functions are actually named
6375     something starting with __ and the normal name is an alias.  */
6376 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6377 choke me
6378 #else
6379 $ac_func();
6380 #endif
6381
6382 ; return 0; }
6383 EOF
6384 if { (eval echo configure:6385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6385   rm -rf conftest*
6386   eval "ac_cv_func_$ac_func=yes"
6387 else
6388   echo "configure: failed program was:" >&5
6389   cat conftest.$ac_ext >&5
6390   rm -rf conftest*
6391   eval "ac_cv_func_$ac_func=no"
6392 fi
6393 rm -f conftest*
6394 fi
6395
6396 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6397   echo "$ac_t""yes" 1>&6
6398     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6399   cat >> confdefs.h <<EOF
6400 #define $ac_tr_func 1
6401 EOF
6402  
6403 else
6404   echo "$ac_t""no" 1>&6
6405 fi
6406 done
6407
6408 for ac_func in _write __write _fork __fork
6409 do
6410 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6411 echo "configure:6412: checking for $ac_func" >&5
6412 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6413   echo $ac_n "(cached) $ac_c" 1>&6
6414 else
6415   cat > conftest.$ac_ext <<EOF
6416 #line 6417 "configure"
6417 #include "confdefs.h"
6418 /* System header to define __stub macros and hopefully few prototypes,
6419     which can conflict with char $ac_func(); below.  */
6420 #include <assert.h>
6421 /* Override any gcc2 internal prototype to avoid an error.  */
6422 /* We use char because int might match the return type of a gcc2
6423     builtin and then its argument prototype would still apply.  */
6424 char $ac_func();
6425
6426 int main() {
6427
6428 /* The GNU C library defines this for functions which it implements
6429     to always fail with ENOSYS.  Some functions are actually named
6430     something starting with __ and the normal name is an alias.  */
6431 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6432 choke me
6433 #else
6434 $ac_func();
6435 #endif
6436
6437 ; return 0; }
6438 EOF
6439 if { (eval echo configure:6440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6440   rm -rf conftest*
6441   eval "ac_cv_func_$ac_func=yes"
6442 else
6443   echo "configure: failed program was:" >&5
6444   cat conftest.$ac_ext >&5
6445   rm -rf conftest*
6446   eval "ac_cv_func_$ac_func=no"
6447 fi
6448 rm -f conftest*
6449 fi
6450
6451 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6452   echo "$ac_t""yes" 1>&6
6453     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6454   cat >> confdefs.h <<EOF
6455 #define $ac_tr_func 1
6456 EOF
6457  
6458 else
6459   echo "$ac_t""no" 1>&6
6460 fi
6461 done
6462
6463 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6464 do
6465 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6466 echo "configure:6467: checking for $ac_func" >&5
6467 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6468   echo $ac_n "(cached) $ac_c" 1>&6
6469 else
6470   cat > conftest.$ac_ext <<EOF
6471 #line 6472 "configure"
6472 #include "confdefs.h"
6473 /* System header to define __stub macros and hopefully few prototypes,
6474     which can conflict with char $ac_func(); below.  */
6475 #include <assert.h>
6476 /* Override any gcc2 internal prototype to avoid an error.  */
6477 /* We use char because int might match the return type of a gcc2
6478     builtin and then its argument prototype would still apply.  */
6479 char $ac_func();
6480
6481 int main() {
6482
6483 /* The GNU C library defines this for functions which it implements
6484     to always fail with ENOSYS.  Some functions are actually named
6485     something starting with __ and the normal name is an alias.  */
6486 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6487 choke me
6488 #else
6489 $ac_func();
6490 #endif
6491
6492 ; return 0; }
6493 EOF
6494 if { (eval echo configure:6495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6495   rm -rf conftest*
6496   eval "ac_cv_func_$ac_func=yes"
6497 else
6498   echo "configure: failed program was:" >&5
6499   cat conftest.$ac_ext >&5
6500   rm -rf conftest*
6501   eval "ac_cv_func_$ac_func=no"
6502 fi
6503 rm -f conftest*
6504 fi
6505
6506 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6507   echo "$ac_t""yes" 1>&6
6508     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6509   cat >> confdefs.h <<EOF
6510 #define $ac_tr_func 1
6511 EOF
6512  
6513 else
6514   echo "$ac_t""no" 1>&6
6515 fi
6516 done
6517
6518 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6519 do
6520 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6521 echo "configure:6522: checking for $ac_func" >&5
6522 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6523   echo $ac_n "(cached) $ac_c" 1>&6
6524 else
6525   cat > conftest.$ac_ext <<EOF
6526 #line 6527 "configure"
6527 #include "confdefs.h"
6528 /* System header to define __stub macros and hopefully few prototypes,
6529     which can conflict with char $ac_func(); below.  */
6530 #include <assert.h>
6531 /* Override any gcc2 internal prototype to avoid an error.  */
6532 /* We use char because int might match the return type of a gcc2
6533     builtin and then its argument prototype would still apply.  */
6534 char $ac_func();
6535
6536 int main() {
6537
6538 /* The GNU C library defines this for functions which it implements
6539     to always fail with ENOSYS.  Some functions are actually named
6540     something starting with __ and the normal name is an alias.  */
6541 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6542 choke me
6543 #else
6544 $ac_func();
6545 #endif
6546
6547 ; return 0; }
6548 EOF
6549 if { (eval echo configure:6550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6550   rm -rf conftest*
6551   eval "ac_cv_func_$ac_func=yes"
6552 else
6553   echo "configure: failed program was:" >&5
6554   cat conftest.$ac_ext >&5
6555   rm -rf conftest*
6556   eval "ac_cv_func_$ac_func=no"
6557 fi
6558 rm -f conftest*
6559 fi
6560
6561 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6562   echo "$ac_t""yes" 1>&6
6563     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6564   cat >> confdefs.h <<EOF
6565 #define $ac_tr_func 1
6566 EOF
6567  
6568 else
6569   echo "$ac_t""no" 1>&6
6570 fi
6571 done
6572
6573 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6574 do
6575 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6576 echo "configure:6577: checking for $ac_func" >&5
6577 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6578   echo $ac_n "(cached) $ac_c" 1>&6
6579 else
6580   cat > conftest.$ac_ext <<EOF
6581 #line 6582 "configure"
6582 #include "confdefs.h"
6583 /* System header to define __stub macros and hopefully few prototypes,
6584     which can conflict with char $ac_func(); below.  */
6585 #include <assert.h>
6586 /* Override any gcc2 internal prototype to avoid an error.  */
6587 /* We use char because int might match the return type of a gcc2
6588     builtin and then its argument prototype would still apply.  */
6589 char $ac_func();
6590
6591 int main() {
6592
6593 /* The GNU C library defines this for functions which it implements
6594     to always fail with ENOSYS.  Some functions are actually named
6595     something starting with __ and the normal name is an alias.  */
6596 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6597 choke me
6598 #else
6599 $ac_func();
6600 #endif
6601
6602 ; return 0; }
6603 EOF
6604 if { (eval echo configure:6605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6605   rm -rf conftest*
6606   eval "ac_cv_func_$ac_func=yes"
6607 else
6608   echo "configure: failed program was:" >&5
6609   cat conftest.$ac_ext >&5
6610   rm -rf conftest*
6611   eval "ac_cv_func_$ac_func=no"
6612 fi
6613 rm -f conftest*
6614 fi
6615
6616 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6617   echo "$ac_t""yes" 1>&6
6618     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6619   cat >> confdefs.h <<EOF
6620 #define $ac_tr_func 1
6621 EOF
6622  
6623 else
6624   echo "$ac_t""no" 1>&6
6625 fi
6626 done
6627
6628 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6629 do
6630 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6631 echo "configure:6632: checking for $ac_func" >&5
6632 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6633   echo $ac_n "(cached) $ac_c" 1>&6
6634 else
6635   cat > conftest.$ac_ext <<EOF
6636 #line 6637 "configure"
6637 #include "confdefs.h"
6638 /* System header to define __stub macros and hopefully few prototypes,
6639     which can conflict with char $ac_func(); below.  */
6640 #include <assert.h>
6641 /* Override any gcc2 internal prototype to avoid an error.  */
6642 /* We use char because int might match the return type of a gcc2
6643     builtin and then its argument prototype would still apply.  */
6644 char $ac_func();
6645
6646 int main() {
6647
6648 /* The GNU C library defines this for functions which it implements
6649     to always fail with ENOSYS.  Some functions are actually named
6650     something starting with __ and the normal name is an alias.  */
6651 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6652 choke me
6653 #else
6654 $ac_func();
6655 #endif
6656
6657 ; return 0; }
6658 EOF
6659 if { (eval echo configure:6660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6660   rm -rf conftest*
6661   eval "ac_cv_func_$ac_func=yes"
6662 else
6663   echo "configure: failed program was:" >&5
6664   cat conftest.$ac_ext >&5
6665   rm -rf conftest*
6666   eval "ac_cv_func_$ac_func=no"
6667 fi
6668 rm -f conftest*
6669 fi
6670
6671 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6672   echo "$ac_t""yes" 1>&6
6673     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6674   cat >> confdefs.h <<EOF
6675 #define $ac_tr_func 1
6676 EOF
6677  
6678 else
6679   echo "$ac_t""no" 1>&6
6680 fi
6681 done
6682
6683 for ac_func in open64 _open64 __open64 creat64
6684 do
6685 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6686 echo "configure:6687: checking for $ac_func" >&5
6687 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6688   echo $ac_n "(cached) $ac_c" 1>&6
6689 else
6690   cat > conftest.$ac_ext <<EOF
6691 #line 6692 "configure"
6692 #include "confdefs.h"
6693 /* System header to define __stub macros and hopefully few prototypes,
6694     which can conflict with char $ac_func(); below.  */
6695 #include <assert.h>
6696 /* Override any gcc2 internal prototype to avoid an error.  */
6697 /* We use char because int might match the return type of a gcc2
6698     builtin and then its argument prototype would still apply.  */
6699 char $ac_func();
6700
6701 int main() {
6702
6703 /* The GNU C library defines this for functions which it implements
6704     to always fail with ENOSYS.  Some functions are actually named
6705     something starting with __ and the normal name is an alias.  */
6706 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6707 choke me
6708 #else
6709 $ac_func();
6710 #endif
6711
6712 ; return 0; }
6713 EOF
6714 if { (eval echo configure:6715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6715   rm -rf conftest*
6716   eval "ac_cv_func_$ac_func=yes"
6717 else
6718   echo "configure: failed program was:" >&5
6719   cat conftest.$ac_ext >&5
6720   rm -rf conftest*
6721   eval "ac_cv_func_$ac_func=no"
6722 fi
6723 rm -f conftest*
6724 fi
6725
6726 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6727   echo "$ac_t""yes" 1>&6
6728     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6729   cat >> confdefs.h <<EOF
6730 #define $ac_tr_func 1
6731 EOF
6732  
6733 else
6734   echo "$ac_t""no" 1>&6
6735 fi
6736 done
6737
6738
6739 #
6740 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6741 #
6742
6743 if test x$ac_cv_func_stat64 = xno ; then
6744   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6745 echo "configure:6746: checking for stat64 in <sys/stat.h>" >&5
6746   cat > conftest.$ac_ext <<EOF
6747 #line 6748 "configure"
6748 #include "confdefs.h"
6749
6750 #if defined(HAVE_UNISTD_H)
6751 #include <unistd.h>
6752 #endif
6753 #include <sys/stat.h>
6754
6755 int main() {
6756 struct stat64 st64; exit(stat64(".",&st64));
6757 ; return 0; }
6758 EOF
6759 if { (eval echo configure:6760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6760   rm -rf conftest*
6761   ac_cv_func_stat64=yes
6762 else
6763   echo "configure: failed program was:" >&5
6764   cat conftest.$ac_ext >&5
6765 fi
6766 rm -f conftest*
6767   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6768   if test x$ac_cv_func_stat64 = xyes ; then
6769     cat >> confdefs.h <<\EOF
6770 #define HAVE_STAT64 1
6771 EOF
6772
6773   fi
6774 fi
6775
6776 if test x$ac_cv_func_lstat64 = xno ; then
6777   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6778 echo "configure:6779: checking for lstat64 in <sys/stat.h>" >&5
6779   cat > conftest.$ac_ext <<EOF
6780 #line 6781 "configure"
6781 #include "confdefs.h"
6782
6783 #if defined(HAVE_UNISTD_H)
6784 #include <unistd.h>
6785 #endif
6786 #include <sys/stat.h>
6787
6788 int main() {
6789 struct stat64 st64; exit(lstat64(".",&st64));
6790 ; return 0; }
6791 EOF
6792 if { (eval echo configure:6793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6793   rm -rf conftest*
6794   ac_cv_func_lstat64=yes
6795 else
6796   echo "configure: failed program was:" >&5
6797   cat conftest.$ac_ext >&5
6798 fi
6799 rm -f conftest*
6800   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6801   if test x$ac_cv_func_lstat64 = xyes ; then
6802     cat >> confdefs.h <<\EOF
6803 #define HAVE_LSTAT64 1
6804 EOF
6805
6806   fi
6807 fi
6808
6809 if test x$ac_cv_func_fstat64 = xno ; then
6810   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6811 echo "configure:6812: checking for fstat64 in <sys/stat.h>" >&5
6812   cat > conftest.$ac_ext <<EOF
6813 #line 6814 "configure"
6814 #include "confdefs.h"
6815
6816 #if defined(HAVE_UNISTD_H)
6817 #include <unistd.h>
6818 #endif
6819 #include <sys/stat.h>
6820
6821 int main() {
6822 struct stat64 st64; exit(fstat64(0,&st64));
6823 ; return 0; }
6824 EOF
6825 if { (eval echo configure:6826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6826   rm -rf conftest*
6827   ac_cv_func_fstat64=yes
6828 else
6829   echo "configure: failed program was:" >&5
6830   cat conftest.$ac_ext >&5
6831 fi
6832 rm -f conftest*
6833   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6834   if test x$ac_cv_func_fstat64 = xyes ; then
6835     cat >> confdefs.h <<\EOF
6836 #define HAVE_FSTAT64 1
6837 EOF
6838
6839   fi
6840 fi
6841
6842 #
6843 # If no strcasecmp, check for it in some known places
6844 # It is in -lresolv on ReliantUNIX and UnixWare
6845 #   -lresolve *must* follow -lnsl for name resolution to work properly
6846 #
6847
6848 if test x$ac_cv_func_strcasecmp = xno ; then
6849         echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6
6850 echo "configure:6851: checking for strcasecmp in -lresolv" >&5
6851 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'`
6852 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6853   echo $ac_n "(cached) $ac_c" 1>&6
6854 else
6855   ac_save_LIBS="$LIBS"
6856 LIBS="-lresolv  $LIBS"
6857 cat > conftest.$ac_ext <<EOF
6858 #line 6859 "configure"
6859 #include "confdefs.h"
6860 /* Override any gcc2 internal prototype to avoid an error.  */
6861 /* We use char because int might match the return type of a gcc2
6862     builtin and then its argument prototype would still apply.  */
6863 char strcasecmp();
6864
6865 int main() {
6866 strcasecmp()
6867 ; return 0; }
6868 EOF
6869 if { (eval echo configure:6870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6870   rm -rf conftest*
6871   eval "ac_cv_lib_$ac_lib_var=yes"
6872 else
6873   echo "configure: failed program was:" >&5
6874   cat conftest.$ac_ext >&5
6875   rm -rf conftest*
6876   eval "ac_cv_lib_$ac_lib_var=no"
6877 fi
6878 rm -f conftest*
6879 LIBS="$ac_save_LIBS"
6880
6881 fi
6882 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6883   echo "$ac_t""yes" 1>&6
6884   LIBS="$LIBS -lresolv"
6885                 cat >> confdefs.h <<\EOF
6886 #define HAVE_STRCASECMP 1
6887 EOF
6888
6889 else
6890   echo "$ac_t""no" 1>&6
6891 fi
6892
6893 fi
6894
6895 #
6896 # Check for the functions putprpwnam, set_auth_parameters,
6897 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6898 # Needed for OSF1 and HPUX.
6899 #
6900
6901 case "$LIBS" in
6902   *-lsecurity*) for ac_func in putprpwnam
6903 do
6904 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6905 echo "configure:6906: checking for $ac_func" >&5
6906 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6907   echo $ac_n "(cached) $ac_c" 1>&6
6908 else
6909   cat > conftest.$ac_ext <<EOF
6910 #line 6911 "configure"
6911 #include "confdefs.h"
6912 /* System header to define __stub macros and hopefully few prototypes,
6913     which can conflict with char $ac_func(); below.  */
6914 #include <assert.h>
6915 /* Override any gcc2 internal prototype to avoid an error.  */
6916 /* We use char because int might match the return type of a gcc2
6917     builtin and then its argument prototype would still apply.  */
6918 char $ac_func();
6919
6920 int main() {
6921
6922 /* The GNU C library defines this for functions which it implements
6923     to always fail with ENOSYS.  Some functions are actually named
6924     something starting with __ and the normal name is an alias.  */
6925 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6926 choke me
6927 #else
6928 $ac_func();
6929 #endif
6930
6931 ; return 0; }
6932 EOF
6933 if { (eval echo configure:6934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6934   rm -rf conftest*
6935   eval "ac_cv_func_$ac_func=yes"
6936 else
6937   echo "configure: failed program was:" >&5
6938   cat conftest.$ac_ext >&5
6939   rm -rf conftest*
6940   eval "ac_cv_func_$ac_func=no"
6941 fi
6942 rm -f conftest*
6943 fi
6944
6945 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6946   echo "$ac_t""yes" 1>&6
6947     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6948   cat >> confdefs.h <<EOF
6949 #define $ac_tr_func 1
6950 EOF
6951  
6952 else
6953   echo "$ac_t""no" 1>&6
6954 fi
6955 done
6956  ;;
6957   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6958 echo "configure:6959: checking for putprpwnam in -lsecurity" >&5
6959 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6960 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6961   echo $ac_n "(cached) $ac_c" 1>&6
6962 else
6963   ac_save_LIBS="$LIBS"
6964 LIBS="-lsecurity  $LIBS"
6965 cat > conftest.$ac_ext <<EOF
6966 #line 6967 "configure"
6967 #include "confdefs.h"
6968 /* Override any gcc2 internal prototype to avoid an error.  */
6969 /* We use char because int might match the return type of a gcc2
6970     builtin and then its argument prototype would still apply.  */
6971 char putprpwnam();
6972
6973 int main() {
6974 putprpwnam()
6975 ; return 0; }
6976 EOF
6977 if { (eval echo configure:6978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6978   rm -rf conftest*
6979   eval "ac_cv_lib_$ac_lib_var=yes"
6980 else
6981   echo "configure: failed program was:" >&5
6982   cat conftest.$ac_ext >&5
6983   rm -rf conftest*
6984   eval "ac_cv_lib_$ac_lib_var=no"
6985 fi
6986 rm -f conftest*
6987 LIBS="$ac_save_LIBS"
6988
6989 fi
6990 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6991   echo "$ac_t""yes" 1>&6
6992     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6993     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6994   cat >> confdefs.h <<EOF
6995 #define $ac_tr_lib 1
6996 EOF
6997
6998   LIBS="-lsecurity $LIBS"
6999
7000 else
7001   echo "$ac_t""no" 1>&6
7002 fi
7003  
7004      for ac_func in putprpwnam
7005 do
7006 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7007 echo "configure:7008: checking for $ac_func" >&5
7008 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7009   echo $ac_n "(cached) $ac_c" 1>&6
7010 else
7011   cat > conftest.$ac_ext <<EOF
7012 #line 7013 "configure"
7013 #include "confdefs.h"
7014 /* System header to define __stub macros and hopefully few prototypes,
7015     which can conflict with char $ac_func(); below.  */
7016 #include <assert.h>
7017 /* Override any gcc2 internal prototype to avoid an error.  */
7018 /* We use char because int might match the return type of a gcc2
7019     builtin and then its argument prototype would still apply.  */
7020 char $ac_func();
7021
7022 int main() {
7023
7024 /* The GNU C library defines this for functions which it implements
7025     to always fail with ENOSYS.  Some functions are actually named
7026     something starting with __ and the normal name is an alias.  */
7027 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7028 choke me
7029 #else
7030 $ac_func();
7031 #endif
7032
7033 ; return 0; }
7034 EOF
7035 if { (eval echo configure:7036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7036   rm -rf conftest*
7037   eval "ac_cv_func_$ac_func=yes"
7038 else
7039   echo "configure: failed program was:" >&5
7040   cat conftest.$ac_ext >&5
7041   rm -rf conftest*
7042   eval "ac_cv_func_$ac_func=no"
7043 fi
7044 rm -f conftest*
7045 fi
7046
7047 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7048   echo "$ac_t""yes" 1>&6
7049     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7050   cat >> confdefs.h <<EOF
7051 #define $ac_tr_func 1
7052 EOF
7053  
7054 else
7055   echo "$ac_t""no" 1>&6
7056 fi
7057 done
7058
7059   ;;
7060   esac
7061
7062 case "$LIBS" in
7063   *-lsec*) for ac_func in putprpwnam
7064 do
7065 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7066 echo "configure:7067: checking for $ac_func" >&5
7067 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7068   echo $ac_n "(cached) $ac_c" 1>&6
7069 else
7070   cat > conftest.$ac_ext <<EOF
7071 #line 7072 "configure"
7072 #include "confdefs.h"
7073 /* System header to define __stub macros and hopefully few prototypes,
7074     which can conflict with char $ac_func(); below.  */
7075 #include <assert.h>
7076 /* Override any gcc2 internal prototype to avoid an error.  */
7077 /* We use char because int might match the return type of a gcc2
7078     builtin and then its argument prototype would still apply.  */
7079 char $ac_func();
7080
7081 int main() {
7082
7083 /* The GNU C library defines this for functions which it implements
7084     to always fail with ENOSYS.  Some functions are actually named
7085     something starting with __ and the normal name is an alias.  */
7086 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7087 choke me
7088 #else
7089 $ac_func();
7090 #endif
7091
7092 ; return 0; }
7093 EOF
7094 if { (eval echo configure:7095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7095   rm -rf conftest*
7096   eval "ac_cv_func_$ac_func=yes"
7097 else
7098   echo "configure: failed program was:" >&5
7099   cat conftest.$ac_ext >&5
7100   rm -rf conftest*
7101   eval "ac_cv_func_$ac_func=no"
7102 fi
7103 rm -f conftest*
7104 fi
7105
7106 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7107   echo "$ac_t""yes" 1>&6
7108     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7109   cat >> confdefs.h <<EOF
7110 #define $ac_tr_func 1
7111 EOF
7112  
7113 else
7114   echo "$ac_t""no" 1>&6
7115 fi
7116 done
7117  ;;
7118   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
7119 echo "configure:7120: checking for putprpwnam in -lsec" >&5
7120 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
7121 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7122   echo $ac_n "(cached) $ac_c" 1>&6
7123 else
7124   ac_save_LIBS="$LIBS"
7125 LIBS="-lsec  $LIBS"
7126 cat > conftest.$ac_ext <<EOF
7127 #line 7128 "configure"
7128 #include "confdefs.h"
7129 /* Override any gcc2 internal prototype to avoid an error.  */
7130 /* We use char because int might match the return type of a gcc2
7131     builtin and then its argument prototype would still apply.  */
7132 char putprpwnam();
7133
7134 int main() {
7135 putprpwnam()
7136 ; return 0; }
7137 EOF
7138 if { (eval echo configure:7139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7139   rm -rf conftest*
7140   eval "ac_cv_lib_$ac_lib_var=yes"
7141 else
7142   echo "configure: failed program was:" >&5
7143   cat conftest.$ac_ext >&5
7144   rm -rf conftest*
7145   eval "ac_cv_lib_$ac_lib_var=no"
7146 fi
7147 rm -f conftest*
7148 LIBS="$ac_save_LIBS"
7149
7150 fi
7151 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7152   echo "$ac_t""yes" 1>&6
7153     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7154     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7155   cat >> confdefs.h <<EOF
7156 #define $ac_tr_lib 1
7157 EOF
7158
7159   LIBS="-lsec $LIBS"
7160
7161 else
7162   echo "$ac_t""no" 1>&6
7163 fi
7164  
7165      for ac_func in putprpwnam
7166 do
7167 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7168 echo "configure:7169: checking for $ac_func" >&5
7169 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7170   echo $ac_n "(cached) $ac_c" 1>&6
7171 else
7172   cat > conftest.$ac_ext <<EOF
7173 #line 7174 "configure"
7174 #include "confdefs.h"
7175 /* System header to define __stub macros and hopefully few prototypes,
7176     which can conflict with char $ac_func(); below.  */
7177 #include <assert.h>
7178 /* Override any gcc2 internal prototype to avoid an error.  */
7179 /* We use char because int might match the return type of a gcc2
7180     builtin and then its argument prototype would still apply.  */
7181 char $ac_func();
7182
7183 int main() {
7184
7185 /* The GNU C library defines this for functions which it implements
7186     to always fail with ENOSYS.  Some functions are actually named
7187     something starting with __ and the normal name is an alias.  */
7188 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7189 choke me
7190 #else
7191 $ac_func();
7192 #endif
7193
7194 ; return 0; }
7195 EOF
7196 if { (eval echo configure:7197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7197   rm -rf conftest*
7198   eval "ac_cv_func_$ac_func=yes"
7199 else
7200   echo "configure: failed program was:" >&5
7201   cat conftest.$ac_ext >&5
7202   rm -rf conftest*
7203   eval "ac_cv_func_$ac_func=no"
7204 fi
7205 rm -f conftest*
7206 fi
7207
7208 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7209   echo "$ac_t""yes" 1>&6
7210     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7211   cat >> confdefs.h <<EOF
7212 #define $ac_tr_func 1
7213 EOF
7214  
7215 else
7216   echo "$ac_t""no" 1>&6
7217 fi
7218 done
7219
7220   ;;
7221   esac
7222
7223
7224 case "$LIBS" in
7225   *-lsecurity*) for ac_func in set_auth_parameters
7226 do
7227 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7228 echo "configure:7229: checking for $ac_func" >&5
7229 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7230   echo $ac_n "(cached) $ac_c" 1>&6
7231 else
7232   cat > conftest.$ac_ext <<EOF
7233 #line 7234 "configure"
7234 #include "confdefs.h"
7235 /* System header to define __stub macros and hopefully few prototypes,
7236     which can conflict with char $ac_func(); below.  */
7237 #include <assert.h>
7238 /* Override any gcc2 internal prototype to avoid an error.  */
7239 /* We use char because int might match the return type of a gcc2
7240     builtin and then its argument prototype would still apply.  */
7241 char $ac_func();
7242
7243 int main() {
7244
7245 /* The GNU C library defines this for functions which it implements
7246     to always fail with ENOSYS.  Some functions are actually named
7247     something starting with __ and the normal name is an alias.  */
7248 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7249 choke me
7250 #else
7251 $ac_func();
7252 #endif
7253
7254 ; return 0; }
7255 EOF
7256 if { (eval echo configure:7257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7257   rm -rf conftest*
7258   eval "ac_cv_func_$ac_func=yes"
7259 else
7260   echo "configure: failed program was:" >&5
7261   cat conftest.$ac_ext >&5
7262   rm -rf conftest*
7263   eval "ac_cv_func_$ac_func=no"
7264 fi
7265 rm -f conftest*
7266 fi
7267
7268 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7269   echo "$ac_t""yes" 1>&6
7270     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7271   cat >> confdefs.h <<EOF
7272 #define $ac_tr_func 1
7273 EOF
7274  
7275 else
7276   echo "$ac_t""no" 1>&6
7277 fi
7278 done
7279  ;;
7280   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7281 echo "configure:7282: checking for set_auth_parameters in -lsecurity" >&5
7282 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7283 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7284   echo $ac_n "(cached) $ac_c" 1>&6
7285 else
7286   ac_save_LIBS="$LIBS"
7287 LIBS="-lsecurity  $LIBS"
7288 cat > conftest.$ac_ext <<EOF
7289 #line 7290 "configure"
7290 #include "confdefs.h"
7291 /* Override any gcc2 internal prototype to avoid an error.  */
7292 /* We use char because int might match the return type of a gcc2
7293     builtin and then its argument prototype would still apply.  */
7294 char set_auth_parameters();
7295
7296 int main() {
7297 set_auth_parameters()
7298 ; return 0; }
7299 EOF
7300 if { (eval echo configure:7301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7301   rm -rf conftest*
7302   eval "ac_cv_lib_$ac_lib_var=yes"
7303 else
7304   echo "configure: failed program was:" >&5
7305   cat conftest.$ac_ext >&5
7306   rm -rf conftest*
7307   eval "ac_cv_lib_$ac_lib_var=no"
7308 fi
7309 rm -f conftest*
7310 LIBS="$ac_save_LIBS"
7311
7312 fi
7313 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7314   echo "$ac_t""yes" 1>&6
7315     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7316     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7317   cat >> confdefs.h <<EOF
7318 #define $ac_tr_lib 1
7319 EOF
7320
7321   LIBS="-lsecurity $LIBS"
7322
7323 else
7324   echo "$ac_t""no" 1>&6
7325 fi
7326  
7327      for ac_func in set_auth_parameters
7328 do
7329 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7330 echo "configure:7331: checking for $ac_func" >&5
7331 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7332   echo $ac_n "(cached) $ac_c" 1>&6
7333 else
7334   cat > conftest.$ac_ext <<EOF
7335 #line 7336 "configure"
7336 #include "confdefs.h"
7337 /* System header to define __stub macros and hopefully few prototypes,
7338     which can conflict with char $ac_func(); below.  */
7339 #include <assert.h>
7340 /* Override any gcc2 internal prototype to avoid an error.  */
7341 /* We use char because int might match the return type of a gcc2
7342     builtin and then its argument prototype would still apply.  */
7343 char $ac_func();
7344
7345 int main() {
7346
7347 /* The GNU C library defines this for functions which it implements
7348     to always fail with ENOSYS.  Some functions are actually named
7349     something starting with __ and the normal name is an alias.  */
7350 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7351 choke me
7352 #else
7353 $ac_func();
7354 #endif
7355
7356 ; return 0; }
7357 EOF
7358 if { (eval echo configure:7359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7359   rm -rf conftest*
7360   eval "ac_cv_func_$ac_func=yes"
7361 else
7362   echo "configure: failed program was:" >&5
7363   cat conftest.$ac_ext >&5
7364   rm -rf conftest*
7365   eval "ac_cv_func_$ac_func=no"
7366 fi
7367 rm -f conftest*
7368 fi
7369
7370 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7371   echo "$ac_t""yes" 1>&6
7372     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7373   cat >> confdefs.h <<EOF
7374 #define $ac_tr_func 1
7375 EOF
7376  
7377 else
7378   echo "$ac_t""no" 1>&6
7379 fi
7380 done
7381
7382   ;;
7383   esac
7384
7385 case "$LIBS" in
7386   *-lsec*) for ac_func in set_auth_parameters
7387 do
7388 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7389 echo "configure:7390: checking for $ac_func" >&5
7390 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7391   echo $ac_n "(cached) $ac_c" 1>&6
7392 else
7393   cat > conftest.$ac_ext <<EOF
7394 #line 7395 "configure"
7395 #include "confdefs.h"
7396 /* System header to define __stub macros and hopefully few prototypes,
7397     which can conflict with char $ac_func(); below.  */
7398 #include <assert.h>
7399 /* Override any gcc2 internal prototype to avoid an error.  */
7400 /* We use char because int might match the return type of a gcc2
7401     builtin and then its argument prototype would still apply.  */
7402 char $ac_func();
7403
7404 int main() {
7405
7406 /* The GNU C library defines this for functions which it implements
7407     to always fail with ENOSYS.  Some functions are actually named
7408     something starting with __ and the normal name is an alias.  */
7409 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7410 choke me
7411 #else
7412 $ac_func();
7413 #endif
7414
7415 ; return 0; }
7416 EOF
7417 if { (eval echo configure:7418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7418   rm -rf conftest*
7419   eval "ac_cv_func_$ac_func=yes"
7420 else
7421   echo "configure: failed program was:" >&5
7422   cat conftest.$ac_ext >&5
7423   rm -rf conftest*
7424   eval "ac_cv_func_$ac_func=no"
7425 fi
7426 rm -f conftest*
7427 fi
7428
7429 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7430   echo "$ac_t""yes" 1>&6
7431     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7432   cat >> confdefs.h <<EOF
7433 #define $ac_tr_func 1
7434 EOF
7435  
7436 else
7437   echo "$ac_t""no" 1>&6
7438 fi
7439 done
7440  ;;
7441   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7442 echo "configure:7443: checking for set_auth_parameters in -lsec" >&5
7443 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7444 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7445   echo $ac_n "(cached) $ac_c" 1>&6
7446 else
7447   ac_save_LIBS="$LIBS"
7448 LIBS="-lsec  $LIBS"
7449 cat > conftest.$ac_ext <<EOF
7450 #line 7451 "configure"
7451 #include "confdefs.h"
7452 /* Override any gcc2 internal prototype to avoid an error.  */
7453 /* We use char because int might match the return type of a gcc2
7454     builtin and then its argument prototype would still apply.  */
7455 char set_auth_parameters();
7456
7457 int main() {
7458 set_auth_parameters()
7459 ; return 0; }
7460 EOF
7461 if { (eval echo configure:7462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7462   rm -rf conftest*
7463   eval "ac_cv_lib_$ac_lib_var=yes"
7464 else
7465   echo "configure: failed program was:" >&5
7466   cat conftest.$ac_ext >&5
7467   rm -rf conftest*
7468   eval "ac_cv_lib_$ac_lib_var=no"
7469 fi
7470 rm -f conftest*
7471 LIBS="$ac_save_LIBS"
7472
7473 fi
7474 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7475   echo "$ac_t""yes" 1>&6
7476     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7477     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7478   cat >> confdefs.h <<EOF
7479 #define $ac_tr_lib 1
7480 EOF
7481
7482   LIBS="-lsec $LIBS"
7483
7484 else
7485   echo "$ac_t""no" 1>&6
7486 fi
7487  
7488      for ac_func in set_auth_parameters
7489 do
7490 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7491 echo "configure:7492: checking for $ac_func" >&5
7492 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7493   echo $ac_n "(cached) $ac_c" 1>&6
7494 else
7495   cat > conftest.$ac_ext <<EOF
7496 #line 7497 "configure"
7497 #include "confdefs.h"
7498 /* System header to define __stub macros and hopefully few prototypes,
7499     which can conflict with char $ac_func(); below.  */
7500 #include <assert.h>
7501 /* Override any gcc2 internal prototype to avoid an error.  */
7502 /* We use char because int might match the return type of a gcc2
7503     builtin and then its argument prototype would still apply.  */
7504 char $ac_func();
7505
7506 int main() {
7507
7508 /* The GNU C library defines this for functions which it implements
7509     to always fail with ENOSYS.  Some functions are actually named
7510     something starting with __ and the normal name is an alias.  */
7511 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7512 choke me
7513 #else
7514 $ac_func();
7515 #endif
7516
7517 ; return 0; }
7518 EOF
7519 if { (eval echo configure:7520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7520   rm -rf conftest*
7521   eval "ac_cv_func_$ac_func=yes"
7522 else
7523   echo "configure: failed program was:" >&5
7524   cat conftest.$ac_ext >&5
7525   rm -rf conftest*
7526   eval "ac_cv_func_$ac_func=no"
7527 fi
7528 rm -f conftest*
7529 fi
7530
7531 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7532   echo "$ac_t""yes" 1>&6
7533     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7534   cat >> confdefs.h <<EOF
7535 #define $ac_tr_func 1
7536 EOF
7537  
7538 else
7539   echo "$ac_t""no" 1>&6
7540 fi
7541 done
7542
7543   ;;
7544   esac
7545
7546
7547 # UnixWare 7.x has its getspnam in -lgen
7548 case "$LIBS" in
7549   *-lgen*) for ac_func in getspnam
7550 do
7551 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7552 echo "configure:7553: checking for $ac_func" >&5
7553 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7554   echo $ac_n "(cached) $ac_c" 1>&6
7555 else
7556   cat > conftest.$ac_ext <<EOF
7557 #line 7558 "configure"
7558 #include "confdefs.h"
7559 /* System header to define __stub macros and hopefully few prototypes,
7560     which can conflict with char $ac_func(); below.  */
7561 #include <assert.h>
7562 /* Override any gcc2 internal prototype to avoid an error.  */
7563 /* We use char because int might match the return type of a gcc2
7564     builtin and then its argument prototype would still apply.  */
7565 char $ac_func();
7566
7567 int main() {
7568
7569 /* The GNU C library defines this for functions which it implements
7570     to always fail with ENOSYS.  Some functions are actually named
7571     something starting with __ and the normal name is an alias.  */
7572 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7573 choke me
7574 #else
7575 $ac_func();
7576 #endif
7577
7578 ; return 0; }
7579 EOF
7580 if { (eval echo configure:7581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7581   rm -rf conftest*
7582   eval "ac_cv_func_$ac_func=yes"
7583 else
7584   echo "configure: failed program was:" >&5
7585   cat conftest.$ac_ext >&5
7586   rm -rf conftest*
7587   eval "ac_cv_func_$ac_func=no"
7588 fi
7589 rm -f conftest*
7590 fi
7591
7592 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7593   echo "$ac_t""yes" 1>&6
7594     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7595   cat >> confdefs.h <<EOF
7596 #define $ac_tr_func 1
7597 EOF
7598  
7599 else
7600   echo "$ac_t""no" 1>&6
7601 fi
7602 done
7603  ;;
7604   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7605 echo "configure:7606: checking for getspnam in -lgen" >&5
7606 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7607 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7608   echo $ac_n "(cached) $ac_c" 1>&6
7609 else
7610   ac_save_LIBS="$LIBS"
7611 LIBS="-lgen  $LIBS"
7612 cat > conftest.$ac_ext <<EOF
7613 #line 7614 "configure"
7614 #include "confdefs.h"
7615 /* Override any gcc2 internal prototype to avoid an error.  */
7616 /* We use char because int might match the return type of a gcc2
7617     builtin and then its argument prototype would still apply.  */
7618 char getspnam();
7619
7620 int main() {
7621 getspnam()
7622 ; return 0; }
7623 EOF
7624 if { (eval echo configure:7625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7625   rm -rf conftest*
7626   eval "ac_cv_lib_$ac_lib_var=yes"
7627 else
7628   echo "configure: failed program was:" >&5
7629   cat conftest.$ac_ext >&5
7630   rm -rf conftest*
7631   eval "ac_cv_lib_$ac_lib_var=no"
7632 fi
7633 rm -f conftest*
7634 LIBS="$ac_save_LIBS"
7635
7636 fi
7637 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7638   echo "$ac_t""yes" 1>&6
7639     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7640     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7641   cat >> confdefs.h <<EOF
7642 #define $ac_tr_lib 1
7643 EOF
7644
7645   LIBS="-lgen $LIBS"
7646
7647 else
7648   echo "$ac_t""no" 1>&6
7649 fi
7650  
7651      for ac_func in getspnam
7652 do
7653 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7654 echo "configure:7655: checking for $ac_func" >&5
7655 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7656   echo $ac_n "(cached) $ac_c" 1>&6
7657 else
7658   cat > conftest.$ac_ext <<EOF
7659 #line 7660 "configure"
7660 #include "confdefs.h"
7661 /* System header to define __stub macros and hopefully few prototypes,
7662     which can conflict with char $ac_func(); below.  */
7663 #include <assert.h>
7664 /* Override any gcc2 internal prototype to avoid an error.  */
7665 /* We use char because int might match the return type of a gcc2
7666     builtin and then its argument prototype would still apply.  */
7667 char $ac_func();
7668
7669 int main() {
7670
7671 /* The GNU C library defines this for functions which it implements
7672     to always fail with ENOSYS.  Some functions are actually named
7673     something starting with __ and the normal name is an alias.  */
7674 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7675 choke me
7676 #else
7677 $ac_func();
7678 #endif
7679
7680 ; return 0; }
7681 EOF
7682 if { (eval echo configure:7683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7683   rm -rf conftest*
7684   eval "ac_cv_func_$ac_func=yes"
7685 else
7686   echo "configure: failed program was:" >&5
7687   cat conftest.$ac_ext >&5
7688   rm -rf conftest*
7689   eval "ac_cv_func_$ac_func=no"
7690 fi
7691 rm -f conftest*
7692 fi
7693
7694 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7695   echo "$ac_t""yes" 1>&6
7696     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7697   cat >> confdefs.h <<EOF
7698 #define $ac_tr_func 1
7699 EOF
7700  
7701 else
7702   echo "$ac_t""no" 1>&6
7703 fi
7704 done
7705
7706   ;;
7707   esac
7708
7709
7710 case "$LIBS" in
7711   *-lsecurity*) for ac_func in getspnam
7712 do
7713 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7714 echo "configure:7715: checking for $ac_func" >&5
7715 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7716   echo $ac_n "(cached) $ac_c" 1>&6
7717 else
7718   cat > conftest.$ac_ext <<EOF
7719 #line 7720 "configure"
7720 #include "confdefs.h"
7721 /* System header to define __stub macros and hopefully few prototypes,
7722     which can conflict with char $ac_func(); below.  */
7723 #include <assert.h>
7724 /* Override any gcc2 internal prototype to avoid an error.  */
7725 /* We use char because int might match the return type of a gcc2
7726     builtin and then its argument prototype would still apply.  */
7727 char $ac_func();
7728
7729 int main() {
7730
7731 /* The GNU C library defines this for functions which it implements
7732     to always fail with ENOSYS.  Some functions are actually named
7733     something starting with __ and the normal name is an alias.  */
7734 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7735 choke me
7736 #else
7737 $ac_func();
7738 #endif
7739
7740 ; return 0; }
7741 EOF
7742 if { (eval echo configure:7743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7743   rm -rf conftest*
7744   eval "ac_cv_func_$ac_func=yes"
7745 else
7746   echo "configure: failed program was:" >&5
7747   cat conftest.$ac_ext >&5
7748   rm -rf conftest*
7749   eval "ac_cv_func_$ac_func=no"
7750 fi
7751 rm -f conftest*
7752 fi
7753
7754 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7755   echo "$ac_t""yes" 1>&6
7756     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7757   cat >> confdefs.h <<EOF
7758 #define $ac_tr_func 1
7759 EOF
7760  
7761 else
7762   echo "$ac_t""no" 1>&6
7763 fi
7764 done
7765  ;;
7766   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7767 echo "configure:7768: checking for getspnam in -lsecurity" >&5
7768 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7769 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7770   echo $ac_n "(cached) $ac_c" 1>&6
7771 else
7772   ac_save_LIBS="$LIBS"
7773 LIBS="-lsecurity  $LIBS"
7774 cat > conftest.$ac_ext <<EOF
7775 #line 7776 "configure"
7776 #include "confdefs.h"
7777 /* Override any gcc2 internal prototype to avoid an error.  */
7778 /* We use char because int might match the return type of a gcc2
7779     builtin and then its argument prototype would still apply.  */
7780 char getspnam();
7781
7782 int main() {
7783 getspnam()
7784 ; return 0; }
7785 EOF
7786 if { (eval echo configure:7787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7787   rm -rf conftest*
7788   eval "ac_cv_lib_$ac_lib_var=yes"
7789 else
7790   echo "configure: failed program was:" >&5
7791   cat conftest.$ac_ext >&5
7792   rm -rf conftest*
7793   eval "ac_cv_lib_$ac_lib_var=no"
7794 fi
7795 rm -f conftest*
7796 LIBS="$ac_save_LIBS"
7797
7798 fi
7799 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7800   echo "$ac_t""yes" 1>&6
7801     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7802     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7803   cat >> confdefs.h <<EOF
7804 #define $ac_tr_lib 1
7805 EOF
7806
7807   LIBS="-lsecurity $LIBS"
7808
7809 else
7810   echo "$ac_t""no" 1>&6
7811 fi
7812  
7813      for ac_func in getspnam
7814 do
7815 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7816 echo "configure:7817: checking for $ac_func" >&5
7817 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7818   echo $ac_n "(cached) $ac_c" 1>&6
7819 else
7820   cat > conftest.$ac_ext <<EOF
7821 #line 7822 "configure"
7822 #include "confdefs.h"
7823 /* System header to define __stub macros and hopefully few prototypes,
7824     which can conflict with char $ac_func(); below.  */
7825 #include <assert.h>
7826 /* Override any gcc2 internal prototype to avoid an error.  */
7827 /* We use char because int might match the return type of a gcc2
7828     builtin and then its argument prototype would still apply.  */
7829 char $ac_func();
7830
7831 int main() {
7832
7833 /* The GNU C library defines this for functions which it implements
7834     to always fail with ENOSYS.  Some functions are actually named
7835     something starting with __ and the normal name is an alias.  */
7836 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7837 choke me
7838 #else
7839 $ac_func();
7840 #endif
7841
7842 ; return 0; }
7843 EOF
7844 if { (eval echo configure:7845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7845   rm -rf conftest*
7846   eval "ac_cv_func_$ac_func=yes"
7847 else
7848   echo "configure: failed program was:" >&5
7849   cat conftest.$ac_ext >&5
7850   rm -rf conftest*
7851   eval "ac_cv_func_$ac_func=no"
7852 fi
7853 rm -f conftest*
7854 fi
7855
7856 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7857   echo "$ac_t""yes" 1>&6
7858     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7859   cat >> confdefs.h <<EOF
7860 #define $ac_tr_func 1
7861 EOF
7862  
7863 else
7864   echo "$ac_t""no" 1>&6
7865 fi
7866 done
7867
7868   ;;
7869   esac
7870
7871 case "$LIBS" in
7872   *-lsec*) for ac_func in getspnam
7873 do
7874 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7875 echo "configure:7876: checking for $ac_func" >&5
7876 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7877   echo $ac_n "(cached) $ac_c" 1>&6
7878 else
7879   cat > conftest.$ac_ext <<EOF
7880 #line 7881 "configure"
7881 #include "confdefs.h"
7882 /* System header to define __stub macros and hopefully few prototypes,
7883     which can conflict with char $ac_func(); below.  */
7884 #include <assert.h>
7885 /* Override any gcc2 internal prototype to avoid an error.  */
7886 /* We use char because int might match the return type of a gcc2
7887     builtin and then its argument prototype would still apply.  */
7888 char $ac_func();
7889
7890 int main() {
7891
7892 /* The GNU C library defines this for functions which it implements
7893     to always fail with ENOSYS.  Some functions are actually named
7894     something starting with __ and the normal name is an alias.  */
7895 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7896 choke me
7897 #else
7898 $ac_func();
7899 #endif
7900
7901 ; return 0; }
7902 EOF
7903 if { (eval echo configure:7904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7904   rm -rf conftest*
7905   eval "ac_cv_func_$ac_func=yes"
7906 else
7907   echo "configure: failed program was:" >&5
7908   cat conftest.$ac_ext >&5
7909   rm -rf conftest*
7910   eval "ac_cv_func_$ac_func=no"
7911 fi
7912 rm -f conftest*
7913 fi
7914
7915 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7916   echo "$ac_t""yes" 1>&6
7917     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7918   cat >> confdefs.h <<EOF
7919 #define $ac_tr_func 1
7920 EOF
7921  
7922 else
7923   echo "$ac_t""no" 1>&6
7924 fi
7925 done
7926  ;;
7927   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7928 echo "configure:7929: checking for getspnam in -lsec" >&5
7929 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7930 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7931   echo $ac_n "(cached) $ac_c" 1>&6
7932 else
7933   ac_save_LIBS="$LIBS"
7934 LIBS="-lsec  $LIBS"
7935 cat > conftest.$ac_ext <<EOF
7936 #line 7937 "configure"
7937 #include "confdefs.h"
7938 /* Override any gcc2 internal prototype to avoid an error.  */
7939 /* We use char because int might match the return type of a gcc2
7940     builtin and then its argument prototype would still apply.  */
7941 char getspnam();
7942
7943 int main() {
7944 getspnam()
7945 ; return 0; }
7946 EOF
7947 if { (eval echo configure:7948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7948   rm -rf conftest*
7949   eval "ac_cv_lib_$ac_lib_var=yes"
7950 else
7951   echo "configure: failed program was:" >&5
7952   cat conftest.$ac_ext >&5
7953   rm -rf conftest*
7954   eval "ac_cv_lib_$ac_lib_var=no"
7955 fi
7956 rm -f conftest*
7957 LIBS="$ac_save_LIBS"
7958
7959 fi
7960 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7961   echo "$ac_t""yes" 1>&6
7962     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7963     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7964   cat >> confdefs.h <<EOF
7965 #define $ac_tr_lib 1
7966 EOF
7967
7968   LIBS="-lsec $LIBS"
7969
7970 else
7971   echo "$ac_t""no" 1>&6
7972 fi
7973  
7974      for ac_func in getspnam
7975 do
7976 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7977 echo "configure:7978: checking for $ac_func" >&5
7978 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7979   echo $ac_n "(cached) $ac_c" 1>&6
7980 else
7981   cat > conftest.$ac_ext <<EOF
7982 #line 7983 "configure"
7983 #include "confdefs.h"
7984 /* System header to define __stub macros and hopefully few prototypes,
7985     which can conflict with char $ac_func(); below.  */
7986 #include <assert.h>
7987 /* Override any gcc2 internal prototype to avoid an error.  */
7988 /* We use char because int might match the return type of a gcc2
7989     builtin and then its argument prototype would still apply.  */
7990 char $ac_func();
7991
7992 int main() {
7993
7994 /* The GNU C library defines this for functions which it implements
7995     to always fail with ENOSYS.  Some functions are actually named
7996     something starting with __ and the normal name is an alias.  */
7997 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7998 choke me
7999 #else
8000 $ac_func();
8001 #endif
8002
8003 ; return 0; }
8004 EOF
8005 if { (eval echo configure:8006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8006   rm -rf conftest*
8007   eval "ac_cv_func_$ac_func=yes"
8008 else
8009   echo "configure: failed program was:" >&5
8010   cat conftest.$ac_ext >&5
8011   rm -rf conftest*
8012   eval "ac_cv_func_$ac_func=no"
8013 fi
8014 rm -f conftest*
8015 fi
8016
8017 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8018   echo "$ac_t""yes" 1>&6
8019     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8020   cat >> confdefs.h <<EOF
8021 #define $ac_tr_func 1
8022 EOF
8023  
8024 else
8025   echo "$ac_t""no" 1>&6
8026 fi
8027 done
8028
8029   ;;
8030   esac
8031
8032
8033 case "$LIBS" in
8034   *-lsecurity*) for ac_func in bigcrypt
8035 do
8036 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8037 echo "configure:8038: checking for $ac_func" >&5
8038 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8039   echo $ac_n "(cached) $ac_c" 1>&6
8040 else
8041   cat > conftest.$ac_ext <<EOF
8042 #line 8043 "configure"
8043 #include "confdefs.h"
8044 /* System header to define __stub macros and hopefully few prototypes,
8045     which can conflict with char $ac_func(); below.  */
8046 #include <assert.h>
8047 /* Override any gcc2 internal prototype to avoid an error.  */
8048 /* We use char because int might match the return type of a gcc2
8049     builtin and then its argument prototype would still apply.  */
8050 char $ac_func();
8051
8052 int main() {
8053
8054 /* The GNU C library defines this for functions which it implements
8055     to always fail with ENOSYS.  Some functions are actually named
8056     something starting with __ and the normal name is an alias.  */
8057 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8058 choke me
8059 #else
8060 $ac_func();
8061 #endif
8062
8063 ; return 0; }
8064 EOF
8065 if { (eval echo configure:8066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8066   rm -rf conftest*
8067   eval "ac_cv_func_$ac_func=yes"
8068 else
8069   echo "configure: failed program was:" >&5
8070   cat conftest.$ac_ext >&5
8071   rm -rf conftest*
8072   eval "ac_cv_func_$ac_func=no"
8073 fi
8074 rm -f conftest*
8075 fi
8076
8077 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8078   echo "$ac_t""yes" 1>&6
8079     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8080   cat >> confdefs.h <<EOF
8081 #define $ac_tr_func 1
8082 EOF
8083  
8084 else
8085   echo "$ac_t""no" 1>&6
8086 fi
8087 done
8088  ;;
8089   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
8090 echo "configure:8091: checking for bigcrypt in -lsecurity" >&5
8091 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
8092 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8093   echo $ac_n "(cached) $ac_c" 1>&6
8094 else
8095   ac_save_LIBS="$LIBS"
8096 LIBS="-lsecurity  $LIBS"
8097 cat > conftest.$ac_ext <<EOF
8098 #line 8099 "configure"
8099 #include "confdefs.h"
8100 /* Override any gcc2 internal prototype to avoid an error.  */
8101 /* We use char because int might match the return type of a gcc2
8102     builtin and then its argument prototype would still apply.  */
8103 char bigcrypt();
8104
8105 int main() {
8106 bigcrypt()
8107 ; return 0; }
8108 EOF
8109 if { (eval echo configure:8110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8110   rm -rf conftest*
8111   eval "ac_cv_lib_$ac_lib_var=yes"
8112 else
8113   echo "configure: failed program was:" >&5
8114   cat conftest.$ac_ext >&5
8115   rm -rf conftest*
8116   eval "ac_cv_lib_$ac_lib_var=no"
8117 fi
8118 rm -f conftest*
8119 LIBS="$ac_save_LIBS"
8120
8121 fi
8122 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8123   echo "$ac_t""yes" 1>&6
8124     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8125     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8126   cat >> confdefs.h <<EOF
8127 #define $ac_tr_lib 1
8128 EOF
8129
8130   LIBS="-lsecurity $LIBS"
8131
8132 else
8133   echo "$ac_t""no" 1>&6
8134 fi
8135  
8136      for ac_func in bigcrypt
8137 do
8138 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8139 echo "configure:8140: checking for $ac_func" >&5
8140 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8141   echo $ac_n "(cached) $ac_c" 1>&6
8142 else
8143   cat > conftest.$ac_ext <<EOF
8144 #line 8145 "configure"
8145 #include "confdefs.h"
8146 /* System header to define __stub macros and hopefully few prototypes,
8147     which can conflict with char $ac_func(); below.  */
8148 #include <assert.h>
8149 /* Override any gcc2 internal prototype to avoid an error.  */
8150 /* We use char because int might match the return type of a gcc2
8151     builtin and then its argument prototype would still apply.  */
8152 char $ac_func();
8153
8154 int main() {
8155
8156 /* The GNU C library defines this for functions which it implements
8157     to always fail with ENOSYS.  Some functions are actually named
8158     something starting with __ and the normal name is an alias.  */
8159 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8160 choke me
8161 #else
8162 $ac_func();
8163 #endif
8164
8165 ; return 0; }
8166 EOF
8167 if { (eval echo configure:8168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8168   rm -rf conftest*
8169   eval "ac_cv_func_$ac_func=yes"
8170 else
8171   echo "configure: failed program was:" >&5
8172   cat conftest.$ac_ext >&5
8173   rm -rf conftest*
8174   eval "ac_cv_func_$ac_func=no"
8175 fi
8176 rm -f conftest*
8177 fi
8178
8179 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8180   echo "$ac_t""yes" 1>&6
8181     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8182   cat >> confdefs.h <<EOF
8183 #define $ac_tr_func 1
8184 EOF
8185  
8186 else
8187   echo "$ac_t""no" 1>&6
8188 fi
8189 done
8190
8191   ;;
8192   esac
8193
8194 case "$LIBS" in
8195   *-lsec*) for ac_func in bigcrypt
8196 do
8197 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8198 echo "configure:8199: checking for $ac_func" >&5
8199 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8200   echo $ac_n "(cached) $ac_c" 1>&6
8201 else
8202   cat > conftest.$ac_ext <<EOF
8203 #line 8204 "configure"
8204 #include "confdefs.h"
8205 /* System header to define __stub macros and hopefully few prototypes,
8206     which can conflict with char $ac_func(); below.  */
8207 #include <assert.h>
8208 /* Override any gcc2 internal prototype to avoid an error.  */
8209 /* We use char because int might match the return type of a gcc2
8210     builtin and then its argument prototype would still apply.  */
8211 char $ac_func();
8212
8213 int main() {
8214
8215 /* The GNU C library defines this for functions which it implements
8216     to always fail with ENOSYS.  Some functions are actually named
8217     something starting with __ and the normal name is an alias.  */
8218 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8219 choke me
8220 #else
8221 $ac_func();
8222 #endif
8223
8224 ; return 0; }
8225 EOF
8226 if { (eval echo configure:8227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8227   rm -rf conftest*
8228   eval "ac_cv_func_$ac_func=yes"
8229 else
8230   echo "configure: failed program was:" >&5
8231   cat conftest.$ac_ext >&5
8232   rm -rf conftest*
8233   eval "ac_cv_func_$ac_func=no"
8234 fi
8235 rm -f conftest*
8236 fi
8237
8238 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8239   echo "$ac_t""yes" 1>&6
8240     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8241   cat >> confdefs.h <<EOF
8242 #define $ac_tr_func 1
8243 EOF
8244  
8245 else
8246   echo "$ac_t""no" 1>&6
8247 fi
8248 done
8249  ;;
8250   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8251 echo "configure:8252: checking for bigcrypt in -lsec" >&5
8252 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8253 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8254   echo $ac_n "(cached) $ac_c" 1>&6
8255 else
8256   ac_save_LIBS="$LIBS"
8257 LIBS="-lsec  $LIBS"
8258 cat > conftest.$ac_ext <<EOF
8259 #line 8260 "configure"
8260 #include "confdefs.h"
8261 /* Override any gcc2 internal prototype to avoid an error.  */
8262 /* We use char because int might match the return type of a gcc2
8263     builtin and then its argument prototype would still apply.  */
8264 char bigcrypt();
8265
8266 int main() {
8267 bigcrypt()
8268 ; return 0; }
8269 EOF
8270 if { (eval echo configure:8271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8271   rm -rf conftest*
8272   eval "ac_cv_lib_$ac_lib_var=yes"
8273 else
8274   echo "configure: failed program was:" >&5
8275   cat conftest.$ac_ext >&5
8276   rm -rf conftest*
8277   eval "ac_cv_lib_$ac_lib_var=no"
8278 fi
8279 rm -f conftest*
8280 LIBS="$ac_save_LIBS"
8281
8282 fi
8283 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8284   echo "$ac_t""yes" 1>&6
8285     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8286     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8287   cat >> confdefs.h <<EOF
8288 #define $ac_tr_lib 1
8289 EOF
8290
8291   LIBS="-lsec $LIBS"
8292
8293 else
8294   echo "$ac_t""no" 1>&6
8295 fi
8296  
8297      for ac_func in bigcrypt
8298 do
8299 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8300 echo "configure:8301: checking for $ac_func" >&5
8301 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8302   echo $ac_n "(cached) $ac_c" 1>&6
8303 else
8304   cat > conftest.$ac_ext <<EOF
8305 #line 8306 "configure"
8306 #include "confdefs.h"
8307 /* System header to define __stub macros and hopefully few prototypes,
8308     which can conflict with char $ac_func(); below.  */
8309 #include <assert.h>
8310 /* Override any gcc2 internal prototype to avoid an error.  */
8311 /* We use char because int might match the return type of a gcc2
8312     builtin and then its argument prototype would still apply.  */
8313 char $ac_func();
8314
8315 int main() {
8316
8317 /* The GNU C library defines this for functions which it implements
8318     to always fail with ENOSYS.  Some functions are actually named
8319     something starting with __ and the normal name is an alias.  */
8320 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8321 choke me
8322 #else
8323 $ac_func();
8324 #endif
8325
8326 ; return 0; }
8327 EOF
8328 if { (eval echo configure:8329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8329   rm -rf conftest*
8330   eval "ac_cv_func_$ac_func=yes"
8331 else
8332   echo "configure: failed program was:" >&5
8333   cat conftest.$ac_ext >&5
8334   rm -rf conftest*
8335   eval "ac_cv_func_$ac_func=no"
8336 fi
8337 rm -f conftest*
8338 fi
8339
8340 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8341   echo "$ac_t""yes" 1>&6
8342     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8343   cat >> confdefs.h <<EOF
8344 #define $ac_tr_func 1
8345 EOF
8346  
8347 else
8348   echo "$ac_t""no" 1>&6
8349 fi
8350 done
8351
8352   ;;
8353   esac
8354
8355
8356 case "$LIBS" in
8357   *-lsecurity*) for ac_func in getprpwnam
8358 do
8359 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8360 echo "configure:8361: checking for $ac_func" >&5
8361 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8362   echo $ac_n "(cached) $ac_c" 1>&6
8363 else
8364   cat > conftest.$ac_ext <<EOF
8365 #line 8366 "configure"
8366 #include "confdefs.h"
8367 /* System header to define __stub macros and hopefully few prototypes,
8368     which can conflict with char $ac_func(); below.  */
8369 #include <assert.h>
8370 /* Override any gcc2 internal prototype to avoid an error.  */
8371 /* We use char because int might match the return type of a gcc2
8372     builtin and then its argument prototype would still apply.  */
8373 char $ac_func();
8374
8375 int main() {
8376
8377 /* The GNU C library defines this for functions which it implements
8378     to always fail with ENOSYS.  Some functions are actually named
8379     something starting with __ and the normal name is an alias.  */
8380 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8381 choke me
8382 #else
8383 $ac_func();
8384 #endif
8385
8386 ; return 0; }
8387 EOF
8388 if { (eval echo configure:8389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8389   rm -rf conftest*
8390   eval "ac_cv_func_$ac_func=yes"
8391 else
8392   echo "configure: failed program was:" >&5
8393   cat conftest.$ac_ext >&5
8394   rm -rf conftest*
8395   eval "ac_cv_func_$ac_func=no"
8396 fi
8397 rm -f conftest*
8398 fi
8399
8400 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8401   echo "$ac_t""yes" 1>&6
8402     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8403   cat >> confdefs.h <<EOF
8404 #define $ac_tr_func 1
8405 EOF
8406  
8407 else
8408   echo "$ac_t""no" 1>&6
8409 fi
8410 done
8411  ;;
8412   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8413 echo "configure:8414: checking for getprpwnam in -lsecurity" >&5
8414 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8415 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8416   echo $ac_n "(cached) $ac_c" 1>&6
8417 else
8418   ac_save_LIBS="$LIBS"
8419 LIBS="-lsecurity  $LIBS"
8420 cat > conftest.$ac_ext <<EOF
8421 #line 8422 "configure"
8422 #include "confdefs.h"
8423 /* Override any gcc2 internal prototype to avoid an error.  */
8424 /* We use char because int might match the return type of a gcc2
8425     builtin and then its argument prototype would still apply.  */
8426 char getprpwnam();
8427
8428 int main() {
8429 getprpwnam()
8430 ; return 0; }
8431 EOF
8432 if { (eval echo configure:8433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8433   rm -rf conftest*
8434   eval "ac_cv_lib_$ac_lib_var=yes"
8435 else
8436   echo "configure: failed program was:" >&5
8437   cat conftest.$ac_ext >&5
8438   rm -rf conftest*
8439   eval "ac_cv_lib_$ac_lib_var=no"
8440 fi
8441 rm -f conftest*
8442 LIBS="$ac_save_LIBS"
8443
8444 fi
8445 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8446   echo "$ac_t""yes" 1>&6
8447     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8448     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8449   cat >> confdefs.h <<EOF
8450 #define $ac_tr_lib 1
8451 EOF
8452
8453   LIBS="-lsecurity $LIBS"
8454
8455 else
8456   echo "$ac_t""no" 1>&6
8457 fi
8458  
8459      for ac_func in getprpwnam
8460 do
8461 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8462 echo "configure:8463: checking for $ac_func" >&5
8463 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8464   echo $ac_n "(cached) $ac_c" 1>&6
8465 else
8466   cat > conftest.$ac_ext <<EOF
8467 #line 8468 "configure"
8468 #include "confdefs.h"
8469 /* System header to define __stub macros and hopefully few prototypes,
8470     which can conflict with char $ac_func(); below.  */
8471 #include <assert.h>
8472 /* Override any gcc2 internal prototype to avoid an error.  */
8473 /* We use char because int might match the return type of a gcc2
8474     builtin and then its argument prototype would still apply.  */
8475 char $ac_func();
8476
8477 int main() {
8478
8479 /* The GNU C library defines this for functions which it implements
8480     to always fail with ENOSYS.  Some functions are actually named
8481     something starting with __ and the normal name is an alias.  */
8482 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8483 choke me
8484 #else
8485 $ac_func();
8486 #endif
8487
8488 ; return 0; }
8489 EOF
8490 if { (eval echo configure:8491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8491   rm -rf conftest*
8492   eval "ac_cv_func_$ac_func=yes"
8493 else
8494   echo "configure: failed program was:" >&5
8495   cat conftest.$ac_ext >&5
8496   rm -rf conftest*
8497   eval "ac_cv_func_$ac_func=no"
8498 fi
8499 rm -f conftest*
8500 fi
8501
8502 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8503   echo "$ac_t""yes" 1>&6
8504     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8505   cat >> confdefs.h <<EOF
8506 #define $ac_tr_func 1
8507 EOF
8508  
8509 else
8510   echo "$ac_t""no" 1>&6
8511 fi
8512 done
8513
8514   ;;
8515   esac
8516
8517 case "$LIBS" in
8518   *-lsec*) for ac_func in getprpwnam
8519 do
8520 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8521 echo "configure:8522: checking for $ac_func" >&5
8522 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8523   echo $ac_n "(cached) $ac_c" 1>&6
8524 else
8525   cat > conftest.$ac_ext <<EOF
8526 #line 8527 "configure"
8527 #include "confdefs.h"
8528 /* System header to define __stub macros and hopefully few prototypes,
8529     which can conflict with char $ac_func(); below.  */
8530 #include <assert.h>
8531 /* Override any gcc2 internal prototype to avoid an error.  */
8532 /* We use char because int might match the return type of a gcc2
8533     builtin and then its argument prototype would still apply.  */
8534 char $ac_func();
8535
8536 int main() {
8537
8538 /* The GNU C library defines this for functions which it implements
8539     to always fail with ENOSYS.  Some functions are actually named
8540     something starting with __ and the normal name is an alias.  */
8541 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8542 choke me
8543 #else
8544 $ac_func();
8545 #endif
8546
8547 ; return 0; }
8548 EOF
8549 if { (eval echo configure:8550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8550   rm -rf conftest*
8551   eval "ac_cv_func_$ac_func=yes"
8552 else
8553   echo "configure: failed program was:" >&5
8554   cat conftest.$ac_ext >&5
8555   rm -rf conftest*
8556   eval "ac_cv_func_$ac_func=no"
8557 fi
8558 rm -f conftest*
8559 fi
8560
8561 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8562   echo "$ac_t""yes" 1>&6
8563     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8564   cat >> confdefs.h <<EOF
8565 #define $ac_tr_func 1
8566 EOF
8567  
8568 else
8569   echo "$ac_t""no" 1>&6
8570 fi
8571 done
8572  ;;
8573   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8574 echo "configure:8575: checking for getprpwnam in -lsec" >&5
8575 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8576 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8577   echo $ac_n "(cached) $ac_c" 1>&6
8578 else
8579   ac_save_LIBS="$LIBS"
8580 LIBS="-lsec  $LIBS"
8581 cat > conftest.$ac_ext <<EOF
8582 #line 8583 "configure"
8583 #include "confdefs.h"
8584 /* Override any gcc2 internal prototype to avoid an error.  */
8585 /* We use char because int might match the return type of a gcc2
8586     builtin and then its argument prototype would still apply.  */
8587 char getprpwnam();
8588
8589 int main() {
8590 getprpwnam()
8591 ; return 0; }
8592 EOF
8593 if { (eval echo configure:8594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8594   rm -rf conftest*
8595   eval "ac_cv_lib_$ac_lib_var=yes"
8596 else
8597   echo "configure: failed program was:" >&5
8598   cat conftest.$ac_ext >&5
8599   rm -rf conftest*
8600   eval "ac_cv_lib_$ac_lib_var=no"
8601 fi
8602 rm -f conftest*
8603 LIBS="$ac_save_LIBS"
8604
8605 fi
8606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8607   echo "$ac_t""yes" 1>&6
8608     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8609     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8610   cat >> confdefs.h <<EOF
8611 #define $ac_tr_lib 1
8612 EOF
8613
8614   LIBS="-lsec $LIBS"
8615
8616 else
8617   echo "$ac_t""no" 1>&6
8618 fi
8619  
8620      for ac_func in getprpwnam
8621 do
8622 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8623 echo "configure:8624: checking for $ac_func" >&5
8624 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8625   echo $ac_n "(cached) $ac_c" 1>&6
8626 else
8627   cat > conftest.$ac_ext <<EOF
8628 #line 8629 "configure"
8629 #include "confdefs.h"
8630 /* System header to define __stub macros and hopefully few prototypes,
8631     which can conflict with char $ac_func(); below.  */
8632 #include <assert.h>
8633 /* Override any gcc2 internal prototype to avoid an error.  */
8634 /* We use char because int might match the return type of a gcc2
8635     builtin and then its argument prototype would still apply.  */
8636 char $ac_func();
8637
8638 int main() {
8639
8640 /* The GNU C library defines this for functions which it implements
8641     to always fail with ENOSYS.  Some functions are actually named
8642     something starting with __ and the normal name is an alias.  */
8643 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8644 choke me
8645 #else
8646 $ac_func();
8647 #endif
8648
8649 ; return 0; }
8650 EOF
8651 if { (eval echo configure:8652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8652   rm -rf conftest*
8653   eval "ac_cv_func_$ac_func=yes"
8654 else
8655   echo "configure: failed program was:" >&5
8656   cat conftest.$ac_ext >&5
8657   rm -rf conftest*
8658   eval "ac_cv_func_$ac_func=no"
8659 fi
8660 rm -f conftest*
8661 fi
8662
8663 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8664   echo "$ac_t""yes" 1>&6
8665     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8666   cat >> confdefs.h <<EOF
8667 #define $ac_tr_func 1
8668 EOF
8669  
8670 else
8671   echo "$ac_t""no" 1>&6
8672 fi
8673 done
8674
8675   ;;
8676   esac
8677
8678
8679 # this bit needs to be modified for each OS that is suported by
8680 # smbwrapper. You need to specify how to created a shared library and
8681 # how to compile C code to produce PIC object files
8682
8683 # these are the defaults, good for lots of systems
8684 HOST_OS="$host_os"
8685 LDSHFLAGS="-shared"
8686 PICFLAG=""
8687 SHLIBEXT="so"
8688 BLDSHARED="false"
8689
8690 # and these are for particular systems
8691 case "$host_os" in
8692                 *linux*)   cat >> confdefs.h <<\EOF
8693 #define LINUX 1
8694 EOF
8695
8696                                         BLDSHARED="true"
8697                 ;;
8698                 *solaris*) cat >> confdefs.h <<\EOF
8699 #define SUNOS5 1
8700 EOF
8701
8702                                         LDSHFLAGS="-G"
8703                                         BLDSHARED="true"
8704                 ;;
8705                 *sunos*) cat >> confdefs.h <<\EOF
8706 #define SUNOS4 1
8707 EOF
8708
8709                                         LDSHFLAGS=""
8710                 ;;
8711                 *bsd*) LDSHFLAGS="-shared -Bshareable"
8712                         BLDSHARED="true"
8713                 ;;
8714                 *irix*) cat >> confdefs.h <<\EOF
8715 #define IRIX 1
8716 EOF
8717
8718                         case "$host_os" in
8719                         *irix6*) cat >> confdefs.h <<\EOF
8720 #define IRIX6 1
8721 EOF
8722
8723                         ;;
8724                         esac
8725                         ATTEMPT_WRAP32_BUILD=yes
8726                 ;;
8727                 *aix*) cat >> confdefs.h <<\EOF
8728 #define AIX 1
8729 EOF
8730 ;;
8731                 *hpux*) cat >> confdefs.h <<\EOF
8732 #define HPUX 1
8733 EOF
8734
8735                         SHLIBEXT="sl"
8736                         # Use special PIC flags for the native HP-UX compiler.
8737                         if test $ac_cv_prog_cc_Ae = yes; then
8738                                 LDSHFLAGS="-b"
8739                                 PICFLAG="+z"
8740                         fi
8741                 ;;
8742                 *qnx*) cat >> confdefs.h <<\EOF
8743 #define QNX 1
8744 EOF
8745 ;;
8746                 *osf*) cat >> confdefs.h <<\EOF
8747 #define OSF1 1
8748 EOF
8749 ;;
8750                 *sco*) cat >> confdefs.h <<\EOF
8751 #define SCO 1
8752 EOF
8753 ;;
8754                 *next2*) cat >> confdefs.h <<\EOF
8755 #define NEXT2 1
8756 EOF
8757 ;;
8758                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8759 set dummy groff; ac_word=$2
8760 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8761 echo "configure:8762: checking for $ac_word" >&5
8762 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8763   echo $ac_n "(cached) $ac_c" 1>&6
8764 else
8765   if test -n "$ROFF"; then
8766   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8767 else
8768   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8769   ac_dummy="$PATH"
8770   for ac_dir in $ac_dummy; do
8771     test -z "$ac_dir" && ac_dir=.
8772     if test -f $ac_dir/$ac_word; then
8773       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8774       break
8775     fi
8776   done
8777   IFS="$ac_save_ifs"
8778 fi
8779 fi
8780 ROFF="$ac_cv_prog_ROFF"
8781 if test -n "$ROFF"; then
8782   echo "$ac_t""$ROFF" 1>&6
8783 else
8784   echo "$ac_t""no" 1>&6
8785 fi
8786 ;;
8787                 *sysv4*)
8788                         case "$host" in
8789                                 *-univel-*)     if  test "$GCC" != yes ; then
8790                                                                         cat >> confdefs.h <<\EOF
8791 #define HAVE_MEMSET 1
8792 EOF
8793
8794                                                                 fi
8795                                                                 LDSHFLAGS="-G"
8796                                 ;;
8797                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
8798 #define RELIANTUNIX 1
8799 EOF
8800 ;;
8801                         esac
8802                         ;;
8803                 *sysv5*)
8804                         if  test "$GCC" != yes ; then
8805                                 cat >> confdefs.h <<\EOF
8806 #define HAVE_MEMSET 1
8807 EOF
8808
8809                         fi
8810                         LDSHFLAGS="-G"
8811                         ;;
8812 esac
8813
8814 # try to work out how to produce PIC code with this compiler
8815 echo $ac_n "checking whether ${CC-cc} accepts -fPIC""... $ac_c" 1>&6
8816 echo "configure:8817: checking whether ${CC-cc} accepts -fPIC" >&5
8817 if eval "test \"`echo '$''{'ac_cv_prog_cc_fPIC'+set}'`\" = set"; then
8818   echo $ac_n "(cached) $ac_c" 1>&6
8819 else
8820   echo 'void f(){}' > conftest.c
8821 if test -z "`${CC-cc} -fPIC -c conftest.c 2>&1`"; then
8822   ac_cv_prog_cc_fPIC=yes
8823 else
8824   ac_cv_prog_cc_fPIC=no
8825 fi
8826 rm -f conftest*
8827
8828 fi
8829
8830 echo "$ac_t""$ac_cv_prog_cc_fPIC" 1>&6
8831 if test $ac_cv_prog_cc_fPIC = yes; then
8832     PICFLAG="-fPIC";
8833 fi
8834 if test x$PICFLAG = x; then
8835   echo $ac_n "checking whether ${CC-cc} accepts -KPIC""... $ac_c" 1>&6
8836 echo "configure:8837: checking whether ${CC-cc} accepts -KPIC" >&5
8837 if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then
8838   echo $ac_n "(cached) $ac_c" 1>&6
8839 else
8840   echo 'void f(){}' > conftest.c
8841 if test -z "`${CC-cc} -KPIC -c conftest.c 2>&1`"; then
8842   ac_cv_prog_cc_KPIC=yes
8843 else
8844   ac_cv_prog_cc_KPIC=no
8845 fi
8846 rm -f conftest*
8847
8848 fi
8849
8850 echo "$ac_t""$ac_cv_prog_cc_KPIC" 1>&6
8851   if test $ac_cv_prog_cc_KPIC = yes; then
8852     PICFLAG="-KPIC";
8853   fi
8854 fi
8855 if test x$PICFLAG = x; then
8856   echo $ac_n "checking whether ${CC-cc} accepts -Kpic""... $ac_c" 1>&6
8857 echo "configure:8858: checking whether ${CC-cc} accepts -Kpic" >&5
8858 if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then
8859   echo $ac_n "(cached) $ac_c" 1>&6
8860 else
8861   echo 'void f(){}' > conftest.c
8862 if test -z "`${CC-cc} -Kpic -c conftest.c 2>&1`"; then
8863   ac_cv_prog_cc_Kpic=yes
8864 else
8865   ac_cv_prog_cc_Kpic=no
8866 fi
8867 rm -f conftest*
8868
8869 fi
8870
8871 echo "$ac_t""$ac_cv_prog_cc_Kpic" 1>&6
8872   if test $ac_cv_prog_cc_Kpic = yes; then
8873     PICFLAG="-Kpic";
8874   fi
8875 fi
8876
8877 ################
8878
8879 echo $ac_n "checking for long long""... $ac_c" 1>&6
8880 echo "configure:8881: checking for long long" >&5
8881 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8882   echo $ac_n "(cached) $ac_c" 1>&6
8883 else
8884   
8885 if test "$cross_compiling" = yes; then
8886   samba_cv_have_longlong=cross
8887 else
8888   cat > conftest.$ac_ext <<EOF
8889 #line 8890 "configure"
8890 #include "confdefs.h"
8891 #include <stdio.h>
8892 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8893 EOF
8894 if { (eval echo configure:8895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8895 then
8896   samba_cv_have_longlong=yes
8897 else
8898   echo "configure: failed program was:" >&5
8899   cat conftest.$ac_ext >&5
8900   rm -fr conftest*
8901   samba_cv_have_longlong=no
8902 fi
8903 rm -fr conftest*
8904 fi
8905
8906 fi
8907
8908 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8909 if test x"$samba_cv_have_longlong" = x"yes"; then
8910     cat >> confdefs.h <<\EOF
8911 #define HAVE_LONGLONG 1
8912 EOF
8913
8914 fi
8915
8916 #
8917 # Check if the compiler supports the LL prefix on long long integers.
8918 # AIX needs this.
8919
8920 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8921 echo "configure:8922: checking for LL suffix on long long integers" >&5
8922 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8923   echo $ac_n "(cached) $ac_c" 1>&6
8924 else
8925   
8926     cat > conftest.$ac_ext <<EOF
8927 #line 8928 "configure"
8928 #include "confdefs.h"
8929 #include <stdio.h>
8930 int main() {
8931 long long i = 0x8000000000LL
8932 ; return 0; }
8933 EOF
8934 if { (eval echo configure:8935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8935   rm -rf conftest*
8936   samba_cv_compiler_supports_ll=yes
8937 else
8938   echo "configure: failed program was:" >&5
8939   cat conftest.$ac_ext >&5
8940   rm -rf conftest*
8941   samba_cv_compiler_supports_ll=no
8942 fi
8943 rm -f conftest*
8944 fi
8945
8946 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8947 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8948    cat >> confdefs.h <<\EOF
8949 #define COMPILER_SUPPORTS_LL 1
8950 EOF
8951
8952 fi
8953
8954   
8955 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8956 echo "configure:8957: checking for 64 bit off_t" >&5
8957 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8958   echo $ac_n "(cached) $ac_c" 1>&6
8959 else
8960   
8961 if test "$cross_compiling" = yes; then
8962   samba_cv_SIZEOF_OFF_T=cross
8963 else
8964   cat > conftest.$ac_ext <<EOF
8965 #line 8966 "configure"
8966 #include "confdefs.h"
8967 #include <stdio.h>
8968 #include <sys/stat.h>
8969 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8970 EOF
8971 if { (eval echo configure:8972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8972 then
8973   samba_cv_SIZEOF_OFF_T=yes
8974 else
8975   echo "configure: failed program was:" >&5
8976   cat conftest.$ac_ext >&5
8977   rm -fr conftest*
8978   samba_cv_SIZEOF_OFF_T=no
8979 fi
8980 rm -fr conftest*
8981 fi
8982
8983 fi
8984
8985 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8986 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8987     cat >> confdefs.h <<\EOF
8988 #define SIZEOF_OFF_T 8
8989 EOF
8990
8991 fi
8992
8993 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8994 echo "configure:8995: checking for off64_t" >&5
8995 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8996   echo $ac_n "(cached) $ac_c" 1>&6
8997 else
8998   
8999 if test "$cross_compiling" = yes; then
9000   samba_cv_HAVE_OFF64_T=cross
9001 else
9002   cat > conftest.$ac_ext <<EOF
9003 #line 9004 "configure"
9004 #include "confdefs.h"
9005
9006 #if defined(HAVE_UNISTD_H)
9007 #include <unistd.h>
9008 #endif
9009 #include <stdio.h>
9010 #include <sys/stat.h>
9011 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9012 EOF
9013 if { (eval echo configure:9014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9014 then
9015   samba_cv_HAVE_OFF64_T=yes
9016 else
9017   echo "configure: failed program was:" >&5
9018   cat conftest.$ac_ext >&5
9019   rm -fr conftest*
9020   samba_cv_HAVE_OFF64_T=no
9021 fi
9022 rm -fr conftest*
9023 fi
9024
9025 fi
9026
9027 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
9028 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
9029     cat >> confdefs.h <<\EOF
9030 #define HAVE_OFF64_T 1
9031 EOF
9032
9033 fi
9034
9035 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
9036 echo "configure:9037: checking for 64 bit ino_t" >&5
9037 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
9038   echo $ac_n "(cached) $ac_c" 1>&6
9039 else
9040   
9041 if test "$cross_compiling" = yes; then
9042   samba_cv_SIZEOF_INO_T=cross
9043 else
9044   cat > conftest.$ac_ext <<EOF
9045 #line 9046 "configure"
9046 #include "confdefs.h"
9047 #include <stdio.h>
9048 #include <sys/stat.h>
9049 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
9050 EOF
9051 if { (eval echo configure:9052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9052 then
9053   samba_cv_SIZEOF_INO_T=yes
9054 else
9055   echo "configure: failed program was:" >&5
9056   cat conftest.$ac_ext >&5
9057   rm -fr conftest*
9058   samba_cv_SIZEOF_INO_T=no
9059 fi
9060 rm -fr conftest*
9061 fi
9062
9063 fi
9064
9065 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
9066 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
9067     cat >> confdefs.h <<\EOF
9068 #define SIZEOF_INO_T 8
9069 EOF
9070
9071 fi
9072
9073 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
9074 echo "configure:9075: checking for ino64_t" >&5
9075 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
9076   echo $ac_n "(cached) $ac_c" 1>&6
9077 else
9078   
9079 if test "$cross_compiling" = yes; then
9080   samba_cv_HAVE_INO64_T=cross
9081 else
9082   cat > conftest.$ac_ext <<EOF
9083 #line 9084 "configure"
9084 #include "confdefs.h"
9085
9086 #if defined(HAVE_UNISTD_H)
9087 #include <unistd.h>
9088 #endif
9089 #include <stdio.h>
9090 #include <sys/stat.h>
9091 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9092 EOF
9093 if { (eval echo configure:9094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9094 then
9095   samba_cv_HAVE_INO64_T=yes
9096 else
9097   echo "configure: failed program was:" >&5
9098   cat conftest.$ac_ext >&5
9099   rm -fr conftest*
9100   samba_cv_HAVE_INO64_T=no
9101 fi
9102 rm -fr conftest*
9103 fi
9104
9105 fi
9106
9107 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9108 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9109     cat >> confdefs.h <<\EOF
9110 #define HAVE_INO64_T 1
9111 EOF
9112
9113 fi
9114
9115 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9116 echo "configure:9117: checking for struct dirent64" >&5
9117 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9118   echo $ac_n "(cached) $ac_c" 1>&6
9119 else
9120   
9121 cat > conftest.$ac_ext <<EOF
9122 #line 9123 "configure"
9123 #include "confdefs.h"
9124
9125 #if defined(HAVE_UNISTD_H)
9126 #include <unistd.h>
9127 #endif
9128 #include <sys/types.h>
9129 #include <dirent.h>
9130 int main() {
9131 struct dirent64 de;
9132 ; return 0; }
9133 EOF
9134 if { (eval echo configure:9135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9135   rm -rf conftest*
9136   samba_cv_HAVE_STRUCT_DIRENT64=yes
9137 else
9138   echo "configure: failed program was:" >&5
9139   cat conftest.$ac_ext >&5
9140   rm -rf conftest*
9141   samba_cv_HAVE_STRUCT_DIRENT64=no
9142 fi
9143 rm -f conftest*
9144 fi
9145
9146 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9147 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
9148     cat >> confdefs.h <<\EOF
9149 #define HAVE_STRUCT_DIRENT64 1
9150 EOF
9151
9152 fi
9153
9154 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9155 echo "configure:9156: checking for unsigned char" >&5
9156 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9157   echo $ac_n "(cached) $ac_c" 1>&6
9158 else
9159   
9160 if test "$cross_compiling" = yes; then
9161   samba_cv_HAVE_UNSIGNED_CHAR=cross
9162 else
9163   cat > conftest.$ac_ext <<EOF
9164 #line 9165 "configure"
9165 #include "confdefs.h"
9166 #include <stdio.h>
9167 main() { char c; c=250; exit((c > 0)?0:1); }
9168 EOF
9169 if { (eval echo configure:9170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9170 then
9171   samba_cv_HAVE_UNSIGNED_CHAR=yes
9172 else
9173   echo "configure: failed program was:" >&5
9174   cat conftest.$ac_ext >&5
9175   rm -fr conftest*
9176   samba_cv_HAVE_UNSIGNED_CHAR=no
9177 fi
9178 rm -fr conftest*
9179 fi
9180
9181 fi
9182
9183 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9184 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9185     cat >> confdefs.h <<\EOF
9186 #define HAVE_UNSIGNED_CHAR 1
9187 EOF
9188
9189 fi
9190
9191 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9192 echo "configure:9193: checking for sin_len in sock" >&5
9193 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9194   echo $ac_n "(cached) $ac_c" 1>&6
9195 else
9196   
9197 cat > conftest.$ac_ext <<EOF
9198 #line 9199 "configure"
9199 #include "confdefs.h"
9200 #include <sys/types.h>
9201 #include <sys/socket.h>
9202 #include <netinet/in.h>
9203 int main() {
9204 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9205 ; return 0; }
9206 EOF
9207 if { (eval echo configure:9208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9208   rm -rf conftest*
9209   samba_cv_HAVE_SOCK_SIN_LEN=yes
9210 else
9211   echo "configure: failed program was:" >&5
9212   cat conftest.$ac_ext >&5
9213   rm -rf conftest*
9214   samba_cv_HAVE_SOCK_SIN_LEN=no
9215 fi
9216 rm -f conftest*
9217 fi
9218
9219 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9220 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9221     cat >> confdefs.h <<\EOF
9222 #define HAVE_SOCK_SIN_LEN 1
9223 EOF
9224
9225 fi
9226
9227 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9228 echo "configure:9229: checking whether seekdir returns void" >&5
9229 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9230   echo $ac_n "(cached) $ac_c" 1>&6
9231 else
9232   
9233 cat > conftest.$ac_ext <<EOF
9234 #line 9235 "configure"
9235 #include "confdefs.h"
9236 #include <sys/types.h>
9237 #include <dirent.h>
9238 void seekdir(DIR *d, long loc) { return; }
9239 int main() {
9240 return 0;
9241 ; return 0; }
9242 EOF
9243 if { (eval echo configure:9244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9244   rm -rf conftest*
9245   samba_cv_SEEKDIR_RETURNS_VOID=yes
9246 else
9247   echo "configure: failed program was:" >&5
9248   cat conftest.$ac_ext >&5
9249   rm -rf conftest*
9250   samba_cv_SEEKDIR_RETURNS_VOID=no
9251 fi
9252 rm -f conftest*
9253 fi
9254
9255 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9256 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9257     cat >> confdefs.h <<\EOF
9258 #define SEEKDIR_RETURNS_VOID 1
9259 EOF
9260
9261 fi
9262
9263 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9264 echo "configure:9265: checking for __FILE__ macro" >&5
9265 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9266   echo $ac_n "(cached) $ac_c" 1>&6
9267 else
9268   
9269 cat > conftest.$ac_ext <<EOF
9270 #line 9271 "configure"
9271 #include "confdefs.h"
9272 #include <stdio.h>
9273 int main() {
9274 printf("%s\n", __FILE__);
9275 ; return 0; }
9276 EOF
9277 if { (eval echo configure:9278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9278   rm -rf conftest*
9279   samba_cv_HAVE_FILE_MACRO=yes
9280 else
9281   echo "configure: failed program was:" >&5
9282   cat conftest.$ac_ext >&5
9283   rm -rf conftest*
9284   samba_cv_HAVE_FILE_MACRO=no
9285 fi
9286 rm -f conftest*
9287 fi
9288
9289 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9290 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9291     cat >> confdefs.h <<\EOF
9292 #define HAVE_FILE_MACRO 1
9293 EOF
9294
9295 fi
9296
9297 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9298 echo "configure:9299: checking for __FUNCTION__ macro" >&5
9299 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9300   echo $ac_n "(cached) $ac_c" 1>&6
9301 else
9302   
9303 cat > conftest.$ac_ext <<EOF
9304 #line 9305 "configure"
9305 #include "confdefs.h"
9306 #include <stdio.h>
9307 int main() {
9308 printf("%s\n", __FUNCTION__);
9309 ; return 0; }
9310 EOF
9311 if { (eval echo configure:9312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9312   rm -rf conftest*
9313   samba_cv_HAVE_FUNCTION_MACRO=yes
9314 else
9315   echo "configure: failed program was:" >&5
9316   cat conftest.$ac_ext >&5
9317   rm -rf conftest*
9318   samba_cv_HAVE_FUNCTION_MACRO=no
9319 fi
9320 rm -f conftest*
9321 fi
9322
9323 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9324 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9325     cat >> confdefs.h <<\EOF
9326 #define HAVE_FUNCTION_MACRO 1
9327 EOF
9328
9329 fi
9330
9331 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9332 echo "configure:9333: checking if gettimeofday takes tz argument" >&5
9333 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9334   echo $ac_n "(cached) $ac_c" 1>&6
9335 else
9336   
9337 if test "$cross_compiling" = yes; then
9338   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9339 else
9340   cat > conftest.$ac_ext <<EOF
9341 #line 9342 "configure"
9342 #include "confdefs.h"
9343
9344 #include <sys/time.h>
9345 #include <unistd.h>
9346 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9347 EOF
9348 if { (eval echo configure:9349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9349 then
9350   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9351 else
9352   echo "configure: failed program was:" >&5
9353   cat conftest.$ac_ext >&5
9354   rm -fr conftest*
9355   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9356 fi
9357 rm -fr conftest*
9358 fi
9359
9360 fi
9361
9362 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9363 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9364     cat >> confdefs.h <<\EOF
9365 #define HAVE_GETTIMEOFDAY_TZ 1
9366 EOF
9367
9368 fi
9369
9370 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9371 echo "configure:9372: checking for C99 vsnprintf" >&5
9372 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9373   echo $ac_n "(cached) $ac_c" 1>&6
9374 else
9375   
9376 if test "$cross_compiling" = yes; then
9377   samba_cv_HAVE_C99_VSNPRINTF=cross
9378 else
9379   cat > conftest.$ac_ext <<EOF
9380 #line 9381 "configure"
9381 #include "confdefs.h"
9382
9383 #include <sys/types.h>
9384 #include <stdarg.h>
9385 void foo(const char *format, ...) { 
9386        va_list ap;
9387        int len;
9388        char buf[5];
9389
9390        va_start(ap, format);
9391        len = vsnprintf(0, 0, format, ap);
9392        va_end(ap);
9393        if (len != 5) exit(1);
9394
9395        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9396
9397        exit(0);
9398 }
9399 main() { foo("hello"); }
9400
9401 EOF
9402 if { (eval echo configure:9403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9403 then
9404   samba_cv_HAVE_C99_VSNPRINTF=yes
9405 else
9406   echo "configure: failed program was:" >&5
9407   cat conftest.$ac_ext >&5
9408   rm -fr conftest*
9409   samba_cv_HAVE_C99_VSNPRINTF=no
9410 fi
9411 rm -fr conftest*
9412 fi
9413
9414 fi
9415
9416 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9417 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9418     cat >> confdefs.h <<\EOF
9419 #define HAVE_C99_VSNPRINTF 1
9420 EOF
9421
9422 fi
9423
9424 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9425 echo "configure:9426: checking for broken readdir" >&5
9426 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9427   echo $ac_n "(cached) $ac_c" 1>&6
9428 else
9429   
9430 if test "$cross_compiling" = yes; then
9431   samba_cv_HAVE_BROKEN_READDIR=cross
9432 else
9433   cat > conftest.$ac_ext <<EOF
9434 #line 9435 "configure"
9435 #include "confdefs.h"
9436 #include <sys/types.h>
9437 #include <dirent.h>
9438 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9439 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9440 di->d_name[0] == 0) exit(0); exit(1);} 
9441 EOF
9442 if { (eval echo configure:9443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9443 then
9444   samba_cv_HAVE_BROKEN_READDIR=yes
9445 else
9446   echo "configure: failed program was:" >&5
9447   cat conftest.$ac_ext >&5
9448   rm -fr conftest*
9449   samba_cv_HAVE_BROKEN_READDIR=no
9450 fi
9451 rm -fr conftest*
9452 fi
9453
9454 fi
9455
9456 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9457 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9458     cat >> confdefs.h <<\EOF
9459 #define HAVE_BROKEN_READDIR 1
9460 EOF
9461
9462 fi
9463
9464 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9465 echo "configure:9466: checking for utimbuf" >&5
9466 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9467   echo $ac_n "(cached) $ac_c" 1>&6
9468 else
9469   
9470 cat > conftest.$ac_ext <<EOF
9471 #line 9472 "configure"
9472 #include "confdefs.h"
9473 #include <sys/types.h>
9474 #include <utime.h>
9475 int main() {
9476 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9477 ; return 0; }
9478 EOF
9479 if { (eval echo configure:9480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9480   rm -rf conftest*
9481   samba_cv_HAVE_UTIMBUF=yes
9482 else
9483   echo "configure: failed program was:" >&5
9484   cat conftest.$ac_ext >&5
9485   rm -rf conftest*
9486   samba_cv_HAVE_UTIMBUF=no
9487 fi
9488 rm -f conftest*
9489 fi
9490
9491 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9492 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9493     cat >> confdefs.h <<\EOF
9494 #define HAVE_UTIMBUF 1
9495 EOF
9496
9497 fi
9498
9499
9500 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9501 do
9502 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9503 echo "configure:9504: checking for $ac_func" >&5
9504 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9505   echo $ac_n "(cached) $ac_c" 1>&6
9506 else
9507   cat > conftest.$ac_ext <<EOF
9508 #line 9509 "configure"
9509 #include "confdefs.h"
9510 /* System header to define __stub macros and hopefully few prototypes,
9511     which can conflict with char $ac_func(); below.  */
9512 #include <assert.h>
9513 /* Override any gcc2 internal prototype to avoid an error.  */
9514 /* We use char because int might match the return type of a gcc2
9515     builtin and then its argument prototype would still apply.  */
9516 char $ac_func();
9517
9518 int main() {
9519
9520 /* The GNU C library defines this for functions which it implements
9521     to always fail with ENOSYS.  Some functions are actually named
9522     something starting with __ and the normal name is an alias.  */
9523 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9524 choke me
9525 #else
9526 $ac_func();
9527 #endif
9528
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_func_$ac_func=yes"
9534 else
9535   echo "configure: failed program was:" >&5
9536   cat conftest.$ac_ext >&5
9537   rm -rf conftest*
9538   eval "ac_cv_func_$ac_func=no"
9539 fi
9540 rm -f conftest*
9541 fi
9542
9543 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9544   echo "$ac_t""yes" 1>&6
9545     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9546   cat >> confdefs.h <<EOF
9547 #define $ac_tr_func 1
9548 EOF
9549  
9550 else
9551   echo "$ac_t""no" 1>&6
9552 fi
9553 done
9554
9555
9556 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9557 echo "configure:9558: checking for ut_name in utmp" >&5
9558 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9559   echo $ac_n "(cached) $ac_c" 1>&6
9560 else
9561   
9562 cat > conftest.$ac_ext <<EOF
9563 #line 9564 "configure"
9564 #include "confdefs.h"
9565 #include <sys/types.h>
9566 #include <utmp.h>
9567 int main() {
9568 struct utmp ut;  ut.ut_name[0] = 'a';
9569 ; return 0; }
9570 EOF
9571 if { (eval echo configure:9572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9572   rm -rf conftest*
9573   samba_cv_HAVE_UT_UT_NAME=yes
9574 else
9575   echo "configure: failed program was:" >&5
9576   cat conftest.$ac_ext >&5
9577   rm -rf conftest*
9578   samba_cv_HAVE_UT_UT_NAME=no
9579 fi
9580 rm -f conftest*
9581 fi
9582
9583 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9584 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9585     cat >> confdefs.h <<\EOF
9586 #define HAVE_UT_UT_NAME 1
9587 EOF
9588
9589 fi 
9590
9591 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9592 echo "configure:9593: checking for ut_user in utmp" >&5
9593 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9594   echo $ac_n "(cached) $ac_c" 1>&6
9595 else
9596   
9597 cat > conftest.$ac_ext <<EOF
9598 #line 9599 "configure"
9599 #include "confdefs.h"
9600 #include <sys/types.h>
9601 #include <utmp.h>
9602 int main() {
9603 struct utmp ut;  ut.ut_user[0] = 'a';
9604 ; return 0; }
9605 EOF
9606 if { (eval echo configure:9607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9607   rm -rf conftest*
9608   samba_cv_HAVE_UT_UT_USER=yes
9609 else
9610   echo "configure: failed program was:" >&5
9611   cat conftest.$ac_ext >&5
9612   rm -rf conftest*
9613   samba_cv_HAVE_UT_UT_USER=no
9614 fi
9615 rm -f conftest*
9616 fi
9617
9618 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9619 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9620     cat >> confdefs.h <<\EOF
9621 #define HAVE_UT_UT_USER 1
9622 EOF
9623
9624 fi 
9625
9626 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9627 echo "configure:9628: checking for ut_id in utmp" >&5
9628 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9629   echo $ac_n "(cached) $ac_c" 1>&6
9630 else
9631   
9632 cat > conftest.$ac_ext <<EOF
9633 #line 9634 "configure"
9634 #include "confdefs.h"
9635 #include <sys/types.h>
9636 #include <utmp.h>
9637 int main() {
9638 struct utmp ut;  ut.ut_id[0] = 'a';
9639 ; return 0; }
9640 EOF
9641 if { (eval echo configure:9642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9642   rm -rf conftest*
9643   samba_cv_HAVE_UT_UT_ID=yes
9644 else
9645   echo "configure: failed program was:" >&5
9646   cat conftest.$ac_ext >&5
9647   rm -rf conftest*
9648   samba_cv_HAVE_UT_UT_ID=no
9649 fi
9650 rm -f conftest*
9651 fi
9652
9653 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9654 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9655     cat >> confdefs.h <<\EOF
9656 #define HAVE_UT_UT_ID 1
9657 EOF
9658
9659 fi 
9660
9661 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9662 echo "configure:9663: checking for ut_host in utmp" >&5
9663 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9664   echo $ac_n "(cached) $ac_c" 1>&6
9665 else
9666   
9667 cat > conftest.$ac_ext <<EOF
9668 #line 9669 "configure"
9669 #include "confdefs.h"
9670 #include <sys/types.h>
9671 #include <utmp.h>
9672 int main() {
9673 struct utmp ut;  ut.ut_host[0] = 'a';
9674 ; return 0; }
9675 EOF
9676 if { (eval echo configure:9677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9677   rm -rf conftest*
9678   samba_cv_HAVE_UT_UT_HOST=yes
9679 else
9680   echo "configure: failed program was:" >&5
9681   cat conftest.$ac_ext >&5
9682   rm -rf conftest*
9683   samba_cv_HAVE_UT_UT_HOST=no
9684 fi
9685 rm -f conftest*
9686 fi
9687
9688 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9689 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9690     cat >> confdefs.h <<\EOF
9691 #define HAVE_UT_UT_HOST 1
9692 EOF
9693
9694 fi 
9695
9696 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9697 echo "configure:9698: checking for ut_time in utmp" >&5
9698 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9699   echo $ac_n "(cached) $ac_c" 1>&6
9700 else
9701   
9702 cat > conftest.$ac_ext <<EOF
9703 #line 9704 "configure"
9704 #include "confdefs.h"
9705 #include <sys/types.h>
9706 #include <utmp.h>
9707 int main() {
9708 struct utmp ut;  time_t t; ut.ut_time = t;
9709 ; return 0; }
9710 EOF
9711 if { (eval echo configure:9712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9712   rm -rf conftest*
9713   samba_cv_HAVE_UT_UT_TIME=yes
9714 else
9715   echo "configure: failed program was:" >&5
9716   cat conftest.$ac_ext >&5
9717   rm -rf conftest*
9718   samba_cv_HAVE_UT_UT_TIME=no
9719 fi
9720 rm -f conftest*
9721 fi
9722
9723 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9724 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9725     cat >> confdefs.h <<\EOF
9726 #define HAVE_UT_UT_TIME 1
9727 EOF
9728
9729 fi 
9730
9731 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9732 echo "configure:9733: checking for ut_tv in utmp" >&5
9733 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9734   echo $ac_n "(cached) $ac_c" 1>&6
9735 else
9736   
9737 cat > conftest.$ac_ext <<EOF
9738 #line 9739 "configure"
9739 #include "confdefs.h"
9740 #include <sys/types.h>
9741 #include <utmp.h>
9742 int main() {
9743 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9744 ; return 0; }
9745 EOF
9746 if { (eval echo configure:9747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9747   rm -rf conftest*
9748   samba_cv_HAVE_UT_UT_TV=yes
9749 else
9750   echo "configure: failed program was:" >&5
9751   cat conftest.$ac_ext >&5
9752   rm -rf conftest*
9753   samba_cv_HAVE_UT_UT_TV=no
9754 fi
9755 rm -f conftest*
9756 fi
9757
9758 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9759 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9760     cat >> confdefs.h <<\EOF
9761 #define HAVE_UT_UT_TV 1
9762 EOF
9763
9764 fi 
9765
9766 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9767 echo "configure:9768: checking for ut_type in utmp" >&5
9768 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9769   echo $ac_n "(cached) $ac_c" 1>&6
9770 else
9771   
9772 cat > conftest.$ac_ext <<EOF
9773 #line 9774 "configure"
9774 #include "confdefs.h"
9775 #include <sys/types.h>
9776 #include <utmp.h>
9777 int main() {
9778 struct utmp ut;  ut.ut_type = 0;
9779 ; return 0; }
9780 EOF
9781 if { (eval echo configure:9782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9782   rm -rf conftest*
9783   samba_cv_HAVE_UT_UT_TYPE=yes
9784 else
9785   echo "configure: failed program was:" >&5
9786   cat conftest.$ac_ext >&5
9787   rm -rf conftest*
9788   samba_cv_HAVE_UT_UT_TYPE=no
9789 fi
9790 rm -f conftest*
9791 fi
9792
9793 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9794 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9795     cat >> confdefs.h <<\EOF
9796 #define HAVE_UT_UT_TYPE 1
9797 EOF
9798
9799 fi 
9800
9801 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9802 echo "configure:9803: checking for ut_pid in utmp" >&5
9803 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9804   echo $ac_n "(cached) $ac_c" 1>&6
9805 else
9806   
9807 cat > conftest.$ac_ext <<EOF
9808 #line 9809 "configure"
9809 #include "confdefs.h"
9810 #include <sys/types.h>
9811 #include <utmp.h>
9812 int main() {
9813 struct utmp ut;  ut.ut_pid = 0;
9814 ; return 0; }
9815 EOF
9816 if { (eval echo configure:9817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9817   rm -rf conftest*
9818   samba_cv_HAVE_UT_UT_PID=yes
9819 else
9820   echo "configure: failed program was:" >&5
9821   cat conftest.$ac_ext >&5
9822   rm -rf conftest*
9823   samba_cv_HAVE_UT_UT_PID=no
9824 fi
9825 rm -f conftest*
9826 fi
9827
9828 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9829 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9830     cat >> confdefs.h <<\EOF
9831 #define HAVE_UT_UT_PID 1
9832 EOF
9833
9834 fi 
9835
9836 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9837 echo "configure:9838: checking for ut_exit in utmp" >&5
9838 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9839   echo $ac_n "(cached) $ac_c" 1>&6
9840 else
9841   
9842 cat > conftest.$ac_ext <<EOF
9843 #line 9844 "configure"
9844 #include "confdefs.h"
9845 #include <sys/types.h>
9846 #include <utmp.h>
9847 int main() {
9848 struct utmp ut;  ut.ut_exit.e_exit = 0;
9849 ; return 0; }
9850 EOF
9851 if { (eval echo configure:9852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9852   rm -rf conftest*
9853   samba_cv_HAVE_UT_UT_EXIT=yes
9854 else
9855   echo "configure: failed program was:" >&5
9856   cat conftest.$ac_ext >&5
9857   rm -rf conftest*
9858   samba_cv_HAVE_UT_UT_EXIT=no
9859 fi
9860 rm -f conftest*
9861 fi
9862
9863 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9864 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9865     cat >> confdefs.h <<\EOF
9866 #define HAVE_UT_UT_EXIT 1
9867 EOF
9868
9869 fi 
9870
9871 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9872 echo "configure:9873: checking for ut_addr in utmp" >&5
9873 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9874   echo $ac_n "(cached) $ac_c" 1>&6
9875 else
9876   
9877 cat > conftest.$ac_ext <<EOF
9878 #line 9879 "configure"
9879 #include "confdefs.h"
9880 #include <sys/types.h>
9881 #include <utmp.h>
9882 int main() {
9883 struct utmp ut;  ut.ut_addr = 0;
9884 ; return 0; }
9885 EOF
9886 if { (eval echo configure:9887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9887   rm -rf conftest*
9888   samba_cv_HAVE_UT_UT_ADDR=yes
9889 else
9890   echo "configure: failed program was:" >&5
9891   cat conftest.$ac_ext >&5
9892   rm -rf conftest*
9893   samba_cv_HAVE_UT_UT_ADDR=no
9894 fi
9895 rm -f conftest*
9896 fi
9897
9898 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9899 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9900     cat >> confdefs.h <<\EOF
9901 #define HAVE_UT_UT_ADDR 1
9902 EOF
9903
9904 fi 
9905
9906 if test x$ac_cv_func_pututline = xyes ; then
9907   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9908 echo "configure:9909: checking whether pututline returns pointer" >&5
9909 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9910   echo $ac_n "(cached) $ac_c" 1>&6
9911 else
9912   
9913   cat > conftest.$ac_ext <<EOF
9914 #line 9915 "configure"
9915 #include "confdefs.h"
9916 #include <sys/types.h>
9917 #include <utmp.h>
9918 int main() {
9919 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9920 ; return 0; }
9921 EOF
9922 if { (eval echo configure:9923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9923   rm -rf conftest*
9924   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9925 else
9926   echo "configure: failed program was:" >&5
9927   cat conftest.$ac_ext >&5
9928   rm -rf conftest*
9929   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9930 fi
9931 rm -f conftest*
9932 fi
9933
9934 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9935   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9936       cat >> confdefs.h <<\EOF
9937 #define PUTUTLINE_RETURNS_UTMP 1
9938 EOF
9939
9940   fi
9941 fi
9942
9943 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9944 echo "configure:9945: checking for ut_syslen in utmpx" >&5
9945 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9946   echo $ac_n "(cached) $ac_c" 1>&6
9947 else
9948   
9949 cat > conftest.$ac_ext <<EOF
9950 #line 9951 "configure"
9951 #include "confdefs.h"
9952 #include <sys/types.h>
9953 #include <utmpx.h>
9954 int main() {
9955 struct utmpx ux;  ux.ut_syslen = 0;
9956 ; return 0; }
9957 EOF
9958 if { (eval echo configure:9959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9959   rm -rf conftest*
9960   samba_cv_HAVE_UX_UT_SYSLEN=yes
9961 else
9962   echo "configure: failed program was:" >&5
9963   cat conftest.$ac_ext >&5
9964   rm -rf conftest*
9965   samba_cv_HAVE_UX_UT_SYSLEN=no
9966 fi
9967 rm -f conftest*
9968 fi
9969
9970 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
9971 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
9972     cat >> confdefs.h <<\EOF
9973 #define HAVE_UX_UT_SYSLEN 1
9974 EOF
9975
9976 fi 
9977
9978 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
9979 echo "configure:9980: checking for Linux kernel oplocks" >&5
9980 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
9981   echo $ac_n "(cached) $ac_c" 1>&6
9982 else
9983   
9984 if test "$cross_compiling" = yes; then
9985   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
9986 else
9987   cat > conftest.$ac_ext <<EOF
9988 #line 9989 "configure"
9989 #include "confdefs.h"
9990
9991 #include <sys/types.h>
9992 #include <fcntl.h>
9993 #ifndef F_GETLEASE
9994 #define F_GETLEASE      1025
9995 #endif
9996 main() {
9997        int fd = open("/dev/null", O_RDONLY);
9998        return fcntl(fd, F_GETLEASE, 0) == -1;
9999 }
10000
10001 EOF
10002 if { (eval echo configure:10003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10003 then
10004   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10005 else
10006   echo "configure: failed program was:" >&5
10007   cat conftest.$ac_ext >&5
10008   rm -fr conftest*
10009   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10010 fi
10011 rm -fr conftest*
10012 fi
10013
10014 fi
10015
10016 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10017 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10018     cat >> confdefs.h <<\EOF
10019 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10020 EOF
10021
10022 fi
10023
10024 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10025 echo "configure:10026: checking for kernel change notify support" >&5
10026 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10027   echo $ac_n "(cached) $ac_c" 1>&6
10028 else
10029   
10030 if test "$cross_compiling" = yes; then
10031   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10032 else
10033   cat > conftest.$ac_ext <<EOF
10034 #line 10035 "configure"
10035 #include "confdefs.h"
10036
10037 #include <sys/types.h>
10038 #include <fcntl.h>
10039 #include <signal.h>
10040 #ifndef F_NOTIFY
10041 #define F_NOTIFY 1026
10042 #endif
10043 main() {
10044         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10045 }
10046
10047 EOF
10048 if { (eval echo configure:10049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10049 then
10050   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10051 else
10052   echo "configure: failed program was:" >&5
10053   cat conftest.$ac_ext >&5
10054   rm -fr conftest*
10055   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10056 fi
10057 rm -fr conftest*
10058 fi
10059
10060 fi
10061
10062 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10063 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10064     cat >> confdefs.h <<\EOF
10065 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10066 EOF
10067
10068 fi
10069
10070 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10071 echo "configure:10072: checking for kernel share modes" >&5
10072 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10073   echo $ac_n "(cached) $ac_c" 1>&6
10074 else
10075   
10076 if test "$cross_compiling" = yes; then
10077   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10078 else
10079   cat > conftest.$ac_ext <<EOF
10080 #line 10081 "configure"
10081 #include "confdefs.h"
10082
10083 #include <sys/types.h>
10084 #include <fcntl.h>
10085 #include <signal.h>
10086 #include <sys/file.h>
10087 #ifndef LOCK_MAND
10088 #define LOCK_MAND       32
10089 #define LOCK_READ       64
10090 #endif
10091 main() {
10092         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10093 }
10094
10095 EOF
10096 if { (eval echo configure:10097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10097 then
10098   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10099 else
10100   echo "configure: failed program was:" >&5
10101   cat conftest.$ac_ext >&5
10102   rm -fr conftest*
10103   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10104 fi
10105 rm -fr conftest*
10106 fi
10107
10108 fi
10109
10110 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10111 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10112     cat >> confdefs.h <<\EOF
10113 #define HAVE_KERNEL_SHARE_MODES 1
10114 EOF
10115
10116 fi
10117
10118
10119
10120
10121 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10122 echo "configure:10123: checking for IRIX kernel oplock type definitions" >&5
10123 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10124   echo $ac_n "(cached) $ac_c" 1>&6
10125 else
10126   
10127 cat > conftest.$ac_ext <<EOF
10128 #line 10129 "configure"
10129 #include "confdefs.h"
10130 #include <sys/types.h>
10131 #include <fcntl.h>
10132 int main() {
10133 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10134 ; return 0; }
10135 EOF
10136 if { (eval echo configure:10137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10137   rm -rf conftest*
10138   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10139 else
10140   echo "configure: failed program was:" >&5
10141   cat conftest.$ac_ext >&5
10142   rm -rf conftest*
10143   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10144 fi
10145 rm -f conftest*
10146 fi
10147
10148 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10149 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10150     cat >> confdefs.h <<\EOF
10151 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10152 EOF
10153
10154 fi
10155
10156 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10157 echo "configure:10158: checking for irix specific capabilities" >&5
10158 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10159   echo $ac_n "(cached) $ac_c" 1>&6
10160 else
10161   
10162 if test "$cross_compiling" = yes; then
10163   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10164 else
10165   cat > conftest.$ac_ext <<EOF
10166 #line 10167 "configure"
10167 #include "confdefs.h"
10168 #include <sys/types.h>
10169 #include <sys/capability.h>
10170 main() {
10171  cap_t cap;
10172  if ((cap = cap_get_proc()) == NULL)
10173    exit(1);
10174  cap->cap_effective |= CAP_NETWORK_MGT;
10175  cap->cap_inheritable |= CAP_NETWORK_MGT;
10176  cap_set_proc(cap);
10177  exit(0);
10178 }
10179
10180 EOF
10181 if { (eval echo configure:10182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10182 then
10183   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10184 else
10185   echo "configure: failed program was:" >&5
10186   cat conftest.$ac_ext >&5
10187   rm -fr conftest*
10188   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10189 fi
10190 rm -fr conftest*
10191 fi
10192
10193 fi
10194
10195 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10196 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10197     cat >> confdefs.h <<\EOF
10198 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10199 EOF
10200
10201 fi
10202
10203 #
10204 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10205 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10206 #
10207
10208 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10209 echo "configure:10210: checking for int16 typedef included by rpc/rpc.h" >&5
10210 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10211   echo $ac_n "(cached) $ac_c" 1>&6
10212 else
10213   
10214 cat > conftest.$ac_ext <<EOF
10215 #line 10216 "configure"
10216 #include "confdefs.h"
10217 #include <sys/types.h>
10218 #if defined(HAVE_RPC_RPC_H)
10219 #include <rpc/rpc.h>
10220 #endif
10221 int main() {
10222 int16 testvar;
10223 ; return 0; }
10224 EOF
10225 if { (eval echo configure:10226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10226   rm -rf conftest*
10227   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10228 else
10229   echo "configure: failed program was:" >&5
10230   cat conftest.$ac_ext >&5
10231   rm -rf conftest*
10232   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10233 fi
10234 rm -f conftest*
10235 fi
10236
10237 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10238 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10239     cat >> confdefs.h <<\EOF
10240 #define HAVE_INT16_FROM_RPC_RPC_H 1
10241 EOF
10242
10243 fi
10244
10245 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10246 echo "configure:10247: checking for uint16 typedef included by rpc/rpc.h" >&5
10247 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10248   echo $ac_n "(cached) $ac_c" 1>&6
10249 else
10250   
10251 cat > conftest.$ac_ext <<EOF
10252 #line 10253 "configure"
10253 #include "confdefs.h"
10254 #include <sys/types.h>
10255 #if defined(HAVE_RPC_RPC_H)
10256 #include <rpc/rpc.h>
10257 #endif
10258 int main() {
10259 uint16 testvar;
10260 ; return 0; }
10261 EOF
10262 if { (eval echo configure:10263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10263   rm -rf conftest*
10264   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10265 else
10266   echo "configure: failed program was:" >&5
10267   cat conftest.$ac_ext >&5
10268   rm -rf conftest*
10269   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10270 fi
10271 rm -f conftest*
10272 fi
10273
10274 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10275 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10276     cat >> confdefs.h <<\EOF
10277 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10278 EOF
10279
10280 fi
10281
10282 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10283 echo "configure:10284: checking for int32 typedef included by rpc/rpc.h" >&5
10284 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10285   echo $ac_n "(cached) $ac_c" 1>&6
10286 else
10287   
10288 cat > conftest.$ac_ext <<EOF
10289 #line 10290 "configure"
10290 #include "confdefs.h"
10291 #include <sys/types.h>
10292 #if defined(HAVE_RPC_RPC_H)
10293 #include <rpc/rpc.h>
10294 #endif
10295 int main() {
10296 int32 testvar;
10297 ; return 0; }
10298 EOF
10299 if { (eval echo configure:10300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10300   rm -rf conftest*
10301   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10302 else
10303   echo "configure: failed program was:" >&5
10304   cat conftest.$ac_ext >&5
10305   rm -rf conftest*
10306   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10307 fi
10308 rm -f conftest*
10309 fi
10310
10311 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10312 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10313     cat >> confdefs.h <<\EOF
10314 #define HAVE_INT32_FROM_RPC_RPC_H 1
10315 EOF
10316
10317 fi
10318
10319 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10320 echo "configure:10321: checking for uint32 typedef included by rpc/rpc.h" >&5
10321 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10322   echo $ac_n "(cached) $ac_c" 1>&6
10323 else
10324   
10325 cat > conftest.$ac_ext <<EOF
10326 #line 10327 "configure"
10327 #include "confdefs.h"
10328 #include <sys/types.h>
10329 #if defined(HAVE_RPC_RPC_H)
10330 #include <rpc/rpc.h>
10331 #endif
10332 int main() {
10333 uint32 testvar;
10334 ; return 0; }
10335 EOF
10336 if { (eval echo configure:10337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10337   rm -rf conftest*
10338   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10339 else
10340   echo "configure: failed program was:" >&5
10341   cat conftest.$ac_ext >&5
10342   rm -rf conftest*
10343   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10344 fi
10345 rm -f conftest*
10346 fi
10347
10348 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10349 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10350     cat >> confdefs.h <<\EOF
10351 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10352 EOF
10353
10354 fi
10355
10356
10357 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10358 echo "configure:10359: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10359 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10360   echo $ac_n "(cached) $ac_c" 1>&6
10361 else
10362   
10363 cat > conftest.$ac_ext <<EOF
10364 #line 10365 "configure"
10365 #include "confdefs.h"
10366 #include <sys/types.h>
10367 #ifdef HAVE_SYS_SECURITY_H
10368 #include <sys/security.h>
10369 #include <prot.h>
10370 #endif  /* HAVE_SYS_SECURITY_H */
10371 #if defined(HAVE_RPC_RPC_H)
10372 #include <rpc/rpc.h>
10373 #endif
10374 int main() {
10375 int testvar;
10376 ; return 0; }
10377 EOF
10378 if { (eval echo configure:10379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10379   rm -rf conftest*
10380   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10381 else
10382   echo "configure: failed program was:" >&5
10383   cat conftest.$ac_ext >&5
10384   rm -rf conftest*
10385   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10386 fi
10387 rm -f conftest*
10388 fi
10389
10390 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10391 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10392     cat >> confdefs.h <<\EOF
10393 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10394 EOF
10395
10396 fi
10397
10398 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10399 echo "configure:10400: checking for test routines" >&5
10400 if test "$cross_compiling" = yes; then
10401   echo "configure: warning: cannot run when cross-compiling" 1>&2
10402 else
10403   cat > conftest.$ac_ext <<EOF
10404 #line 10405 "configure"
10405 #include "confdefs.h"
10406 #include "${srcdir-.}/tests/trivial.c"
10407 EOF
10408 if { (eval echo configure:10409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10409 then
10410   echo "$ac_t""yes" 1>&6
10411 else
10412   echo "configure: failed program was:" >&5
10413   cat conftest.$ac_ext >&5
10414   rm -fr conftest*
10415   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10416 fi
10417 rm -fr conftest*
10418 fi
10419
10420
10421 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10422 echo "configure:10423: checking for ftruncate extend" >&5
10423 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10424   echo $ac_n "(cached) $ac_c" 1>&6
10425 else
10426   
10427 if test "$cross_compiling" = yes; then
10428   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10429 else
10430   cat > conftest.$ac_ext <<EOF
10431 #line 10432 "configure"
10432 #include "confdefs.h"
10433 #include "${srcdir-.}/tests/ftruncate.c"
10434 EOF
10435 if { (eval echo configure:10436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10436 then
10437   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10438 else
10439   echo "configure: failed program was:" >&5
10440   cat conftest.$ac_ext >&5
10441   rm -fr conftest*
10442   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10443 fi
10444 rm -fr conftest*
10445 fi
10446
10447 fi
10448
10449 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10450 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10451     cat >> confdefs.h <<\EOF
10452 #define HAVE_FTRUNCATE_EXTEND 1
10453 EOF
10454
10455 fi
10456
10457 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10458 echo "configure:10459: checking for AF_LOCAL socket support" >&5
10459 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10460   echo $ac_n "(cached) $ac_c" 1>&6
10461 else
10462   
10463 if test "$cross_compiling" = yes; then
10464   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10465 else
10466   cat > conftest.$ac_ext <<EOF
10467 #line 10468 "configure"
10468 #include "confdefs.h"
10469 #include "${srcdir-.}/tests/unixsock.c"
10470 EOF
10471 if { (eval echo configure:10472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10472 then
10473   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10474 else
10475   echo "configure: failed program was:" >&5
10476   cat conftest.$ac_ext >&5
10477   rm -fr conftest*
10478   samba_cv_HAVE_WORKING_AF_LOCAL=no
10479 fi
10480 rm -fr conftest*
10481 fi
10482
10483 fi
10484
10485 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10486 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10487 then
10488     cat >> confdefs.h <<\EOF
10489 #define HAVE_WORKING_AF_LOCAL 1
10490 EOF
10491
10492 fi
10493
10494 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10495 echo "configure:10496: checking for broken getgroups" >&5
10496 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10497   echo $ac_n "(cached) $ac_c" 1>&6
10498 else
10499   
10500 if test "$cross_compiling" = yes; then
10501   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10502 else
10503   cat > conftest.$ac_ext <<EOF
10504 #line 10505 "configure"
10505 #include "confdefs.h"
10506 #include "${srcdir-.}/tests/getgroups.c"
10507 EOF
10508 if { (eval echo configure:10509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10509 then
10510   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10511 else
10512   echo "configure: failed program was:" >&5
10513   cat conftest.$ac_ext >&5
10514   rm -fr conftest*
10515   samba_cv_HAVE_BROKEN_GETGROUPS=no
10516 fi
10517 rm -fr conftest*
10518 fi
10519
10520 fi
10521
10522 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10523 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10524     cat >> confdefs.h <<\EOF
10525 #define HAVE_BROKEN_GETGROUPS 1
10526 EOF
10527
10528 fi
10529
10530 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10531 echo "configure:10532: checking whether getpass should be replaced" >&5
10532 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10533   echo $ac_n "(cached) $ac_c" 1>&6
10534 else
10535   
10536 SAVE_CPPFLAGS="$CPPFLAGS"
10537 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10538 cat > conftest.$ac_ext <<EOF
10539 #line 10540 "configure"
10540 #include "confdefs.h"
10541
10542 #define REPLACE_GETPASS 1
10543 #define NO_CONFIG_H 1
10544 #define main dont_declare_main
10545 #include "${srcdir-.}/lib/getsmbpass.c"
10546 #undef main
10547
10548 int main() {
10549
10550 ; return 0; }
10551 EOF
10552 if { (eval echo configure:10553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10553   rm -rf conftest*
10554   samba_cv_REPLACE_GETPASS=yes
10555 else
10556   echo "configure: failed program was:" >&5
10557   cat conftest.$ac_ext >&5
10558   rm -rf conftest*
10559   samba_cv_REPLACE_GETPASS=no
10560 fi
10561 rm -f conftest*
10562 CPPFLAGS="$SAVE_CPPFLAGS"
10563
10564 fi
10565
10566 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10567 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10568         cat >> confdefs.h <<\EOF
10569 #define REPLACE_GETPASS 1
10570 EOF
10571
10572 fi
10573
10574 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10575 echo "configure:10576: checking for broken inet_ntoa" >&5
10576 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10577   echo $ac_n "(cached) $ac_c" 1>&6
10578 else
10579   
10580 if test "$cross_compiling" = yes; then
10581   samba_cv_REPLACE_INET_NTOA=cross
10582 else
10583   cat > conftest.$ac_ext <<EOF
10584 #line 10585 "configure"
10585 #include "confdefs.h"
10586
10587 #include <stdio.h>
10588 #include <sys/types.h>
10589 #include <netinet/in.h>
10590 #ifdef HAVE_ARPA_INET_H
10591 #include <arpa/inet.h>
10592 #endif
10593 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10594 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10595     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10596 exit(1);}
10597 EOF
10598 if { (eval echo configure:10599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10599 then
10600   samba_cv_REPLACE_INET_NTOA=yes
10601 else
10602   echo "configure: failed program was:" >&5
10603   cat conftest.$ac_ext >&5
10604   rm -fr conftest*
10605   samba_cv_REPLACE_INET_NTOA=no
10606 fi
10607 rm -fr conftest*
10608 fi
10609
10610 fi
10611
10612 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10613 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10614     cat >> confdefs.h <<\EOF
10615 #define REPLACE_INET_NTOA 1
10616 EOF
10617
10618 fi
10619
10620 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10621 echo "configure:10622: checking for secure mkstemp" >&5
10622 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10623   echo $ac_n "(cached) $ac_c" 1>&6
10624 else
10625   
10626 if test "$cross_compiling" = yes; then
10627   samba_cv_HAVE_SECURE_MKSTEMP=cross
10628 else
10629   cat > conftest.$ac_ext <<EOF
10630 #line 10631 "configure"
10631 #include "confdefs.h"
10632 #include <stdlib.h>
10633 #include <sys/types.h>
10634 #include <sys/stat.h>
10635 #include <unistd.h>
10636 main() { 
10637   struct stat st;
10638   char tpl[20]="/tmp/test.XXXXXX"; 
10639   int fd = mkstemp(tpl); 
10640   if (fd == -1) exit(1);
10641   unlink(tpl);
10642   if (fstat(fd, &st) != 0) exit(1);
10643   if ((st.st_mode & 0777) != 0600) exit(1);
10644   exit(0);
10645 }
10646 EOF
10647 if { (eval echo configure:10648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10648 then
10649   samba_cv_HAVE_SECURE_MKSTEMP=yes
10650 else
10651   echo "configure: failed program was:" >&5
10652   cat conftest.$ac_ext >&5
10653   rm -fr conftest*
10654   samba_cv_HAVE_SECURE_MKSTEMP=no
10655 fi
10656 rm -fr conftest*
10657 fi
10658
10659 fi
10660
10661 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10662 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10663     cat >> confdefs.h <<\EOF
10664 #define HAVE_SECURE_MKSTEMP 1
10665 EOF
10666
10667 fi
10668
10669 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10670 echo "configure:10671: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10671 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10672   echo $ac_n "(cached) $ac_c" 1>&6
10673 else
10674   
10675 if test "$cross_compiling" = yes; then
10676   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10677 else
10678   cat > conftest.$ac_ext <<EOF
10679 #line 10680 "configure"
10680 #include "confdefs.h"
10681 #include <unistd.h>
10682 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10683 EOF
10684 if { (eval echo configure:10685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10685 then
10686   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10687 else
10688   echo "configure: failed program was:" >&5
10689   cat conftest.$ac_ext >&5
10690   rm -fr conftest*
10691   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10692 fi
10693 rm -fr conftest*
10694 fi
10695
10696 fi
10697
10698 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10699 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10700     cat >> confdefs.h <<\EOF
10701 #define SYSCONF_SC_NGROUPS_MAX 1
10702 EOF
10703
10704 fi
10705
10706 echo $ac_n "checking for root""... $ac_c" 1>&6
10707 echo "configure:10708: checking for root" >&5
10708 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10709   echo $ac_n "(cached) $ac_c" 1>&6
10710 else
10711   
10712 if test "$cross_compiling" = yes; then
10713   samba_cv_HAVE_ROOT=cross
10714 else
10715   cat > conftest.$ac_ext <<EOF
10716 #line 10717 "configure"
10717 #include "confdefs.h"
10718 main() { exit(getuid() != 0); }
10719 EOF
10720 if { (eval echo configure:10721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10721 then
10722   samba_cv_HAVE_ROOT=yes
10723 else
10724   echo "configure: failed program was:" >&5
10725   cat conftest.$ac_ext >&5
10726   rm -fr conftest*
10727   samba_cv_HAVE_ROOT=no
10728 fi
10729 rm -fr conftest*
10730 fi
10731
10732 fi
10733
10734 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10735 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10736     cat >> confdefs.h <<\EOF
10737 #define HAVE_ROOT 1
10738 EOF
10739
10740 else
10741     echo "configure: warning: running as non-root will disable some tests" 1>&2
10742 fi
10743
10744 ##################
10745 # look for a method of finding the list of network interfaces
10746 iface=no;
10747 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10748 echo "configure:10749: checking for iface AIX" >&5
10749 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10750   echo $ac_n "(cached) $ac_c" 1>&6
10751 else
10752   
10753 if test "$cross_compiling" = yes; then
10754   samba_cv_HAVE_IFACE_AIX=cross
10755 else
10756   cat > conftest.$ac_ext <<EOF
10757 #line 10758 "configure"
10758 #include "confdefs.h"
10759
10760 #define HAVE_IFACE_AIX 1
10761 #define AUTOCONF_TEST 1
10762 #include "confdefs.h"
10763 #include "${srcdir-.}/lib/interfaces.c"
10764 EOF
10765 if { (eval echo configure:10766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10766 then
10767   samba_cv_HAVE_IFACE_AIX=yes
10768 else
10769   echo "configure: failed program was:" >&5
10770   cat conftest.$ac_ext >&5
10771   rm -fr conftest*
10772   samba_cv_HAVE_IFACE_AIX=no
10773 fi
10774 rm -fr conftest*
10775 fi
10776
10777 fi
10778
10779 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10780 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10781     iface=yes;cat >> confdefs.h <<\EOF
10782 #define HAVE_IFACE_AIX 1
10783 EOF
10784
10785 fi
10786
10787 if test $iface = no; then
10788 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10789 echo "configure:10790: checking for iface ifconf" >&5
10790 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+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_IFACE_IFCONF=cross
10796 else
10797   cat > conftest.$ac_ext <<EOF
10798 #line 10799 "configure"
10799 #include "confdefs.h"
10800
10801 #define HAVE_IFACE_IFCONF 1
10802 #define AUTOCONF_TEST 1
10803 #include "confdefs.h"
10804 #include "${srcdir-.}/lib/interfaces.c"
10805 EOF
10806 if { (eval echo configure:10807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10807 then
10808   samba_cv_HAVE_IFACE_IFCONF=yes
10809 else
10810   echo "configure: failed program was:" >&5
10811   cat conftest.$ac_ext >&5
10812   rm -fr conftest*
10813   samba_cv_HAVE_IFACE_IFCONF=no
10814 fi
10815 rm -fr conftest*
10816 fi
10817
10818 fi
10819
10820 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10821 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10822     iface=yes;cat >> confdefs.h <<\EOF
10823 #define HAVE_IFACE_IFCONF 1
10824 EOF
10825
10826 fi
10827 fi
10828
10829 if test $iface = no; then
10830 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
10831 echo "configure:10832: checking for iface ifreq" >&5
10832 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
10833   echo $ac_n "(cached) $ac_c" 1>&6
10834 else
10835   
10836 if test "$cross_compiling" = yes; then
10837   samba_cv_HAVE_IFACE_IFREQ=cross
10838 else
10839   cat > conftest.$ac_ext <<EOF
10840 #line 10841 "configure"
10841 #include "confdefs.h"
10842
10843 #define HAVE_IFACE_IFREQ 1
10844 #define AUTOCONF_TEST 1
10845 #include "confdefs.h"
10846 #include "${srcdir-.}/lib/interfaces.c"
10847 EOF
10848 if { (eval echo configure:10849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10849 then
10850   samba_cv_HAVE_IFACE_IFREQ=yes
10851 else
10852   echo "configure: failed program was:" >&5
10853   cat conftest.$ac_ext >&5
10854   rm -fr conftest*
10855   samba_cv_HAVE_IFACE_IFREQ=no
10856 fi
10857 rm -fr conftest*
10858 fi
10859
10860 fi
10861
10862 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
10863 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
10864     iface=yes;cat >> confdefs.h <<\EOF
10865 #define HAVE_IFACE_IFREQ 1
10866 EOF
10867
10868 fi
10869 fi
10870
10871
10872 ################################################
10873 # look for a method of setting the effective uid
10874 seteuid=no;
10875 if test $seteuid = no; then
10876 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
10877 echo "configure:10878: checking for setresuid" >&5
10878 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
10879   echo $ac_n "(cached) $ac_c" 1>&6
10880 else
10881   
10882 if test "$cross_compiling" = yes; then
10883   samba_cv_USE_SETRESUID=cross
10884 else
10885   cat > conftest.$ac_ext <<EOF
10886 #line 10887 "configure"
10887 #include "confdefs.h"
10888
10889 #define AUTOCONF_TEST 1
10890 #define USE_SETRESUID 1
10891 #include "confdefs.h"
10892 #include "${srcdir-.}/lib/util_sec.c"
10893 EOF
10894 if { (eval echo configure:10895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10895 then
10896   samba_cv_USE_SETRESUID=yes
10897 else
10898   echo "configure: failed program was:" >&5
10899   cat conftest.$ac_ext >&5
10900   rm -fr conftest*
10901   samba_cv_USE_SETRESUID=no
10902 fi
10903 rm -fr conftest*
10904 fi
10905
10906 fi
10907
10908 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
10909 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
10910     seteuid=yes;cat >> confdefs.h <<\EOF
10911 #define USE_SETRESUID 1
10912 EOF
10913
10914 fi
10915 fi
10916
10917
10918 if test $seteuid = no; then
10919 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
10920 echo "configure:10921: checking for setreuid" >&5
10921 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
10922   echo $ac_n "(cached) $ac_c" 1>&6
10923 else
10924   
10925 if test "$cross_compiling" = yes; then
10926   samba_cv_USE_SETREUID=cross
10927 else
10928   cat > conftest.$ac_ext <<EOF
10929 #line 10930 "configure"
10930 #include "confdefs.h"
10931
10932 #define AUTOCONF_TEST 1
10933 #define USE_SETREUID 1
10934 #include "confdefs.h"
10935 #include "${srcdir-.}/lib/util_sec.c"
10936 EOF
10937 if { (eval echo configure:10938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10938 then
10939   samba_cv_USE_SETREUID=yes
10940 else
10941   echo "configure: failed program was:" >&5
10942   cat conftest.$ac_ext >&5
10943   rm -fr conftest*
10944   samba_cv_USE_SETREUID=no
10945 fi
10946 rm -fr conftest*
10947 fi
10948
10949 fi
10950
10951 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
10952 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
10953     seteuid=yes;cat >> confdefs.h <<\EOF
10954 #define USE_SETREUID 1
10955 EOF
10956
10957 fi
10958 fi
10959
10960 if test $seteuid = no; then
10961 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
10962 echo "configure:10963: checking for seteuid" >&5
10963 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
10964   echo $ac_n "(cached) $ac_c" 1>&6
10965 else
10966   
10967 if test "$cross_compiling" = yes; then
10968   samba_cv_USE_SETEUID=cross
10969 else
10970   cat > conftest.$ac_ext <<EOF
10971 #line 10972 "configure"
10972 #include "confdefs.h"
10973
10974 #define AUTOCONF_TEST 1
10975 #define USE_SETEUID 1
10976 #include "confdefs.h"
10977 #include "${srcdir-.}/lib/util_sec.c"
10978 EOF
10979 if { (eval echo configure:10980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10980 then
10981   samba_cv_USE_SETEUID=yes
10982 else
10983   echo "configure: failed program was:" >&5
10984   cat conftest.$ac_ext >&5
10985   rm -fr conftest*
10986   samba_cv_USE_SETEUID=no
10987 fi
10988 rm -fr conftest*
10989 fi
10990
10991 fi
10992
10993 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
10994 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
10995     seteuid=yes;cat >> confdefs.h <<\EOF
10996 #define USE_SETEUID 1
10997 EOF
10998
10999 fi
11000 fi
11001
11002 if test $seteuid = no; then
11003 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11004 echo "configure:11005: checking for setuidx" >&5
11005 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
11006   echo $ac_n "(cached) $ac_c" 1>&6
11007 else
11008   
11009 if test "$cross_compiling" = yes; then
11010   samba_cv_USE_SETUIDX=cross
11011 else
11012   cat > conftest.$ac_ext <<EOF
11013 #line 11014 "configure"
11014 #include "confdefs.h"
11015
11016 #define AUTOCONF_TEST 1
11017 #define USE_SETUIDX 1
11018 #include "confdefs.h"
11019 #include "${srcdir-.}/lib/util_sec.c"
11020 EOF
11021 if { (eval echo configure:11022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11022 then
11023   samba_cv_USE_SETUIDX=yes
11024 else
11025   echo "configure: failed program was:" >&5
11026   cat conftest.$ac_ext >&5
11027   rm -fr conftest*
11028   samba_cv_USE_SETUIDX=no
11029 fi
11030 rm -fr conftest*
11031 fi
11032
11033 fi
11034
11035 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11036 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11037     seteuid=yes;cat >> confdefs.h <<\EOF
11038 #define USE_SETUIDX 1
11039 EOF
11040
11041 fi
11042 fi
11043
11044
11045 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11046 echo "configure:11047: checking for working mmap" >&5
11047 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11048   echo $ac_n "(cached) $ac_c" 1>&6
11049 else
11050   
11051 if test "$cross_compiling" = yes; then
11052   samba_cv_HAVE_MMAP=cross
11053 else
11054   cat > conftest.$ac_ext <<EOF
11055 #line 11056 "configure"
11056 #include "confdefs.h"
11057 #include "${srcdir-.}/tests/shared_mmap.c"
11058 EOF
11059 if { (eval echo configure:11060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11060 then
11061   samba_cv_HAVE_MMAP=yes
11062 else
11063   echo "configure: failed program was:" >&5
11064   cat conftest.$ac_ext >&5
11065   rm -fr conftest*
11066   samba_cv_HAVE_MMAP=no
11067 fi
11068 rm -fr conftest*
11069 fi
11070
11071 fi
11072
11073 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11074 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11075     cat >> confdefs.h <<\EOF
11076 #define HAVE_MMAP 1
11077 EOF
11078
11079 fi
11080
11081 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11082 echo "configure:11083: checking for ftruncate needs root" >&5
11083 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11084   echo $ac_n "(cached) $ac_c" 1>&6
11085 else
11086   
11087 if test "$cross_compiling" = yes; then
11088   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11089 else
11090   cat > conftest.$ac_ext <<EOF
11091 #line 11092 "configure"
11092 #include "confdefs.h"
11093 #include "${srcdir-.}/tests/ftruncroot.c"
11094 EOF
11095 if { (eval echo configure:11096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11096 then
11097   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11098 else
11099   echo "configure: failed program was:" >&5
11100   cat conftest.$ac_ext >&5
11101   rm -fr conftest*
11102   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11103 fi
11104 rm -fr conftest*
11105 fi
11106
11107 fi
11108
11109 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11110 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11111     cat >> confdefs.h <<\EOF
11112 #define FTRUNCATE_NEEDS_ROOT 1
11113 EOF
11114
11115 fi
11116
11117 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11118 echo "configure:11119: checking for fcntl locking" >&5
11119 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11120   echo $ac_n "(cached) $ac_c" 1>&6
11121 else
11122   
11123 if test "$cross_compiling" = yes; then
11124   samba_cv_HAVE_FCNTL_LOCK=cross
11125 else
11126   cat > conftest.$ac_ext <<EOF
11127 #line 11128 "configure"
11128 #include "confdefs.h"
11129 #include "${srcdir-.}/tests/fcntl_lock.c"
11130 EOF
11131 if { (eval echo configure:11132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11132 then
11133   samba_cv_HAVE_FCNTL_LOCK=yes
11134 else
11135   echo "configure: failed program was:" >&5
11136   cat conftest.$ac_ext >&5
11137   rm -fr conftest*
11138   samba_cv_HAVE_FCNTL_LOCK=no
11139 fi
11140 rm -fr conftest*
11141 fi
11142
11143 fi
11144
11145 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11146 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11147     cat >> confdefs.h <<\EOF
11148 #define HAVE_FCNTL_LOCK 1
11149 EOF
11150
11151 fi
11152
11153 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11154 echo "configure:11155: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11155 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11156   echo $ac_n "(cached) $ac_c" 1>&6
11157 else
11158   
11159 if test "$cross_compiling" = yes; then
11160   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11161 else
11162   cat > conftest.$ac_ext <<EOF
11163 #line 11164 "configure"
11164 #include "confdefs.h"
11165 #include "${srcdir-.}/tests/fcntl_lock64.c"
11166 EOF
11167 if { (eval echo configure:11168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11168 then
11169   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11170 else
11171   echo "configure: failed program was:" >&5
11172   cat conftest.$ac_ext >&5
11173   rm -fr conftest*
11174   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11175 fi
11176 rm -fr conftest*
11177 fi
11178
11179 fi
11180
11181 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11182 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11183     cat >> confdefs.h <<\EOF
11184 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11185 EOF
11186
11187
11188 else
11189
11190
11191   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11192 echo "configure:11193: checking for 64 bit fcntl locking" >&5
11193 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11194   echo $ac_n "(cached) $ac_c" 1>&6
11195 else
11196   
11197   if test "$cross_compiling" = yes; then
11198   samba_cv_HAVE_STRUCT_FLOCK64=cross
11199 else
11200   cat > conftest.$ac_ext <<EOF
11201 #line 11202 "configure"
11202 #include "confdefs.h"
11203
11204 #if defined(HAVE_UNISTD_H)
11205 #include <unistd.h>
11206 #endif
11207 #include <stdio.h>
11208 #include <stdlib.h>
11209
11210 #ifdef HAVE_FCNTL_H
11211 #include <fcntl.h>
11212 #endif
11213
11214 #ifdef HAVE_SYS_FCNTL_H
11215 #include <sys/fcntl.h>
11216 #endif
11217 main() { struct flock64 fl64;
11218 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11219 exit(0);
11220 #else
11221 exit(1);
11222 #endif
11223 }
11224 EOF
11225 if { (eval echo configure:11226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11226 then
11227   samba_cv_HAVE_STRUCT_FLOCK64=yes
11228 else
11229   echo "configure: failed program was:" >&5
11230   cat conftest.$ac_ext >&5
11231   rm -fr conftest*
11232   samba_cv_HAVE_STRUCT_FLOCK64=no
11233 fi
11234 rm -fr conftest*
11235 fi
11236
11237 fi
11238
11239 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11240
11241   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11242       cat >> confdefs.h <<\EOF
11243 #define HAVE_STRUCT_FLOCK64 1
11244 EOF
11245
11246   fi
11247 fi
11248
11249 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
11250 echo "configure:11251: checking for a crypt that needs truncated salt" >&5
11251 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
11252   echo $ac_n "(cached) $ac_c" 1>&6
11253 else
11254   
11255 if test "$cross_compiling" = yes; then
11256   samba_cv_HAVE_TRUNCATED_SALT=cross
11257 else
11258   cat > conftest.$ac_ext <<EOF
11259 #line 11260 "configure"
11260 #include "confdefs.h"
11261 #include "${srcdir-.}/tests/crypttest.c"
11262 EOF
11263 if { (eval echo configure:11264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11264 then
11265   samba_cv_HAVE_TRUNCATED_SALT=no
11266 else
11267   echo "configure: failed program was:" >&5
11268   cat conftest.$ac_ext >&5
11269   rm -fr conftest*
11270   samba_cv_HAVE_TRUNCATED_SALT=yes
11271 fi
11272 rm -fr conftest*
11273 fi
11274
11275 fi
11276
11277 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
11278 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
11279     cat >> confdefs.h <<\EOF
11280 #define HAVE_TRUNCATED_SALT 1
11281 EOF
11282
11283 fi
11284
11285 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11286 echo "configure:11287: checking for broken nisplus include files" >&5
11287 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11288   echo $ac_n "(cached) $ac_c" 1>&6
11289 else
11290   
11291 cat > conftest.$ac_ext <<EOF
11292 #line 11293 "configure"
11293 #include "confdefs.h"
11294 #include <sys/acl.h>
11295 #if defined(HAVE_RPCSVC_NIS_H)
11296 #include <rpcsvc/nis.h>
11297 #endif
11298 int main() {
11299 return 0;
11300 ; return 0; }
11301 EOF
11302 if { (eval echo configure:11303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11303   rm -rf conftest*
11304   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11305 else
11306   echo "configure: failed program was:" >&5
11307   cat conftest.$ac_ext >&5
11308   rm -rf conftest*
11309   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11310 fi
11311 rm -f conftest*
11312 fi
11313
11314 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11315 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11316     cat >> confdefs.h <<\EOF
11317 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11318 EOF
11319
11320 fi
11321
11322
11323 #################################################
11324 # check for smbwrapper support
11325 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11326 echo "configure:11327: checking whether to use smbwrapper" >&5
11327 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11328 if test "${with_smbwrapper+set}" = set; then
11329   withval="$with_smbwrapper"
11330    case "$withval" in
11331   yes)
11332     echo "$ac_t""yes" 1>&6
11333     cat >> confdefs.h <<\EOF
11334 #define WITH_SMBWRAPPER 1
11335 EOF
11336
11337         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11338
11339         if test x$ATTEMPT_WRAP32_BUILD = x; then
11340                 WRAP32=""
11341         else
11342                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11343         fi
11344
11345 # Conditions under which smbwrapper should not be built.
11346
11347         if test x$PICFLAG = x; then
11348            echo No support for PIC code - disabling smbwrapper and smbsh
11349            WRAP=""
11350            WRAP32=""
11351         elif test x$ac_cv_func_syscall = xno; then
11352            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11353            WRAP=""
11354            WRAP32=""
11355         fi
11356     ;;
11357   *)
11358     echo "$ac_t""no" 1>&6
11359     ;;
11360   esac 
11361 else
11362   echo "$ac_t""no" 1>&6
11363
11364 fi
11365
11366
11367 #################################################
11368 # check for the AFS filesystem
11369 echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
11370 echo "configure:11371: checking whether to use AFS" >&5
11371 # Check whether --with-afs or --without-afs was given.
11372 if test "${with_afs+set}" = set; then
11373   withval="$with_afs"
11374    case "$withval" in
11375   yes)
11376     echo "$ac_t""yes" 1>&6
11377     cat >> confdefs.h <<\EOF
11378 #define WITH_AFS 1
11379 EOF
11380
11381     ;;
11382   *)
11383     echo "$ac_t""no" 1>&6
11384     ;;
11385   esac 
11386 else
11387   echo "$ac_t""no" 1>&6
11388
11389 fi
11390
11391
11392
11393 #################################################
11394 # check for the DFS auth system
11395 echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
11396 echo "configure:11397: checking whether to use DFS auth" >&5
11397 # Check whether --with-dfs or --without-dfs was given.
11398 if test "${with_dfs+set}" = set; then
11399   withval="$with_dfs"
11400    case "$withval" in
11401   yes)
11402     echo "$ac_t""yes" 1>&6
11403     cat >> confdefs.h <<\EOF
11404 #define WITH_DFS 1
11405 EOF
11406
11407     ;;
11408   *)
11409     echo "$ac_t""no" 1>&6
11410     ;;
11411   esac 
11412 else
11413   echo "$ac_t""no" 1>&6
11414
11415 fi
11416
11417
11418 #################################################
11419 # check for Kerberos IV auth system
11420 echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
11421 echo "configure:11422: checking whether to use Kerberos IV" >&5
11422 # Check whether --with-krb4 or --without-krb4 was given.
11423 if test "${with_krb4+set}" = set; then
11424   withval="$with_krb4"
11425      echo "$ac_t""yes" 1>&6
11426     cat >> confdefs.h <<\EOF
11427 #define KRB4_AUTH 1
11428 EOF
11429
11430     echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
11431 echo "configure:11432: checking for dn_expand in -lresolv" >&5
11432 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
11433 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11434   echo $ac_n "(cached) $ac_c" 1>&6
11435 else
11436   ac_save_LIBS="$LIBS"
11437 LIBS="-lresolv  $LIBS"
11438 cat > conftest.$ac_ext <<EOF
11439 #line 11440 "configure"
11440 #include "confdefs.h"
11441 /* Override any gcc2 internal prototype to avoid an error.  */
11442 /* We use char because int might match the return type of a gcc2
11443     builtin and then its argument prototype would still apply.  */
11444 char dn_expand();
11445
11446 int main() {
11447 dn_expand()
11448 ; return 0; }
11449 EOF
11450 if { (eval echo configure:11451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11451   rm -rf conftest*
11452   eval "ac_cv_lib_$ac_lib_var=yes"
11453 else
11454   echo "configure: failed program was:" >&5
11455   cat conftest.$ac_ext >&5
11456   rm -rf conftest*
11457   eval "ac_cv_lib_$ac_lib_var=no"
11458 fi
11459 rm -f conftest*
11460 LIBS="$ac_save_LIBS"
11461
11462 fi
11463 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11464   echo "$ac_t""yes" 1>&6
11465     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11466     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11467   cat >> confdefs.h <<EOF
11468 #define $ac_tr_lib 1
11469 EOF
11470
11471   LIBS="-lresolv $LIBS"
11472
11473 else
11474   echo "$ac_t""no" 1>&6
11475 fi
11476
11477     LIBS="$LIBS -lkrb -ldes"
11478     CFLAGS="$CFLAGS -I$withval/include"
11479     LDFLAGS="$LDFLAGS -L$withval/lib"
11480 else
11481   echo "$ac_t""no" 1>&6
11482
11483 fi
11484
11485
11486 #################################################
11487 # check for Kerberos 5 auth system
11488 echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6
11489 echo "configure:11490: checking whether to use Kerberos 5" >&5
11490 # Check whether --with-krb5 or --without-krb5 was given.
11491 if test "${with_krb5+set}" = set; then
11492   withval="$with_krb5"
11493      echo "$ac_t""yes" 1>&6
11494     cat >> confdefs.h <<\EOF
11495 #define KRB5_AUTH 1
11496 EOF
11497
11498     LIBS="$LIBS -ldes425 -lkrb5 -lcrypto -lcom_err"
11499     CFLAGS="$CFLAGS -I$withval/include"
11500     LDFLAGS="$LDFLAGS -L$withval/lib"
11501 else
11502   echo "$ac_t""no" 1>&6
11503
11504 fi
11505
11506
11507 #################################################
11508 # check for automount support
11509 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
11510 echo "configure:11511: checking whether to use AUTOMOUNT" >&5
11511 # Check whether --with-automount or --without-automount was given.
11512 if test "${with_automount+set}" = set; then
11513   withval="$with_automount"
11514    case "$withval" in
11515   yes)
11516     echo "$ac_t""yes" 1>&6
11517     cat >> confdefs.h <<\EOF
11518 #define WITH_AUTOMOUNT 1
11519 EOF
11520
11521     ;;
11522   *)
11523     echo "$ac_t""no" 1>&6
11524     ;;
11525   esac 
11526 else
11527   echo "$ac_t""no" 1>&6
11528
11529 fi
11530
11531
11532 #################################################
11533 # check for smbmount support
11534 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
11535 echo "configure:11536: checking whether to use SMBMOUNT" >&5
11536 # Check whether --with-smbmount or --without-smbmount was given.
11537 if test "${with_smbmount+set}" = set; then
11538   withval="$with_smbmount"
11539    case "$withval" in
11540   yes)
11541     echo "$ac_t""yes" 1>&6
11542     cat >> confdefs.h <<\EOF
11543 #define WITH_SMBMOUNT 1
11544 EOF
11545
11546     MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
11547     ;;
11548   *)
11549     echo "$ac_t""no" 1>&6
11550     MPROGS=
11551     ;;
11552   esac 
11553 else
11554   echo "$ac_t""no" 1>&6
11555   MPROGS=
11556
11557 fi
11558
11559
11560
11561 #################################################
11562 # check for a PAM password database
11563
11564 echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6
11565 echo "configure:11566: checking whether to use PAM password database" >&5
11566 # Check whether --with-pam or --without-pam was given.
11567 if test "${with_pam+set}" = set; then
11568   withval="$with_pam"
11569    case "$withval" in
11570   yes)
11571     echo "$ac_t""yes" 1>&6
11572     cat >> confdefs.h <<\EOF
11573 #define WITH_PAM 1
11574 EOF
11575
11576     LIBS="$LIBS -lpam"
11577     ;;
11578   *)
11579     echo "$ac_t""no" 1>&6
11580     ;;
11581   esac 
11582 else
11583   echo "$ac_t""no" 1>&6
11584
11585 fi
11586
11587
11588 # we can't build a pam module if we don't have pam.
11589 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
11590 echo "configure:11591: checking for pam_get_data in -lpam" >&5
11591 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
11592 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11593   echo $ac_n "(cached) $ac_c" 1>&6
11594 else
11595   ac_save_LIBS="$LIBS"
11596 LIBS="-lpam  $LIBS"
11597 cat > conftest.$ac_ext <<EOF
11598 #line 11599 "configure"
11599 #include "confdefs.h"
11600 /* Override any gcc2 internal prototype to avoid an error.  */
11601 /* We use char because int might match the return type of a gcc2
11602     builtin and then its argument prototype would still apply.  */
11603 char pam_get_data();
11604
11605 int main() {
11606 pam_get_data()
11607 ; return 0; }
11608 EOF
11609 if { (eval echo configure:11610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11610   rm -rf conftest*
11611   eval "ac_cv_lib_$ac_lib_var=yes"
11612 else
11613   echo "configure: failed program was:" >&5
11614   cat conftest.$ac_ext >&5
11615   rm -rf conftest*
11616   eval "ac_cv_lib_$ac_lib_var=no"
11617 fi
11618 rm -f conftest*
11619 LIBS="$ac_save_LIBS"
11620
11621 fi
11622 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11623   echo "$ac_t""yes" 1>&6
11624   cat >> confdefs.h <<\EOF
11625 #define HAVE_LIBPAM 1
11626 EOF
11627
11628 else
11629   echo "$ac_t""no" 1>&6
11630 fi
11631
11632
11633 #################################################
11634 # check for pam_smbpass support
11635 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
11636 echo "configure:11637: checking whether to use pam_smbpass" >&5
11637 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
11638 if test "${with_pam_smbpass+set}" = set; then
11639   withval="$with_pam_smbpass"
11640    case "$withval" in
11641   yes)
11642     echo "$ac_t""yes" 1>&6
11643
11644 # Conditions under which pam_smbpass should not be built.
11645
11646        if test x$PICFLAG = x; then
11647           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
11648           PAM_MOD=""
11649        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
11650           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
11651           PAM_MOD=""
11652        else
11653           cat >> confdefs.h <<\EOF
11654 #define WITH_PAM_SMBPASS 1
11655 EOF
11656
11657           PAM_MOD="bin/pam_smbpass.so"
11658        fi
11659     ;;
11660   *)
11661     echo "$ac_t""no" 1>&6
11662     ;;
11663   esac 
11664 else
11665   echo "$ac_t""no" 1>&6
11666
11667 fi
11668
11669
11670
11671 ###############################################
11672 # test for where we get crypt() from, but only
11673 # if not using PAM
11674 if test "$with_pam" != yes; then
11675 for ac_func in crypt
11676 do
11677 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11678 echo "configure:11679: checking for $ac_func" >&5
11679 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11680   echo $ac_n "(cached) $ac_c" 1>&6
11681 else
11682   cat > conftest.$ac_ext <<EOF
11683 #line 11684 "configure"
11684 #include "confdefs.h"
11685 /* System header to define __stub macros and hopefully few prototypes,
11686     which can conflict with char $ac_func(); below.  */
11687 #include <assert.h>
11688 /* Override any gcc2 internal prototype to avoid an error.  */
11689 /* We use char because int might match the return type of a gcc2
11690     builtin and then its argument prototype would still apply.  */
11691 char $ac_func();
11692
11693 int main() {
11694
11695 /* The GNU C library defines this for functions which it implements
11696     to always fail with ENOSYS.  Some functions are actually named
11697     something starting with __ and the normal name is an alias.  */
11698 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11699 choke me
11700 #else
11701 $ac_func();
11702 #endif
11703
11704 ; return 0; }
11705 EOF
11706 if { (eval echo configure:11707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11707   rm -rf conftest*
11708   eval "ac_cv_func_$ac_func=yes"
11709 else
11710   echo "configure: failed program was:" >&5
11711   cat conftest.$ac_ext >&5
11712   rm -rf conftest*
11713   eval "ac_cv_func_$ac_func=no"
11714 fi
11715 rm -f conftest*
11716 fi
11717
11718 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11719   echo "$ac_t""yes" 1>&6
11720     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11721   cat >> confdefs.h <<EOF
11722 #define $ac_tr_func 1
11723 EOF
11724  
11725 else
11726   echo "$ac_t""no" 1>&6
11727 fi
11728 done
11729
11730 if test x"$ac_cv_func_crypt" = x"no"; then
11731     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
11732 echo "configure:11733: checking for crypt in -lcrypt" >&5
11733 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
11734 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11735   echo $ac_n "(cached) $ac_c" 1>&6
11736 else
11737   ac_save_LIBS="$LIBS"
11738 LIBS="-lcrypt  $LIBS"
11739 cat > conftest.$ac_ext <<EOF
11740 #line 11741 "configure"
11741 #include "confdefs.h"
11742 /* Override any gcc2 internal prototype to avoid an error.  */
11743 /* We use char because int might match the return type of a gcc2
11744     builtin and then its argument prototype would still apply.  */
11745 char crypt();
11746
11747 int main() {
11748 crypt()
11749 ; return 0; }
11750 EOF
11751 if { (eval echo configure:11752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11752   rm -rf conftest*
11753   eval "ac_cv_lib_$ac_lib_var=yes"
11754 else
11755   echo "configure: failed program was:" >&5
11756   cat conftest.$ac_ext >&5
11757   rm -rf conftest*
11758   eval "ac_cv_lib_$ac_lib_var=no"
11759 fi
11760 rm -f conftest*
11761 LIBS="$ac_save_LIBS"
11762
11763 fi
11764 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11765   echo "$ac_t""yes" 1>&6
11766   LIBS="$LIBS -lcrypt";
11767         cat >> confdefs.h <<\EOF
11768 #define HAVE_CRYPT 1
11769 EOF
11770
11771 else
11772   echo "$ac_t""no" 1>&6
11773 fi
11774
11775 fi
11776 fi
11777
11778
11779 #################################################
11780 # check for a TDB password database
11781 echo $ac_n "checking whether to use TDB password database""... $ac_c" 1>&6
11782 echo "configure:11783: checking whether to use TDB password database" >&5
11783 # Check whether --with-tdbsam or --without-tdbsam was given.
11784 if test "${with_tdbsam+set}" = set; then
11785   withval="$with_tdbsam"
11786    case "$withval" in
11787   yes)
11788     echo "$ac_t""yes" 1>&6
11789     cat >> confdefs.h <<\EOF
11790 #define WITH_TDBPWD 1
11791 EOF
11792
11793 #    AC_MSG_ERROR([TDB password database not supported in this version.])
11794     ;;
11795   *)
11796     echo "$ac_t""no" 1>&6
11797     ;;
11798   esac 
11799 else
11800   echo "$ac_t""no" 1>&6
11801
11802 fi
11803
11804
11805 #################################################
11806 # check for a LDAP password database
11807 echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6
11808 echo "configure:11809: checking whether to use LDAP password database" >&5
11809 # Check whether --with-ldap or --without-ldap was given.
11810 if test "${with_ldap+set}" = set; then
11811   withval="$with_ldap"
11812    case "$withval" in
11813   yes)
11814     echo "$ac_t""yes" 1>&6
11815     cat >> confdefs.h <<\EOF
11816 #define WITH_LDAP 1
11817 EOF
11818
11819     { echo "configure: error: LDAP password database not supported in this version." 1>&2; exit 1; }
11820     ;;
11821   *)
11822     echo "$ac_t""no" 1>&6
11823     ;;
11824   esac 
11825 else
11826   echo "$ac_t""no" 1>&6
11827
11828 fi
11829
11830
11831 #################################################
11832 # check for a NISPLUS password database
11833 echo $ac_n "checking whether to use NISPLUS password database""... $ac_c" 1>&6
11834 echo "configure:11835: checking whether to use NISPLUS password database" >&5
11835 # Check whether --with-nisplus or --without-nisplus was given.
11836 if test "${with_nisplus+set}" = set; then
11837   withval="$with_nisplus"
11838    case "$withval" in
11839   yes)
11840     echo "$ac_t""yes" 1>&6
11841     cat >> confdefs.h <<\EOF
11842 #define WITH_NISPLUS 1
11843 EOF
11844
11845     ;;
11846   *)
11847     echo "$ac_t""no" 1>&6
11848     ;;
11849   esac 
11850 else
11851   echo "$ac_t""no" 1>&6
11852
11853 fi
11854
11855
11856 #################################################
11857 # check for a NISPLUS_HOME support 
11858 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
11859 echo "configure:11860: checking whether to use NISPLUS_HOME" >&5
11860 # Check whether --with-nisplus-home or --without-nisplus-home was given.
11861 if test "${with_nisplus_home+set}" = set; then
11862   withval="$with_nisplus_home"
11863    case "$withval" in
11864   yes)
11865     echo "$ac_t""yes" 1>&6
11866     cat >> confdefs.h <<\EOF
11867 #define WITH_NISPLUS_HOME 1
11868 EOF
11869
11870     ;;
11871   *)
11872     echo "$ac_t""no" 1>&6
11873     ;;
11874   esac 
11875 else
11876   echo "$ac_t""no" 1>&6
11877
11878 fi
11879
11880
11881 #################################################
11882 # check for the secure socket layer
11883 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
11884 echo "configure:11885: checking whether to use SSL" >&5
11885 # Check whether --with-ssl or --without-ssl was given.
11886 if test "${with_ssl+set}" = set; then
11887   withval="$with_ssl"
11888    case "$withval" in
11889   yes)
11890     echo "$ac_t""yes" 1>&6
11891     cat >> confdefs.h <<\EOF
11892 #define WITH_SSL 1
11893 EOF
11894
11895     withval="/usr/local/ssl"     # default
11896
11897     if test "${with_sslinc+set}" = set; then
11898
11899         withval="$with_sslinc"
11900         case "$withval" in
11901         yes|no)
11902           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
11903           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
11904           LIBS="-lssl -lcrypto $LIBS"
11905           LDFLAGS="=L/usr/local/ssl/lib $LDFLAGS"
11906         ;;
11907         * )
11908           CFLAGS="-I${withval}/include $CFLAGS"
11909           LIBS="-lssl -lcrypto $LIBS"
11910           LDFLAGS="-L${withval}/lib $LDFLAGS"
11911         ;;
11912         esac
11913
11914     else
11915
11916         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
11917         LIBS="-lssl -lcrypto $LIBS"
11918         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
11919
11920     fi
11921
11922     if test ! -d ${withval}; then
11923       echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
11924       exit 1
11925     fi 
11926
11927     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
11928
11929     ;;
11930   *)
11931     echo "$ac_t""no" 1>&6
11932     ;;
11933   esac 
11934 else
11935   echo "$ac_t""no" 1>&6
11936
11937 fi
11938
11939
11940 #################################################
11941 # check for syslog logging
11942 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
11943 echo "configure:11944: checking whether to use syslog logging" >&5
11944 # Check whether --with-syslog or --without-syslog was given.
11945 if test "${with_syslog+set}" = set; then
11946   withval="$with_syslog"
11947    case "$withval" in
11948   yes)
11949     echo "$ac_t""yes" 1>&6
11950     cat >> confdefs.h <<\EOF
11951 #define WITH_SYSLOG 1
11952 EOF
11953
11954     ;;
11955   *)
11956     echo "$ac_t""no" 1>&6
11957     ;;
11958   esac 
11959 else
11960   echo "$ac_t""no" 1>&6
11961
11962 fi
11963
11964
11965 #################################################
11966 # check for a shared memory profiling support
11967 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
11968 echo "configure:11969: checking whether to use profiling" >&5
11969 # Check whether --with-profile or --without-profile was given.
11970 if test "${with_profile+set}" = set; then
11971   withval="$with_profile"
11972    case "$withval" in
11973   yes)
11974     echo "$ac_t""yes" 1>&6
11975     cat >> confdefs.h <<\EOF
11976 #define WITH_PROFILE 1
11977 EOF
11978
11979     ;;
11980   *)
11981     echo "$ac_t""no" 1>&6
11982     ;;
11983   esac 
11984 else
11985   echo "$ac_t""no" 1>&6
11986
11987 fi
11988
11989
11990
11991 #################################################
11992 # check for experimental netatalk resource fork support
11993 echo $ac_n "checking whether to support netatalk""... $ac_c" 1>&6
11994 echo "configure:11995: checking whether to support netatalk" >&5
11995 # Check whether --with-netatalk or --without-netatalk was given.
11996 if test "${with_netatalk+set}" = set; then
11997   withval="$with_netatalk"
11998    case "$withval" in
11999   yes)
12000     echo "$ac_t""yes" 1>&6
12001     cat >> confdefs.h <<\EOF
12002 #define WITH_NETATALK 1
12003 EOF
12004
12005     ;;
12006   *)
12007     echo "$ac_t""no" 1>&6
12008     ;;
12009   esac 
12010 else
12011   echo "$ac_t""no" 1>&6
12012
12013 fi
12014
12015
12016 #################################################
12017 # check for experimental disk-quotas support
12018 QUOTAOBJS=smbd/noquotas.o
12019
12020 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12021 echo "configure:12022: checking whether to support disk-quotas" >&5
12022 # Check whether --with-quotas or --without-quotas was given.
12023 if test "${with_quotas+set}" = set; then
12024   withval="$with_quotas"
12025    case "$withval" in
12026   yes)
12027     echo "$ac_t""yes" 1>&6
12028     QUOTAOBJS=smbd/quotas.o
12029     ;;
12030   *)
12031     echo "$ac_t""no" 1>&6
12032     ;;
12033   esac 
12034 else
12035   echo "$ac_t""no" 1>&6
12036
12037 fi
12038
12039
12040
12041 #################################################
12042 # check for experimental utmp accounting
12043
12044 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
12045 echo "configure:12046: checking whether to support utmp accounting" >&5
12046 # Check whether --with-utmp or --without-utmp was given.
12047 if test "${with_utmp+set}" = set; then
12048   withval="$with_utmp"
12049    case "$withval" in
12050   yes)
12051     echo "$ac_t""yes" 1>&6
12052     cat >> confdefs.h <<\EOF
12053 #define WITH_UTMP 1
12054 EOF
12055
12056     ;;
12057   *)
12058     echo "$ac_t""no" 1>&6
12059     ;;
12060   esac 
12061 else
12062   echo "$ac_t""no" 1>&6
12063
12064 fi
12065
12066
12067 #################################################
12068 # check for MS Dfs support
12069
12070 echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6
12071 echo "configure:12072: checking whether to support Microsoft Dfs" >&5
12072 # Check whether --with-msdfs or --without-msdfs was given.
12073 if test "${with_msdfs+set}" = set; then
12074   withval="$with_msdfs"
12075    case "$withval" in
12076   yes)
12077      echo "$ac_t""yes" 1>&6
12078      cat >> confdefs.h <<\EOF
12079 #define WITH_MSDFS 1
12080 EOF
12081
12082      ;;
12083   *)
12084     echo "$ac_t""no" 1>&6
12085     ;;
12086   esac 
12087 else
12088   echo "$ac_t""no" 1>&6
12089
12090 fi
12091
12092
12093 #################################################
12094 # set private directory location
12095 # Check whether --with-privatedir or --without-privatedir was given.
12096 if test "${with_privatedir+set}" = set; then
12097   withval="$with_privatedir"
12098    case "$withval" in
12099   yes|no)
12100   #
12101   # Just in case anybody calls it without argument
12102   #
12103     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
12104     privatedir='${prefix}/private'
12105   ;;
12106   * )
12107     privatedir="$withval"
12108     ;;
12109   esac
12110   
12111 else
12112   privatedir='${prefix}/private'
12113    
12114
12115 fi
12116
12117
12118 #################################################
12119 # set lock directory location
12120 # Check whether --with-lockdir or --without-lockdir was given.
12121 if test "${with_lockdir+set}" = set; then
12122   withval="$with_lockdir"
12123    case "$withval" in
12124   yes|no)
12125   #
12126   # Just in case anybody calls it without argument
12127   #
12128     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
12129     lockdir='$(VARDIR)/locks'
12130   ;;
12131   * )
12132     lockdir="$withval"
12133     ;;
12134   esac
12135   
12136 else
12137   lockdir='$(VARDIR)/locks'
12138    
12139
12140 fi
12141
12142
12143 #################################################
12144 # set SWAT directory location
12145 # Check whether --with-swatdir or --without-swatdir was given.
12146 if test "${with_swatdir+set}" = set; then
12147   withval="$with_swatdir"
12148    case "$withval" in
12149   yes|no)
12150   #
12151   # Just in case anybody does it
12152   #
12153     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
12154     swatdir='${prefix}/swat'
12155   ;;
12156   * )
12157     swatdir="$withval"
12158     ;;
12159   esac
12160   
12161 else
12162   swatdir='${prefix}/swat'
12163    
12164
12165 fi
12166
12167
12168 #################################################
12169 # these tests are taken from the GNU fileutils package
12170 echo "checking how to get filesystem space usage" 1>&6
12171 echo "configure:12172: checking how to get filesystem space usage" >&5
12172 space=no
12173
12174 # Test for statvfs64.
12175 if test $space = no; then
12176   # SVR4
12177   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
12178 echo "configure:12179: checking statvfs64 function (SVR4)" >&5
12179 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
12180   echo $ac_n "(cached) $ac_c" 1>&6
12181 else
12182   if test "$cross_compiling" = yes; then
12183   fu_cv_sys_stat_statvfs64=cross
12184 else
12185   cat > conftest.$ac_ext <<EOF
12186 #line 12187 "configure"
12187 #include "confdefs.h"
12188
12189 #if defined(HAVE_UNISTD_H)
12190 #include <unistd.h>
12191 #endif
12192 #include <sys/types.h>
12193 #include <sys/statvfs.h>
12194   main ()
12195   {
12196     struct statvfs64 fsd;
12197     exit (statvfs64 (".", &fsd));
12198   }
12199 EOF
12200 if { (eval echo configure:12201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12201 then
12202   fu_cv_sys_stat_statvfs64=yes
12203 else
12204   echo "configure: failed program was:" >&5
12205   cat conftest.$ac_ext >&5
12206   rm -fr conftest*
12207   fu_cv_sys_stat_statvfs64=no
12208 fi
12209 rm -fr conftest*
12210 fi
12211
12212 fi
12213
12214 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
12215   if test $fu_cv_sys_stat_statvfs64 = yes; then
12216     space=yes
12217     cat >> confdefs.h <<\EOF
12218 #define STAT_STATVFS64 1
12219 EOF
12220
12221   fi
12222 fi
12223
12224 # Perform only the link test since it seems there are no variants of the
12225 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
12226 # because that got a false positive on SCO OSR5.  Adding the declaration
12227 # of a `struct statvfs' causes this test to fail (as it should) on such
12228 # systems.  That system is reported to work fine with STAT_STATFS4 which
12229 # is what it gets when this test fails.
12230 if test $space = no; then
12231   # SVR4
12232   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
12233 echo "configure:12234: checking statvfs function (SVR4)" >&5
12234 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
12235   echo $ac_n "(cached) $ac_c" 1>&6
12236 else
12237   cat > conftest.$ac_ext <<EOF
12238 #line 12239 "configure"
12239 #include "confdefs.h"
12240 #include <sys/types.h>
12241 #include <sys/statvfs.h>
12242 int main() {
12243 struct statvfs fsd; statvfs (0, &fsd);
12244 ; return 0; }
12245 EOF
12246 if { (eval echo configure:12247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12247   rm -rf conftest*
12248   fu_cv_sys_stat_statvfs=yes
12249 else
12250   echo "configure: failed program was:" >&5
12251   cat conftest.$ac_ext >&5
12252   rm -rf conftest*
12253   fu_cv_sys_stat_statvfs=no
12254 fi
12255 rm -f conftest*
12256 fi
12257
12258 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
12259   if test $fu_cv_sys_stat_statvfs = yes; then
12260     space=yes
12261     cat >> confdefs.h <<\EOF
12262 #define STAT_STATVFS 1
12263 EOF
12264
12265   fi
12266 fi
12267
12268 if test $space = no; then
12269   # DEC Alpha running OSF/1
12270   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
12271 echo "configure:12272: checking for 3-argument statfs function (DEC OSF/1)" >&5
12272   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
12273   echo $ac_n "(cached) $ac_c" 1>&6
12274 else
12275   if test "$cross_compiling" = yes; then
12276   fu_cv_sys_stat_statfs3_osf1=no
12277 else
12278   cat > conftest.$ac_ext <<EOF
12279 #line 12280 "configure"
12280 #include "confdefs.h"
12281
12282 #include <sys/param.h>
12283 #include <sys/types.h>
12284 #include <sys/mount.h>
12285   main ()
12286   {
12287     struct statfs fsd;
12288     fsd.f_fsize = 0;
12289     exit (statfs (".", &fsd, sizeof (struct statfs)));
12290   }
12291 EOF
12292 if { (eval echo configure:12293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12293 then
12294   fu_cv_sys_stat_statfs3_osf1=yes
12295 else
12296   echo "configure: failed program was:" >&5
12297   cat conftest.$ac_ext >&5
12298   rm -fr conftest*
12299   fu_cv_sys_stat_statfs3_osf1=no
12300 fi
12301 rm -fr conftest*
12302 fi
12303
12304 fi
12305
12306   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
12307   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
12308     space=yes
12309     cat >> confdefs.h <<\EOF
12310 #define STAT_STATFS3_OSF1 1
12311 EOF
12312
12313   fi
12314 fi
12315
12316 if test $space = no; then
12317 # AIX
12318   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
12319 echo "configure:12320: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
12320   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
12321   echo $ac_n "(cached) $ac_c" 1>&6
12322 else
12323   if test "$cross_compiling" = yes; then
12324   fu_cv_sys_stat_statfs2_bsize=no
12325 else
12326   cat > conftest.$ac_ext <<EOF
12327 #line 12328 "configure"
12328 #include "confdefs.h"
12329
12330 #ifdef HAVE_SYS_PARAM_H
12331 #include <sys/param.h>
12332 #endif
12333 #ifdef HAVE_SYS_MOUNT_H
12334 #include <sys/mount.h>
12335 #endif
12336 #ifdef HAVE_SYS_VFS_H
12337 #include <sys/vfs.h>
12338 #endif
12339   main ()
12340   {
12341   struct statfs fsd;
12342   fsd.f_bsize = 0;
12343   exit (statfs (".", &fsd));
12344   }
12345 EOF
12346 if { (eval echo configure:12347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12347 then
12348   fu_cv_sys_stat_statfs2_bsize=yes
12349 else
12350   echo "configure: failed program was:" >&5
12351   cat conftest.$ac_ext >&5
12352   rm -fr conftest*
12353   fu_cv_sys_stat_statfs2_bsize=no
12354 fi
12355 rm -fr conftest*
12356 fi
12357
12358 fi
12359
12360   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
12361   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
12362     space=yes
12363     cat >> confdefs.h <<\EOF
12364 #define STAT_STATFS2_BSIZE 1
12365 EOF
12366
12367   fi
12368 fi
12369
12370 if test $space = no; then
12371 # SVR3
12372   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
12373 echo "configure:12374: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
12374   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
12375   echo $ac_n "(cached) $ac_c" 1>&6
12376 else
12377   if test "$cross_compiling" = yes; then
12378   fu_cv_sys_stat_statfs4=no
12379 else
12380   cat > conftest.$ac_ext <<EOF
12381 #line 12382 "configure"
12382 #include "confdefs.h"
12383 #include <sys/types.h>
12384 #include <sys/statfs.h>
12385   main ()
12386   {
12387   struct statfs fsd;
12388   exit (statfs (".", &fsd, sizeof fsd, 0));
12389   }
12390 EOF
12391 if { (eval echo configure:12392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12392 then
12393   fu_cv_sys_stat_statfs4=yes
12394 else
12395   echo "configure: failed program was:" >&5
12396   cat conftest.$ac_ext >&5
12397   rm -fr conftest*
12398   fu_cv_sys_stat_statfs4=no
12399 fi
12400 rm -fr conftest*
12401 fi
12402
12403 fi
12404
12405   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
12406   if test $fu_cv_sys_stat_statfs4 = yes; then
12407     space=yes
12408     cat >> confdefs.h <<\EOF
12409 #define STAT_STATFS4 1
12410 EOF
12411
12412   fi
12413 fi
12414
12415 if test $space = no; then
12416 # 4.4BSD and NetBSD
12417   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
12418 echo "configure:12419: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
12419   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
12420   echo $ac_n "(cached) $ac_c" 1>&6
12421 else
12422   if test "$cross_compiling" = yes; then
12423   fu_cv_sys_stat_statfs2_fsize=no
12424 else
12425   cat > conftest.$ac_ext <<EOF
12426 #line 12427 "configure"
12427 #include "confdefs.h"
12428 #include <sys/types.h>
12429 #ifdef HAVE_SYS_PARAM_H
12430 #include <sys/param.h>
12431 #endif
12432 #ifdef HAVE_SYS_MOUNT_H
12433 #include <sys/mount.h>
12434 #endif
12435   main ()
12436   {
12437   struct statfs fsd;
12438   fsd.f_fsize = 0;
12439   exit (statfs (".", &fsd));
12440   }
12441 EOF
12442 if { (eval echo configure:12443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12443 then
12444   fu_cv_sys_stat_statfs2_fsize=yes
12445 else
12446   echo "configure: failed program was:" >&5
12447   cat conftest.$ac_ext >&5
12448   rm -fr conftest*
12449   fu_cv_sys_stat_statfs2_fsize=no
12450 fi
12451 rm -fr conftest*
12452 fi
12453
12454 fi
12455
12456   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
12457   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
12458     space=yes
12459     cat >> confdefs.h <<\EOF
12460 #define STAT_STATFS2_FSIZE 1
12461 EOF
12462
12463   fi
12464 fi
12465
12466 if test $space = no; then
12467   # Ultrix
12468   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
12469 echo "configure:12470: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
12470   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
12471   echo $ac_n "(cached) $ac_c" 1>&6
12472 else
12473   if test "$cross_compiling" = yes; then
12474   fu_cv_sys_stat_fs_data=no
12475 else
12476   cat > conftest.$ac_ext <<EOF
12477 #line 12478 "configure"
12478 #include "confdefs.h"
12479 #include <sys/types.h>
12480 #ifdef HAVE_SYS_PARAM_H
12481 #include <sys/param.h>
12482 #endif
12483 #ifdef HAVE_SYS_MOUNT_H
12484 #include <sys/mount.h>
12485 #endif
12486 #ifdef HAVE_SYS_FS_TYPES_H
12487 #include <sys/fs_types.h>
12488 #endif
12489   main ()
12490   {
12491   struct fs_data fsd;
12492   /* Ultrix's statfs returns 1 for success,
12493      0 for not mounted, -1 for failure.  */
12494   exit (statfs (".", &fsd) != 1);
12495   }
12496 EOF
12497 if { (eval echo configure:12498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12498 then
12499   fu_cv_sys_stat_fs_data=yes
12500 else
12501   echo "configure: failed program was:" >&5
12502   cat conftest.$ac_ext >&5
12503   rm -fr conftest*
12504   fu_cv_sys_stat_fs_data=no
12505 fi
12506 rm -fr conftest*
12507 fi
12508
12509 fi
12510
12511   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
12512   if test $fu_cv_sys_stat_fs_data = yes; then
12513     space=yes
12514     cat >> confdefs.h <<\EOF
12515 #define STAT_STATFS2_FS_DATA 1
12516 EOF
12517
12518   fi
12519 fi
12520
12521 #
12522 # As a gating factor for large file support, in order to
12523 # use <4GB files we must have the following minimal support
12524 # available.
12525 # long long, and a 64 bit off_t or off64_t.
12526 # If we don't have all of these then disable large
12527 # file support.
12528 #
12529 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
12530 echo "configure:12531: checking if large file support can be enabled" >&5
12531 cat > conftest.$ac_ext <<EOF
12532 #line 12533 "configure"
12533 #include "confdefs.h"
12534
12535 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
12536 #include <sys/types.h>
12537 #else
12538 __COMPILE_ERROR_
12539 #endif
12540
12541 int main() {
12542 int i
12543 ; return 0; }
12544 EOF
12545 if { (eval echo configure:12546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12546   rm -rf conftest*
12547   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
12548 else
12549   echo "configure: failed program was:" >&5
12550   cat conftest.$ac_ext >&5
12551   rm -rf conftest*
12552   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
12553 fi
12554 rm -f conftest*
12555 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
12556     cat >> confdefs.h <<\EOF
12557 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
12558 EOF
12559
12560 fi
12561 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
12562
12563 # Check whether --with-spinlocks or --without-spinlocks was given.
12564 if test "${with_spinlocks+set}" = set; then
12565   withval="$with_spinlocks"
12566   :
12567 fi
12568
12569 if test "x$with_spinlocks" = "xyes"; then
12570     cat >> confdefs.h <<\EOF
12571 #define USE_SPINLOCKS 1
12572 EOF
12573
12574
12575     case "$host_cpu" in
12576         sparc)
12577             cat >> confdefs.h <<\EOF
12578 #define SPARC_SPINLOCKS 1
12579 EOF
12580
12581             ;;
12582
12583         i386|i486|i586|i686)
12584             cat >> confdefs.h <<\EOF
12585 #define INTEL_SPINLOCKS 1
12586 EOF
12587
12588             ;;
12589
12590         mips)
12591             cat >> confdefs.h <<\EOF
12592 #define MIPS_SPINLOCKS 1
12593 EOF
12594
12595             ;;
12596
12597         powerpc)
12598             cat >> confdefs.h <<\EOF
12599 #define POWERPC_SPINLOCKS 1
12600 EOF
12601
12602             ;;
12603     esac
12604 fi
12605
12606 #################################################
12607 # check for ACL support
12608
12609 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
12610 echo "configure:12611: checking whether to support ACLs" >&5
12611 # Check whether --with-acl-support or --without-acl-support was given.
12612 if test "${with_acl_support+set}" = set; then
12613   withval="$with_acl_support"
12614    case "$withval" in
12615   yes)
12616
12617         case "$host_os" in
12618         *sysv5*)
12619             echo "$ac_t""Using UnixWare ACLs" 1>&6
12620             cat >> confdefs.h <<\EOF
12621 #define HAVE_UNIXWARE_ACLS 1
12622 EOF
12623
12624             ;;
12625         *solaris*)
12626             echo "$ac_t""Using solaris ACLs" 1>&6
12627             cat >> confdefs.h <<\EOF
12628 #define HAVE_SOLARIS_ACLS 1
12629 EOF
12630
12631             ;;
12632                 *irix*)
12633                         echo "$ac_t""Using IRIX ACLs" 1>&6
12634                         cat >> confdefs.h <<\EOF
12635 #define HAVE_IRIX_ACLS 1
12636 EOF
12637
12638                         ;;
12639                 *aix*)
12640                         echo "$ac_t""Using AIX ACLs" 1>&6
12641                         cat >> confdefs.h <<\EOF
12642 #define HAVE_AIX_ACLS 1
12643 EOF
12644
12645                         ;;
12646         *)
12647                         echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
12648 echo "configure:12649: checking for acl_get_file in -lacl" >&5
12649 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
12650 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12651   echo $ac_n "(cached) $ac_c" 1>&6
12652 else
12653   ac_save_LIBS="$LIBS"
12654 LIBS="-lacl  $LIBS"
12655 cat > conftest.$ac_ext <<EOF
12656 #line 12657 "configure"
12657 #include "confdefs.h"
12658 /* Override any gcc2 internal prototype to avoid an error.  */
12659 /* We use char because int might match the return type of a gcc2
12660     builtin and then its argument prototype would still apply.  */
12661 char acl_get_file();
12662
12663 int main() {
12664 acl_get_file()
12665 ; return 0; }
12666 EOF
12667 if { (eval echo configure:12668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12668   rm -rf conftest*
12669   eval "ac_cv_lib_$ac_lib_var=yes"
12670 else
12671   echo "configure: failed program was:" >&5
12672   cat conftest.$ac_ext >&5
12673   rm -rf conftest*
12674   eval "ac_cv_lib_$ac_lib_var=no"
12675 fi
12676 rm -f conftest*
12677 LIBS="$ac_save_LIBS"
12678
12679 fi
12680 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12681   echo "$ac_t""yes" 1>&6
12682     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12683     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12684   cat >> confdefs.h <<EOF
12685 #define $ac_tr_lib 1
12686 EOF
12687
12688   LIBS="-lacl $LIBS"
12689
12690 else
12691   echo "$ac_t""no" 1>&6
12692 fi
12693
12694                         echo $ac_n "checking for ACL support""... $ac_c" 1>&6
12695 echo "configure:12696: checking for ACL support" >&5
12696 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
12697   echo $ac_n "(cached) $ac_c" 1>&6
12698 else
12699   
12700                         cat > conftest.$ac_ext <<EOF
12701 #line 12702 "configure"
12702 #include "confdefs.h"
12703 #include <sys/types.h>
12704 #include <sys/acl.h>
12705 int main() {
12706  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
12707 ; return 0; }
12708 EOF
12709 if { (eval echo configure:12710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12710   rm -rf conftest*
12711   samba_cv_HAVE_POSIX_ACLS=yes
12712 else
12713   echo "configure: failed program was:" >&5
12714   cat conftest.$ac_ext >&5
12715   rm -rf conftest*
12716   samba_cv_HAVE_POSIX_ACLS=no
12717 fi
12718 rm -f conftest*
12719 fi
12720
12721 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
12722                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
12723                                 echo "$ac_t""Using posix ACLs" 1>&6
12724                                 cat >> confdefs.h <<\EOF
12725 #define HAVE_POSIX_ACLS 1
12726 EOF
12727
12728                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
12729 echo "configure:12730: checking for acl_get_perm_np" >&5
12730 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
12731   echo $ac_n "(cached) $ac_c" 1>&6
12732 else
12733   
12734                                 cat > conftest.$ac_ext <<EOF
12735 #line 12736 "configure"
12736 #include "confdefs.h"
12737 #include <sys/types.h>
12738 #include <sys/acl.h>
12739 int main() {
12740  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
12741 ; return 0; }
12742 EOF
12743 if { (eval echo configure:12744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12744   rm -rf conftest*
12745   samba_cv_HAVE_ACL_GET_PERM_NP=yes
12746 else
12747   echo "configure: failed program was:" >&5
12748   cat conftest.$ac_ext >&5
12749   rm -rf conftest*
12750   samba_cv_HAVE_ACL_GET_PERM_NP=no
12751 fi
12752 rm -f conftest*
12753 fi
12754
12755 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
12756                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
12757                                         cat >> confdefs.h <<\EOF
12758 #define HAVE_ACL_GET_PERM_NP 1
12759 EOF
12760
12761                                 fi
12762                         fi
12763             ;;
12764         esac
12765         ;;
12766   *)
12767     echo "$ac_t""no" 1>&6
12768     cat >> confdefs.h <<\EOF
12769 #define HAVE_NO_ACLS 1
12770 EOF
12771
12772     ;;
12773   esac 
12774 else
12775   cat >> confdefs.h <<\EOF
12776 #define HAVE_NO_ACLS 1
12777 EOF
12778
12779   echo "$ac_t""no" 1>&6
12780
12781 fi
12782
12783
12784 #################################################
12785 # check whether winbind is supported on this platform
12786
12787 echo $ac_n "checking whether to compile winbind""... $ac_c" 1>&6
12788 echo "configure:12789: checking whether to compile winbind" >&5
12789
12790 case "$host_os" in 
12791         *linux*|*solaris*)
12792                 WINBIND_TARGETS="$WINBIND_TARGETS \$(WINBIND_PROGS)"
12793                 case "$with_pam" in
12794                         yes)
12795                                 WINBIND_TARGETS="$WINBIND_TARGETS \$(WINBIND_PAM_PROGS)"
12796                         ;;
12797                         *)
12798                 esac
12799                 ;;
12800         *)
12801                 winbind_no_reason=", unsupported on $host_os"
12802                 ;;
12803 esac
12804
12805 # Check whether --with-winbind or --without-winbind was given.
12806 if test "${with_winbind+set}" = set; then
12807   withval="$with_winbind"
12808    
12809   case "$withval" in
12810         no)
12811                 WINBIND_TARGETS=""
12812                 winbind_reason=""
12813                 ;;
12814   esac 
12815 fi
12816
12817
12818 if test x"$WINBIND_TARGETS" = x; then
12819         echo "$ac_t""no$winbind_no_reason" 1>&6
12820 else
12821         echo "$ac_t""yes" 1>&6
12822 fi
12823
12824
12825
12826 #################################################
12827 # final configure stuff
12828
12829 echo "checking configure summary"
12830 if test "$cross_compiling" = yes; then
12831   :
12832 else
12833   cat > conftest.$ac_ext <<EOF
12834 #line 12835 "configure"
12835 #include "confdefs.h"
12836 #include "${srcdir-.}/tests/summary.c"
12837 EOF
12838 if { (eval echo configure:12839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12839 then
12840   echo "configure OK";
12841 else
12842   echo "configure: failed program was:" >&5
12843   cat conftest.$ac_ext >&5
12844   rm -fr conftest*
12845   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
12846 fi
12847 rm -fr conftest*
12848 fi
12849
12850
12851 builddir=`pwd`
12852
12853
12854 trap '' 1 2 15
12855 cat > confcache <<\EOF
12856 # This file is a shell script that caches the results of configure
12857 # tests run on this system so they can be shared between configure
12858 # scripts and configure runs.  It is not useful on other systems.
12859 # If it contains results you don't want to keep, you may remove or edit it.
12860 #
12861 # By default, configure uses ./config.cache as the cache file,
12862 # creating it if it does not exist already.  You can give configure
12863 # the --cache-file=FILE option to use a different cache file; that is
12864 # what configure does when it calls configure scripts in
12865 # subdirectories, so they share the cache.
12866 # Giving --cache-file=/dev/null disables caching, for debugging configure.
12867 # config.status only pays attention to the cache file if you give it the
12868 # --recheck option to rerun configure.
12869 #
12870 EOF
12871 # The following way of writing the cache mishandles newlines in values,
12872 # but we know of no workaround that is simple, portable, and efficient.
12873 # So, don't put newlines in cache variables' values.
12874 # Ultrix sh set writes to stderr and can't be redirected directly,
12875 # and sets the high bit in the cache file unless we assign to the vars.
12876 (set) 2>&1 |
12877   case `(ac_space=' '; set | grep ac_space) 2>&1` in
12878   *ac_space=\ *)
12879     # `set' does not quote correctly, so add quotes (double-quote substitution
12880     # turns \\\\ into \\, and sed turns \\ into \).
12881     sed -n \
12882       -e "s/'/'\\\\''/g" \
12883       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
12884     ;;
12885   *)
12886     # `set' quotes correctly as required by POSIX, so do not add quotes.
12887     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
12888     ;;
12889   esac >> confcache
12890 if cmp -s $cache_file confcache; then
12891   :
12892 else
12893   if test -w $cache_file; then
12894     echo "updating cache $cache_file"
12895     cat confcache > $cache_file
12896   else
12897     echo "not updating unwritable cache $cache_file"
12898   fi
12899 fi
12900 rm -f confcache
12901
12902 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12903
12904 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12905 # Let make expand exec_prefix.
12906 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12907
12908 # Any assignment to VPATH causes Sun make to only execute
12909 # the first set of double-colon rules, so remove it if not needed.
12910 # If there is a colon in the path, we need to keep it.
12911 if test "x$srcdir" = x.; then
12912   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12913 fi
12914
12915 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12916
12917 DEFS=-DHAVE_CONFIG_H
12918
12919 # Without the "./", some shells look in PATH for config.status.
12920 : ${CONFIG_STATUS=./config.status}
12921
12922 echo creating $CONFIG_STATUS
12923 rm -f $CONFIG_STATUS
12924 cat > $CONFIG_STATUS <<EOF
12925 #! /bin/sh
12926 # Generated automatically by configure.
12927 # Run this file to recreate the current configuration.
12928 # This directory was configured as follows,
12929 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12930 #
12931 # $0 $ac_configure_args
12932 #
12933 # Compiler output produced by configure, useful for debugging
12934 # configure, is in ./config.log if it exists.
12935
12936 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12937 for ac_option
12938 do
12939   case "\$ac_option" in
12940   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12941     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12942     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12943   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12944     echo "$CONFIG_STATUS generated by autoconf version 2.13"
12945     exit 0 ;;
12946   -help | --help | --hel | --he | --h)
12947     echo "\$ac_cs_usage"; exit 0 ;;
12948   *) echo "\$ac_cs_usage"; exit 1 ;;
12949   esac
12950 done
12951
12952 ac_given_srcdir=$srcdir
12953 ac_given_INSTALL="$INSTALL"
12954
12955 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12956 EOF
12957 cat >> $CONFIG_STATUS <<EOF
12958
12959 # Protect against being on the right side of a sed subst in config.status.
12960 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12961  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12962 $ac_vpsub
12963 $extrasub
12964 s%@SHELL@%$SHELL%g
12965 s%@CFLAGS@%$CFLAGS%g
12966 s%@CPPFLAGS@%$CPPFLAGS%g
12967 s%@CXXFLAGS@%$CXXFLAGS%g
12968 s%@FFLAGS@%$FFLAGS%g
12969 s%@DEFS@%$DEFS%g
12970 s%@LDFLAGS@%$LDFLAGS%g
12971 s%@LIBS@%$LIBS%g
12972 s%@exec_prefix@%$exec_prefix%g
12973 s%@prefix@%$prefix%g
12974 s%@program_transform_name@%$program_transform_name%g
12975 s%@bindir@%$bindir%g
12976 s%@sbindir@%$sbindir%g
12977 s%@libexecdir@%$libexecdir%g
12978 s%@datadir@%$datadir%g
12979 s%@sysconfdir@%$sysconfdir%g
12980 s%@sharedstatedir@%$sharedstatedir%g
12981 s%@localstatedir@%$localstatedir%g
12982 s%@libdir@%$libdir%g
12983 s%@includedir@%$includedir%g
12984 s%@oldincludedir@%$oldincludedir%g
12985 s%@infodir@%$infodir%g
12986 s%@mandir@%$mandir%g
12987 s%@RUNPROG@%$RUNPROG%g
12988 s%@MPROGS@%$MPROGS%g
12989 s%@LDSHFLAGS@%$LDSHFLAGS%g
12990 s%@HOST_OS@%$HOST_OS%g
12991 s%@PAM_MOD@%$PAM_MOD%g
12992 s%@WRAP@%$WRAP%g
12993 s%@WRAP32@%$WRAP32%g
12994 s%@PICFLAG@%$PICFLAG%g
12995 s%@SHLIBEXT@%$SHLIBEXT%g
12996 s%@BLDSHARED@%$BLDSHARED%g
12997 s%@CC@%$CC%g
12998 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12999 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13000 s%@INSTALL_DATA@%$INSTALL_DATA%g
13001 s%@AWK@%$AWK%g
13002 s%@host@%$host%g
13003 s%@host_alias@%$host_alias%g
13004 s%@host_cpu@%$host_cpu%g
13005 s%@host_vendor@%$host_vendor%g
13006 s%@host_os@%$host_os%g
13007 s%@build@%$build%g
13008 s%@build_alias@%$build_alias%g
13009 s%@build_cpu@%$build_cpu%g
13010 s%@build_vendor@%$build_vendor%g
13011 s%@build_os@%$build_os%g
13012 s%@RANLIB@%$RANLIB%g
13013 s%@LN_S@%$LN_S%g
13014 s%@LIBTOOL@%$LIBTOOL%g
13015 s%@LIBTOOL_DEPS@%$LIBTOOL_DEPS%g
13016 s%@BROKEN_CC@%$BROKEN_CC%g
13017 s%@target@%$target%g
13018 s%@target_alias@%$target_alias%g
13019 s%@target_cpu@%$target_cpu%g
13020 s%@target_vendor@%$target_vendor%g
13021 s%@target_os@%$target_os%g
13022 s%@CPP@%$CPP%g
13023 s%@LIBOBJS@%$LIBOBJS%g
13024 s%@TERMLIBS@%$TERMLIBS%g
13025 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
13026 s%@ROFF@%$ROFF%g
13027 s%@QUOTAOBJS@%$QUOTAOBJS%g
13028 s%@privatedir@%$privatedir%g
13029 s%@lockdir@%$lockdir%g
13030 s%@swatdir@%$swatdir%g
13031 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
13032 s%@builddir@%$builddir%g
13033
13034 CEOF
13035 EOF
13036
13037 cat >> $CONFIG_STATUS <<\EOF
13038
13039 # Split the substitutions into bite-sized pieces for seds with
13040 # small command number limits, like on Digital OSF/1 and HP-UX.
13041 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13042 ac_file=1 # Number of current file.
13043 ac_beg=1 # First line for current file.
13044 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13045 ac_more_lines=:
13046 ac_sed_cmds=""
13047 while $ac_more_lines; do
13048   if test $ac_beg -gt 1; then
13049     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13050   else
13051     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13052   fi
13053   if test ! -s conftest.s$ac_file; then
13054     ac_more_lines=false
13055     rm -f conftest.s$ac_file
13056   else
13057     if test -z "$ac_sed_cmds"; then
13058       ac_sed_cmds="sed -f conftest.s$ac_file"
13059     else
13060       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13061     fi
13062     ac_file=`expr $ac_file + 1`
13063     ac_beg=$ac_end
13064     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13065   fi
13066 done
13067 if test -z "$ac_sed_cmds"; then
13068   ac_sed_cmds=cat
13069 fi
13070 EOF
13071
13072 cat >> $CONFIG_STATUS <<EOF
13073
13074 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
13075 EOF
13076 cat >> $CONFIG_STATUS <<\EOF
13077 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13078   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13079   case "$ac_file" in
13080   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13081        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13082   *) ac_file_in="${ac_file}.in" ;;
13083   esac
13084
13085   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13086
13087   # Remove last slash and all that follows it.  Not all systems have dirname.
13088   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13089   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13090     # The file is in a subdirectory.
13091     test ! -d "$ac_dir" && mkdir "$ac_dir"
13092     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13093     # A "../" for each directory in $ac_dir_suffix.
13094     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13095   else
13096     ac_dir_suffix= ac_dots=
13097   fi
13098
13099   case "$ac_given_srcdir" in
13100   .)  srcdir=.
13101       if test -z "$ac_dots"; then top_srcdir=.
13102       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13103   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13104   *) # Relative path.
13105     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13106     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13107   esac
13108
13109   case "$ac_given_INSTALL" in
13110   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13111   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13112   esac
13113
13114   echo creating "$ac_file"
13115   rm -f "$ac_file"
13116   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13117   case "$ac_file" in
13118   *Makefile*) ac_comsub="1i\\
13119 # $configure_input" ;;
13120   *) ac_comsub= ;;
13121   esac
13122
13123   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13124   sed -e "$ac_comsub
13125 s%@configure_input@%$configure_input%g
13126 s%@srcdir@%$srcdir%g
13127 s%@top_srcdir@%$top_srcdir%g
13128 s%@INSTALL@%$INSTALL%g
13129 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13130 fi; done
13131 rm -f conftest.s*
13132
13133 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13134 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13135 #
13136 # ac_d sets the value in "#define NAME VALUE" lines.
13137 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13138 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13139 ac_dC='\3'
13140 ac_dD='%g'
13141 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13142 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13143 ac_uB='\([      ]\)%\1#\2define\3'
13144 ac_uC=' '
13145 ac_uD='\4%g'
13146 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13147 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13148 ac_eB='$%\1#\2define\3'
13149 ac_eC=' '
13150 ac_eD='%g'
13151
13152 if test "${CONFIG_HEADERS+set}" != set; then
13153 EOF
13154 cat >> $CONFIG_STATUS <<EOF
13155   CONFIG_HEADERS="include/config.h"
13156 EOF
13157 cat >> $CONFIG_STATUS <<\EOF
13158 fi
13159 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13160   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13161   case "$ac_file" in
13162   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13163        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13164   *) ac_file_in="${ac_file}.in" ;;
13165   esac
13166
13167   echo creating $ac_file
13168
13169   rm -f conftest.frag conftest.in conftest.out
13170   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13171   cat $ac_file_inputs > conftest.in
13172
13173 EOF
13174
13175 # Transform confdefs.h into a sed script conftest.vals that substitutes
13176 # the proper values into config.h.in to produce config.h.  And first:
13177 # Protect against being on the right side of a sed subst in config.status.
13178 # Protect against being in an unquoted here document in config.status.
13179 rm -f conftest.vals
13180 cat > conftest.hdr <<\EOF
13181 s/[\\&%]/\\&/g
13182 s%[\\$`]%\\&%g
13183 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13184 s%ac_d%ac_u%gp
13185 s%ac_u%ac_e%gp
13186 EOF
13187 sed -n -f conftest.hdr confdefs.h > conftest.vals
13188 rm -f conftest.hdr
13189
13190 # This sed command replaces #undef with comments.  This is necessary, for
13191 # example, in the case of _POSIX_SOURCE, which is predefined and required
13192 # on some systems where configure will not decide to define it.
13193 cat >> conftest.vals <<\EOF
13194 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13195 EOF
13196
13197 # Break up conftest.vals because some shells have a limit on
13198 # the size of here documents, and old seds have small limits too.
13199
13200 rm -f conftest.tail
13201 while :
13202 do
13203   ac_lines=`grep -c . conftest.vals`
13204   # grep -c gives empty output for an empty file on some AIX systems.
13205   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13206   # Write a limited-size here document to conftest.frag.
13207   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13208   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13209   echo 'CEOF
13210   sed -f conftest.frag conftest.in > conftest.out
13211   rm -f conftest.in
13212   mv conftest.out conftest.in
13213 ' >> $CONFIG_STATUS
13214   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13215   rm -f conftest.vals
13216   mv conftest.tail conftest.vals
13217 done
13218 rm -f conftest.vals
13219
13220 cat >> $CONFIG_STATUS <<\EOF
13221   rm -f conftest.frag conftest.h
13222   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13223   cat conftest.in >> conftest.h
13224   rm -f conftest.in
13225   if cmp -s $ac_file conftest.h 2>/dev/null; then
13226     echo "$ac_file is unchanged"
13227     rm -f conftest.h
13228   else
13229     # Remove last slash and all that follows it.  Not all systems have dirname.
13230       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13231       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13232       # The file is in a subdirectory.
13233       test ! -d "$ac_dir" && mkdir "$ac_dir"
13234     fi
13235     rm -f $ac_file
13236     mv conftest.h $ac_file
13237   fi
13238 fi; done
13239
13240 EOF
13241 cat >> $CONFIG_STATUS <<EOF
13242
13243 EOF
13244 cat >> $CONFIG_STATUS <<\EOF
13245
13246 exit 0
13247 EOF
13248 chmod +x $CONFIG_STATUS
13249 rm -fr confdefs* $ac_clean_files
13250 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
13251