843483f5bdaed038af09f7a1e15f4155c3262fbd
[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 gawk mawk 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 main()
2994 {
2995   FILE *f=fopen("conftestval", "w");
2996   if (!f) exit(1);
2997   fprintf(f, "%d\n", sizeof(int));
2998   exit(0);
2999 }
3000 EOF
3001 if { (eval echo configure:3002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3002 then
3003   ac_cv_sizeof_int=`cat conftestval`
3004 else
3005   echo "configure: failed program was:" >&5
3006   cat conftest.$ac_ext >&5
3007   rm -fr conftest*
3008   ac_cv_sizeof_int=0
3009 fi
3010 rm -fr conftest*
3011 fi
3012
3013 fi
3014 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
3015 cat >> confdefs.h <<EOF
3016 #define SIZEOF_INT $ac_cv_sizeof_int
3017 EOF
3018
3019
3020 echo $ac_n "checking size of long""... $ac_c" 1>&6
3021 echo "configure:3022: checking size of long" >&5
3022 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
3023   echo $ac_n "(cached) $ac_c" 1>&6
3024 else
3025   if test "$cross_compiling" = yes; then
3026   ac_cv_sizeof_long=cross
3027 else
3028   cat > conftest.$ac_ext <<EOF
3029 #line 3030 "configure"
3030 #include "confdefs.h"
3031 #include <stdio.h>
3032 main()
3033 {
3034   FILE *f=fopen("conftestval", "w");
3035   if (!f) exit(1);
3036   fprintf(f, "%d\n", sizeof(long));
3037   exit(0);
3038 }
3039 EOF
3040 if { (eval echo configure:3041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3041 then
3042   ac_cv_sizeof_long=`cat conftestval`
3043 else
3044   echo "configure: failed program was:" >&5
3045   cat conftest.$ac_ext >&5
3046   rm -fr conftest*
3047   ac_cv_sizeof_long=0
3048 fi
3049 rm -fr conftest*
3050 fi
3051
3052 fi
3053 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
3054 cat >> confdefs.h <<EOF
3055 #define SIZEOF_LONG $ac_cv_sizeof_long
3056 EOF
3057
3058
3059 echo $ac_n "checking size of short""... $ac_c" 1>&6
3060 echo "configure:3061: checking size of short" >&5
3061 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
3062   echo $ac_n "(cached) $ac_c" 1>&6
3063 else
3064   if test "$cross_compiling" = yes; then
3065   ac_cv_sizeof_short=cross
3066 else
3067   cat > conftest.$ac_ext <<EOF
3068 #line 3069 "configure"
3069 #include "confdefs.h"
3070 #include <stdio.h>
3071 main()
3072 {
3073   FILE *f=fopen("conftestval", "w");
3074   if (!f) exit(1);
3075   fprintf(f, "%d\n", sizeof(short));
3076   exit(0);
3077 }
3078 EOF
3079 if { (eval echo configure:3080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3080 then
3081   ac_cv_sizeof_short=`cat conftestval`
3082 else
3083   echo "configure: failed program was:" >&5
3084   cat conftest.$ac_ext >&5
3085   rm -fr conftest*
3086   ac_cv_sizeof_short=0
3087 fi
3088 rm -fr conftest*
3089 fi
3090
3091 fi
3092 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3093 cat >> confdefs.h <<EOF
3094 #define SIZEOF_SHORT $ac_cv_sizeof_short
3095 EOF
3096
3097
3098
3099 echo $ac_n "checking for working const""... $ac_c" 1>&6
3100 echo "configure:3101: checking for working const" >&5
3101 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3102   echo $ac_n "(cached) $ac_c" 1>&6
3103 else
3104   cat > conftest.$ac_ext <<EOF
3105 #line 3106 "configure"
3106 #include "confdefs.h"
3107
3108 int main() {
3109
3110 /* Ultrix mips cc rejects this.  */
3111 typedef int charset[2]; const charset x;
3112 /* SunOS 4.1.1 cc rejects this.  */
3113 char const *const *ccp;
3114 char **p;
3115 /* NEC SVR4.0.2 mips cc rejects this.  */
3116 struct point {int x, y;};
3117 static struct point const zero = {0,0};
3118 /* AIX XL C 1.02.0.0 rejects this.
3119    It does not let you subtract one const X* pointer from another in an arm
3120    of an if-expression whose if-part is not a constant expression */
3121 const char *g = "string";
3122 ccp = &g + (g ? g-g : 0);
3123 /* HPUX 7.0 cc rejects these. */
3124 ++ccp;
3125 p = (char**) ccp;
3126 ccp = (char const *const *) p;
3127 { /* SCO 3.2v4 cc rejects this.  */
3128   char *t;
3129   char const *s = 0 ? (char *) 0 : (char const *) 0;
3130
3131   *t++ = 0;
3132 }
3133 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3134   int x[] = {25, 17};
3135   const int *foo = &x[0];
3136   ++foo;
3137 }
3138 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3139   typedef const int *iptr;
3140   iptr p = 0;
3141   ++p;
3142 }
3143 { /* AIX XL C 1.02.0.0 rejects this saying
3144      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3145   struct s { int j; const int *ap[3]; };
3146   struct s *b; b->j = 5;
3147 }
3148 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3149   const int foo = 10;
3150 }
3151
3152 ; return 0; }
3153 EOF
3154 if { (eval echo configure:3155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3155   rm -rf conftest*
3156   ac_cv_c_const=yes
3157 else
3158   echo "configure: failed program was:" >&5
3159   cat conftest.$ac_ext >&5
3160   rm -rf conftest*
3161   ac_cv_c_const=no
3162 fi
3163 rm -f conftest*
3164 fi
3165
3166 echo "$ac_t""$ac_cv_c_const" 1>&6
3167 if test $ac_cv_c_const = no; then
3168   cat >> confdefs.h <<\EOF
3169 #define const 
3170 EOF
3171
3172 fi
3173
3174 echo $ac_n "checking for inline""... $ac_c" 1>&6
3175 echo "configure:3176: checking for inline" >&5
3176 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3177   echo $ac_n "(cached) $ac_c" 1>&6
3178 else
3179   ac_cv_c_inline=no
3180 for ac_kw in inline __inline__ __inline; do
3181   cat > conftest.$ac_ext <<EOF
3182 #line 3183 "configure"
3183 #include "confdefs.h"
3184
3185 int main() {
3186 } $ac_kw foo() {
3187 ; return 0; }
3188 EOF
3189 if { (eval echo configure:3190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3190   rm -rf conftest*
3191   ac_cv_c_inline=$ac_kw; break
3192 else
3193   echo "configure: failed program was:" >&5
3194   cat conftest.$ac_ext >&5
3195 fi
3196 rm -f conftest*
3197 done
3198
3199 fi
3200
3201 echo "$ac_t""$ac_cv_c_inline" 1>&6
3202 case "$ac_cv_c_inline" in
3203   inline | yes) ;;
3204   no) cat >> confdefs.h <<\EOF
3205 #define inline 
3206 EOF
3207  ;;
3208   *)  cat >> confdefs.h <<EOF
3209 #define inline $ac_cv_c_inline
3210 EOF
3211  ;;
3212 esac
3213
3214 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3215 echo "configure:3216: checking whether byte ordering is bigendian" >&5
3216 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3217   echo $ac_n "(cached) $ac_c" 1>&6
3218 else
3219   ac_cv_c_bigendian=unknown
3220 # See if sys/param.h defines the BYTE_ORDER macro.
3221 cat > conftest.$ac_ext <<EOF
3222 #line 3223 "configure"
3223 #include "confdefs.h"
3224 #include <sys/types.h>
3225 #include <sys/param.h>
3226 int main() {
3227
3228 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3229  bogus endian macros
3230 #endif
3231 ; return 0; }
3232 EOF
3233 if { (eval echo configure:3234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3234   rm -rf conftest*
3235   # It does; now see whether it defined to BIG_ENDIAN or not.
3236 cat > conftest.$ac_ext <<EOF
3237 #line 3238 "configure"
3238 #include "confdefs.h"
3239 #include <sys/types.h>
3240 #include <sys/param.h>
3241 int main() {
3242
3243 #if BYTE_ORDER != BIG_ENDIAN
3244  not big endian
3245 #endif
3246 ; return 0; }
3247 EOF
3248 if { (eval echo configure:3249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3249   rm -rf conftest*
3250   ac_cv_c_bigendian=yes
3251 else
3252   echo "configure: failed program was:" >&5
3253   cat conftest.$ac_ext >&5
3254   rm -rf conftest*
3255   ac_cv_c_bigendian=no
3256 fi
3257 rm -f conftest*
3258 else
3259   echo "configure: failed program was:" >&5
3260   cat conftest.$ac_ext >&5
3261 fi
3262 rm -f conftest*
3263 if test $ac_cv_c_bigendian = unknown; then
3264 if test "$cross_compiling" = yes; then
3265     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3266 else
3267   cat > conftest.$ac_ext <<EOF
3268 #line 3269 "configure"
3269 #include "confdefs.h"
3270 main () {
3271   /* Are we little or big endian?  From Harbison&Steele.  */
3272   union
3273   {
3274     long l;
3275     char c[sizeof (long)];
3276   } u;
3277   u.l = 1;
3278   exit (u.c[sizeof (long) - 1] == 1);
3279 }
3280 EOF
3281 if { (eval echo configure:3282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3282 then
3283   ac_cv_c_bigendian=no
3284 else
3285   echo "configure: failed program was:" >&5
3286   cat conftest.$ac_ext >&5
3287   rm -fr conftest*
3288   ac_cv_c_bigendian=yes
3289 fi
3290 rm -fr conftest*
3291 fi
3292
3293 fi
3294 fi
3295
3296 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3297 if test $ac_cv_c_bigendian = yes; then
3298   cat >> confdefs.h <<\EOF
3299 #define WORDS_BIGENDIAN 1
3300 EOF
3301
3302 fi
3303
3304 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
3305 echo "configure:3306: checking whether char is unsigned" >&5
3306 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3307   echo $ac_n "(cached) $ac_c" 1>&6
3308 else
3309   if test "$GCC" = yes; then
3310   # GCC predefines this symbol on systems where it applies.
3311 cat > conftest.$ac_ext <<EOF
3312 #line 3313 "configure"
3313 #include "confdefs.h"
3314 #ifdef __CHAR_UNSIGNED__
3315   yes
3316 #endif
3317
3318 EOF
3319 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3320   egrep "yes" >/dev/null 2>&1; then
3321   rm -rf conftest*
3322   ac_cv_c_char_unsigned=yes
3323 else
3324   rm -rf conftest*
3325   ac_cv_c_char_unsigned=no
3326 fi
3327 rm -f conftest*
3328
3329 else
3330 if test "$cross_compiling" = yes; then
3331     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3332 else
3333   cat > conftest.$ac_ext <<EOF
3334 #line 3335 "configure"
3335 #include "confdefs.h"
3336 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
3337 #if !defined(__STDC__) || __STDC__ != 1
3338 #define volatile
3339 #endif
3340 main() {
3341   volatile char c = 255; exit(c < 0);
3342 }
3343 EOF
3344 if { (eval echo configure:3345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3345 then
3346   ac_cv_c_char_unsigned=yes
3347 else
3348   echo "configure: failed program was:" >&5
3349   cat conftest.$ac_ext >&5
3350   rm -fr conftest*
3351   ac_cv_c_char_unsigned=no
3352 fi
3353 rm -fr conftest*
3354 fi
3355
3356 fi
3357 fi
3358
3359 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
3360 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3361   cat >> confdefs.h <<\EOF
3362 #define __CHAR_UNSIGNED__ 1
3363 EOF
3364
3365 fi
3366
3367
3368 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3369 echo "configure:3370: checking return type of signal handlers" >&5
3370 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3371   echo $ac_n "(cached) $ac_c" 1>&6
3372 else
3373   cat > conftest.$ac_ext <<EOF
3374 #line 3375 "configure"
3375 #include "confdefs.h"
3376 #include <sys/types.h>
3377 #include <signal.h>
3378 #ifdef signal
3379 #undef signal
3380 #endif
3381 #ifdef __cplusplus
3382 extern "C" void (*signal (int, void (*)(int)))(int);
3383 #else
3384 void (*signal ()) ();
3385 #endif
3386
3387 int main() {
3388 int i;
3389 ; return 0; }
3390 EOF
3391 if { (eval echo configure:3392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3392   rm -rf conftest*
3393   ac_cv_type_signal=void
3394 else
3395   echo "configure: failed program was:" >&5
3396   cat conftest.$ac_ext >&5
3397   rm -rf conftest*
3398   ac_cv_type_signal=int
3399 fi
3400 rm -f conftest*
3401 fi
3402
3403 echo "$ac_t""$ac_cv_type_signal" 1>&6
3404 cat >> confdefs.h <<EOF
3405 #define RETSIGTYPE $ac_cv_type_signal
3406 EOF
3407
3408
3409 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3410 echo "configure:3411: checking for uid_t in sys/types.h" >&5
3411 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3412   echo $ac_n "(cached) $ac_c" 1>&6
3413 else
3414   cat > conftest.$ac_ext <<EOF
3415 #line 3416 "configure"
3416 #include "confdefs.h"
3417 #include <sys/types.h>
3418 EOF
3419 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3420   egrep "uid_t" >/dev/null 2>&1; then
3421   rm -rf conftest*
3422   ac_cv_type_uid_t=yes
3423 else
3424   rm -rf conftest*
3425   ac_cv_type_uid_t=no
3426 fi
3427 rm -f conftest*
3428
3429 fi
3430
3431 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3432 if test $ac_cv_type_uid_t = no; then
3433   cat >> confdefs.h <<\EOF
3434 #define uid_t int
3435 EOF
3436
3437   cat >> confdefs.h <<\EOF
3438 #define gid_t int
3439 EOF
3440
3441 fi
3442
3443 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3444 echo "configure:3445: checking for mode_t" >&5
3445 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3446   echo $ac_n "(cached) $ac_c" 1>&6
3447 else
3448   cat > conftest.$ac_ext <<EOF
3449 #line 3450 "configure"
3450 #include "confdefs.h"
3451 #include <sys/types.h>
3452 #if STDC_HEADERS
3453 #include <stdlib.h>
3454 #include <stddef.h>
3455 #endif
3456 EOF
3457 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3458   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3459   rm -rf conftest*
3460   ac_cv_type_mode_t=yes
3461 else
3462   rm -rf conftest*
3463   ac_cv_type_mode_t=no
3464 fi
3465 rm -f conftest*
3466
3467 fi
3468 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3469 if test $ac_cv_type_mode_t = no; then
3470   cat >> confdefs.h <<\EOF
3471 #define mode_t int
3472 EOF
3473
3474 fi
3475
3476 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3477 echo "configure:3478: checking for off_t" >&5
3478 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3479   echo $ac_n "(cached) $ac_c" 1>&6
3480 else
3481   cat > conftest.$ac_ext <<EOF
3482 #line 3483 "configure"
3483 #include "confdefs.h"
3484 #include <sys/types.h>
3485 #if STDC_HEADERS
3486 #include <stdlib.h>
3487 #include <stddef.h>
3488 #endif
3489 EOF
3490 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3491   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3492   rm -rf conftest*
3493   ac_cv_type_off_t=yes
3494 else
3495   rm -rf conftest*
3496   ac_cv_type_off_t=no
3497 fi
3498 rm -f conftest*
3499
3500 fi
3501 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3502 if test $ac_cv_type_off_t = no; then
3503   cat >> confdefs.h <<\EOF
3504 #define off_t long
3505 EOF
3506
3507 fi
3508
3509 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3510 echo "configure:3511: checking for size_t" >&5
3511 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3512   echo $ac_n "(cached) $ac_c" 1>&6
3513 else
3514   cat > conftest.$ac_ext <<EOF
3515 #line 3516 "configure"
3516 #include "confdefs.h"
3517 #include <sys/types.h>
3518 #if STDC_HEADERS
3519 #include <stdlib.h>
3520 #include <stddef.h>
3521 #endif
3522 EOF
3523 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3524   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3525   rm -rf conftest*
3526   ac_cv_type_size_t=yes
3527 else
3528   rm -rf conftest*
3529   ac_cv_type_size_t=no
3530 fi
3531 rm -f conftest*
3532
3533 fi
3534 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3535 if test $ac_cv_type_size_t = no; then
3536   cat >> confdefs.h <<\EOF
3537 #define size_t unsigned
3538 EOF
3539
3540 fi
3541
3542 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3543 echo "configure:3544: checking for pid_t" >&5
3544 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3545   echo $ac_n "(cached) $ac_c" 1>&6
3546 else
3547   cat > conftest.$ac_ext <<EOF
3548 #line 3549 "configure"
3549 #include "confdefs.h"
3550 #include <sys/types.h>
3551 #if STDC_HEADERS
3552 #include <stdlib.h>
3553 #include <stddef.h>
3554 #endif
3555 EOF
3556 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3557   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3558   rm -rf conftest*
3559   ac_cv_type_pid_t=yes
3560 else
3561   rm -rf conftest*
3562   ac_cv_type_pid_t=no
3563 fi
3564 rm -f conftest*
3565
3566 fi
3567 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3568 if test $ac_cv_type_pid_t = no; then
3569   cat >> confdefs.h <<\EOF
3570 #define pid_t int
3571 EOF
3572
3573 fi
3574
3575 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3576 echo "configure:3577: checking for st_rdev in struct stat" >&5
3577 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3578   echo $ac_n "(cached) $ac_c" 1>&6
3579 else
3580   cat > conftest.$ac_ext <<EOF
3581 #line 3582 "configure"
3582 #include "confdefs.h"
3583 #include <sys/types.h>
3584 #include <sys/stat.h>
3585 int main() {
3586 struct stat s; s.st_rdev;
3587 ; return 0; }
3588 EOF
3589 if { (eval echo configure:3590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3590   rm -rf conftest*
3591   ac_cv_struct_st_rdev=yes
3592 else
3593   echo "configure: failed program was:" >&5
3594   cat conftest.$ac_ext >&5
3595   rm -rf conftest*
3596   ac_cv_struct_st_rdev=no
3597 fi
3598 rm -f conftest*
3599 fi
3600
3601 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3602 if test $ac_cv_struct_st_rdev = yes; then
3603   cat >> confdefs.h <<\EOF
3604 #define HAVE_ST_RDEV 1
3605 EOF
3606
3607 fi
3608
3609 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3610 echo "configure:3611: checking for d_off in dirent" >&5
3611 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3612   echo $ac_n "(cached) $ac_c" 1>&6
3613 else
3614   cat > conftest.$ac_ext <<EOF
3615 #line 3616 "configure"
3616 #include "confdefs.h"
3617
3618 #include <unistd.h>
3619 #include <sys/types.h>
3620 #include <dirent.h>
3621 int main() {
3622 struct dirent d; d.d_off;
3623 ; return 0; }
3624 EOF
3625 if { (eval echo configure:3626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3626   rm -rf conftest*
3627   ac_cv_dirent_d_off=yes
3628 else
3629   echo "configure: failed program was:" >&5
3630   cat conftest.$ac_ext >&5
3631   rm -rf conftest*
3632   ac_cv_dirent_d_off=no
3633 fi
3634 rm -f conftest*
3635 fi
3636
3637 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3638 if test $ac_cv_dirent_d_off = yes; then
3639   cat >> confdefs.h <<\EOF
3640 #define HAVE_DIRENT_D_OFF 1
3641 EOF
3642
3643 fi
3644
3645 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3646 echo "configure:3647: checking for ino_t" >&5
3647 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3648   echo $ac_n "(cached) $ac_c" 1>&6
3649 else
3650   cat > conftest.$ac_ext <<EOF
3651 #line 3652 "configure"
3652 #include "confdefs.h"
3653 #include <sys/types.h>
3654 #if STDC_HEADERS
3655 #include <stdlib.h>
3656 #include <stddef.h>
3657 #endif
3658 EOF
3659 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3660   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3661   rm -rf conftest*
3662   ac_cv_type_ino_t=yes
3663 else
3664   rm -rf conftest*
3665   ac_cv_type_ino_t=no
3666 fi
3667 rm -f conftest*
3668
3669 fi
3670 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3671 if test $ac_cv_type_ino_t = no; then
3672   cat >> confdefs.h <<\EOF
3673 #define ino_t unsigned
3674 EOF
3675
3676 fi
3677
3678 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3679 echo "configure:3680: checking for loff_t" >&5
3680 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3681   echo $ac_n "(cached) $ac_c" 1>&6
3682 else
3683   cat > conftest.$ac_ext <<EOF
3684 #line 3685 "configure"
3685 #include "confdefs.h"
3686 #include <sys/types.h>
3687 #if STDC_HEADERS
3688 #include <stdlib.h>
3689 #include <stddef.h>
3690 #endif
3691 EOF
3692 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3693   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3694   rm -rf conftest*
3695   ac_cv_type_loff_t=yes
3696 else
3697   rm -rf conftest*
3698   ac_cv_type_loff_t=no
3699 fi
3700 rm -f conftest*
3701
3702 fi
3703 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3704 if test $ac_cv_type_loff_t = no; then
3705   cat >> confdefs.h <<\EOF
3706 #define loff_t off_t
3707 EOF
3708
3709 fi
3710
3711 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3712 echo "configure:3713: checking for offset_t" >&5
3713 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3714   echo $ac_n "(cached) $ac_c" 1>&6
3715 else
3716   cat > conftest.$ac_ext <<EOF
3717 #line 3718 "configure"
3718 #include "confdefs.h"
3719 #include <sys/types.h>
3720 #if STDC_HEADERS
3721 #include <stdlib.h>
3722 #include <stddef.h>
3723 #endif
3724 EOF
3725 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3726   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3727   rm -rf conftest*
3728   ac_cv_type_offset_t=yes
3729 else
3730   rm -rf conftest*
3731   ac_cv_type_offset_t=no
3732 fi
3733 rm -f conftest*
3734
3735 fi
3736 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3737 if test $ac_cv_type_offset_t = no; then
3738   cat >> confdefs.h <<\EOF
3739 #define offset_t loff_t
3740 EOF
3741
3742 fi
3743
3744 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3745 echo "configure:3746: checking for ssize_t" >&5
3746 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3747   echo $ac_n "(cached) $ac_c" 1>&6
3748 else
3749   cat > conftest.$ac_ext <<EOF
3750 #line 3751 "configure"
3751 #include "confdefs.h"
3752 #include <sys/types.h>
3753 #if STDC_HEADERS
3754 #include <stdlib.h>
3755 #include <stddef.h>
3756 #endif
3757 EOF
3758 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3759   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3760   rm -rf conftest*
3761   ac_cv_type_ssize_t=yes
3762 else
3763   rm -rf conftest*
3764   ac_cv_type_ssize_t=no
3765 fi
3766 rm -f conftest*
3767
3768 fi
3769 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3770 if test $ac_cv_type_ssize_t = no; then
3771   cat >> confdefs.h <<\EOF
3772 #define ssize_t int
3773 EOF
3774
3775 fi
3776
3777 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3778 echo "configure:3779: checking for wchar_t" >&5
3779 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3780   echo $ac_n "(cached) $ac_c" 1>&6
3781 else
3782   cat > conftest.$ac_ext <<EOF
3783 #line 3784 "configure"
3784 #include "confdefs.h"
3785 #include <sys/types.h>
3786 #if STDC_HEADERS
3787 #include <stdlib.h>
3788 #include <stddef.h>
3789 #endif
3790 EOF
3791 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3792   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3793   rm -rf conftest*
3794   ac_cv_type_wchar_t=yes
3795 else
3796   rm -rf conftest*
3797   ac_cv_type_wchar_t=no
3798 fi
3799 rm -f conftest*
3800
3801 fi
3802 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3803 if test $ac_cv_type_wchar_t = no; then
3804   cat >> confdefs.h <<\EOF
3805 #define wchar_t unsigned short
3806 EOF
3807
3808 fi
3809
3810
3811 # we need libcups for CUPS support...
3812 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3813 echo "configure:3814: checking for httpConnect in -lcups" >&5
3814 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3815 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3816   echo $ac_n "(cached) $ac_c" 1>&6
3817 else
3818   ac_save_LIBS="$LIBS"
3819 LIBS="-lcups  $LIBS"
3820 cat > conftest.$ac_ext <<EOF
3821 #line 3822 "configure"
3822 #include "confdefs.h"
3823 /* Override any gcc2 internal prototype to avoid an error.  */
3824 /* We use char because int might match the return type of a gcc2
3825     builtin and then its argument prototype would still apply.  */
3826 char httpConnect();
3827
3828 int main() {
3829 httpConnect()
3830 ; return 0; }
3831 EOF
3832 if { (eval echo configure:3833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3833   rm -rf conftest*
3834   eval "ac_cv_lib_$ac_lib_var=yes"
3835 else
3836   echo "configure: failed program was:" >&5
3837   cat conftest.$ac_ext >&5
3838   rm -rf conftest*
3839   eval "ac_cv_lib_$ac_lib_var=no"
3840 fi
3841 rm -f conftest*
3842 LIBS="$ac_save_LIBS"
3843
3844 fi
3845 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3846   echo "$ac_t""yes" 1>&6
3847     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3848     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3849   cat >> confdefs.h <<EOF
3850 #define $ac_tr_lib 1
3851 EOF
3852
3853   LIBS="-lcups $LIBS"
3854
3855 else
3856   echo "$ac_t""no" 1>&6
3857 fi
3858
3859
3860 # we need libdl for PAM and the new VFS code
3861 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3862 echo "configure:3863: checking for dlopen in -ldl" >&5
3863 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3864 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3865   echo $ac_n "(cached) $ac_c" 1>&6
3866 else
3867   ac_save_LIBS="$LIBS"
3868 LIBS="-ldl  $LIBS"
3869 cat > conftest.$ac_ext <<EOF
3870 #line 3871 "configure"
3871 #include "confdefs.h"
3872 /* Override any gcc2 internal prototype to avoid an error.  */
3873 /* We use char because int might match the return type of a gcc2
3874     builtin and then its argument prototype would still apply.  */
3875 char dlopen();
3876
3877 int main() {
3878 dlopen()
3879 ; return 0; }
3880 EOF
3881 if { (eval echo configure:3882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3882   rm -rf conftest*
3883   eval "ac_cv_lib_$ac_lib_var=yes"
3884 else
3885   echo "configure: failed program was:" >&5
3886   cat conftest.$ac_ext >&5
3887   rm -rf conftest*
3888   eval "ac_cv_lib_$ac_lib_var=no"
3889 fi
3890 rm -f conftest*
3891 LIBS="$ac_save_LIBS"
3892
3893 fi
3894 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3895   echo "$ac_t""yes" 1>&6
3896   LIBS="$LIBS -ldl";
3897         cat >> confdefs.h <<\EOF
3898 #define HAVE_LIBDL 1
3899 EOF
3900
3901 else
3902   echo "$ac_t""no" 1>&6
3903 fi
3904
3905
3906 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3907 echo "configure:3908: checking for socklen_t type" >&5
3908 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3909   echo $ac_n "(cached) $ac_c" 1>&6
3910 else
3911   
3912     cat > conftest.$ac_ext <<EOF
3913 #line 3914 "configure"
3914 #include "confdefs.h"
3915
3916 #include <sys/types.h>
3917 #if STDC_HEADERS
3918 #include <stdlib.h>
3919 #include <stddef.h>
3920 #endif
3921 #include <sys/socket.h>
3922 int main() {
3923 socklen_t i = 0
3924 ; return 0; }
3925 EOF
3926 if { (eval echo configure:3927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3927   rm -rf conftest*
3928   samba_cv_socklen_t=yes
3929 else
3930   echo "configure: failed program was:" >&5
3931   cat conftest.$ac_ext >&5
3932   rm -rf conftest*
3933   samba_cv_socklen_t=no
3934 fi
3935 rm -f conftest*
3936 fi
3937
3938 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3939 if test x"$samba_cv_socklen_t" = x"yes"; then
3940    cat >> confdefs.h <<\EOF
3941 #define HAVE_SOCKLEN_T_TYPE 1
3942 EOF
3943
3944 fi
3945
3946 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3947 echo "configure:3948: checking for sig_atomic_t type" >&5
3948 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3949   echo $ac_n "(cached) $ac_c" 1>&6
3950 else
3951   
3952     cat > conftest.$ac_ext <<EOF
3953 #line 3954 "configure"
3954 #include "confdefs.h"
3955
3956 #include <sys/types.h>
3957 #if STDC_HEADERS
3958 #include <stdlib.h>
3959 #include <stddef.h>
3960 #endif
3961 #include <signal.h>
3962 int main() {
3963 sig_atomic_t i = 0
3964 ; return 0; }
3965 EOF
3966 if { (eval echo configure:3967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3967   rm -rf conftest*
3968   samba_cv_sig_atomic_t=yes
3969 else
3970   echo "configure: failed program was:" >&5
3971   cat conftest.$ac_ext >&5
3972   rm -rf conftest*
3973   samba_cv_sig_atomic_t=no
3974 fi
3975 rm -f conftest*
3976 fi
3977
3978 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3979 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3980    cat >> confdefs.h <<\EOF
3981 #define HAVE_SIG_ATOMIC_T_TYPE 1
3982 EOF
3983
3984 fi
3985
3986 # stupid headers have the functions but no declaration. grrrr.
3987
3988  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
3989 echo "configure:3990: checking for errno declaration" >&5
3990 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
3991   echo $ac_n "(cached) $ac_c" 1>&6
3992 else
3993   
3994     cat > conftest.$ac_ext <<EOF
3995 #line 3996 "configure"
3996 #include "confdefs.h"
3997 #include <errno.h>
3998 int main() {
3999 int i = (int)errno
4000 ; return 0; }
4001 EOF
4002 if { (eval echo configure:4003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4003   rm -rf conftest*
4004   ac_cv_have_errno_decl=yes
4005 else
4006   echo "configure: failed program was:" >&5
4007   cat conftest.$ac_ext >&5
4008   rm -rf conftest*
4009   ac_cv_have_errno_decl=no
4010 fi
4011 rm -f conftest*
4012 fi
4013
4014 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
4015  if test x"$ac_cv_have_errno_decl" = x"yes"; then
4016     cat >> confdefs.h <<\EOF
4017 #define HAVE_ERRNO_DECL 1
4018 EOF
4019
4020  fi
4021
4022
4023  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
4024 echo "configure:4025: checking for setresuid declaration" >&5
4025 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
4026   echo $ac_n "(cached) $ac_c" 1>&6
4027 else
4028   
4029     cat > conftest.$ac_ext <<EOF
4030 #line 4031 "configure"
4031 #include "confdefs.h"
4032 #include <unistd.h>
4033 int main() {
4034 int i = (int)setresuid
4035 ; return 0; }
4036 EOF
4037 if { (eval echo configure:4038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4038   rm -rf conftest*
4039   ac_cv_have_setresuid_decl=yes
4040 else
4041   echo "configure: failed program was:" >&5
4042   cat conftest.$ac_ext >&5
4043   rm -rf conftest*
4044   ac_cv_have_setresuid_decl=no
4045 fi
4046 rm -f conftest*
4047 fi
4048
4049 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
4050  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
4051     cat >> confdefs.h <<\EOF
4052 #define HAVE_SETRESUID_DECL 1
4053 EOF
4054
4055  fi
4056
4057
4058  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
4059 echo "configure:4060: checking for setresgid declaration" >&5
4060 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
4061   echo $ac_n "(cached) $ac_c" 1>&6
4062 else
4063   
4064     cat > conftest.$ac_ext <<EOF
4065 #line 4066 "configure"
4066 #include "confdefs.h"
4067 #include <unistd.h>
4068 int main() {
4069 int i = (int)setresgid
4070 ; return 0; }
4071 EOF
4072 if { (eval echo configure:4073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4073   rm -rf conftest*
4074   ac_cv_have_setresgid_decl=yes
4075 else
4076   echo "configure: failed program was:" >&5
4077   cat conftest.$ac_ext >&5
4078   rm -rf conftest*
4079   ac_cv_have_setresgid_decl=no
4080 fi
4081 rm -f conftest*
4082 fi
4083
4084 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
4085  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
4086     cat >> confdefs.h <<\EOF
4087 #define HAVE_SETRESGID_DECL 1
4088 EOF
4089
4090  fi
4091
4092
4093  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
4094 echo "configure:4095: checking for asprintf declaration" >&5
4095 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
4096   echo $ac_n "(cached) $ac_c" 1>&6
4097 else
4098   
4099     cat > conftest.$ac_ext <<EOF
4100 #line 4101 "configure"
4101 #include "confdefs.h"
4102 #include <stdio.h>
4103 int main() {
4104 int i = (int)asprintf
4105 ; return 0; }
4106 EOF
4107 if { (eval echo configure:4108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4108   rm -rf conftest*
4109   ac_cv_have_asprintf_decl=yes
4110 else
4111   echo "configure: failed program was:" >&5
4112   cat conftest.$ac_ext >&5
4113   rm -rf conftest*
4114   ac_cv_have_asprintf_decl=no
4115 fi
4116 rm -f conftest*
4117 fi
4118
4119 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
4120  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
4121     cat >> confdefs.h <<\EOF
4122 #define HAVE_ASPRINTF_DECL 1
4123 EOF
4124
4125  fi
4126
4127
4128  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
4129 echo "configure:4130: checking for vasprintf declaration" >&5
4130 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
4131   echo $ac_n "(cached) $ac_c" 1>&6
4132 else
4133   
4134     cat > conftest.$ac_ext <<EOF
4135 #line 4136 "configure"
4136 #include "confdefs.h"
4137 #include <stdio.h>
4138 int main() {
4139 int i = (int)vasprintf
4140 ; return 0; }
4141 EOF
4142 if { (eval echo configure:4143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4143   rm -rf conftest*
4144   ac_cv_have_vasprintf_decl=yes
4145 else
4146   echo "configure: failed program was:" >&5
4147   cat conftest.$ac_ext >&5
4148   rm -rf conftest*
4149   ac_cv_have_vasprintf_decl=no
4150 fi
4151 rm -f conftest*
4152 fi
4153
4154 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
4155  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
4156     cat >> confdefs.h <<\EOF
4157 #define HAVE_VASPRINTF_DECL 1
4158 EOF
4159
4160  fi
4161
4162
4163  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
4164 echo "configure:4165: checking for vsnprintf declaration" >&5
4165 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
4166   echo $ac_n "(cached) $ac_c" 1>&6
4167 else
4168   
4169     cat > conftest.$ac_ext <<EOF
4170 #line 4171 "configure"
4171 #include "confdefs.h"
4172 #include <stdio.h>
4173 int main() {
4174 int i = (int)vsnprintf
4175 ; return 0; }
4176 EOF
4177 if { (eval echo configure:4178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4178   rm -rf conftest*
4179   ac_cv_have_vsnprintf_decl=yes
4180 else
4181   echo "configure: failed program was:" >&5
4182   cat conftest.$ac_ext >&5
4183   rm -rf conftest*
4184   ac_cv_have_vsnprintf_decl=no
4185 fi
4186 rm -f conftest*
4187 fi
4188
4189 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
4190  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
4191     cat >> confdefs.h <<\EOF
4192 #define HAVE_VSNPRINTF_DECL 1
4193 EOF
4194
4195  fi
4196
4197
4198  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
4199 echo "configure:4200: checking for snprintf declaration" >&5
4200 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
4201   echo $ac_n "(cached) $ac_c" 1>&6
4202 else
4203   
4204     cat > conftest.$ac_ext <<EOF
4205 #line 4206 "configure"
4206 #include "confdefs.h"
4207 #include <stdio.h>
4208 int main() {
4209 int i = (int)snprintf
4210 ; return 0; }
4211 EOF
4212 if { (eval echo configure:4213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4213   rm -rf conftest*
4214   ac_cv_have_snprintf_decl=yes
4215 else
4216   echo "configure: failed program was:" >&5
4217   cat conftest.$ac_ext >&5
4218   rm -rf conftest*
4219   ac_cv_have_snprintf_decl=no
4220 fi
4221 rm -f conftest*
4222 fi
4223
4224 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
4225  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
4226     cat >> confdefs.h <<\EOF
4227 #define HAVE_SNPRINTF_DECL 1
4228 EOF
4229
4230  fi
4231
4232
4233 # and glibc has setresuid under linux but the function does
4234 # nothing until kernel 2.1.44! very dumb.
4235 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
4236 echo "configure:4237: checking for real setresuid" >&5
4237 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
4238   echo $ac_n "(cached) $ac_c" 1>&6
4239 else
4240   
4241     if test "$cross_compiling" = yes; then
4242   samba_cv_have_setresuid=cross
4243 else
4244   cat > conftest.$ac_ext <<EOF
4245 #line 4246 "configure"
4246 #include "confdefs.h"
4247 #include <errno.h>
4248 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4249 EOF
4250 if { (eval echo configure:4251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4251 then
4252   samba_cv_have_setresuid=yes
4253 else
4254   echo "configure: failed program was:" >&5
4255   cat conftest.$ac_ext >&5
4256   rm -fr conftest*
4257   samba_cv_have_setresuid=no
4258 fi
4259 rm -fr conftest*
4260 fi
4261
4262 fi
4263
4264 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4265 if test x"$samba_cv_have_setresuid" = x"yes"; then
4266     cat >> confdefs.h <<\EOF
4267 #define HAVE_SETRESUID 1
4268 EOF
4269
4270 fi
4271
4272 # Do the same check for setresguid...
4273 #
4274 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4275 echo "configure:4276: checking for real setresgid" >&5
4276 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4277   echo $ac_n "(cached) $ac_c" 1>&6
4278 else
4279   
4280     if test "$cross_compiling" = yes; then
4281   samba_cv_have_setresgid=cross
4282 else
4283   cat > conftest.$ac_ext <<EOF
4284 #line 4285 "configure"
4285 #include "confdefs.h"
4286 #include <unistd.h>
4287 #include <errno.h>
4288 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4289 EOF
4290 if { (eval echo configure:4291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4291 then
4292   samba_cv_have_setresgid=yes
4293 else
4294   echo "configure: failed program was:" >&5
4295   cat conftest.$ac_ext >&5
4296   rm -fr conftest*
4297   samba_cv_have_setresgid=no
4298 fi
4299 rm -fr conftest*
4300 fi
4301
4302 fi
4303
4304 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4305 if test x"$samba_cv_have_setresgid" = x"yes"; then
4306     cat >> confdefs.h <<\EOF
4307 #define HAVE_SETRESGID 1
4308 EOF
4309
4310 fi
4311
4312 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4313 echo "configure:4314: checking for 8-bit clean memcmp" >&5
4314 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4315   echo $ac_n "(cached) $ac_c" 1>&6
4316 else
4317   if test "$cross_compiling" = yes; then
4318   ac_cv_func_memcmp_clean=no
4319 else
4320   cat > conftest.$ac_ext <<EOF
4321 #line 4322 "configure"
4322 #include "confdefs.h"
4323
4324 main()
4325 {
4326   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4327   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4328 }
4329
4330 EOF
4331 if { (eval echo configure:4332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4332 then
4333   ac_cv_func_memcmp_clean=yes
4334 else
4335   echo "configure: failed program was:" >&5
4336   cat conftest.$ac_ext >&5
4337   rm -fr conftest*
4338   ac_cv_func_memcmp_clean=no
4339 fi
4340 rm -fr conftest*
4341 fi
4342
4343 fi
4344
4345 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4346 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4347
4348
4349 ###############################################
4350 # test for where we get crypt() from
4351 for ac_func in crypt
4352 do
4353 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4354 echo "configure:4355: checking for $ac_func" >&5
4355 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4356   echo $ac_n "(cached) $ac_c" 1>&6
4357 else
4358   cat > conftest.$ac_ext <<EOF
4359 #line 4360 "configure"
4360 #include "confdefs.h"
4361 /* System header to define __stub macros and hopefully few prototypes,
4362     which can conflict with char $ac_func(); below.  */
4363 #include <assert.h>
4364 /* Override any gcc2 internal prototype to avoid an error.  */
4365 /* We use char because int might match the return type of a gcc2
4366     builtin and then its argument prototype would still apply.  */
4367 char $ac_func();
4368
4369 int main() {
4370
4371 /* The GNU C library defines this for functions which it implements
4372     to always fail with ENOSYS.  Some functions are actually named
4373     something starting with __ and the normal name is an alias.  */
4374 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4375 choke me
4376 #else
4377 $ac_func();
4378 #endif
4379
4380 ; return 0; }
4381 EOF
4382 if { (eval echo configure:4383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4383   rm -rf conftest*
4384   eval "ac_cv_func_$ac_func=yes"
4385 else
4386   echo "configure: failed program was:" >&5
4387   cat conftest.$ac_ext >&5
4388   rm -rf conftest*
4389   eval "ac_cv_func_$ac_func=no"
4390 fi
4391 rm -f conftest*
4392 fi
4393
4394 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4395   echo "$ac_t""yes" 1>&6
4396     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4397   cat >> confdefs.h <<EOF
4398 #define $ac_tr_func 1
4399 EOF
4400  
4401 else
4402   echo "$ac_t""no" 1>&6
4403 fi
4404 done
4405
4406 if test x"$ac_cv_func_crypt" = x"no"; then
4407     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4408 echo "configure:4409: checking for crypt in -lcrypt" >&5
4409 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4410 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4411   echo $ac_n "(cached) $ac_c" 1>&6
4412 else
4413   ac_save_LIBS="$LIBS"
4414 LIBS="-lcrypt  $LIBS"
4415 cat > conftest.$ac_ext <<EOF
4416 #line 4417 "configure"
4417 #include "confdefs.h"
4418 /* Override any gcc2 internal prototype to avoid an error.  */
4419 /* We use char because int might match the return type of a gcc2
4420     builtin and then its argument prototype would still apply.  */
4421 char crypt();
4422
4423 int main() {
4424 crypt()
4425 ; return 0; }
4426 EOF
4427 if { (eval echo configure:4428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4428   rm -rf conftest*
4429   eval "ac_cv_lib_$ac_lib_var=yes"
4430 else
4431   echo "configure: failed program was:" >&5
4432   cat conftest.$ac_ext >&5
4433   rm -rf conftest*
4434   eval "ac_cv_lib_$ac_lib_var=no"
4435 fi
4436 rm -f conftest*
4437 LIBS="$ac_save_LIBS"
4438
4439 fi
4440 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4441   echo "$ac_t""yes" 1>&6
4442   LIBS="$LIBS -lcrypt";
4443         cat >> confdefs.h <<\EOF
4444 #define HAVE_CRYPT 1
4445 EOF
4446
4447 else
4448   echo "$ac_t""no" 1>&6
4449 fi
4450
4451 fi
4452
4453
4454 ###############################################
4455 # Readline included by default unless explicitly asked not to
4456 test "${with_readline+set}" != "set" && with_readline=yes
4457
4458 # test for where we get readline() from
4459 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4460 echo "configure:4461: checking whether to use readline" >&5
4461 # Check whether --with-readline or --without-readline was given.
4462 if test "${with_readline+set}" = set; then
4463   withval="$with_readline"
4464     case "$with_readline" in
4465   yes)
4466     echo "$ac_t""yes" 1>&6
4467
4468     for ac_hdr in readline.h history.h readline/readline.h
4469 do
4470 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4471 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4472 echo "configure:4473: checking for $ac_hdr" >&5
4473 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4474   echo $ac_n "(cached) $ac_c" 1>&6
4475 else
4476   cat > conftest.$ac_ext <<EOF
4477 #line 4478 "configure"
4478 #include "confdefs.h"
4479 #include <$ac_hdr>
4480 EOF
4481 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4482 { (eval echo configure:4483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4483 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4484 if test -z "$ac_err"; then
4485   rm -rf conftest*
4486   eval "ac_cv_header_$ac_safe=yes"
4487 else
4488   echo "$ac_err" >&5
4489   echo "configure: failed program was:" >&5
4490   cat conftest.$ac_ext >&5
4491   rm -rf conftest*
4492   eval "ac_cv_header_$ac_safe=no"
4493 fi
4494 rm -f conftest*
4495 fi
4496 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4497   echo "$ac_t""yes" 1>&6
4498     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4499   cat >> confdefs.h <<EOF
4500 #define $ac_tr_hdr 1
4501 EOF
4502  
4503 else
4504   echo "$ac_t""no" 1>&6
4505 fi
4506 done
4507
4508     for ac_hdr in readline/history.h
4509 do
4510 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4511 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4512 echo "configure:4513: checking for $ac_hdr" >&5
4513 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4514   echo $ac_n "(cached) $ac_c" 1>&6
4515 else
4516   cat > conftest.$ac_ext <<EOF
4517 #line 4518 "configure"
4518 #include "confdefs.h"
4519 #include <$ac_hdr>
4520 EOF
4521 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4522 { (eval echo configure:4523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4523 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4524 if test -z "$ac_err"; then
4525   rm -rf conftest*
4526   eval "ac_cv_header_$ac_safe=yes"
4527 else
4528   echo "$ac_err" >&5
4529   echo "configure: failed program was:" >&5
4530   cat conftest.$ac_ext >&5
4531   rm -rf conftest*
4532   eval "ac_cv_header_$ac_safe=no"
4533 fi
4534 rm -f conftest*
4535 fi
4536 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4537   echo "$ac_t""yes" 1>&6
4538     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4539   cat >> confdefs.h <<EOF
4540 #define $ac_tr_hdr 1
4541 EOF
4542  
4543 else
4544   echo "$ac_t""no" 1>&6
4545 fi
4546 done
4547
4548
4549     for ac_hdr in readline.h readline/readline.h
4550 do
4551 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4552 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4553 echo "configure:4554: checking for $ac_hdr" >&5
4554 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4555   echo $ac_n "(cached) $ac_c" 1>&6
4556 else
4557   cat > conftest.$ac_ext <<EOF
4558 #line 4559 "configure"
4559 #include "confdefs.h"
4560 #include <$ac_hdr>
4561 EOF
4562 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4563 { (eval echo configure:4564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4564 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4565 if test -z "$ac_err"; then
4566   rm -rf conftest*
4567   eval "ac_cv_header_$ac_safe=yes"
4568 else
4569   echo "$ac_err" >&5
4570   echo "configure: failed program was:" >&5
4571   cat conftest.$ac_ext >&5
4572   rm -rf conftest*
4573   eval "ac_cv_header_$ac_safe=no"
4574 fi
4575 rm -f conftest*
4576 fi
4577 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4578   echo "$ac_t""yes" 1>&6
4579     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4580   cat >> confdefs.h <<EOF
4581 #define $ac_tr_hdr 1
4582 EOF
4583  
4584       for termlib in ncurses curses termcap terminfo termlib; do
4585        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4586 echo "configure:4587: checking for tgetent in -l${termlib}" >&5
4587 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4588 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4589   echo $ac_n "(cached) $ac_c" 1>&6
4590 else
4591   ac_save_LIBS="$LIBS"
4592 LIBS="-l${termlib}  $LIBS"
4593 cat > conftest.$ac_ext <<EOF
4594 #line 4595 "configure"
4595 #include "confdefs.h"
4596 /* Override any gcc2 internal prototype to avoid an error.  */
4597 /* We use char because int might match the return type of a gcc2
4598     builtin and then its argument prototype would still apply.  */
4599 char tgetent();
4600
4601 int main() {
4602 tgetent()
4603 ; return 0; }
4604 EOF
4605 if { (eval echo configure:4606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4606   rm -rf conftest*
4607   eval "ac_cv_lib_$ac_lib_var=yes"
4608 else
4609   echo "configure: failed program was:" >&5
4610   cat conftest.$ac_ext >&5
4611   rm -rf conftest*
4612   eval "ac_cv_lib_$ac_lib_var=no"
4613 fi
4614 rm -f conftest*
4615 LIBS="$ac_save_LIBS"
4616
4617 fi
4618 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4619   echo "$ac_t""yes" 1>&6
4620   TERMLIBS="-l${termlib}"; break
4621 else
4622   echo "$ac_t""no" 1>&6
4623 fi
4624
4625       done
4626       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4627 echo "configure:4628: checking for rl_callback_handler_install in -lreadline" >&5
4628 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4629 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4630   echo $ac_n "(cached) $ac_c" 1>&6
4631 else
4632   ac_save_LIBS="$LIBS"
4633 LIBS="-lreadline $TERMLIBS $LIBS"
4634 cat > conftest.$ac_ext <<EOF
4635 #line 4636 "configure"
4636 #include "confdefs.h"
4637 /* Override any gcc2 internal prototype to avoid an error.  */
4638 /* We use char because int might match the return type of a gcc2
4639     builtin and then its argument prototype would still apply.  */
4640 char rl_callback_handler_install();
4641
4642 int main() {
4643 rl_callback_handler_install()
4644 ; return 0; }
4645 EOF
4646 if { (eval echo configure:4647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4647   rm -rf conftest*
4648   eval "ac_cv_lib_$ac_lib_var=yes"
4649 else
4650   echo "configure: failed program was:" >&5
4651   cat conftest.$ac_ext >&5
4652   rm -rf conftest*
4653   eval "ac_cv_lib_$ac_lib_var=no"
4654 fi
4655 rm -f conftest*
4656 LIBS="$ac_save_LIBS"
4657
4658 fi
4659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4660   echo "$ac_t""yes" 1>&6
4661   TERMLIBS="-lreadline $TERMLIBS"
4662        cat >> confdefs.h <<\EOF
4663 #define HAVE_LIBREADLINE 1
4664 EOF
4665
4666        break
4667 else
4668   echo "$ac_t""no" 1>&6
4669 TERMLIBS=
4670 fi
4671
4672 else
4673   echo "$ac_t""no" 1>&6
4674 fi
4675 done
4676
4677     ;;
4678   no)
4679     echo "$ac_t""no" 1>&6
4680     ;;
4681   *)
4682     echo "$ac_t""yes" 1>&6
4683
4684     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4685     # alternate readline path
4686     _ldflags=${LDFLAGS}
4687     _cppflags=${CPPFLAGS}
4688
4689     # Add additional search path
4690     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4691     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4692
4693     for ac_hdr in readline.h history.h readline/readline.h
4694 do
4695 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4696 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4697 echo "configure:4698: checking for $ac_hdr" >&5
4698 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4699   echo $ac_n "(cached) $ac_c" 1>&6
4700 else
4701   cat > conftest.$ac_ext <<EOF
4702 #line 4703 "configure"
4703 #include "confdefs.h"
4704 #include <$ac_hdr>
4705 EOF
4706 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4707 { (eval echo configure:4708: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4708 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4709 if test -z "$ac_err"; then
4710   rm -rf conftest*
4711   eval "ac_cv_header_$ac_safe=yes"
4712 else
4713   echo "$ac_err" >&5
4714   echo "configure: failed program was:" >&5
4715   cat conftest.$ac_ext >&5
4716   rm -rf conftest*
4717   eval "ac_cv_header_$ac_safe=no"
4718 fi
4719 rm -f conftest*
4720 fi
4721 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4722   echo "$ac_t""yes" 1>&6
4723     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4724   cat >> confdefs.h <<EOF
4725 #define $ac_tr_hdr 1
4726 EOF
4727  
4728 else
4729   echo "$ac_t""no" 1>&6
4730 fi
4731 done
4732
4733     for ac_hdr in readline/history.h
4734 do
4735 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4736 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4737 echo "configure:4738: checking for $ac_hdr" >&5
4738 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4739   echo $ac_n "(cached) $ac_c" 1>&6
4740 else
4741   cat > conftest.$ac_ext <<EOF
4742 #line 4743 "configure"
4743 #include "confdefs.h"
4744 #include <$ac_hdr>
4745 EOF
4746 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4747 { (eval echo configure:4748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4748 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4749 if test -z "$ac_err"; then
4750   rm -rf conftest*
4751   eval "ac_cv_header_$ac_safe=yes"
4752 else
4753   echo "$ac_err" >&5
4754   echo "configure: failed program was:" >&5
4755   cat conftest.$ac_ext >&5
4756   rm -rf conftest*
4757   eval "ac_cv_header_$ac_safe=no"
4758 fi
4759 rm -f conftest*
4760 fi
4761 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4762   echo "$ac_t""yes" 1>&6
4763     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4764   cat >> confdefs.h <<EOF
4765 #define $ac_tr_hdr 1
4766 EOF
4767  
4768 else
4769   echo "$ac_t""no" 1>&6
4770 fi
4771 done
4772
4773
4774     for ac_hdr in readline.h readline/readline.h
4775 do
4776 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4777 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4778 echo "configure:4779: checking for $ac_hdr" >&5
4779 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4780   echo $ac_n "(cached) $ac_c" 1>&6
4781 else
4782   cat > conftest.$ac_ext <<EOF
4783 #line 4784 "configure"
4784 #include "confdefs.h"
4785 #include <$ac_hdr>
4786 EOF
4787 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4788 { (eval echo configure:4789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4789 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4790 if test -z "$ac_err"; then
4791   rm -rf conftest*
4792   eval "ac_cv_header_$ac_safe=yes"
4793 else
4794   echo "$ac_err" >&5
4795   echo "configure: failed program was:" >&5
4796   cat conftest.$ac_ext >&5
4797   rm -rf conftest*
4798   eval "ac_cv_header_$ac_safe=no"
4799 fi
4800 rm -f conftest*
4801 fi
4802 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4803   echo "$ac_t""yes" 1>&6
4804     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4805   cat >> confdefs.h <<EOF
4806 #define $ac_tr_hdr 1
4807 EOF
4808  
4809       for termlib in ncurses curses termcap terminfo termlib; do
4810        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4811 echo "configure:4812: checking for tgetent in -l${termlib}" >&5
4812 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4813 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4814   echo $ac_n "(cached) $ac_c" 1>&6
4815 else
4816   ac_save_LIBS="$LIBS"
4817 LIBS="-l${termlib}  $LIBS"
4818 cat > conftest.$ac_ext <<EOF
4819 #line 4820 "configure"
4820 #include "confdefs.h"
4821 /* Override any gcc2 internal prototype to avoid an error.  */
4822 /* We use char because int might match the return type of a gcc2
4823     builtin and then its argument prototype would still apply.  */
4824 char tgetent();
4825
4826 int main() {
4827 tgetent()
4828 ; return 0; }
4829 EOF
4830 if { (eval echo configure:4831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4831   rm -rf conftest*
4832   eval "ac_cv_lib_$ac_lib_var=yes"
4833 else
4834   echo "configure: failed program was:" >&5
4835   cat conftest.$ac_ext >&5
4836   rm -rf conftest*
4837   eval "ac_cv_lib_$ac_lib_var=no"
4838 fi
4839 rm -f conftest*
4840 LIBS="$ac_save_LIBS"
4841
4842 fi
4843 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4844   echo "$ac_t""yes" 1>&6
4845   TERMLIBS="-l${termlib}"; break
4846 else
4847   echo "$ac_t""no" 1>&6
4848 fi
4849
4850       done
4851       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4852 echo "configure:4853: checking for rl_callback_handler_install in -lreadline" >&5
4853 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4854 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4855   echo $ac_n "(cached) $ac_c" 1>&6
4856 else
4857   ac_save_LIBS="$LIBS"
4858 LIBS="-lreadline $TERMLIBS $LIBS"
4859 cat > conftest.$ac_ext <<EOF
4860 #line 4861 "configure"
4861 #include "confdefs.h"
4862 /* Override any gcc2 internal prototype to avoid an error.  */
4863 /* We use char because int might match the return type of a gcc2
4864     builtin and then its argument prototype would still apply.  */
4865 char rl_callback_handler_install();
4866
4867 int main() {
4868 rl_callback_handler_install()
4869 ; return 0; }
4870 EOF
4871 if { (eval echo configure:4872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4872   rm -rf conftest*
4873   eval "ac_cv_lib_$ac_lib_var=yes"
4874 else
4875   echo "configure: failed program was:" >&5
4876   cat conftest.$ac_ext >&5
4877   rm -rf conftest*
4878   eval "ac_cv_lib_$ac_lib_var=no"
4879 fi
4880 rm -f conftest*
4881 LIBS="$ac_save_LIBS"
4882
4883 fi
4884 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4885   echo "$ac_t""yes" 1>&6
4886   TERMLDFLAGS="-L$with_readline/lib"
4887        TERMCPPFLAGS="-I$with_readline/include"
4888        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4889        TERMLIBS="-lreadline $TERMLIBS"
4890        cat >> confdefs.h <<\EOF
4891 #define HAVE_LIBREADLINE 1
4892 EOF
4893
4894        break
4895 else
4896   echo "$ac_t""no" 1>&6
4897 TERMLIBS= CPPFLAGS=$_cppflags
4898 fi
4899
4900 else
4901   echo "$ac_t""no" 1>&6
4902 fi
4903 done
4904
4905
4906     LDFLAGS=$_ldflags
4907     ;;
4908   esac
4909 else
4910   echo "$ac_t""no" 1>&6
4911
4912 fi
4913
4914
4915
4916
4917 # The following test taken from the cvs sources
4918 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4919 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4920 # libsocket.so which has a bad implementation of gethostbyname (it
4921 # only looks in /etc/hosts), so we only look for -lsocket if we need
4922 # it.
4923 for ac_func in connect
4924 do
4925 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4926 echo "configure:4927: checking for $ac_func" >&5
4927 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4928   echo $ac_n "(cached) $ac_c" 1>&6
4929 else
4930   cat > conftest.$ac_ext <<EOF
4931 #line 4932 "configure"
4932 #include "confdefs.h"
4933 /* System header to define __stub macros and hopefully few prototypes,
4934     which can conflict with char $ac_func(); below.  */
4935 #include <assert.h>
4936 /* Override any gcc2 internal prototype to avoid an error.  */
4937 /* We use char because int might match the return type of a gcc2
4938     builtin and then its argument prototype would still apply.  */
4939 char $ac_func();
4940
4941 int main() {
4942
4943 /* The GNU C library defines this for functions which it implements
4944     to always fail with ENOSYS.  Some functions are actually named
4945     something starting with __ and the normal name is an alias.  */
4946 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4947 choke me
4948 #else
4949 $ac_func();
4950 #endif
4951
4952 ; return 0; }
4953 EOF
4954 if { (eval echo configure:4955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4955   rm -rf conftest*
4956   eval "ac_cv_func_$ac_func=yes"
4957 else
4958   echo "configure: failed program was:" >&5
4959   cat conftest.$ac_ext >&5
4960   rm -rf conftest*
4961   eval "ac_cv_func_$ac_func=no"
4962 fi
4963 rm -f conftest*
4964 fi
4965
4966 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4967   echo "$ac_t""yes" 1>&6
4968     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4969   cat >> confdefs.h <<EOF
4970 #define $ac_tr_func 1
4971 EOF
4972  
4973 else
4974   echo "$ac_t""no" 1>&6
4975 fi
4976 done
4977
4978 if test x"$ac_cv_func_connect" = x"no"; then
4979     case "$LIBS" in
4980     *-lnsl*) ;;
4981     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4982 echo "configure:4983: checking for printf in -lnsl_s" >&5
4983 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4984 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4985   echo $ac_n "(cached) $ac_c" 1>&6
4986 else
4987   ac_save_LIBS="$LIBS"
4988 LIBS="-lnsl_s  $LIBS"
4989 cat > conftest.$ac_ext <<EOF
4990 #line 4991 "configure"
4991 #include "confdefs.h"
4992 /* Override any gcc2 internal prototype to avoid an error.  */
4993 /* We use char because int might match the return type of a gcc2
4994     builtin and then its argument prototype would still apply.  */
4995 char printf();
4996
4997 int main() {
4998 printf()
4999 ; return 0; }
5000 EOF
5001 if { (eval echo configure:5002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5002   rm -rf conftest*
5003   eval "ac_cv_lib_$ac_lib_var=yes"
5004 else
5005   echo "configure: failed program was:" >&5
5006   cat conftest.$ac_ext >&5
5007   rm -rf conftest*
5008   eval "ac_cv_lib_$ac_lib_var=no"
5009 fi
5010 rm -f conftest*
5011 LIBS="$ac_save_LIBS"
5012
5013 fi
5014 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5015   echo "$ac_t""yes" 1>&6
5016     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5017     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5018   cat >> confdefs.h <<EOF
5019 #define $ac_tr_lib 1
5020 EOF
5021
5022   LIBS="-lnsl_s $LIBS"
5023
5024 else
5025   echo "$ac_t""no" 1>&6
5026 fi
5027  ;;
5028     esac
5029     case "$LIBS" in
5030     *-lnsl*) ;;
5031     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
5032 echo "configure:5033: checking for printf in -lnsl" >&5
5033 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
5034 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5035   echo $ac_n "(cached) $ac_c" 1>&6
5036 else
5037   ac_save_LIBS="$LIBS"
5038 LIBS="-lnsl  $LIBS"
5039 cat > conftest.$ac_ext <<EOF
5040 #line 5041 "configure"
5041 #include "confdefs.h"
5042 /* Override any gcc2 internal prototype to avoid an error.  */
5043 /* We use char because int might match the return type of a gcc2
5044     builtin and then its argument prototype would still apply.  */
5045 char printf();
5046
5047 int main() {
5048 printf()
5049 ; return 0; }
5050 EOF
5051 if { (eval echo configure:5052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5052   rm -rf conftest*
5053   eval "ac_cv_lib_$ac_lib_var=yes"
5054 else
5055   echo "configure: failed program was:" >&5
5056   cat conftest.$ac_ext >&5
5057   rm -rf conftest*
5058   eval "ac_cv_lib_$ac_lib_var=no"
5059 fi
5060 rm -f conftest*
5061 LIBS="$ac_save_LIBS"
5062
5063 fi
5064 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5065   echo "$ac_t""yes" 1>&6
5066     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5067     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5068   cat >> confdefs.h <<EOF
5069 #define $ac_tr_lib 1
5070 EOF
5071
5072   LIBS="-lnsl $LIBS"
5073
5074 else
5075   echo "$ac_t""no" 1>&6
5076 fi
5077  ;;
5078     esac
5079     case "$LIBS" in
5080     *-lsocket*) ;;
5081     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5082 echo "configure:5083: checking for connect in -lsocket" >&5
5083 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5084 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5085   echo $ac_n "(cached) $ac_c" 1>&6
5086 else
5087   ac_save_LIBS="$LIBS"
5088 LIBS="-lsocket  $LIBS"
5089 cat > conftest.$ac_ext <<EOF
5090 #line 5091 "configure"
5091 #include "confdefs.h"
5092 /* Override any gcc2 internal prototype to avoid an error.  */
5093 /* We use char because int might match the return type of a gcc2
5094     builtin and then its argument prototype would still apply.  */
5095 char connect();
5096
5097 int main() {
5098 connect()
5099 ; return 0; }
5100 EOF
5101 if { (eval echo configure:5102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5102   rm -rf conftest*
5103   eval "ac_cv_lib_$ac_lib_var=yes"
5104 else
5105   echo "configure: failed program was:" >&5
5106   cat conftest.$ac_ext >&5
5107   rm -rf conftest*
5108   eval "ac_cv_lib_$ac_lib_var=no"
5109 fi
5110 rm -f conftest*
5111 LIBS="$ac_save_LIBS"
5112
5113 fi
5114 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5115   echo "$ac_t""yes" 1>&6
5116     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5117     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5118   cat >> confdefs.h <<EOF
5119 #define $ac_tr_lib 1
5120 EOF
5121
5122   LIBS="-lsocket $LIBS"
5123
5124 else
5125   echo "$ac_t""no" 1>&6
5126 fi
5127  ;;
5128     esac
5129     case "$LIBS" in
5130     *-linet*) ;;
5131     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
5132 echo "configure:5133: checking for connect in -linet" >&5
5133 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
5134 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5135   echo $ac_n "(cached) $ac_c" 1>&6
5136 else
5137   ac_save_LIBS="$LIBS"
5138 LIBS="-linet  $LIBS"
5139 cat > conftest.$ac_ext <<EOF
5140 #line 5141 "configure"
5141 #include "confdefs.h"
5142 /* Override any gcc2 internal prototype to avoid an error.  */
5143 /* We use char because int might match the return type of a gcc2
5144     builtin and then its argument prototype would still apply.  */
5145 char connect();
5146
5147 int main() {
5148 connect()
5149 ; return 0; }
5150 EOF
5151 if { (eval echo configure:5152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5152   rm -rf conftest*
5153   eval "ac_cv_lib_$ac_lib_var=yes"
5154 else
5155   echo "configure: failed program was:" >&5
5156   cat conftest.$ac_ext >&5
5157   rm -rf conftest*
5158   eval "ac_cv_lib_$ac_lib_var=no"
5159 fi
5160 rm -f conftest*
5161 LIBS="$ac_save_LIBS"
5162
5163 fi
5164 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5165   echo "$ac_t""yes" 1>&6
5166     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5167     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5168   cat >> confdefs.h <<EOF
5169 #define $ac_tr_lib 1
5170 EOF
5171
5172   LIBS="-linet $LIBS"
5173
5174 else
5175   echo "$ac_t""no" 1>&6
5176 fi
5177  ;;
5178     esac
5179             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
5180        test x"$ac_cv_lib_inet_connect" = x"yes"; then
5181         # ac_cv_func_connect=yes
5182         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
5183         cat >> confdefs.h <<\EOF
5184 #define HAVE_CONNECT 1
5185 EOF
5186
5187     fi
5188 fi
5189
5190 ###############################################
5191 # test for where we get get_yp_default_domain() from
5192 for ac_func in yp_get_default_domain
5193 do
5194 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5195 echo "configure:5196: checking for $ac_func" >&5
5196 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5197   echo $ac_n "(cached) $ac_c" 1>&6
5198 else
5199   cat > conftest.$ac_ext <<EOF
5200 #line 5201 "configure"
5201 #include "confdefs.h"
5202 /* System header to define __stub macros and hopefully few prototypes,
5203     which can conflict with char $ac_func(); below.  */
5204 #include <assert.h>
5205 /* Override any gcc2 internal prototype to avoid an error.  */
5206 /* We use char because int might match the return type of a gcc2
5207     builtin and then its argument prototype would still apply.  */
5208 char $ac_func();
5209
5210 int main() {
5211
5212 /* The GNU C library defines this for functions which it implements
5213     to always fail with ENOSYS.  Some functions are actually named
5214     something starting with __ and the normal name is an alias.  */
5215 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5216 choke me
5217 #else
5218 $ac_func();
5219 #endif
5220
5221 ; return 0; }
5222 EOF
5223 if { (eval echo configure:5224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5224   rm -rf conftest*
5225   eval "ac_cv_func_$ac_func=yes"
5226 else
5227   echo "configure: failed program was:" >&5
5228   cat conftest.$ac_ext >&5
5229   rm -rf conftest*
5230   eval "ac_cv_func_$ac_func=no"
5231 fi
5232 rm -f conftest*
5233 fi
5234
5235 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5236   echo "$ac_t""yes" 1>&6
5237     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5238   cat >> confdefs.h <<EOF
5239 #define $ac_tr_func 1
5240 EOF
5241  
5242 else
5243   echo "$ac_t""no" 1>&6
5244 fi
5245 done
5246
5247 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5248         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5249 echo "configure:5250: checking for yp_get_default_domain in -lnsl" >&5
5250 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5251 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5252   echo $ac_n "(cached) $ac_c" 1>&6
5253 else
5254   ac_save_LIBS="$LIBS"
5255 LIBS="-lnsl  $LIBS"
5256 cat > conftest.$ac_ext <<EOF
5257 #line 5258 "configure"
5258 #include "confdefs.h"
5259 /* Override any gcc2 internal prototype to avoid an error.  */
5260 /* We use char because int might match the return type of a gcc2
5261     builtin and then its argument prototype would still apply.  */
5262 char yp_get_default_domain();
5263
5264 int main() {
5265 yp_get_default_domain()
5266 ; return 0; }
5267 EOF
5268 if { (eval echo configure:5269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5269   rm -rf conftest*
5270   eval "ac_cv_lib_$ac_lib_var=yes"
5271 else
5272   echo "configure: failed program was:" >&5
5273   cat conftest.$ac_ext >&5
5274   rm -rf conftest*
5275   eval "ac_cv_lib_$ac_lib_var=no"
5276 fi
5277 rm -f conftest*
5278 LIBS="$ac_save_LIBS"
5279
5280 fi
5281 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5282   echo "$ac_t""yes" 1>&6
5283   LIBS="$LIBS -lnsl";
5284         cat >> confdefs.h <<\EOF
5285 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5286 EOF
5287
5288 else
5289   echo "$ac_t""no" 1>&6
5290 fi
5291  
5292 fi
5293
5294 # Check if we have execl, if not we need to compile smbrun.
5295 for ac_func in execl
5296 do
5297 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5298 echo "configure:5299: checking for $ac_func" >&5
5299 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5300   echo $ac_n "(cached) $ac_c" 1>&6
5301 else
5302   cat > conftest.$ac_ext <<EOF
5303 #line 5304 "configure"
5304 #include "confdefs.h"
5305 /* System header to define __stub macros and hopefully few prototypes,
5306     which can conflict with char $ac_func(); below.  */
5307 #include <assert.h>
5308 /* Override any gcc2 internal prototype to avoid an error.  */
5309 /* We use char because int might match the return type of a gcc2
5310     builtin and then its argument prototype would still apply.  */
5311 char $ac_func();
5312
5313 int main() {
5314
5315 /* The GNU C library defines this for functions which it implements
5316     to always fail with ENOSYS.  Some functions are actually named
5317     something starting with __ and the normal name is an alias.  */
5318 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5319 choke me
5320 #else
5321 $ac_func();
5322 #endif
5323
5324 ; return 0; }
5325 EOF
5326 if { (eval echo configure:5327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5327   rm -rf conftest*
5328   eval "ac_cv_func_$ac_func=yes"
5329 else
5330   echo "configure: failed program was:" >&5
5331   cat conftest.$ac_ext >&5
5332   rm -rf conftest*
5333   eval "ac_cv_func_$ac_func=no"
5334 fi
5335 rm -f conftest*
5336 fi
5337
5338 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5339   echo "$ac_t""yes" 1>&6
5340     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5341   cat >> confdefs.h <<EOF
5342 #define $ac_tr_func 1
5343 EOF
5344  
5345 else
5346   echo "$ac_t""no" 1>&6
5347 fi
5348 done
5349
5350 if test x"$ac_cv_func_execl" = x"no"; then
5351     RUNPROG="bin/smbrun"
5352 else
5353     RUNPROG=""
5354 fi
5355
5356 for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot
5357 do
5358 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5359 echo "configure:5360: checking for $ac_func" >&5
5360 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5361   echo $ac_n "(cached) $ac_c" 1>&6
5362 else
5363   cat > conftest.$ac_ext <<EOF
5364 #line 5365 "configure"
5365 #include "confdefs.h"
5366 /* System header to define __stub macros and hopefully few prototypes,
5367     which can conflict with char $ac_func(); below.  */
5368 #include <assert.h>
5369 /* Override any gcc2 internal prototype to avoid an error.  */
5370 /* We use char because int might match the return type of a gcc2
5371     builtin and then its argument prototype would still apply.  */
5372 char $ac_func();
5373
5374 int main() {
5375
5376 /* The GNU C library defines this for functions which it implements
5377     to always fail with ENOSYS.  Some functions are actually named
5378     something starting with __ and the normal name is an alias.  */
5379 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5380 choke me
5381 #else
5382 $ac_func();
5383 #endif
5384
5385 ; return 0; }
5386 EOF
5387 if { (eval echo configure:5388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5388   rm -rf conftest*
5389   eval "ac_cv_func_$ac_func=yes"
5390 else
5391   echo "configure: failed program was:" >&5
5392   cat conftest.$ac_ext >&5
5393   rm -rf conftest*
5394   eval "ac_cv_func_$ac_func=no"
5395 fi
5396 rm -f conftest*
5397 fi
5398
5399 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5400   echo "$ac_t""yes" 1>&6
5401     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5402   cat >> confdefs.h <<EOF
5403 #define $ac_tr_func 1
5404 EOF
5405  
5406 else
5407   echo "$ac_t""no" 1>&6
5408 fi
5409 done
5410
5411 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset
5412 do
5413 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5414 echo "configure:5415: checking for $ac_func" >&5
5415 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5416   echo $ac_n "(cached) $ac_c" 1>&6
5417 else
5418   cat > conftest.$ac_ext <<EOF
5419 #line 5420 "configure"
5420 #include "confdefs.h"
5421 /* System header to define __stub macros and hopefully few prototypes,
5422     which can conflict with char $ac_func(); below.  */
5423 #include <assert.h>
5424 /* Override any gcc2 internal prototype to avoid an error.  */
5425 /* We use char because int might match the return type of a gcc2
5426     builtin and then its argument prototype would still apply.  */
5427 char $ac_func();
5428
5429 int main() {
5430
5431 /* The GNU C library defines this for functions which it implements
5432     to always fail with ENOSYS.  Some functions are actually named
5433     something starting with __ and the normal name is an alias.  */
5434 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5435 choke me
5436 #else
5437 $ac_func();
5438 #endif
5439
5440 ; return 0; }
5441 EOF
5442 if { (eval echo configure:5443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5443   rm -rf conftest*
5444   eval "ac_cv_func_$ac_func=yes"
5445 else
5446   echo "configure: failed program was:" >&5
5447   cat conftest.$ac_ext >&5
5448   rm -rf conftest*
5449   eval "ac_cv_func_$ac_func=no"
5450 fi
5451 rm -f conftest*
5452 fi
5453
5454 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5455   echo "$ac_t""yes" 1>&6
5456     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5457   cat >> confdefs.h <<EOF
5458 #define $ac_tr_func 1
5459 EOF
5460  
5461 else
5462   echo "$ac_t""no" 1>&6
5463 fi
5464 done
5465
5466 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5467 do
5468 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5469 echo "configure:5470: checking for $ac_func" >&5
5470 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5471   echo $ac_n "(cached) $ac_c" 1>&6
5472 else
5473   cat > conftest.$ac_ext <<EOF
5474 #line 5475 "configure"
5475 #include "confdefs.h"
5476 /* System header to define __stub macros and hopefully few prototypes,
5477     which can conflict with char $ac_func(); below.  */
5478 #include <assert.h>
5479 /* Override any gcc2 internal prototype to avoid an error.  */
5480 /* We use char because int might match the return type of a gcc2
5481     builtin and then its argument prototype would still apply.  */
5482 char $ac_func();
5483
5484 int main() {
5485
5486 /* The GNU C library defines this for functions which it implements
5487     to always fail with ENOSYS.  Some functions are actually named
5488     something starting with __ and the normal name is an alias.  */
5489 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5490 choke me
5491 #else
5492 $ac_func();
5493 #endif
5494
5495 ; return 0; }
5496 EOF
5497 if { (eval echo configure:5498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5498   rm -rf conftest*
5499   eval "ac_cv_func_$ac_func=yes"
5500 else
5501   echo "configure: failed program was:" >&5
5502   cat conftest.$ac_ext >&5
5503   rm -rf conftest*
5504   eval "ac_cv_func_$ac_func=no"
5505 fi
5506 rm -f conftest*
5507 fi
5508
5509 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5510   echo "$ac_t""yes" 1>&6
5511     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5512   cat >> confdefs.h <<EOF
5513 #define $ac_tr_func 1
5514 EOF
5515  
5516 else
5517   echo "$ac_t""no" 1>&6
5518 fi
5519 done
5520
5521 for ac_func in strftime sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent
5522 do
5523 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5524 echo "configure:5525: checking for $ac_func" >&5
5525 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5526   echo $ac_n "(cached) $ac_c" 1>&6
5527 else
5528   cat > conftest.$ac_ext <<EOF
5529 #line 5530 "configure"
5530 #include "confdefs.h"
5531 /* System header to define __stub macros and hopefully few prototypes,
5532     which can conflict with char $ac_func(); below.  */
5533 #include <assert.h>
5534 /* Override any gcc2 internal prototype to avoid an error.  */
5535 /* We use char because int might match the return type of a gcc2
5536     builtin and then its argument prototype would still apply.  */
5537 char $ac_func();
5538
5539 int main() {
5540
5541 /* The GNU C library defines this for functions which it implements
5542     to always fail with ENOSYS.  Some functions are actually named
5543     something starting with __ and the normal name is an alias.  */
5544 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5545 choke me
5546 #else
5547 $ac_func();
5548 #endif
5549
5550 ; return 0; }
5551 EOF
5552 if { (eval echo configure:5553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5553   rm -rf conftest*
5554   eval "ac_cv_func_$ac_func=yes"
5555 else
5556   echo "configure: failed program was:" >&5
5557   cat conftest.$ac_ext >&5
5558   rm -rf conftest*
5559   eval "ac_cv_func_$ac_func=no"
5560 fi
5561 rm -f conftest*
5562 fi
5563
5564 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5565   echo "$ac_t""yes" 1>&6
5566     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5567   cat >> confdefs.h <<EOF
5568 #define $ac_tr_func 1
5569 EOF
5570  
5571 else
5572   echo "$ac_t""no" 1>&6
5573 fi
5574 done
5575
5576 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
5577 do
5578 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5579 echo "configure:5580: checking for $ac_func" >&5
5580 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5581   echo $ac_n "(cached) $ac_c" 1>&6
5582 else
5583   cat > conftest.$ac_ext <<EOF
5584 #line 5585 "configure"
5585 #include "confdefs.h"
5586 /* System header to define __stub macros and hopefully few prototypes,
5587     which can conflict with char $ac_func(); below.  */
5588 #include <assert.h>
5589 /* Override any gcc2 internal prototype to avoid an error.  */
5590 /* We use char because int might match the return type of a gcc2
5591     builtin and then its argument prototype would still apply.  */
5592 char $ac_func();
5593
5594 int main() {
5595
5596 /* The GNU C library defines this for functions which it implements
5597     to always fail with ENOSYS.  Some functions are actually named
5598     something starting with __ and the normal name is an alias.  */
5599 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5600 choke me
5601 #else
5602 $ac_func();
5603 #endif
5604
5605 ; return 0; }
5606 EOF
5607 if { (eval echo configure:5608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5608   rm -rf conftest*
5609   eval "ac_cv_func_$ac_func=yes"
5610 else
5611   echo "configure: failed program was:" >&5
5612   cat conftest.$ac_ext >&5
5613   rm -rf conftest*
5614   eval "ac_cv_func_$ac_func=no"
5615 fi
5616 rm -f conftest*
5617 fi
5618
5619 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5620   echo "$ac_t""yes" 1>&6
5621     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5622   cat >> confdefs.h <<EOF
5623 #define $ac_tr_func 1
5624 EOF
5625  
5626 else
5627   echo "$ac_t""no" 1>&6
5628 fi
5629 done
5630
5631 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5632 do
5633 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5634 echo "configure:5635: checking for $ac_func" >&5
5635 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5636   echo $ac_n "(cached) $ac_c" 1>&6
5637 else
5638   cat > conftest.$ac_ext <<EOF
5639 #line 5640 "configure"
5640 #include "confdefs.h"
5641 /* System header to define __stub macros and hopefully few prototypes,
5642     which can conflict with char $ac_func(); below.  */
5643 #include <assert.h>
5644 /* Override any gcc2 internal prototype to avoid an error.  */
5645 /* We use char because int might match the return type of a gcc2
5646     builtin and then its argument prototype would still apply.  */
5647 char $ac_func();
5648
5649 int main() {
5650
5651 /* The GNU C library defines this for functions which it implements
5652     to always fail with ENOSYS.  Some functions are actually named
5653     something starting with __ and the normal name is an alias.  */
5654 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5655 choke me
5656 #else
5657 $ac_func();
5658 #endif
5659
5660 ; return 0; }
5661 EOF
5662 if { (eval echo configure:5663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5663   rm -rf conftest*
5664   eval "ac_cv_func_$ac_func=yes"
5665 else
5666   echo "configure: failed program was:" >&5
5667   cat conftest.$ac_ext >&5
5668   rm -rf conftest*
5669   eval "ac_cv_func_$ac_func=no"
5670 fi
5671 rm -f conftest*
5672 fi
5673
5674 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5675   echo "$ac_t""yes" 1>&6
5676     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5677   cat >> confdefs.h <<EOF
5678 #define $ac_tr_func 1
5679 EOF
5680  
5681 else
5682   echo "$ac_t""no" 1>&6
5683 fi
5684 done
5685
5686 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5687 do
5688 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5689 echo "configure:5690: checking for $ac_func" >&5
5690 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5691   echo $ac_n "(cached) $ac_c" 1>&6
5692 else
5693   cat > conftest.$ac_ext <<EOF
5694 #line 5695 "configure"
5695 #include "confdefs.h"
5696 /* System header to define __stub macros and hopefully few prototypes,
5697     which can conflict with char $ac_func(); below.  */
5698 #include <assert.h>
5699 /* Override any gcc2 internal prototype to avoid an error.  */
5700 /* We use char because int might match the return type of a gcc2
5701     builtin and then its argument prototype would still apply.  */
5702 char $ac_func();
5703
5704 int main() {
5705
5706 /* The GNU C library defines this for functions which it implements
5707     to always fail with ENOSYS.  Some functions are actually named
5708     something starting with __ and the normal name is an alias.  */
5709 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5710 choke me
5711 #else
5712 $ac_func();
5713 #endif
5714
5715 ; return 0; }
5716 EOF
5717 if { (eval echo configure:5718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5718   rm -rf conftest*
5719   eval "ac_cv_func_$ac_func=yes"
5720 else
5721   echo "configure: failed program was:" >&5
5722   cat conftest.$ac_ext >&5
5723   rm -rf conftest*
5724   eval "ac_cv_func_$ac_func=no"
5725 fi
5726 rm -f conftest*
5727 fi
5728
5729 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5730   echo "$ac_t""yes" 1>&6
5731     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5732   cat >> confdefs.h <<EOF
5733 #define $ac_tr_func 1
5734 EOF
5735  
5736 else
5737   echo "$ac_t""no" 1>&6
5738 fi
5739 done
5740
5741 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5742 do
5743 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5744 echo "configure:5745: checking for $ac_func" >&5
5745 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5746   echo $ac_n "(cached) $ac_c" 1>&6
5747 else
5748   cat > conftest.$ac_ext <<EOF
5749 #line 5750 "configure"
5750 #include "confdefs.h"
5751 /* System header to define __stub macros and hopefully few prototypes,
5752     which can conflict with char $ac_func(); below.  */
5753 #include <assert.h>
5754 /* Override any gcc2 internal prototype to avoid an error.  */
5755 /* We use char because int might match the return type of a gcc2
5756     builtin and then its argument prototype would still apply.  */
5757 char $ac_func();
5758
5759 int main() {
5760
5761 /* The GNU C library defines this for functions which it implements
5762     to always fail with ENOSYS.  Some functions are actually named
5763     something starting with __ and the normal name is an alias.  */
5764 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5765 choke me
5766 #else
5767 $ac_func();
5768 #endif
5769
5770 ; return 0; }
5771 EOF
5772 if { (eval echo configure:5773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5773   rm -rf conftest*
5774   eval "ac_cv_func_$ac_func=yes"
5775 else
5776   echo "configure: failed program was:" >&5
5777   cat conftest.$ac_ext >&5
5778   rm -rf conftest*
5779   eval "ac_cv_func_$ac_func=no"
5780 fi
5781 rm -f conftest*
5782 fi
5783
5784 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5785   echo "$ac_t""yes" 1>&6
5786     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5787   cat >> confdefs.h <<EOF
5788 #define $ac_tr_func 1
5789 EOF
5790  
5791 else
5792   echo "$ac_t""no" 1>&6
5793 fi
5794 done
5795
5796 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5797 do
5798 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5799 echo "configure:5800: checking for $ac_func" >&5
5800 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5801   echo $ac_n "(cached) $ac_c" 1>&6
5802 else
5803   cat > conftest.$ac_ext <<EOF
5804 #line 5805 "configure"
5805 #include "confdefs.h"
5806 /* System header to define __stub macros and hopefully few prototypes,
5807     which can conflict with char $ac_func(); below.  */
5808 #include <assert.h>
5809 /* Override any gcc2 internal prototype to avoid an error.  */
5810 /* We use char because int might match the return type of a gcc2
5811     builtin and then its argument prototype would still apply.  */
5812 char $ac_func();
5813
5814 int main() {
5815
5816 /* The GNU C library defines this for functions which it implements
5817     to always fail with ENOSYS.  Some functions are actually named
5818     something starting with __ and the normal name is an alias.  */
5819 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5820 choke me
5821 #else
5822 $ac_func();
5823 #endif
5824
5825 ; return 0; }
5826 EOF
5827 if { (eval echo configure:5828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5828   rm -rf conftest*
5829   eval "ac_cv_func_$ac_func=yes"
5830 else
5831   echo "configure: failed program was:" >&5
5832   cat conftest.$ac_ext >&5
5833   rm -rf conftest*
5834   eval "ac_cv_func_$ac_func=no"
5835 fi
5836 rm -f conftest*
5837 fi
5838
5839 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5840   echo "$ac_t""yes" 1>&6
5841     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5842   cat >> confdefs.h <<EOF
5843 #define $ac_tr_func 1
5844 EOF
5845  
5846 else
5847   echo "$ac_t""no" 1>&6
5848 fi
5849 done
5850
5851 # setbuffer is needed for smbtorture
5852 for ac_func in setbuffer
5853 do
5854 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5855 echo "configure:5856: checking for $ac_func" >&5
5856 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5857   echo $ac_n "(cached) $ac_c" 1>&6
5858 else
5859   cat > conftest.$ac_ext <<EOF
5860 #line 5861 "configure"
5861 #include "confdefs.h"
5862 /* System header to define __stub macros and hopefully few prototypes,
5863     which can conflict with char $ac_func(); below.  */
5864 #include <assert.h>
5865 /* Override any gcc2 internal prototype to avoid an error.  */
5866 /* We use char because int might match the return type of a gcc2
5867     builtin and then its argument prototype would still apply.  */
5868 char $ac_func();
5869
5870 int main() {
5871
5872 /* The GNU C library defines this for functions which it implements
5873     to always fail with ENOSYS.  Some functions are actually named
5874     something starting with __ and the normal name is an alias.  */
5875 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5876 choke me
5877 #else
5878 $ac_func();
5879 #endif
5880
5881 ; return 0; }
5882 EOF
5883 if { (eval echo configure:5884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5884   rm -rf conftest*
5885   eval "ac_cv_func_$ac_func=yes"
5886 else
5887   echo "configure: failed program was:" >&5
5888   cat conftest.$ac_ext >&5
5889   rm -rf conftest*
5890   eval "ac_cv_func_$ac_func=no"
5891 fi
5892 rm -f conftest*
5893 fi
5894
5895 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5896   echo "$ac_t""yes" 1>&6
5897     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5898   cat >> confdefs.h <<EOF
5899 #define $ac_tr_func 1
5900 EOF
5901  
5902 else
5903   echo "$ac_t""no" 1>&6
5904 fi
5905 done
5906
5907
5908 # syscall() is needed for smbwrapper.
5909 for ac_func in syscall
5910 do
5911 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5912 echo "configure:5913: checking for $ac_func" >&5
5913 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5914   echo $ac_n "(cached) $ac_c" 1>&6
5915 else
5916   cat > conftest.$ac_ext <<EOF
5917 #line 5918 "configure"
5918 #include "confdefs.h"
5919 /* System header to define __stub macros and hopefully few prototypes,
5920     which can conflict with char $ac_func(); below.  */
5921 #include <assert.h>
5922 /* Override any gcc2 internal prototype to avoid an error.  */
5923 /* We use char because int might match the return type of a gcc2
5924     builtin and then its argument prototype would still apply.  */
5925 char $ac_func();
5926
5927 int main() {
5928
5929 /* The GNU C library defines this for functions which it implements
5930     to always fail with ENOSYS.  Some functions are actually named
5931     something starting with __ and the normal name is an alias.  */
5932 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5933 choke me
5934 #else
5935 $ac_func();
5936 #endif
5937
5938 ; return 0; }
5939 EOF
5940 if { (eval echo configure:5941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5941   rm -rf conftest*
5942   eval "ac_cv_func_$ac_func=yes"
5943 else
5944   echo "configure: failed program was:" >&5
5945   cat conftest.$ac_ext >&5
5946   rm -rf conftest*
5947   eval "ac_cv_func_$ac_func=no"
5948 fi
5949 rm -f conftest*
5950 fi
5951
5952 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5953   echo "$ac_t""yes" 1>&6
5954     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5955   cat >> confdefs.h <<EOF
5956 #define $ac_tr_func 1
5957 EOF
5958  
5959 else
5960   echo "$ac_t""no" 1>&6
5961 fi
5962 done
5963
5964
5965 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5966 do
5967 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5968 echo "configure:5969: checking for $ac_func" >&5
5969 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5970   echo $ac_n "(cached) $ac_c" 1>&6
5971 else
5972   cat > conftest.$ac_ext <<EOF
5973 #line 5974 "configure"
5974 #include "confdefs.h"
5975 /* System header to define __stub macros and hopefully few prototypes,
5976     which can conflict with char $ac_func(); below.  */
5977 #include <assert.h>
5978 /* Override any gcc2 internal prototype to avoid an error.  */
5979 /* We use char because int might match the return type of a gcc2
5980     builtin and then its argument prototype would still apply.  */
5981 char $ac_func();
5982
5983 int main() {
5984
5985 /* The GNU C library defines this for functions which it implements
5986     to always fail with ENOSYS.  Some functions are actually named
5987     something starting with __ and the normal name is an alias.  */
5988 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5989 choke me
5990 #else
5991 $ac_func();
5992 #endif
5993
5994 ; return 0; }
5995 EOF
5996 if { (eval echo configure:5997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5997   rm -rf conftest*
5998   eval "ac_cv_func_$ac_func=yes"
5999 else
6000   echo "configure: failed program was:" >&5
6001   cat conftest.$ac_ext >&5
6002   rm -rf conftest*
6003   eval "ac_cv_func_$ac_func=no"
6004 fi
6005 rm -f conftest*
6006 fi
6007
6008 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6009   echo "$ac_t""yes" 1>&6
6010     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6011   cat >> confdefs.h <<EOF
6012 #define $ac_tr_func 1
6013 EOF
6014  
6015 else
6016   echo "$ac_t""no" 1>&6
6017 fi
6018 done
6019
6020 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
6021 do
6022 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6023 echo "configure:6024: checking for $ac_func" >&5
6024 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6025   echo $ac_n "(cached) $ac_c" 1>&6
6026 else
6027   cat > conftest.$ac_ext <<EOF
6028 #line 6029 "configure"
6029 #include "confdefs.h"
6030 /* System header to define __stub macros and hopefully few prototypes,
6031     which can conflict with char $ac_func(); below.  */
6032 #include <assert.h>
6033 /* Override any gcc2 internal prototype to avoid an error.  */
6034 /* We use char because int might match the return type of a gcc2
6035     builtin and then its argument prototype would still apply.  */
6036 char $ac_func();
6037
6038 int main() {
6039
6040 /* The GNU C library defines this for functions which it implements
6041     to always fail with ENOSYS.  Some functions are actually named
6042     something starting with __ and the normal name is an alias.  */
6043 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6044 choke me
6045 #else
6046 $ac_func();
6047 #endif
6048
6049 ; return 0; }
6050 EOF
6051 if { (eval echo configure:6052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6052   rm -rf conftest*
6053   eval "ac_cv_func_$ac_func=yes"
6054 else
6055   echo "configure: failed program was:" >&5
6056   cat conftest.$ac_ext >&5
6057   rm -rf conftest*
6058   eval "ac_cv_func_$ac_func=no"
6059 fi
6060 rm -f conftest*
6061 fi
6062
6063 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6064   echo "$ac_t""yes" 1>&6
6065     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6066   cat >> confdefs.h <<EOF
6067 #define $ac_tr_func 1
6068 EOF
6069  
6070 else
6071   echo "$ac_t""no" 1>&6
6072 fi
6073 done
6074
6075 for ac_func in __getcwd _getcwd
6076 do
6077 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6078 echo "configure:6079: checking for $ac_func" >&5
6079 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6080   echo $ac_n "(cached) $ac_c" 1>&6
6081 else
6082   cat > conftest.$ac_ext <<EOF
6083 #line 6084 "configure"
6084 #include "confdefs.h"
6085 /* System header to define __stub macros and hopefully few prototypes,
6086     which can conflict with char $ac_func(); below.  */
6087 #include <assert.h>
6088 /* Override any gcc2 internal prototype to avoid an error.  */
6089 /* We use char because int might match the return type of a gcc2
6090     builtin and then its argument prototype would still apply.  */
6091 char $ac_func();
6092
6093 int main() {
6094
6095 /* The GNU C library defines this for functions which it implements
6096     to always fail with ENOSYS.  Some functions are actually named
6097     something starting with __ and the normal name is an alias.  */
6098 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6099 choke me
6100 #else
6101 $ac_func();
6102 #endif
6103
6104 ; return 0; }
6105 EOF
6106 if { (eval echo configure:6107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6107   rm -rf conftest*
6108   eval "ac_cv_func_$ac_func=yes"
6109 else
6110   echo "configure: failed program was:" >&5
6111   cat conftest.$ac_ext >&5
6112   rm -rf conftest*
6113   eval "ac_cv_func_$ac_func=no"
6114 fi
6115 rm -f conftest*
6116 fi
6117
6118 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6119   echo "$ac_t""yes" 1>&6
6120     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6121   cat >> confdefs.h <<EOF
6122 #define $ac_tr_func 1
6123 EOF
6124  
6125 else
6126   echo "$ac_t""no" 1>&6
6127 fi
6128 done
6129
6130 for ac_func in __xstat __fxstat __lxstat
6131 do
6132 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6133 echo "configure:6134: checking for $ac_func" >&5
6134 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6135   echo $ac_n "(cached) $ac_c" 1>&6
6136 else
6137   cat > conftest.$ac_ext <<EOF
6138 #line 6139 "configure"
6139 #include "confdefs.h"
6140 /* System header to define __stub macros and hopefully few prototypes,
6141     which can conflict with char $ac_func(); below.  */
6142 #include <assert.h>
6143 /* Override any gcc2 internal prototype to avoid an error.  */
6144 /* We use char because int might match the return type of a gcc2
6145     builtin and then its argument prototype would still apply.  */
6146 char $ac_func();
6147
6148 int main() {
6149
6150 /* The GNU C library defines this for functions which it implements
6151     to always fail with ENOSYS.  Some functions are actually named
6152     something starting with __ and the normal name is an alias.  */
6153 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6154 choke me
6155 #else
6156 $ac_func();
6157 #endif
6158
6159 ; return 0; }
6160 EOF
6161 if { (eval echo configure:6162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6162   rm -rf conftest*
6163   eval "ac_cv_func_$ac_func=yes"
6164 else
6165   echo "configure: failed program was:" >&5
6166   cat conftest.$ac_ext >&5
6167   rm -rf conftest*
6168   eval "ac_cv_func_$ac_func=no"
6169 fi
6170 rm -f conftest*
6171 fi
6172
6173 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6174   echo "$ac_t""yes" 1>&6
6175     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6176   cat >> confdefs.h <<EOF
6177 #define $ac_tr_func 1
6178 EOF
6179  
6180 else
6181   echo "$ac_t""no" 1>&6
6182 fi
6183 done
6184
6185 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6186 do
6187 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6188 echo "configure:6189: checking for $ac_func" >&5
6189 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6190   echo $ac_n "(cached) $ac_c" 1>&6
6191 else
6192   cat > conftest.$ac_ext <<EOF
6193 #line 6194 "configure"
6194 #include "confdefs.h"
6195 /* System header to define __stub macros and hopefully few prototypes,
6196     which can conflict with char $ac_func(); below.  */
6197 #include <assert.h>
6198 /* Override any gcc2 internal prototype to avoid an error.  */
6199 /* We use char because int might match the return type of a gcc2
6200     builtin and then its argument prototype would still apply.  */
6201 char $ac_func();
6202
6203 int main() {
6204
6205 /* The GNU C library defines this for functions which it implements
6206     to always fail with ENOSYS.  Some functions are actually named
6207     something starting with __ and the normal name is an alias.  */
6208 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6209 choke me
6210 #else
6211 $ac_func();
6212 #endif
6213
6214 ; return 0; }
6215 EOF
6216 if { (eval echo configure:6217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6217   rm -rf conftest*
6218   eval "ac_cv_func_$ac_func=yes"
6219 else
6220   echo "configure: failed program was:" >&5
6221   cat conftest.$ac_ext >&5
6222   rm -rf conftest*
6223   eval "ac_cv_func_$ac_func=no"
6224 fi
6225 rm -f conftest*
6226 fi
6227
6228 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6229   echo "$ac_t""yes" 1>&6
6230     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6231   cat >> confdefs.h <<EOF
6232 #define $ac_tr_func 1
6233 EOF
6234  
6235 else
6236   echo "$ac_t""no" 1>&6
6237 fi
6238 done
6239
6240 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6241 do
6242 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6243 echo "configure:6244: checking for $ac_func" >&5
6244 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6245   echo $ac_n "(cached) $ac_c" 1>&6
6246 else
6247   cat > conftest.$ac_ext <<EOF
6248 #line 6249 "configure"
6249 #include "confdefs.h"
6250 /* System header to define __stub macros and hopefully few prototypes,
6251     which can conflict with char $ac_func(); below.  */
6252 #include <assert.h>
6253 /* Override any gcc2 internal prototype to avoid an error.  */
6254 /* We use char because int might match the return type of a gcc2
6255     builtin and then its argument prototype would still apply.  */
6256 char $ac_func();
6257
6258 int main() {
6259
6260 /* The GNU C library defines this for functions which it implements
6261     to always fail with ENOSYS.  Some functions are actually named
6262     something starting with __ and the normal name is an alias.  */
6263 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6264 choke me
6265 #else
6266 $ac_func();
6267 #endif
6268
6269 ; return 0; }
6270 EOF
6271 if { (eval echo configure:6272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6272   rm -rf conftest*
6273   eval "ac_cv_func_$ac_func=yes"
6274 else
6275   echo "configure: failed program was:" >&5
6276   cat conftest.$ac_ext >&5
6277   rm -rf conftest*
6278   eval "ac_cv_func_$ac_func=no"
6279 fi
6280 rm -f conftest*
6281 fi
6282
6283 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6284   echo "$ac_t""yes" 1>&6
6285     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6286   cat >> confdefs.h <<EOF
6287 #define $ac_tr_func 1
6288 EOF
6289  
6290 else
6291   echo "$ac_t""no" 1>&6
6292 fi
6293 done
6294
6295 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6296 do
6297 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6298 echo "configure:6299: checking for $ac_func" >&5
6299 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6300   echo $ac_n "(cached) $ac_c" 1>&6
6301 else
6302   cat > conftest.$ac_ext <<EOF
6303 #line 6304 "configure"
6304 #include "confdefs.h"
6305 /* System header to define __stub macros and hopefully few prototypes,
6306     which can conflict with char $ac_func(); below.  */
6307 #include <assert.h>
6308 /* Override any gcc2 internal prototype to avoid an error.  */
6309 /* We use char because int might match the return type of a gcc2
6310     builtin and then its argument prototype would still apply.  */
6311 char $ac_func();
6312
6313 int main() {
6314
6315 /* The GNU C library defines this for functions which it implements
6316     to always fail with ENOSYS.  Some functions are actually named
6317     something starting with __ and the normal name is an alias.  */
6318 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6319 choke me
6320 #else
6321 $ac_func();
6322 #endif
6323
6324 ; return 0; }
6325 EOF
6326 if { (eval echo configure:6327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6327   rm -rf conftest*
6328   eval "ac_cv_func_$ac_func=yes"
6329 else
6330   echo "configure: failed program was:" >&5
6331   cat conftest.$ac_ext >&5
6332   rm -rf conftest*
6333   eval "ac_cv_func_$ac_func=no"
6334 fi
6335 rm -f conftest*
6336 fi
6337
6338 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6339   echo "$ac_t""yes" 1>&6
6340     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6341   cat >> confdefs.h <<EOF
6342 #define $ac_tr_func 1
6343 EOF
6344  
6345 else
6346   echo "$ac_t""no" 1>&6
6347 fi
6348 done
6349
6350 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6351 do
6352 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6353 echo "configure:6354: checking for $ac_func" >&5
6354 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6355   echo $ac_n "(cached) $ac_c" 1>&6
6356 else
6357   cat > conftest.$ac_ext <<EOF
6358 #line 6359 "configure"
6359 #include "confdefs.h"
6360 /* System header to define __stub macros and hopefully few prototypes,
6361     which can conflict with char $ac_func(); below.  */
6362 #include <assert.h>
6363 /* Override any gcc2 internal prototype to avoid an error.  */
6364 /* We use char because int might match the return type of a gcc2
6365     builtin and then its argument prototype would still apply.  */
6366 char $ac_func();
6367
6368 int main() {
6369
6370 /* The GNU C library defines this for functions which it implements
6371     to always fail with ENOSYS.  Some functions are actually named
6372     something starting with __ and the normal name is an alias.  */
6373 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6374 choke me
6375 #else
6376 $ac_func();
6377 #endif
6378
6379 ; return 0; }
6380 EOF
6381 if { (eval echo configure:6382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6382   rm -rf conftest*
6383   eval "ac_cv_func_$ac_func=yes"
6384 else
6385   echo "configure: failed program was:" >&5
6386   cat conftest.$ac_ext >&5
6387   rm -rf conftest*
6388   eval "ac_cv_func_$ac_func=no"
6389 fi
6390 rm -f conftest*
6391 fi
6392
6393 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6394   echo "$ac_t""yes" 1>&6
6395     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6396   cat >> confdefs.h <<EOF
6397 #define $ac_tr_func 1
6398 EOF
6399  
6400 else
6401   echo "$ac_t""no" 1>&6
6402 fi
6403 done
6404
6405 for ac_func in _write __write _fork __fork
6406 do
6407 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6408 echo "configure:6409: checking for $ac_func" >&5
6409 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6410   echo $ac_n "(cached) $ac_c" 1>&6
6411 else
6412   cat > conftest.$ac_ext <<EOF
6413 #line 6414 "configure"
6414 #include "confdefs.h"
6415 /* System header to define __stub macros and hopefully few prototypes,
6416     which can conflict with char $ac_func(); below.  */
6417 #include <assert.h>
6418 /* Override any gcc2 internal prototype to avoid an error.  */
6419 /* We use char because int might match the return type of a gcc2
6420     builtin and then its argument prototype would still apply.  */
6421 char $ac_func();
6422
6423 int main() {
6424
6425 /* The GNU C library defines this for functions which it implements
6426     to always fail with ENOSYS.  Some functions are actually named
6427     something starting with __ and the normal name is an alias.  */
6428 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6429 choke me
6430 #else
6431 $ac_func();
6432 #endif
6433
6434 ; return 0; }
6435 EOF
6436 if { (eval echo configure:6437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6437   rm -rf conftest*
6438   eval "ac_cv_func_$ac_func=yes"
6439 else
6440   echo "configure: failed program was:" >&5
6441   cat conftest.$ac_ext >&5
6442   rm -rf conftest*
6443   eval "ac_cv_func_$ac_func=no"
6444 fi
6445 rm -f conftest*
6446 fi
6447
6448 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6449   echo "$ac_t""yes" 1>&6
6450     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6451   cat >> confdefs.h <<EOF
6452 #define $ac_tr_func 1
6453 EOF
6454  
6455 else
6456   echo "$ac_t""no" 1>&6
6457 fi
6458 done
6459
6460 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6461 do
6462 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6463 echo "configure:6464: checking for $ac_func" >&5
6464 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6465   echo $ac_n "(cached) $ac_c" 1>&6
6466 else
6467   cat > conftest.$ac_ext <<EOF
6468 #line 6469 "configure"
6469 #include "confdefs.h"
6470 /* System header to define __stub macros and hopefully few prototypes,
6471     which can conflict with char $ac_func(); below.  */
6472 #include <assert.h>
6473 /* Override any gcc2 internal prototype to avoid an error.  */
6474 /* We use char because int might match the return type of a gcc2
6475     builtin and then its argument prototype would still apply.  */
6476 char $ac_func();
6477
6478 int main() {
6479
6480 /* The GNU C library defines this for functions which it implements
6481     to always fail with ENOSYS.  Some functions are actually named
6482     something starting with __ and the normal name is an alias.  */
6483 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6484 choke me
6485 #else
6486 $ac_func();
6487 #endif
6488
6489 ; return 0; }
6490 EOF
6491 if { (eval echo configure:6492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6492   rm -rf conftest*
6493   eval "ac_cv_func_$ac_func=yes"
6494 else
6495   echo "configure: failed program was:" >&5
6496   cat conftest.$ac_ext >&5
6497   rm -rf conftest*
6498   eval "ac_cv_func_$ac_func=no"
6499 fi
6500 rm -f conftest*
6501 fi
6502
6503 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6504   echo "$ac_t""yes" 1>&6
6505     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6506   cat >> confdefs.h <<EOF
6507 #define $ac_tr_func 1
6508 EOF
6509  
6510 else
6511   echo "$ac_t""no" 1>&6
6512 fi
6513 done
6514
6515 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6516 do
6517 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6518 echo "configure:6519: checking for $ac_func" >&5
6519 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6520   echo $ac_n "(cached) $ac_c" 1>&6
6521 else
6522   cat > conftest.$ac_ext <<EOF
6523 #line 6524 "configure"
6524 #include "confdefs.h"
6525 /* System header to define __stub macros and hopefully few prototypes,
6526     which can conflict with char $ac_func(); below.  */
6527 #include <assert.h>
6528 /* Override any gcc2 internal prototype to avoid an error.  */
6529 /* We use char because int might match the return type of a gcc2
6530     builtin and then its argument prototype would still apply.  */
6531 char $ac_func();
6532
6533 int main() {
6534
6535 /* The GNU C library defines this for functions which it implements
6536     to always fail with ENOSYS.  Some functions are actually named
6537     something starting with __ and the normal name is an alias.  */
6538 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6539 choke me
6540 #else
6541 $ac_func();
6542 #endif
6543
6544 ; return 0; }
6545 EOF
6546 if { (eval echo configure:6547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6547   rm -rf conftest*
6548   eval "ac_cv_func_$ac_func=yes"
6549 else
6550   echo "configure: failed program was:" >&5
6551   cat conftest.$ac_ext >&5
6552   rm -rf conftest*
6553   eval "ac_cv_func_$ac_func=no"
6554 fi
6555 rm -f conftest*
6556 fi
6557
6558 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6559   echo "$ac_t""yes" 1>&6
6560     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6561   cat >> confdefs.h <<EOF
6562 #define $ac_tr_func 1
6563 EOF
6564  
6565 else
6566   echo "$ac_t""no" 1>&6
6567 fi
6568 done
6569
6570 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6571 do
6572 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6573 echo "configure:6574: checking for $ac_func" >&5
6574 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6575   echo $ac_n "(cached) $ac_c" 1>&6
6576 else
6577   cat > conftest.$ac_ext <<EOF
6578 #line 6579 "configure"
6579 #include "confdefs.h"
6580 /* System header to define __stub macros and hopefully few prototypes,
6581     which can conflict with char $ac_func(); below.  */
6582 #include <assert.h>
6583 /* Override any gcc2 internal prototype to avoid an error.  */
6584 /* We use char because int might match the return type of a gcc2
6585     builtin and then its argument prototype would still apply.  */
6586 char $ac_func();
6587
6588 int main() {
6589
6590 /* The GNU C library defines this for functions which it implements
6591     to always fail with ENOSYS.  Some functions are actually named
6592     something starting with __ and the normal name is an alias.  */
6593 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6594 choke me
6595 #else
6596 $ac_func();
6597 #endif
6598
6599 ; return 0; }
6600 EOF
6601 if { (eval echo configure:6602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6602   rm -rf conftest*
6603   eval "ac_cv_func_$ac_func=yes"
6604 else
6605   echo "configure: failed program was:" >&5
6606   cat conftest.$ac_ext >&5
6607   rm -rf conftest*
6608   eval "ac_cv_func_$ac_func=no"
6609 fi
6610 rm -f conftest*
6611 fi
6612
6613 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6614   echo "$ac_t""yes" 1>&6
6615     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6616   cat >> confdefs.h <<EOF
6617 #define $ac_tr_func 1
6618 EOF
6619  
6620 else
6621   echo "$ac_t""no" 1>&6
6622 fi
6623 done
6624
6625 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6626 do
6627 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6628 echo "configure:6629: checking for $ac_func" >&5
6629 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6630   echo $ac_n "(cached) $ac_c" 1>&6
6631 else
6632   cat > conftest.$ac_ext <<EOF
6633 #line 6634 "configure"
6634 #include "confdefs.h"
6635 /* System header to define __stub macros and hopefully few prototypes,
6636     which can conflict with char $ac_func(); below.  */
6637 #include <assert.h>
6638 /* Override any gcc2 internal prototype to avoid an error.  */
6639 /* We use char because int might match the return type of a gcc2
6640     builtin and then its argument prototype would still apply.  */
6641 char $ac_func();
6642
6643 int main() {
6644
6645 /* The GNU C library defines this for functions which it implements
6646     to always fail with ENOSYS.  Some functions are actually named
6647     something starting with __ and the normal name is an alias.  */
6648 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6649 choke me
6650 #else
6651 $ac_func();
6652 #endif
6653
6654 ; return 0; }
6655 EOF
6656 if { (eval echo configure:6657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6657   rm -rf conftest*
6658   eval "ac_cv_func_$ac_func=yes"
6659 else
6660   echo "configure: failed program was:" >&5
6661   cat conftest.$ac_ext >&5
6662   rm -rf conftest*
6663   eval "ac_cv_func_$ac_func=no"
6664 fi
6665 rm -f conftest*
6666 fi
6667
6668 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6669   echo "$ac_t""yes" 1>&6
6670     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6671   cat >> confdefs.h <<EOF
6672 #define $ac_tr_func 1
6673 EOF
6674  
6675 else
6676   echo "$ac_t""no" 1>&6
6677 fi
6678 done
6679
6680 for ac_func in open64 _open64 __open64 creat64
6681 do
6682 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6683 echo "configure:6684: checking for $ac_func" >&5
6684 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6685   echo $ac_n "(cached) $ac_c" 1>&6
6686 else
6687   cat > conftest.$ac_ext <<EOF
6688 #line 6689 "configure"
6689 #include "confdefs.h"
6690 /* System header to define __stub macros and hopefully few prototypes,
6691     which can conflict with char $ac_func(); below.  */
6692 #include <assert.h>
6693 /* Override any gcc2 internal prototype to avoid an error.  */
6694 /* We use char because int might match the return type of a gcc2
6695     builtin and then its argument prototype would still apply.  */
6696 char $ac_func();
6697
6698 int main() {
6699
6700 /* The GNU C library defines this for functions which it implements
6701     to always fail with ENOSYS.  Some functions are actually named
6702     something starting with __ and the normal name is an alias.  */
6703 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6704 choke me
6705 #else
6706 $ac_func();
6707 #endif
6708
6709 ; return 0; }
6710 EOF
6711 if { (eval echo configure:6712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6712   rm -rf conftest*
6713   eval "ac_cv_func_$ac_func=yes"
6714 else
6715   echo "configure: failed program was:" >&5
6716   cat conftest.$ac_ext >&5
6717   rm -rf conftest*
6718   eval "ac_cv_func_$ac_func=no"
6719 fi
6720 rm -f conftest*
6721 fi
6722
6723 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6724   echo "$ac_t""yes" 1>&6
6725     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6726   cat >> confdefs.h <<EOF
6727 #define $ac_tr_func 1
6728 EOF
6729  
6730 else
6731   echo "$ac_t""no" 1>&6
6732 fi
6733 done
6734
6735
6736 #
6737 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6738 #
6739
6740 if test x$ac_cv_func_stat64 = xno ; then
6741   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6742 echo "configure:6743: checking for stat64 in <sys/stat.h>" >&5
6743   cat > conftest.$ac_ext <<EOF
6744 #line 6745 "configure"
6745 #include "confdefs.h"
6746
6747 #if defined(HAVE_UNISTD_H)
6748 #include <unistd.h>
6749 #endif
6750 #include <sys/stat.h>
6751
6752 int main() {
6753 struct stat64 st64; exit(stat64(".",&st64));
6754 ; return 0; }
6755 EOF
6756 if { (eval echo configure:6757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6757   rm -rf conftest*
6758   ac_cv_func_stat64=yes
6759 else
6760   echo "configure: failed program was:" >&5
6761   cat conftest.$ac_ext >&5
6762 fi
6763 rm -f conftest*
6764   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6765   if test x$ac_cv_func_stat64 = xyes ; then
6766     cat >> confdefs.h <<\EOF
6767 #define HAVE_STAT64 1
6768 EOF
6769
6770   fi
6771 fi
6772
6773 if test x$ac_cv_func_lstat64 = xno ; then
6774   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6775 echo "configure:6776: checking for lstat64 in <sys/stat.h>" >&5
6776   cat > conftest.$ac_ext <<EOF
6777 #line 6778 "configure"
6778 #include "confdefs.h"
6779
6780 #if defined(HAVE_UNISTD_H)
6781 #include <unistd.h>
6782 #endif
6783 #include <sys/stat.h>
6784
6785 int main() {
6786 struct stat64 st64; exit(lstat64(".",&st64));
6787 ; return 0; }
6788 EOF
6789 if { (eval echo configure:6790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6790   rm -rf conftest*
6791   ac_cv_func_lstat64=yes
6792 else
6793   echo "configure: failed program was:" >&5
6794   cat conftest.$ac_ext >&5
6795 fi
6796 rm -f conftest*
6797   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6798   if test x$ac_cv_func_lstat64 = xyes ; then
6799     cat >> confdefs.h <<\EOF
6800 #define HAVE_LSTAT64 1
6801 EOF
6802
6803   fi
6804 fi
6805
6806 if test x$ac_cv_func_fstat64 = xno ; then
6807   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6808 echo "configure:6809: checking for fstat64 in <sys/stat.h>" >&5
6809   cat > conftest.$ac_ext <<EOF
6810 #line 6811 "configure"
6811 #include "confdefs.h"
6812
6813 #if defined(HAVE_UNISTD_H)
6814 #include <unistd.h>
6815 #endif
6816 #include <sys/stat.h>
6817
6818 int main() {
6819 struct stat64 st64; exit(fstat64(0,&st64));
6820 ; return 0; }
6821 EOF
6822 if { (eval echo configure:6823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6823   rm -rf conftest*
6824   ac_cv_func_fstat64=yes
6825 else
6826   echo "configure: failed program was:" >&5
6827   cat conftest.$ac_ext >&5
6828 fi
6829 rm -f conftest*
6830   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6831   if test x$ac_cv_func_fstat64 = xyes ; then
6832     cat >> confdefs.h <<\EOF
6833 #define HAVE_FSTAT64 1
6834 EOF
6835
6836   fi
6837 fi
6838
6839 #
6840 # If no strcasecmp, check for it in some known places
6841 # It is in -lresolv on ReliantUNIX and UnixWare
6842 #   -lresolve *must* follow -lnsl for name resolution to work properly
6843 #
6844
6845 if test x$ac_cv_func_strcasecmp = xno ; then
6846         echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6
6847 echo "configure:6848: checking for strcasecmp in -lresolv" >&5
6848 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'`
6849 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6850   echo $ac_n "(cached) $ac_c" 1>&6
6851 else
6852   ac_save_LIBS="$LIBS"
6853 LIBS="-lresolv  $LIBS"
6854 cat > conftest.$ac_ext <<EOF
6855 #line 6856 "configure"
6856 #include "confdefs.h"
6857 /* Override any gcc2 internal prototype to avoid an error.  */
6858 /* We use char because int might match the return type of a gcc2
6859     builtin and then its argument prototype would still apply.  */
6860 char strcasecmp();
6861
6862 int main() {
6863 strcasecmp()
6864 ; return 0; }
6865 EOF
6866 if { (eval echo configure:6867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6867   rm -rf conftest*
6868   eval "ac_cv_lib_$ac_lib_var=yes"
6869 else
6870   echo "configure: failed program was:" >&5
6871   cat conftest.$ac_ext >&5
6872   rm -rf conftest*
6873   eval "ac_cv_lib_$ac_lib_var=no"
6874 fi
6875 rm -f conftest*
6876 LIBS="$ac_save_LIBS"
6877
6878 fi
6879 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6880   echo "$ac_t""yes" 1>&6
6881   LIBS="$LIBS -lresolv"
6882                 cat >> confdefs.h <<\EOF
6883 #define HAVE_STRCASECMP 1
6884 EOF
6885
6886 else
6887   echo "$ac_t""no" 1>&6
6888 fi
6889
6890 fi
6891
6892 #
6893 # Check for the functions putprpwnam, set_auth_parameters,
6894 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6895 # Needed for OSF1 and HPUX.
6896 #
6897
6898 case "$LIBS" in
6899   *-lsecurity*) for ac_func in putprpwnam
6900 do
6901 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6902 echo "configure:6903: checking for $ac_func" >&5
6903 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6904   echo $ac_n "(cached) $ac_c" 1>&6
6905 else
6906   cat > conftest.$ac_ext <<EOF
6907 #line 6908 "configure"
6908 #include "confdefs.h"
6909 /* System header to define __stub macros and hopefully few prototypes,
6910     which can conflict with char $ac_func(); below.  */
6911 #include <assert.h>
6912 /* Override any gcc2 internal prototype to avoid an error.  */
6913 /* We use char because int might match the return type of a gcc2
6914     builtin and then its argument prototype would still apply.  */
6915 char $ac_func();
6916
6917 int main() {
6918
6919 /* The GNU C library defines this for functions which it implements
6920     to always fail with ENOSYS.  Some functions are actually named
6921     something starting with __ and the normal name is an alias.  */
6922 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6923 choke me
6924 #else
6925 $ac_func();
6926 #endif
6927
6928 ; return 0; }
6929 EOF
6930 if { (eval echo configure:6931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6931   rm -rf conftest*
6932   eval "ac_cv_func_$ac_func=yes"
6933 else
6934   echo "configure: failed program was:" >&5
6935   cat conftest.$ac_ext >&5
6936   rm -rf conftest*
6937   eval "ac_cv_func_$ac_func=no"
6938 fi
6939 rm -f conftest*
6940 fi
6941
6942 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6943   echo "$ac_t""yes" 1>&6
6944     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6945   cat >> confdefs.h <<EOF
6946 #define $ac_tr_func 1
6947 EOF
6948  
6949 else
6950   echo "$ac_t""no" 1>&6
6951 fi
6952 done
6953  ;;
6954   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6955 echo "configure:6956: checking for putprpwnam in -lsecurity" >&5
6956 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6957 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6958   echo $ac_n "(cached) $ac_c" 1>&6
6959 else
6960   ac_save_LIBS="$LIBS"
6961 LIBS="-lsecurity  $LIBS"
6962 cat > conftest.$ac_ext <<EOF
6963 #line 6964 "configure"
6964 #include "confdefs.h"
6965 /* Override any gcc2 internal prototype to avoid an error.  */
6966 /* We use char because int might match the return type of a gcc2
6967     builtin and then its argument prototype would still apply.  */
6968 char putprpwnam();
6969
6970 int main() {
6971 putprpwnam()
6972 ; return 0; }
6973 EOF
6974 if { (eval echo configure:6975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6975   rm -rf conftest*
6976   eval "ac_cv_lib_$ac_lib_var=yes"
6977 else
6978   echo "configure: failed program was:" >&5
6979   cat conftest.$ac_ext >&5
6980   rm -rf conftest*
6981   eval "ac_cv_lib_$ac_lib_var=no"
6982 fi
6983 rm -f conftest*
6984 LIBS="$ac_save_LIBS"
6985
6986 fi
6987 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6988   echo "$ac_t""yes" 1>&6
6989     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6990     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6991   cat >> confdefs.h <<EOF
6992 #define $ac_tr_lib 1
6993 EOF
6994
6995   LIBS="-lsecurity $LIBS"
6996
6997 else
6998   echo "$ac_t""no" 1>&6
6999 fi
7000  
7001      for ac_func in putprpwnam
7002 do
7003 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7004 echo "configure:7005: checking for $ac_func" >&5
7005 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7006   echo $ac_n "(cached) $ac_c" 1>&6
7007 else
7008   cat > conftest.$ac_ext <<EOF
7009 #line 7010 "configure"
7010 #include "confdefs.h"
7011 /* System header to define __stub macros and hopefully few prototypes,
7012     which can conflict with char $ac_func(); below.  */
7013 #include <assert.h>
7014 /* Override any gcc2 internal prototype to avoid an error.  */
7015 /* We use char because int might match the return type of a gcc2
7016     builtin and then its argument prototype would still apply.  */
7017 char $ac_func();
7018
7019 int main() {
7020
7021 /* The GNU C library defines this for functions which it implements
7022     to always fail with ENOSYS.  Some functions are actually named
7023     something starting with __ and the normal name is an alias.  */
7024 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7025 choke me
7026 #else
7027 $ac_func();
7028 #endif
7029
7030 ; return 0; }
7031 EOF
7032 if { (eval echo configure:7033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7033   rm -rf conftest*
7034   eval "ac_cv_func_$ac_func=yes"
7035 else
7036   echo "configure: failed program was:" >&5
7037   cat conftest.$ac_ext >&5
7038   rm -rf conftest*
7039   eval "ac_cv_func_$ac_func=no"
7040 fi
7041 rm -f conftest*
7042 fi
7043
7044 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7045   echo "$ac_t""yes" 1>&6
7046     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7047   cat >> confdefs.h <<EOF
7048 #define $ac_tr_func 1
7049 EOF
7050  
7051 else
7052   echo "$ac_t""no" 1>&6
7053 fi
7054 done
7055
7056   ;;
7057   esac
7058
7059 case "$LIBS" in
7060   *-lsec*) for ac_func in putprpwnam
7061 do
7062 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7063 echo "configure:7064: checking for $ac_func" >&5
7064 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7065   echo $ac_n "(cached) $ac_c" 1>&6
7066 else
7067   cat > conftest.$ac_ext <<EOF
7068 #line 7069 "configure"
7069 #include "confdefs.h"
7070 /* System header to define __stub macros and hopefully few prototypes,
7071     which can conflict with char $ac_func(); below.  */
7072 #include <assert.h>
7073 /* Override any gcc2 internal prototype to avoid an error.  */
7074 /* We use char because int might match the return type of a gcc2
7075     builtin and then its argument prototype would still apply.  */
7076 char $ac_func();
7077
7078 int main() {
7079
7080 /* The GNU C library defines this for functions which it implements
7081     to always fail with ENOSYS.  Some functions are actually named
7082     something starting with __ and the normal name is an alias.  */
7083 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7084 choke me
7085 #else
7086 $ac_func();
7087 #endif
7088
7089 ; return 0; }
7090 EOF
7091 if { (eval echo configure:7092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7092   rm -rf conftest*
7093   eval "ac_cv_func_$ac_func=yes"
7094 else
7095   echo "configure: failed program was:" >&5
7096   cat conftest.$ac_ext >&5
7097   rm -rf conftest*
7098   eval "ac_cv_func_$ac_func=no"
7099 fi
7100 rm -f conftest*
7101 fi
7102
7103 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7104   echo "$ac_t""yes" 1>&6
7105     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7106   cat >> confdefs.h <<EOF
7107 #define $ac_tr_func 1
7108 EOF
7109  
7110 else
7111   echo "$ac_t""no" 1>&6
7112 fi
7113 done
7114  ;;
7115   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
7116 echo "configure:7117: checking for putprpwnam in -lsec" >&5
7117 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
7118 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7119   echo $ac_n "(cached) $ac_c" 1>&6
7120 else
7121   ac_save_LIBS="$LIBS"
7122 LIBS="-lsec  $LIBS"
7123 cat > conftest.$ac_ext <<EOF
7124 #line 7125 "configure"
7125 #include "confdefs.h"
7126 /* Override any gcc2 internal prototype to avoid an error.  */
7127 /* We use char because int might match the return type of a gcc2
7128     builtin and then its argument prototype would still apply.  */
7129 char putprpwnam();
7130
7131 int main() {
7132 putprpwnam()
7133 ; return 0; }
7134 EOF
7135 if { (eval echo configure:7136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7136   rm -rf conftest*
7137   eval "ac_cv_lib_$ac_lib_var=yes"
7138 else
7139   echo "configure: failed program was:" >&5
7140   cat conftest.$ac_ext >&5
7141   rm -rf conftest*
7142   eval "ac_cv_lib_$ac_lib_var=no"
7143 fi
7144 rm -f conftest*
7145 LIBS="$ac_save_LIBS"
7146
7147 fi
7148 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7149   echo "$ac_t""yes" 1>&6
7150     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7151     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7152   cat >> confdefs.h <<EOF
7153 #define $ac_tr_lib 1
7154 EOF
7155
7156   LIBS="-lsec $LIBS"
7157
7158 else
7159   echo "$ac_t""no" 1>&6
7160 fi
7161  
7162      for ac_func in putprpwnam
7163 do
7164 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7165 echo "configure:7166: checking for $ac_func" >&5
7166 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7167   echo $ac_n "(cached) $ac_c" 1>&6
7168 else
7169   cat > conftest.$ac_ext <<EOF
7170 #line 7171 "configure"
7171 #include "confdefs.h"
7172 /* System header to define __stub macros and hopefully few prototypes,
7173     which can conflict with char $ac_func(); below.  */
7174 #include <assert.h>
7175 /* Override any gcc2 internal prototype to avoid an error.  */
7176 /* We use char because int might match the return type of a gcc2
7177     builtin and then its argument prototype would still apply.  */
7178 char $ac_func();
7179
7180 int main() {
7181
7182 /* The GNU C library defines this for functions which it implements
7183     to always fail with ENOSYS.  Some functions are actually named
7184     something starting with __ and the normal name is an alias.  */
7185 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7186 choke me
7187 #else
7188 $ac_func();
7189 #endif
7190
7191 ; return 0; }
7192 EOF
7193 if { (eval echo configure:7194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7194   rm -rf conftest*
7195   eval "ac_cv_func_$ac_func=yes"
7196 else
7197   echo "configure: failed program was:" >&5
7198   cat conftest.$ac_ext >&5
7199   rm -rf conftest*
7200   eval "ac_cv_func_$ac_func=no"
7201 fi
7202 rm -f conftest*
7203 fi
7204
7205 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7206   echo "$ac_t""yes" 1>&6
7207     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7208   cat >> confdefs.h <<EOF
7209 #define $ac_tr_func 1
7210 EOF
7211  
7212 else
7213   echo "$ac_t""no" 1>&6
7214 fi
7215 done
7216
7217   ;;
7218   esac
7219
7220
7221 case "$LIBS" in
7222   *-lsecurity*) for ac_func in set_auth_parameters
7223 do
7224 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7225 echo "configure:7226: checking for $ac_func" >&5
7226 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7227   echo $ac_n "(cached) $ac_c" 1>&6
7228 else
7229   cat > conftest.$ac_ext <<EOF
7230 #line 7231 "configure"
7231 #include "confdefs.h"
7232 /* System header to define __stub macros and hopefully few prototypes,
7233     which can conflict with char $ac_func(); below.  */
7234 #include <assert.h>
7235 /* Override any gcc2 internal prototype to avoid an error.  */
7236 /* We use char because int might match the return type of a gcc2
7237     builtin and then its argument prototype would still apply.  */
7238 char $ac_func();
7239
7240 int main() {
7241
7242 /* The GNU C library defines this for functions which it implements
7243     to always fail with ENOSYS.  Some functions are actually named
7244     something starting with __ and the normal name is an alias.  */
7245 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7246 choke me
7247 #else
7248 $ac_func();
7249 #endif
7250
7251 ; return 0; }
7252 EOF
7253 if { (eval echo configure:7254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7254   rm -rf conftest*
7255   eval "ac_cv_func_$ac_func=yes"
7256 else
7257   echo "configure: failed program was:" >&5
7258   cat conftest.$ac_ext >&5
7259   rm -rf conftest*
7260   eval "ac_cv_func_$ac_func=no"
7261 fi
7262 rm -f conftest*
7263 fi
7264
7265 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7266   echo "$ac_t""yes" 1>&6
7267     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7268   cat >> confdefs.h <<EOF
7269 #define $ac_tr_func 1
7270 EOF
7271  
7272 else
7273   echo "$ac_t""no" 1>&6
7274 fi
7275 done
7276  ;;
7277   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7278 echo "configure:7279: checking for set_auth_parameters in -lsecurity" >&5
7279 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7280 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7281   echo $ac_n "(cached) $ac_c" 1>&6
7282 else
7283   ac_save_LIBS="$LIBS"
7284 LIBS="-lsecurity  $LIBS"
7285 cat > conftest.$ac_ext <<EOF
7286 #line 7287 "configure"
7287 #include "confdefs.h"
7288 /* Override any gcc2 internal prototype to avoid an error.  */
7289 /* We use char because int might match the return type of a gcc2
7290     builtin and then its argument prototype would still apply.  */
7291 char set_auth_parameters();
7292
7293 int main() {
7294 set_auth_parameters()
7295 ; return 0; }
7296 EOF
7297 if { (eval echo configure:7298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7298   rm -rf conftest*
7299   eval "ac_cv_lib_$ac_lib_var=yes"
7300 else
7301   echo "configure: failed program was:" >&5
7302   cat conftest.$ac_ext >&5
7303   rm -rf conftest*
7304   eval "ac_cv_lib_$ac_lib_var=no"
7305 fi
7306 rm -f conftest*
7307 LIBS="$ac_save_LIBS"
7308
7309 fi
7310 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7311   echo "$ac_t""yes" 1>&6
7312     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7313     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7314   cat >> confdefs.h <<EOF
7315 #define $ac_tr_lib 1
7316 EOF
7317
7318   LIBS="-lsecurity $LIBS"
7319
7320 else
7321   echo "$ac_t""no" 1>&6
7322 fi
7323  
7324      for ac_func in set_auth_parameters
7325 do
7326 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7327 echo "configure:7328: checking for $ac_func" >&5
7328 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7329   echo $ac_n "(cached) $ac_c" 1>&6
7330 else
7331   cat > conftest.$ac_ext <<EOF
7332 #line 7333 "configure"
7333 #include "confdefs.h"
7334 /* System header to define __stub macros and hopefully few prototypes,
7335     which can conflict with char $ac_func(); below.  */
7336 #include <assert.h>
7337 /* Override any gcc2 internal prototype to avoid an error.  */
7338 /* We use char because int might match the return type of a gcc2
7339     builtin and then its argument prototype would still apply.  */
7340 char $ac_func();
7341
7342 int main() {
7343
7344 /* The GNU C library defines this for functions which it implements
7345     to always fail with ENOSYS.  Some functions are actually named
7346     something starting with __ and the normal name is an alias.  */
7347 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7348 choke me
7349 #else
7350 $ac_func();
7351 #endif
7352
7353 ; return 0; }
7354 EOF
7355 if { (eval echo configure:7356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7356   rm -rf conftest*
7357   eval "ac_cv_func_$ac_func=yes"
7358 else
7359   echo "configure: failed program was:" >&5
7360   cat conftest.$ac_ext >&5
7361   rm -rf conftest*
7362   eval "ac_cv_func_$ac_func=no"
7363 fi
7364 rm -f conftest*
7365 fi
7366
7367 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7368   echo "$ac_t""yes" 1>&6
7369     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7370   cat >> confdefs.h <<EOF
7371 #define $ac_tr_func 1
7372 EOF
7373  
7374 else
7375   echo "$ac_t""no" 1>&6
7376 fi
7377 done
7378
7379   ;;
7380   esac
7381
7382 case "$LIBS" in
7383   *-lsec*) for ac_func in set_auth_parameters
7384 do
7385 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7386 echo "configure:7387: checking for $ac_func" >&5
7387 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7388   echo $ac_n "(cached) $ac_c" 1>&6
7389 else
7390   cat > conftest.$ac_ext <<EOF
7391 #line 7392 "configure"
7392 #include "confdefs.h"
7393 /* System header to define __stub macros and hopefully few prototypes,
7394     which can conflict with char $ac_func(); below.  */
7395 #include <assert.h>
7396 /* Override any gcc2 internal prototype to avoid an error.  */
7397 /* We use char because int might match the return type of a gcc2
7398     builtin and then its argument prototype would still apply.  */
7399 char $ac_func();
7400
7401 int main() {
7402
7403 /* The GNU C library defines this for functions which it implements
7404     to always fail with ENOSYS.  Some functions are actually named
7405     something starting with __ and the normal name is an alias.  */
7406 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7407 choke me
7408 #else
7409 $ac_func();
7410 #endif
7411
7412 ; return 0; }
7413 EOF
7414 if { (eval echo configure:7415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7415   rm -rf conftest*
7416   eval "ac_cv_func_$ac_func=yes"
7417 else
7418   echo "configure: failed program was:" >&5
7419   cat conftest.$ac_ext >&5
7420   rm -rf conftest*
7421   eval "ac_cv_func_$ac_func=no"
7422 fi
7423 rm -f conftest*
7424 fi
7425
7426 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7427   echo "$ac_t""yes" 1>&6
7428     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7429   cat >> confdefs.h <<EOF
7430 #define $ac_tr_func 1
7431 EOF
7432  
7433 else
7434   echo "$ac_t""no" 1>&6
7435 fi
7436 done
7437  ;;
7438   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7439 echo "configure:7440: checking for set_auth_parameters in -lsec" >&5
7440 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7441 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7442   echo $ac_n "(cached) $ac_c" 1>&6
7443 else
7444   ac_save_LIBS="$LIBS"
7445 LIBS="-lsec  $LIBS"
7446 cat > conftest.$ac_ext <<EOF
7447 #line 7448 "configure"
7448 #include "confdefs.h"
7449 /* Override any gcc2 internal prototype to avoid an error.  */
7450 /* We use char because int might match the return type of a gcc2
7451     builtin and then its argument prototype would still apply.  */
7452 char set_auth_parameters();
7453
7454 int main() {
7455 set_auth_parameters()
7456 ; return 0; }
7457 EOF
7458 if { (eval echo configure:7459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7459   rm -rf conftest*
7460   eval "ac_cv_lib_$ac_lib_var=yes"
7461 else
7462   echo "configure: failed program was:" >&5
7463   cat conftest.$ac_ext >&5
7464   rm -rf conftest*
7465   eval "ac_cv_lib_$ac_lib_var=no"
7466 fi
7467 rm -f conftest*
7468 LIBS="$ac_save_LIBS"
7469
7470 fi
7471 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7472   echo "$ac_t""yes" 1>&6
7473     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7474     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7475   cat >> confdefs.h <<EOF
7476 #define $ac_tr_lib 1
7477 EOF
7478
7479   LIBS="-lsec $LIBS"
7480
7481 else
7482   echo "$ac_t""no" 1>&6
7483 fi
7484  
7485      for ac_func in set_auth_parameters
7486 do
7487 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7488 echo "configure:7489: checking for $ac_func" >&5
7489 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7490   echo $ac_n "(cached) $ac_c" 1>&6
7491 else
7492   cat > conftest.$ac_ext <<EOF
7493 #line 7494 "configure"
7494 #include "confdefs.h"
7495 /* System header to define __stub macros and hopefully few prototypes,
7496     which can conflict with char $ac_func(); below.  */
7497 #include <assert.h>
7498 /* Override any gcc2 internal prototype to avoid an error.  */
7499 /* We use char because int might match the return type of a gcc2
7500     builtin and then its argument prototype would still apply.  */
7501 char $ac_func();
7502
7503 int main() {
7504
7505 /* The GNU C library defines this for functions which it implements
7506     to always fail with ENOSYS.  Some functions are actually named
7507     something starting with __ and the normal name is an alias.  */
7508 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7509 choke me
7510 #else
7511 $ac_func();
7512 #endif
7513
7514 ; return 0; }
7515 EOF
7516 if { (eval echo configure:7517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7517   rm -rf conftest*
7518   eval "ac_cv_func_$ac_func=yes"
7519 else
7520   echo "configure: failed program was:" >&5
7521   cat conftest.$ac_ext >&5
7522   rm -rf conftest*
7523   eval "ac_cv_func_$ac_func=no"
7524 fi
7525 rm -f conftest*
7526 fi
7527
7528 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7529   echo "$ac_t""yes" 1>&6
7530     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7531   cat >> confdefs.h <<EOF
7532 #define $ac_tr_func 1
7533 EOF
7534  
7535 else
7536   echo "$ac_t""no" 1>&6
7537 fi
7538 done
7539
7540   ;;
7541   esac
7542
7543
7544 # UnixWare 7.x has its getspnam in -lgen
7545 case "$LIBS" in
7546   *-lgen*) for ac_func in getspnam
7547 do
7548 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7549 echo "configure:7550: checking for $ac_func" >&5
7550 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7551   echo $ac_n "(cached) $ac_c" 1>&6
7552 else
7553   cat > conftest.$ac_ext <<EOF
7554 #line 7555 "configure"
7555 #include "confdefs.h"
7556 /* System header to define __stub macros and hopefully few prototypes,
7557     which can conflict with char $ac_func(); below.  */
7558 #include <assert.h>
7559 /* Override any gcc2 internal prototype to avoid an error.  */
7560 /* We use char because int might match the return type of a gcc2
7561     builtin and then its argument prototype would still apply.  */
7562 char $ac_func();
7563
7564 int main() {
7565
7566 /* The GNU C library defines this for functions which it implements
7567     to always fail with ENOSYS.  Some functions are actually named
7568     something starting with __ and the normal name is an alias.  */
7569 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7570 choke me
7571 #else
7572 $ac_func();
7573 #endif
7574
7575 ; return 0; }
7576 EOF
7577 if { (eval echo configure:7578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7578   rm -rf conftest*
7579   eval "ac_cv_func_$ac_func=yes"
7580 else
7581   echo "configure: failed program was:" >&5
7582   cat conftest.$ac_ext >&5
7583   rm -rf conftest*
7584   eval "ac_cv_func_$ac_func=no"
7585 fi
7586 rm -f conftest*
7587 fi
7588
7589 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7590   echo "$ac_t""yes" 1>&6
7591     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7592   cat >> confdefs.h <<EOF
7593 #define $ac_tr_func 1
7594 EOF
7595  
7596 else
7597   echo "$ac_t""no" 1>&6
7598 fi
7599 done
7600  ;;
7601   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7602 echo "configure:7603: checking for getspnam in -lgen" >&5
7603 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7604 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7605   echo $ac_n "(cached) $ac_c" 1>&6
7606 else
7607   ac_save_LIBS="$LIBS"
7608 LIBS="-lgen  $LIBS"
7609 cat > conftest.$ac_ext <<EOF
7610 #line 7611 "configure"
7611 #include "confdefs.h"
7612 /* Override any gcc2 internal prototype to avoid an error.  */
7613 /* We use char because int might match the return type of a gcc2
7614     builtin and then its argument prototype would still apply.  */
7615 char getspnam();
7616
7617 int main() {
7618 getspnam()
7619 ; return 0; }
7620 EOF
7621 if { (eval echo configure:7622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7622   rm -rf conftest*
7623   eval "ac_cv_lib_$ac_lib_var=yes"
7624 else
7625   echo "configure: failed program was:" >&5
7626   cat conftest.$ac_ext >&5
7627   rm -rf conftest*
7628   eval "ac_cv_lib_$ac_lib_var=no"
7629 fi
7630 rm -f conftest*
7631 LIBS="$ac_save_LIBS"
7632
7633 fi
7634 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7635   echo "$ac_t""yes" 1>&6
7636     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7637     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7638   cat >> confdefs.h <<EOF
7639 #define $ac_tr_lib 1
7640 EOF
7641
7642   LIBS="-lgen $LIBS"
7643
7644 else
7645   echo "$ac_t""no" 1>&6
7646 fi
7647  
7648      for ac_func in getspnam
7649 do
7650 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7651 echo "configure:7652: checking for $ac_func" >&5
7652 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7653   echo $ac_n "(cached) $ac_c" 1>&6
7654 else
7655   cat > conftest.$ac_ext <<EOF
7656 #line 7657 "configure"
7657 #include "confdefs.h"
7658 /* System header to define __stub macros and hopefully few prototypes,
7659     which can conflict with char $ac_func(); below.  */
7660 #include <assert.h>
7661 /* Override any gcc2 internal prototype to avoid an error.  */
7662 /* We use char because int might match the return type of a gcc2
7663     builtin and then its argument prototype would still apply.  */
7664 char $ac_func();
7665
7666 int main() {
7667
7668 /* The GNU C library defines this for functions which it implements
7669     to always fail with ENOSYS.  Some functions are actually named
7670     something starting with __ and the normal name is an alias.  */
7671 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7672 choke me
7673 #else
7674 $ac_func();
7675 #endif
7676
7677 ; return 0; }
7678 EOF
7679 if { (eval echo configure:7680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7680   rm -rf conftest*
7681   eval "ac_cv_func_$ac_func=yes"
7682 else
7683   echo "configure: failed program was:" >&5
7684   cat conftest.$ac_ext >&5
7685   rm -rf conftest*
7686   eval "ac_cv_func_$ac_func=no"
7687 fi
7688 rm -f conftest*
7689 fi
7690
7691 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7692   echo "$ac_t""yes" 1>&6
7693     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7694   cat >> confdefs.h <<EOF
7695 #define $ac_tr_func 1
7696 EOF
7697  
7698 else
7699   echo "$ac_t""no" 1>&6
7700 fi
7701 done
7702
7703   ;;
7704   esac
7705
7706
7707 case "$LIBS" in
7708   *-lsecurity*) for ac_func in getspnam
7709 do
7710 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7711 echo "configure:7712: checking for $ac_func" >&5
7712 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7713   echo $ac_n "(cached) $ac_c" 1>&6
7714 else
7715   cat > conftest.$ac_ext <<EOF
7716 #line 7717 "configure"
7717 #include "confdefs.h"
7718 /* System header to define __stub macros and hopefully few prototypes,
7719     which can conflict with char $ac_func(); below.  */
7720 #include <assert.h>
7721 /* Override any gcc2 internal prototype to avoid an error.  */
7722 /* We use char because int might match the return type of a gcc2
7723     builtin and then its argument prototype would still apply.  */
7724 char $ac_func();
7725
7726 int main() {
7727
7728 /* The GNU C library defines this for functions which it implements
7729     to always fail with ENOSYS.  Some functions are actually named
7730     something starting with __ and the normal name is an alias.  */
7731 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7732 choke me
7733 #else
7734 $ac_func();
7735 #endif
7736
7737 ; return 0; }
7738 EOF
7739 if { (eval echo configure:7740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7740   rm -rf conftest*
7741   eval "ac_cv_func_$ac_func=yes"
7742 else
7743   echo "configure: failed program was:" >&5
7744   cat conftest.$ac_ext >&5
7745   rm -rf conftest*
7746   eval "ac_cv_func_$ac_func=no"
7747 fi
7748 rm -f conftest*
7749 fi
7750
7751 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7752   echo "$ac_t""yes" 1>&6
7753     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7754   cat >> confdefs.h <<EOF
7755 #define $ac_tr_func 1
7756 EOF
7757  
7758 else
7759   echo "$ac_t""no" 1>&6
7760 fi
7761 done
7762  ;;
7763   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7764 echo "configure:7765: checking for getspnam in -lsecurity" >&5
7765 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7766 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7767   echo $ac_n "(cached) $ac_c" 1>&6
7768 else
7769   ac_save_LIBS="$LIBS"
7770 LIBS="-lsecurity  $LIBS"
7771 cat > conftest.$ac_ext <<EOF
7772 #line 7773 "configure"
7773 #include "confdefs.h"
7774 /* Override any gcc2 internal prototype to avoid an error.  */
7775 /* We use char because int might match the return type of a gcc2
7776     builtin and then its argument prototype would still apply.  */
7777 char getspnam();
7778
7779 int main() {
7780 getspnam()
7781 ; return 0; }
7782 EOF
7783 if { (eval echo configure:7784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7784   rm -rf conftest*
7785   eval "ac_cv_lib_$ac_lib_var=yes"
7786 else
7787   echo "configure: failed program was:" >&5
7788   cat conftest.$ac_ext >&5
7789   rm -rf conftest*
7790   eval "ac_cv_lib_$ac_lib_var=no"
7791 fi
7792 rm -f conftest*
7793 LIBS="$ac_save_LIBS"
7794
7795 fi
7796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7797   echo "$ac_t""yes" 1>&6
7798     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7799     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7800   cat >> confdefs.h <<EOF
7801 #define $ac_tr_lib 1
7802 EOF
7803
7804   LIBS="-lsecurity $LIBS"
7805
7806 else
7807   echo "$ac_t""no" 1>&6
7808 fi
7809  
7810      for ac_func in getspnam
7811 do
7812 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7813 echo "configure:7814: checking for $ac_func" >&5
7814 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7815   echo $ac_n "(cached) $ac_c" 1>&6
7816 else
7817   cat > conftest.$ac_ext <<EOF
7818 #line 7819 "configure"
7819 #include "confdefs.h"
7820 /* System header to define __stub macros and hopefully few prototypes,
7821     which can conflict with char $ac_func(); below.  */
7822 #include <assert.h>
7823 /* Override any gcc2 internal prototype to avoid an error.  */
7824 /* We use char because int might match the return type of a gcc2
7825     builtin and then its argument prototype would still apply.  */
7826 char $ac_func();
7827
7828 int main() {
7829
7830 /* The GNU C library defines this for functions which it implements
7831     to always fail with ENOSYS.  Some functions are actually named
7832     something starting with __ and the normal name is an alias.  */
7833 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7834 choke me
7835 #else
7836 $ac_func();
7837 #endif
7838
7839 ; return 0; }
7840 EOF
7841 if { (eval echo configure:7842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7842   rm -rf conftest*
7843   eval "ac_cv_func_$ac_func=yes"
7844 else
7845   echo "configure: failed program was:" >&5
7846   cat conftest.$ac_ext >&5
7847   rm -rf conftest*
7848   eval "ac_cv_func_$ac_func=no"
7849 fi
7850 rm -f conftest*
7851 fi
7852
7853 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7854   echo "$ac_t""yes" 1>&6
7855     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7856   cat >> confdefs.h <<EOF
7857 #define $ac_tr_func 1
7858 EOF
7859  
7860 else
7861   echo "$ac_t""no" 1>&6
7862 fi
7863 done
7864
7865   ;;
7866   esac
7867
7868 case "$LIBS" in
7869   *-lsec*) for ac_func in getspnam
7870 do
7871 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7872 echo "configure:7873: checking for $ac_func" >&5
7873 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7874   echo $ac_n "(cached) $ac_c" 1>&6
7875 else
7876   cat > conftest.$ac_ext <<EOF
7877 #line 7878 "configure"
7878 #include "confdefs.h"
7879 /* System header to define __stub macros and hopefully few prototypes,
7880     which can conflict with char $ac_func(); below.  */
7881 #include <assert.h>
7882 /* Override any gcc2 internal prototype to avoid an error.  */
7883 /* We use char because int might match the return type of a gcc2
7884     builtin and then its argument prototype would still apply.  */
7885 char $ac_func();
7886
7887 int main() {
7888
7889 /* The GNU C library defines this for functions which it implements
7890     to always fail with ENOSYS.  Some functions are actually named
7891     something starting with __ and the normal name is an alias.  */
7892 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7893 choke me
7894 #else
7895 $ac_func();
7896 #endif
7897
7898 ; return 0; }
7899 EOF
7900 if { (eval echo configure:7901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7901   rm -rf conftest*
7902   eval "ac_cv_func_$ac_func=yes"
7903 else
7904   echo "configure: failed program was:" >&5
7905   cat conftest.$ac_ext >&5
7906   rm -rf conftest*
7907   eval "ac_cv_func_$ac_func=no"
7908 fi
7909 rm -f conftest*
7910 fi
7911
7912 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7913   echo "$ac_t""yes" 1>&6
7914     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7915   cat >> confdefs.h <<EOF
7916 #define $ac_tr_func 1
7917 EOF
7918  
7919 else
7920   echo "$ac_t""no" 1>&6
7921 fi
7922 done
7923  ;;
7924   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7925 echo "configure:7926: checking for getspnam in -lsec" >&5
7926 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7927 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7928   echo $ac_n "(cached) $ac_c" 1>&6
7929 else
7930   ac_save_LIBS="$LIBS"
7931 LIBS="-lsec  $LIBS"
7932 cat > conftest.$ac_ext <<EOF
7933 #line 7934 "configure"
7934 #include "confdefs.h"
7935 /* Override any gcc2 internal prototype to avoid an error.  */
7936 /* We use char because int might match the return type of a gcc2
7937     builtin and then its argument prototype would still apply.  */
7938 char getspnam();
7939
7940 int main() {
7941 getspnam()
7942 ; return 0; }
7943 EOF
7944 if { (eval echo configure:7945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7945   rm -rf conftest*
7946   eval "ac_cv_lib_$ac_lib_var=yes"
7947 else
7948   echo "configure: failed program was:" >&5
7949   cat conftest.$ac_ext >&5
7950   rm -rf conftest*
7951   eval "ac_cv_lib_$ac_lib_var=no"
7952 fi
7953 rm -f conftest*
7954 LIBS="$ac_save_LIBS"
7955
7956 fi
7957 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7958   echo "$ac_t""yes" 1>&6
7959     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7960     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7961   cat >> confdefs.h <<EOF
7962 #define $ac_tr_lib 1
7963 EOF
7964
7965   LIBS="-lsec $LIBS"
7966
7967 else
7968   echo "$ac_t""no" 1>&6
7969 fi
7970  
7971      for ac_func in getspnam
7972 do
7973 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7974 echo "configure:7975: checking for $ac_func" >&5
7975 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7976   echo $ac_n "(cached) $ac_c" 1>&6
7977 else
7978   cat > conftest.$ac_ext <<EOF
7979 #line 7980 "configure"
7980 #include "confdefs.h"
7981 /* System header to define __stub macros and hopefully few prototypes,
7982     which can conflict with char $ac_func(); below.  */
7983 #include <assert.h>
7984 /* Override any gcc2 internal prototype to avoid an error.  */
7985 /* We use char because int might match the return type of a gcc2
7986     builtin and then its argument prototype would still apply.  */
7987 char $ac_func();
7988
7989 int main() {
7990
7991 /* The GNU C library defines this for functions which it implements
7992     to always fail with ENOSYS.  Some functions are actually named
7993     something starting with __ and the normal name is an alias.  */
7994 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7995 choke me
7996 #else
7997 $ac_func();
7998 #endif
7999
8000 ; return 0; }
8001 EOF
8002 if { (eval echo configure:8003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8003   rm -rf conftest*
8004   eval "ac_cv_func_$ac_func=yes"
8005 else
8006   echo "configure: failed program was:" >&5
8007   cat conftest.$ac_ext >&5
8008   rm -rf conftest*
8009   eval "ac_cv_func_$ac_func=no"
8010 fi
8011 rm -f conftest*
8012 fi
8013
8014 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8015   echo "$ac_t""yes" 1>&6
8016     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8017   cat >> confdefs.h <<EOF
8018 #define $ac_tr_func 1
8019 EOF
8020  
8021 else
8022   echo "$ac_t""no" 1>&6
8023 fi
8024 done
8025
8026   ;;
8027   esac
8028
8029
8030 case "$LIBS" in
8031   *-lsecurity*) for ac_func in bigcrypt
8032 do
8033 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8034 echo "configure:8035: checking for $ac_func" >&5
8035 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8036   echo $ac_n "(cached) $ac_c" 1>&6
8037 else
8038   cat > conftest.$ac_ext <<EOF
8039 #line 8040 "configure"
8040 #include "confdefs.h"
8041 /* System header to define __stub macros and hopefully few prototypes,
8042     which can conflict with char $ac_func(); below.  */
8043 #include <assert.h>
8044 /* Override any gcc2 internal prototype to avoid an error.  */
8045 /* We use char because int might match the return type of a gcc2
8046     builtin and then its argument prototype would still apply.  */
8047 char $ac_func();
8048
8049 int main() {
8050
8051 /* The GNU C library defines this for functions which it implements
8052     to always fail with ENOSYS.  Some functions are actually named
8053     something starting with __ and the normal name is an alias.  */
8054 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8055 choke me
8056 #else
8057 $ac_func();
8058 #endif
8059
8060 ; return 0; }
8061 EOF
8062 if { (eval echo configure:8063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8063   rm -rf conftest*
8064   eval "ac_cv_func_$ac_func=yes"
8065 else
8066   echo "configure: failed program was:" >&5
8067   cat conftest.$ac_ext >&5
8068   rm -rf conftest*
8069   eval "ac_cv_func_$ac_func=no"
8070 fi
8071 rm -f conftest*
8072 fi
8073
8074 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8075   echo "$ac_t""yes" 1>&6
8076     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8077   cat >> confdefs.h <<EOF
8078 #define $ac_tr_func 1
8079 EOF
8080  
8081 else
8082   echo "$ac_t""no" 1>&6
8083 fi
8084 done
8085  ;;
8086   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
8087 echo "configure:8088: checking for bigcrypt in -lsecurity" >&5
8088 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
8089 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8090   echo $ac_n "(cached) $ac_c" 1>&6
8091 else
8092   ac_save_LIBS="$LIBS"
8093 LIBS="-lsecurity  $LIBS"
8094 cat > conftest.$ac_ext <<EOF
8095 #line 8096 "configure"
8096 #include "confdefs.h"
8097 /* Override any gcc2 internal prototype to avoid an error.  */
8098 /* We use char because int might match the return type of a gcc2
8099     builtin and then its argument prototype would still apply.  */
8100 char bigcrypt();
8101
8102 int main() {
8103 bigcrypt()
8104 ; return 0; }
8105 EOF
8106 if { (eval echo configure:8107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8107   rm -rf conftest*
8108   eval "ac_cv_lib_$ac_lib_var=yes"
8109 else
8110   echo "configure: failed program was:" >&5
8111   cat conftest.$ac_ext >&5
8112   rm -rf conftest*
8113   eval "ac_cv_lib_$ac_lib_var=no"
8114 fi
8115 rm -f conftest*
8116 LIBS="$ac_save_LIBS"
8117
8118 fi
8119 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8120   echo "$ac_t""yes" 1>&6
8121     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8122     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8123   cat >> confdefs.h <<EOF
8124 #define $ac_tr_lib 1
8125 EOF
8126
8127   LIBS="-lsecurity $LIBS"
8128
8129 else
8130   echo "$ac_t""no" 1>&6
8131 fi
8132  
8133      for ac_func in bigcrypt
8134 do
8135 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8136 echo "configure:8137: checking for $ac_func" >&5
8137 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8138   echo $ac_n "(cached) $ac_c" 1>&6
8139 else
8140   cat > conftest.$ac_ext <<EOF
8141 #line 8142 "configure"
8142 #include "confdefs.h"
8143 /* System header to define __stub macros and hopefully few prototypes,
8144     which can conflict with char $ac_func(); below.  */
8145 #include <assert.h>
8146 /* Override any gcc2 internal prototype to avoid an error.  */
8147 /* We use char because int might match the return type of a gcc2
8148     builtin and then its argument prototype would still apply.  */
8149 char $ac_func();
8150
8151 int main() {
8152
8153 /* The GNU C library defines this for functions which it implements
8154     to always fail with ENOSYS.  Some functions are actually named
8155     something starting with __ and the normal name is an alias.  */
8156 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8157 choke me
8158 #else
8159 $ac_func();
8160 #endif
8161
8162 ; return 0; }
8163 EOF
8164 if { (eval echo configure:8165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8165   rm -rf conftest*
8166   eval "ac_cv_func_$ac_func=yes"
8167 else
8168   echo "configure: failed program was:" >&5
8169   cat conftest.$ac_ext >&5
8170   rm -rf conftest*
8171   eval "ac_cv_func_$ac_func=no"
8172 fi
8173 rm -f conftest*
8174 fi
8175
8176 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8177   echo "$ac_t""yes" 1>&6
8178     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8179   cat >> confdefs.h <<EOF
8180 #define $ac_tr_func 1
8181 EOF
8182  
8183 else
8184   echo "$ac_t""no" 1>&6
8185 fi
8186 done
8187
8188   ;;
8189   esac
8190
8191 case "$LIBS" in
8192   *-lsec*) for ac_func in bigcrypt
8193 do
8194 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8195 echo "configure:8196: checking for $ac_func" >&5
8196 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8197   echo $ac_n "(cached) $ac_c" 1>&6
8198 else
8199   cat > conftest.$ac_ext <<EOF
8200 #line 8201 "configure"
8201 #include "confdefs.h"
8202 /* System header to define __stub macros and hopefully few prototypes,
8203     which can conflict with char $ac_func(); below.  */
8204 #include <assert.h>
8205 /* Override any gcc2 internal prototype to avoid an error.  */
8206 /* We use char because int might match the return type of a gcc2
8207     builtin and then its argument prototype would still apply.  */
8208 char $ac_func();
8209
8210 int main() {
8211
8212 /* The GNU C library defines this for functions which it implements
8213     to always fail with ENOSYS.  Some functions are actually named
8214     something starting with __ and the normal name is an alias.  */
8215 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8216 choke me
8217 #else
8218 $ac_func();
8219 #endif
8220
8221 ; return 0; }
8222 EOF
8223 if { (eval echo configure:8224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8224   rm -rf conftest*
8225   eval "ac_cv_func_$ac_func=yes"
8226 else
8227   echo "configure: failed program was:" >&5
8228   cat conftest.$ac_ext >&5
8229   rm -rf conftest*
8230   eval "ac_cv_func_$ac_func=no"
8231 fi
8232 rm -f conftest*
8233 fi
8234
8235 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8236   echo "$ac_t""yes" 1>&6
8237     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8238   cat >> confdefs.h <<EOF
8239 #define $ac_tr_func 1
8240 EOF
8241  
8242 else
8243   echo "$ac_t""no" 1>&6
8244 fi
8245 done
8246  ;;
8247   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8248 echo "configure:8249: checking for bigcrypt in -lsec" >&5
8249 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8250 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8251   echo $ac_n "(cached) $ac_c" 1>&6
8252 else
8253   ac_save_LIBS="$LIBS"
8254 LIBS="-lsec  $LIBS"
8255 cat > conftest.$ac_ext <<EOF
8256 #line 8257 "configure"
8257 #include "confdefs.h"
8258 /* Override any gcc2 internal prototype to avoid an error.  */
8259 /* We use char because int might match the return type of a gcc2
8260     builtin and then its argument prototype would still apply.  */
8261 char bigcrypt();
8262
8263 int main() {
8264 bigcrypt()
8265 ; return 0; }
8266 EOF
8267 if { (eval echo configure:8268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8268   rm -rf conftest*
8269   eval "ac_cv_lib_$ac_lib_var=yes"
8270 else
8271   echo "configure: failed program was:" >&5
8272   cat conftest.$ac_ext >&5
8273   rm -rf conftest*
8274   eval "ac_cv_lib_$ac_lib_var=no"
8275 fi
8276 rm -f conftest*
8277 LIBS="$ac_save_LIBS"
8278
8279 fi
8280 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8281   echo "$ac_t""yes" 1>&6
8282     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8283     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8284   cat >> confdefs.h <<EOF
8285 #define $ac_tr_lib 1
8286 EOF
8287
8288   LIBS="-lsec $LIBS"
8289
8290 else
8291   echo "$ac_t""no" 1>&6
8292 fi
8293  
8294      for ac_func in bigcrypt
8295 do
8296 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8297 echo "configure:8298: checking for $ac_func" >&5
8298 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8299   echo $ac_n "(cached) $ac_c" 1>&6
8300 else
8301   cat > conftest.$ac_ext <<EOF
8302 #line 8303 "configure"
8303 #include "confdefs.h"
8304 /* System header to define __stub macros and hopefully few prototypes,
8305     which can conflict with char $ac_func(); below.  */
8306 #include <assert.h>
8307 /* Override any gcc2 internal prototype to avoid an error.  */
8308 /* We use char because int might match the return type of a gcc2
8309     builtin and then its argument prototype would still apply.  */
8310 char $ac_func();
8311
8312 int main() {
8313
8314 /* The GNU C library defines this for functions which it implements
8315     to always fail with ENOSYS.  Some functions are actually named
8316     something starting with __ and the normal name is an alias.  */
8317 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8318 choke me
8319 #else
8320 $ac_func();
8321 #endif
8322
8323 ; return 0; }
8324 EOF
8325 if { (eval echo configure:8326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8326   rm -rf conftest*
8327   eval "ac_cv_func_$ac_func=yes"
8328 else
8329   echo "configure: failed program was:" >&5
8330   cat conftest.$ac_ext >&5
8331   rm -rf conftest*
8332   eval "ac_cv_func_$ac_func=no"
8333 fi
8334 rm -f conftest*
8335 fi
8336
8337 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8338   echo "$ac_t""yes" 1>&6
8339     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8340   cat >> confdefs.h <<EOF
8341 #define $ac_tr_func 1
8342 EOF
8343  
8344 else
8345   echo "$ac_t""no" 1>&6
8346 fi
8347 done
8348
8349   ;;
8350   esac
8351
8352
8353 case "$LIBS" in
8354   *-lsecurity*) for ac_func in getprpwnam
8355 do
8356 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8357 echo "configure:8358: checking for $ac_func" >&5
8358 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8359   echo $ac_n "(cached) $ac_c" 1>&6
8360 else
8361   cat > conftest.$ac_ext <<EOF
8362 #line 8363 "configure"
8363 #include "confdefs.h"
8364 /* System header to define __stub macros and hopefully few prototypes,
8365     which can conflict with char $ac_func(); below.  */
8366 #include <assert.h>
8367 /* Override any gcc2 internal prototype to avoid an error.  */
8368 /* We use char because int might match the return type of a gcc2
8369     builtin and then its argument prototype would still apply.  */
8370 char $ac_func();
8371
8372 int main() {
8373
8374 /* The GNU C library defines this for functions which it implements
8375     to always fail with ENOSYS.  Some functions are actually named
8376     something starting with __ and the normal name is an alias.  */
8377 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8378 choke me
8379 #else
8380 $ac_func();
8381 #endif
8382
8383 ; return 0; }
8384 EOF
8385 if { (eval echo configure:8386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8386   rm -rf conftest*
8387   eval "ac_cv_func_$ac_func=yes"
8388 else
8389   echo "configure: failed program was:" >&5
8390   cat conftest.$ac_ext >&5
8391   rm -rf conftest*
8392   eval "ac_cv_func_$ac_func=no"
8393 fi
8394 rm -f conftest*
8395 fi
8396
8397 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8398   echo "$ac_t""yes" 1>&6
8399     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8400   cat >> confdefs.h <<EOF
8401 #define $ac_tr_func 1
8402 EOF
8403  
8404 else
8405   echo "$ac_t""no" 1>&6
8406 fi
8407 done
8408  ;;
8409   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8410 echo "configure:8411: checking for getprpwnam in -lsecurity" >&5
8411 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8412 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8413   echo $ac_n "(cached) $ac_c" 1>&6
8414 else
8415   ac_save_LIBS="$LIBS"
8416 LIBS="-lsecurity  $LIBS"
8417 cat > conftest.$ac_ext <<EOF
8418 #line 8419 "configure"
8419 #include "confdefs.h"
8420 /* Override any gcc2 internal prototype to avoid an error.  */
8421 /* We use char because int might match the return type of a gcc2
8422     builtin and then its argument prototype would still apply.  */
8423 char getprpwnam();
8424
8425 int main() {
8426 getprpwnam()
8427 ; return 0; }
8428 EOF
8429 if { (eval echo configure:8430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8430   rm -rf conftest*
8431   eval "ac_cv_lib_$ac_lib_var=yes"
8432 else
8433   echo "configure: failed program was:" >&5
8434   cat conftest.$ac_ext >&5
8435   rm -rf conftest*
8436   eval "ac_cv_lib_$ac_lib_var=no"
8437 fi
8438 rm -f conftest*
8439 LIBS="$ac_save_LIBS"
8440
8441 fi
8442 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8443   echo "$ac_t""yes" 1>&6
8444     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8445     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8446   cat >> confdefs.h <<EOF
8447 #define $ac_tr_lib 1
8448 EOF
8449
8450   LIBS="-lsecurity $LIBS"
8451
8452 else
8453   echo "$ac_t""no" 1>&6
8454 fi
8455  
8456      for ac_func in getprpwnam
8457 do
8458 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8459 echo "configure:8460: checking for $ac_func" >&5
8460 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8461   echo $ac_n "(cached) $ac_c" 1>&6
8462 else
8463   cat > conftest.$ac_ext <<EOF
8464 #line 8465 "configure"
8465 #include "confdefs.h"
8466 /* System header to define __stub macros and hopefully few prototypes,
8467     which can conflict with char $ac_func(); below.  */
8468 #include <assert.h>
8469 /* Override any gcc2 internal prototype to avoid an error.  */
8470 /* We use char because int might match the return type of a gcc2
8471     builtin and then its argument prototype would still apply.  */
8472 char $ac_func();
8473
8474 int main() {
8475
8476 /* The GNU C library defines this for functions which it implements
8477     to always fail with ENOSYS.  Some functions are actually named
8478     something starting with __ and the normal name is an alias.  */
8479 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8480 choke me
8481 #else
8482 $ac_func();
8483 #endif
8484
8485 ; return 0; }
8486 EOF
8487 if { (eval echo configure:8488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8488   rm -rf conftest*
8489   eval "ac_cv_func_$ac_func=yes"
8490 else
8491   echo "configure: failed program was:" >&5
8492   cat conftest.$ac_ext >&5
8493   rm -rf conftest*
8494   eval "ac_cv_func_$ac_func=no"
8495 fi
8496 rm -f conftest*
8497 fi
8498
8499 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8500   echo "$ac_t""yes" 1>&6
8501     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8502   cat >> confdefs.h <<EOF
8503 #define $ac_tr_func 1
8504 EOF
8505  
8506 else
8507   echo "$ac_t""no" 1>&6
8508 fi
8509 done
8510
8511   ;;
8512   esac
8513
8514 case "$LIBS" in
8515   *-lsec*) for ac_func in getprpwnam
8516 do
8517 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8518 echo "configure:8519: checking for $ac_func" >&5
8519 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8520   echo $ac_n "(cached) $ac_c" 1>&6
8521 else
8522   cat > conftest.$ac_ext <<EOF
8523 #line 8524 "configure"
8524 #include "confdefs.h"
8525 /* System header to define __stub macros and hopefully few prototypes,
8526     which can conflict with char $ac_func(); below.  */
8527 #include <assert.h>
8528 /* Override any gcc2 internal prototype to avoid an error.  */
8529 /* We use char because int might match the return type of a gcc2
8530     builtin and then its argument prototype would still apply.  */
8531 char $ac_func();
8532
8533 int main() {
8534
8535 /* The GNU C library defines this for functions which it implements
8536     to always fail with ENOSYS.  Some functions are actually named
8537     something starting with __ and the normal name is an alias.  */
8538 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8539 choke me
8540 #else
8541 $ac_func();
8542 #endif
8543
8544 ; return 0; }
8545 EOF
8546 if { (eval echo configure:8547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8547   rm -rf conftest*
8548   eval "ac_cv_func_$ac_func=yes"
8549 else
8550   echo "configure: failed program was:" >&5
8551   cat conftest.$ac_ext >&5
8552   rm -rf conftest*
8553   eval "ac_cv_func_$ac_func=no"
8554 fi
8555 rm -f conftest*
8556 fi
8557
8558 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8559   echo "$ac_t""yes" 1>&6
8560     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8561   cat >> confdefs.h <<EOF
8562 #define $ac_tr_func 1
8563 EOF
8564  
8565 else
8566   echo "$ac_t""no" 1>&6
8567 fi
8568 done
8569  ;;
8570   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8571 echo "configure:8572: checking for getprpwnam in -lsec" >&5
8572 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8573 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8574   echo $ac_n "(cached) $ac_c" 1>&6
8575 else
8576   ac_save_LIBS="$LIBS"
8577 LIBS="-lsec  $LIBS"
8578 cat > conftest.$ac_ext <<EOF
8579 #line 8580 "configure"
8580 #include "confdefs.h"
8581 /* Override any gcc2 internal prototype to avoid an error.  */
8582 /* We use char because int might match the return type of a gcc2
8583     builtin and then its argument prototype would still apply.  */
8584 char getprpwnam();
8585
8586 int main() {
8587 getprpwnam()
8588 ; return 0; }
8589 EOF
8590 if { (eval echo configure:8591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8591   rm -rf conftest*
8592   eval "ac_cv_lib_$ac_lib_var=yes"
8593 else
8594   echo "configure: failed program was:" >&5
8595   cat conftest.$ac_ext >&5
8596   rm -rf conftest*
8597   eval "ac_cv_lib_$ac_lib_var=no"
8598 fi
8599 rm -f conftest*
8600 LIBS="$ac_save_LIBS"
8601
8602 fi
8603 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8604   echo "$ac_t""yes" 1>&6
8605     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8606     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8607   cat >> confdefs.h <<EOF
8608 #define $ac_tr_lib 1
8609 EOF
8610
8611   LIBS="-lsec $LIBS"
8612
8613 else
8614   echo "$ac_t""no" 1>&6
8615 fi
8616  
8617      for ac_func in getprpwnam
8618 do
8619 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8620 echo "configure:8621: checking for $ac_func" >&5
8621 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8622   echo $ac_n "(cached) $ac_c" 1>&6
8623 else
8624   cat > conftest.$ac_ext <<EOF
8625 #line 8626 "configure"
8626 #include "confdefs.h"
8627 /* System header to define __stub macros and hopefully few prototypes,
8628     which can conflict with char $ac_func(); below.  */
8629 #include <assert.h>
8630 /* Override any gcc2 internal prototype to avoid an error.  */
8631 /* We use char because int might match the return type of a gcc2
8632     builtin and then its argument prototype would still apply.  */
8633 char $ac_func();
8634
8635 int main() {
8636
8637 /* The GNU C library defines this for functions which it implements
8638     to always fail with ENOSYS.  Some functions are actually named
8639     something starting with __ and the normal name is an alias.  */
8640 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8641 choke me
8642 #else
8643 $ac_func();
8644 #endif
8645
8646 ; return 0; }
8647 EOF
8648 if { (eval echo configure:8649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8649   rm -rf conftest*
8650   eval "ac_cv_func_$ac_func=yes"
8651 else
8652   echo "configure: failed program was:" >&5
8653   cat conftest.$ac_ext >&5
8654   rm -rf conftest*
8655   eval "ac_cv_func_$ac_func=no"
8656 fi
8657 rm -f conftest*
8658 fi
8659
8660 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8661   echo "$ac_t""yes" 1>&6
8662     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8663   cat >> confdefs.h <<EOF
8664 #define $ac_tr_func 1
8665 EOF
8666  
8667 else
8668   echo "$ac_t""no" 1>&6
8669 fi
8670 done
8671
8672   ;;
8673   esac
8674
8675
8676 # this bit needs to be modified for each OS that is suported by
8677 # smbwrapper. You need to specify how to created a shared library and
8678 # how to compile C code to produce PIC object files
8679
8680 # these are the defaults, good for lots of systems
8681 HOST_OS="$host_os"
8682 LDSHFLAGS="-shared"
8683 PICFLAG=""
8684 SHLIBEXT="so"
8685 BLDSHARED="false"
8686
8687 # and these are for particular systems
8688 case "$host_os" in
8689                 *linux*)   cat >> confdefs.h <<\EOF
8690 #define LINUX 1
8691 EOF
8692
8693                                         BLDSHARED="true"
8694                 ;;
8695                 *solaris*) cat >> confdefs.h <<\EOF
8696 #define SUNOS5 1
8697 EOF
8698
8699                                         LDSHFLAGS="-G"
8700                                         BLDSHARED="true"
8701                 ;;
8702                 *sunos*) cat >> confdefs.h <<\EOF
8703 #define SUNOS4 1
8704 EOF
8705
8706                                         LDSHFLAGS=""
8707                 ;;
8708                 *bsd*) LDSHFLAGS="-shared -Bshareable"
8709                         BLDSHARED="true"
8710                 ;;
8711                 *irix*) cat >> confdefs.h <<\EOF
8712 #define IRIX 1
8713 EOF
8714
8715                         case "$host_os" in
8716                         *irix6*) cat >> confdefs.h <<\EOF
8717 #define IRIX6 1
8718 EOF
8719
8720                         ;;
8721                         esac
8722                         ATTEMPT_WRAP32_BUILD=yes
8723                 ;;
8724                 *aix*) cat >> confdefs.h <<\EOF
8725 #define AIX 1
8726 EOF
8727 ;;
8728                 *hpux*) cat >> confdefs.h <<\EOF
8729 #define HPUX 1
8730 EOF
8731
8732                         SHLIBEXT="sl"
8733                         # Use special PIC flags for the native HP-UX compiler.
8734                         if test $ac_cv_prog_cc_Ae = yes; then
8735                                 LDSHFLAGS="-b"
8736                                 PICFLAG="+z"
8737                         fi
8738                 ;;
8739                 *qnx*) cat >> confdefs.h <<\EOF
8740 #define QNX 1
8741 EOF
8742 ;;
8743                 *osf*) cat >> confdefs.h <<\EOF
8744 #define OSF1 1
8745 EOF
8746 ;;
8747                 *sco*) cat >> confdefs.h <<\EOF
8748 #define SCO 1
8749 EOF
8750 ;;
8751                 *next2*) cat >> confdefs.h <<\EOF
8752 #define NEXT2 1
8753 EOF
8754 ;;
8755                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8756 set dummy groff; ac_word=$2
8757 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8758 echo "configure:8759: checking for $ac_word" >&5
8759 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8760   echo $ac_n "(cached) $ac_c" 1>&6
8761 else
8762   if test -n "$ROFF"; then
8763   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8764 else
8765   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8766   ac_dummy="$PATH"
8767   for ac_dir in $ac_dummy; do
8768     test -z "$ac_dir" && ac_dir=.
8769     if test -f $ac_dir/$ac_word; then
8770       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8771       break
8772     fi
8773   done
8774   IFS="$ac_save_ifs"
8775 fi
8776 fi
8777 ROFF="$ac_cv_prog_ROFF"
8778 if test -n "$ROFF"; then
8779   echo "$ac_t""$ROFF" 1>&6
8780 else
8781   echo "$ac_t""no" 1>&6
8782 fi
8783 ;;
8784                 *sysv4*)
8785                         case "$host" in
8786                                 *-univel-*)     if  test "$GCC" != yes ; then
8787                                                                         cat >> confdefs.h <<\EOF
8788 #define HAVE_MEMSET 1
8789 EOF
8790
8791                                                                 fi
8792                                                                 LDSHFLAGS="-G"
8793                                 ;;
8794                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
8795 #define RELIANTUNIX 1
8796 EOF
8797 ;;
8798                         esac
8799                         ;;
8800                 *sysv5*)
8801                         if  test "$GCC" != yes ; then
8802                                 cat >> confdefs.h <<\EOF
8803 #define HAVE_MEMSET 1
8804 EOF
8805
8806                         fi
8807                         LDSHFLAGS="-G"
8808                         ;;
8809 esac
8810
8811 # try to work out how to produce PIC code with this compiler
8812 echo $ac_n "checking whether ${CC-cc} accepts -fPIC""... $ac_c" 1>&6
8813 echo "configure:8814: checking whether ${CC-cc} accepts -fPIC" >&5
8814 if eval "test \"`echo '$''{'ac_cv_prog_cc_fPIC'+set}'`\" = set"; then
8815   echo $ac_n "(cached) $ac_c" 1>&6
8816 else
8817   echo 'void f(){}' > conftest.c
8818 if test -z "`${CC-cc} -fPIC -c conftest.c 2>&1`"; then
8819   ac_cv_prog_cc_fPIC=yes
8820 else
8821   ac_cv_prog_cc_fPIC=no
8822 fi
8823 rm -f conftest*
8824
8825 fi
8826
8827 echo "$ac_t""$ac_cv_prog_cc_fPIC" 1>&6
8828 if test $ac_cv_prog_cc_fPIC = yes; then
8829     PICFLAG="-fPIC";
8830 fi
8831 if test x$PICFLAG = x; then
8832   echo $ac_n "checking whether ${CC-cc} accepts -KPIC""... $ac_c" 1>&6
8833 echo "configure:8834: checking whether ${CC-cc} accepts -KPIC" >&5
8834 if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then
8835   echo $ac_n "(cached) $ac_c" 1>&6
8836 else
8837   echo 'void f(){}' > conftest.c
8838 if test -z "`${CC-cc} -KPIC -c conftest.c 2>&1`"; then
8839   ac_cv_prog_cc_KPIC=yes
8840 else
8841   ac_cv_prog_cc_KPIC=no
8842 fi
8843 rm -f conftest*
8844
8845 fi
8846
8847 echo "$ac_t""$ac_cv_prog_cc_KPIC" 1>&6
8848   if test $ac_cv_prog_cc_KPIC = yes; then
8849     PICFLAG="-KPIC";
8850   fi
8851 fi
8852 if test x$PICFLAG = x; then
8853   echo $ac_n "checking whether ${CC-cc} accepts -Kpic""... $ac_c" 1>&6
8854 echo "configure:8855: checking whether ${CC-cc} accepts -Kpic" >&5
8855 if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then
8856   echo $ac_n "(cached) $ac_c" 1>&6
8857 else
8858   echo 'void f(){}' > conftest.c
8859 if test -z "`${CC-cc} -Kpic -c conftest.c 2>&1`"; then
8860   ac_cv_prog_cc_Kpic=yes
8861 else
8862   ac_cv_prog_cc_Kpic=no
8863 fi
8864 rm -f conftest*
8865
8866 fi
8867
8868 echo "$ac_t""$ac_cv_prog_cc_Kpic" 1>&6
8869   if test $ac_cv_prog_cc_Kpic = yes; then
8870     PICFLAG="-Kpic";
8871   fi
8872 fi
8873
8874 ################
8875
8876 echo $ac_n "checking for long long""... $ac_c" 1>&6
8877 echo "configure:8878: checking for long long" >&5
8878 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8879   echo $ac_n "(cached) $ac_c" 1>&6
8880 else
8881   
8882 if test "$cross_compiling" = yes; then
8883   samba_cv_have_longlong=cross
8884 else
8885   cat > conftest.$ac_ext <<EOF
8886 #line 8887 "configure"
8887 #include "confdefs.h"
8888 #include <stdio.h>
8889 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8890 EOF
8891 if { (eval echo configure:8892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8892 then
8893   samba_cv_have_longlong=yes
8894 else
8895   echo "configure: failed program was:" >&5
8896   cat conftest.$ac_ext >&5
8897   rm -fr conftest*
8898   samba_cv_have_longlong=no
8899 fi
8900 rm -fr conftest*
8901 fi
8902
8903 fi
8904
8905 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8906 if test x"$samba_cv_have_longlong" = x"yes"; then
8907     cat >> confdefs.h <<\EOF
8908 #define HAVE_LONGLONG 1
8909 EOF
8910
8911 fi
8912
8913 #
8914 # Check if the compiler supports the LL prefix on long long integers.
8915 # AIX needs this.
8916
8917 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8918 echo "configure:8919: checking for LL suffix on long long integers" >&5
8919 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8920   echo $ac_n "(cached) $ac_c" 1>&6
8921 else
8922   
8923     cat > conftest.$ac_ext <<EOF
8924 #line 8925 "configure"
8925 #include "confdefs.h"
8926 #include <stdio.h>
8927 int main() {
8928 long long i = 0x8000000000LL
8929 ; return 0; }
8930 EOF
8931 if { (eval echo configure:8932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8932   rm -rf conftest*
8933   samba_cv_compiler_supports_ll=yes
8934 else
8935   echo "configure: failed program was:" >&5
8936   cat conftest.$ac_ext >&5
8937   rm -rf conftest*
8938   samba_cv_compiler_supports_ll=no
8939 fi
8940 rm -f conftest*
8941 fi
8942
8943 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8944 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8945    cat >> confdefs.h <<\EOF
8946 #define COMPILER_SUPPORTS_LL 1
8947 EOF
8948
8949 fi
8950
8951   
8952 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8953 echo "configure:8954: checking for 64 bit off_t" >&5
8954 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8955   echo $ac_n "(cached) $ac_c" 1>&6
8956 else
8957   
8958 if test "$cross_compiling" = yes; then
8959   samba_cv_SIZEOF_OFF_T=cross
8960 else
8961   cat > conftest.$ac_ext <<EOF
8962 #line 8963 "configure"
8963 #include "confdefs.h"
8964 #include <stdio.h>
8965 #include <sys/stat.h>
8966 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8967 EOF
8968 if { (eval echo configure:8969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8969 then
8970   samba_cv_SIZEOF_OFF_T=yes
8971 else
8972   echo "configure: failed program was:" >&5
8973   cat conftest.$ac_ext >&5
8974   rm -fr conftest*
8975   samba_cv_SIZEOF_OFF_T=no
8976 fi
8977 rm -fr conftest*
8978 fi
8979
8980 fi
8981
8982 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8983 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8984     cat >> confdefs.h <<\EOF
8985 #define SIZEOF_OFF_T 8
8986 EOF
8987
8988 fi
8989
8990 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8991 echo "configure:8992: checking for off64_t" >&5
8992 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8993   echo $ac_n "(cached) $ac_c" 1>&6
8994 else
8995   
8996 if test "$cross_compiling" = yes; then
8997   samba_cv_HAVE_OFF64_T=cross
8998 else
8999   cat > conftest.$ac_ext <<EOF
9000 #line 9001 "configure"
9001 #include "confdefs.h"
9002
9003 #if defined(HAVE_UNISTD_H)
9004 #include <unistd.h>
9005 #endif
9006 #include <stdio.h>
9007 #include <sys/stat.h>
9008 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9009 EOF
9010 if { (eval echo configure:9011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9011 then
9012   samba_cv_HAVE_OFF64_T=yes
9013 else
9014   echo "configure: failed program was:" >&5
9015   cat conftest.$ac_ext >&5
9016   rm -fr conftest*
9017   samba_cv_HAVE_OFF64_T=no
9018 fi
9019 rm -fr conftest*
9020 fi
9021
9022 fi
9023
9024 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
9025 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
9026     cat >> confdefs.h <<\EOF
9027 #define HAVE_OFF64_T 1
9028 EOF
9029
9030 fi
9031
9032 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
9033 echo "configure:9034: checking for 64 bit ino_t" >&5
9034 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
9035   echo $ac_n "(cached) $ac_c" 1>&6
9036 else
9037   
9038 if test "$cross_compiling" = yes; then
9039   samba_cv_SIZEOF_INO_T=cross
9040 else
9041   cat > conftest.$ac_ext <<EOF
9042 #line 9043 "configure"
9043 #include "confdefs.h"
9044 #include <stdio.h>
9045 #include <sys/stat.h>
9046 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
9047 EOF
9048 if { (eval echo configure:9049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9049 then
9050   samba_cv_SIZEOF_INO_T=yes
9051 else
9052   echo "configure: failed program was:" >&5
9053   cat conftest.$ac_ext >&5
9054   rm -fr conftest*
9055   samba_cv_SIZEOF_INO_T=no
9056 fi
9057 rm -fr conftest*
9058 fi
9059
9060 fi
9061
9062 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
9063 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
9064     cat >> confdefs.h <<\EOF
9065 #define SIZEOF_INO_T 8
9066 EOF
9067
9068 fi
9069
9070 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
9071 echo "configure:9072: checking for ino64_t" >&5
9072 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
9073   echo $ac_n "(cached) $ac_c" 1>&6
9074 else
9075   
9076 if test "$cross_compiling" = yes; then
9077   samba_cv_HAVE_INO64_T=cross
9078 else
9079   cat > conftest.$ac_ext <<EOF
9080 #line 9081 "configure"
9081 #include "confdefs.h"
9082
9083 #if defined(HAVE_UNISTD_H)
9084 #include <unistd.h>
9085 #endif
9086 #include <stdio.h>
9087 #include <sys/stat.h>
9088 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9089 EOF
9090 if { (eval echo configure:9091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9091 then
9092   samba_cv_HAVE_INO64_T=yes
9093 else
9094   echo "configure: failed program was:" >&5
9095   cat conftest.$ac_ext >&5
9096   rm -fr conftest*
9097   samba_cv_HAVE_INO64_T=no
9098 fi
9099 rm -fr conftest*
9100 fi
9101
9102 fi
9103
9104 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9105 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9106     cat >> confdefs.h <<\EOF
9107 #define HAVE_INO64_T 1
9108 EOF
9109
9110 fi
9111
9112 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9113 echo "configure:9114: checking for struct dirent64" >&5
9114 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9115   echo $ac_n "(cached) $ac_c" 1>&6
9116 else
9117   
9118 cat > conftest.$ac_ext <<EOF
9119 #line 9120 "configure"
9120 #include "confdefs.h"
9121
9122 #if defined(HAVE_UNISTD_H)
9123 #include <unistd.h>
9124 #endif
9125 #include <sys/types.h>
9126 #include <dirent.h>
9127 int main() {
9128 struct dirent64 de;
9129 ; return 0; }
9130 EOF
9131 if { (eval echo configure:9132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9132   rm -rf conftest*
9133   samba_cv_HAVE_STRUCT_DIRENT64=yes
9134 else
9135   echo "configure: failed program was:" >&5
9136   cat conftest.$ac_ext >&5
9137   rm -rf conftest*
9138   samba_cv_HAVE_STRUCT_DIRENT64=no
9139 fi
9140 rm -f conftest*
9141 fi
9142
9143 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9144 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
9145     cat >> confdefs.h <<\EOF
9146 #define HAVE_STRUCT_DIRENT64 1
9147 EOF
9148
9149 fi
9150
9151 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9152 echo "configure:9153: checking for unsigned char" >&5
9153 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9154   echo $ac_n "(cached) $ac_c" 1>&6
9155 else
9156   
9157 if test "$cross_compiling" = yes; then
9158   samba_cv_HAVE_UNSIGNED_CHAR=cross
9159 else
9160   cat > conftest.$ac_ext <<EOF
9161 #line 9162 "configure"
9162 #include "confdefs.h"
9163 #include <stdio.h>
9164 main() { char c; c=250; exit((c > 0)?0:1); }
9165 EOF
9166 if { (eval echo configure:9167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9167 then
9168   samba_cv_HAVE_UNSIGNED_CHAR=yes
9169 else
9170   echo "configure: failed program was:" >&5
9171   cat conftest.$ac_ext >&5
9172   rm -fr conftest*
9173   samba_cv_HAVE_UNSIGNED_CHAR=no
9174 fi
9175 rm -fr conftest*
9176 fi
9177
9178 fi
9179
9180 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9181 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9182     cat >> confdefs.h <<\EOF
9183 #define HAVE_UNSIGNED_CHAR 1
9184 EOF
9185
9186 fi
9187
9188 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9189 echo "configure:9190: checking for sin_len in sock" >&5
9190 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9191   echo $ac_n "(cached) $ac_c" 1>&6
9192 else
9193   
9194 cat > conftest.$ac_ext <<EOF
9195 #line 9196 "configure"
9196 #include "confdefs.h"
9197 #include <sys/types.h>
9198 #include <sys/socket.h>
9199 #include <netinet/in.h>
9200 int main() {
9201 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9202 ; return 0; }
9203 EOF
9204 if { (eval echo configure:9205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9205   rm -rf conftest*
9206   samba_cv_HAVE_SOCK_SIN_LEN=yes
9207 else
9208   echo "configure: failed program was:" >&5
9209   cat conftest.$ac_ext >&5
9210   rm -rf conftest*
9211   samba_cv_HAVE_SOCK_SIN_LEN=no
9212 fi
9213 rm -f conftest*
9214 fi
9215
9216 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9217 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9218     cat >> confdefs.h <<\EOF
9219 #define HAVE_SOCK_SIN_LEN 1
9220 EOF
9221
9222 fi
9223
9224 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9225 echo "configure:9226: checking whether seekdir returns void" >&5
9226 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9227   echo $ac_n "(cached) $ac_c" 1>&6
9228 else
9229   
9230 cat > conftest.$ac_ext <<EOF
9231 #line 9232 "configure"
9232 #include "confdefs.h"
9233 #include <sys/types.h>
9234 #include <dirent.h>
9235 void seekdir(DIR *d, long loc) { return; }
9236 int main() {
9237 return 0;
9238 ; return 0; }
9239 EOF
9240 if { (eval echo configure:9241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9241   rm -rf conftest*
9242   samba_cv_SEEKDIR_RETURNS_VOID=yes
9243 else
9244   echo "configure: failed program was:" >&5
9245   cat conftest.$ac_ext >&5
9246   rm -rf conftest*
9247   samba_cv_SEEKDIR_RETURNS_VOID=no
9248 fi
9249 rm -f conftest*
9250 fi
9251
9252 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9253 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9254     cat >> confdefs.h <<\EOF
9255 #define SEEKDIR_RETURNS_VOID 1
9256 EOF
9257
9258 fi
9259
9260 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9261 echo "configure:9262: checking for __FILE__ macro" >&5
9262 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9263   echo $ac_n "(cached) $ac_c" 1>&6
9264 else
9265   
9266 cat > conftest.$ac_ext <<EOF
9267 #line 9268 "configure"
9268 #include "confdefs.h"
9269 #include <stdio.h>
9270 int main() {
9271 printf("%s\n", __FILE__);
9272 ; return 0; }
9273 EOF
9274 if { (eval echo configure:9275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9275   rm -rf conftest*
9276   samba_cv_HAVE_FILE_MACRO=yes
9277 else
9278   echo "configure: failed program was:" >&5
9279   cat conftest.$ac_ext >&5
9280   rm -rf conftest*
9281   samba_cv_HAVE_FILE_MACRO=no
9282 fi
9283 rm -f conftest*
9284 fi
9285
9286 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9287 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9288     cat >> confdefs.h <<\EOF
9289 #define HAVE_FILE_MACRO 1
9290 EOF
9291
9292 fi
9293
9294 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9295 echo "configure:9296: checking for __FUNCTION__ macro" >&5
9296 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9297   echo $ac_n "(cached) $ac_c" 1>&6
9298 else
9299   
9300 cat > conftest.$ac_ext <<EOF
9301 #line 9302 "configure"
9302 #include "confdefs.h"
9303 #include <stdio.h>
9304 int main() {
9305 printf("%s\n", __FUNCTION__);
9306 ; return 0; }
9307 EOF
9308 if { (eval echo configure:9309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9309   rm -rf conftest*
9310   samba_cv_HAVE_FUNCTION_MACRO=yes
9311 else
9312   echo "configure: failed program was:" >&5
9313   cat conftest.$ac_ext >&5
9314   rm -rf conftest*
9315   samba_cv_HAVE_FUNCTION_MACRO=no
9316 fi
9317 rm -f conftest*
9318 fi
9319
9320 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9321 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9322     cat >> confdefs.h <<\EOF
9323 #define HAVE_FUNCTION_MACRO 1
9324 EOF
9325
9326 fi
9327
9328 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9329 echo "configure:9330: checking if gettimeofday takes tz argument" >&5
9330 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9331   echo $ac_n "(cached) $ac_c" 1>&6
9332 else
9333   
9334 if test "$cross_compiling" = yes; then
9335   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9336 else
9337   cat > conftest.$ac_ext <<EOF
9338 #line 9339 "configure"
9339 #include "confdefs.h"
9340
9341 #include <sys/time.h>
9342 #include <unistd.h>
9343 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9344 EOF
9345 if { (eval echo configure:9346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9346 then
9347   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9348 else
9349   echo "configure: failed program was:" >&5
9350   cat conftest.$ac_ext >&5
9351   rm -fr conftest*
9352   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9353 fi
9354 rm -fr conftest*
9355 fi
9356
9357 fi
9358
9359 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9360 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9361     cat >> confdefs.h <<\EOF
9362 #define HAVE_GETTIMEOFDAY_TZ 1
9363 EOF
9364
9365 fi
9366
9367 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9368 echo "configure:9369: checking for C99 vsnprintf" >&5
9369 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9370   echo $ac_n "(cached) $ac_c" 1>&6
9371 else
9372   
9373 if test "$cross_compiling" = yes; then
9374   samba_cv_HAVE_C99_VSNPRINTF=cross
9375 else
9376   cat > conftest.$ac_ext <<EOF
9377 #line 9378 "configure"
9378 #include "confdefs.h"
9379
9380 #include <sys/types.h>
9381 #include <stdarg.h>
9382 void foo(const char *format, ...) { 
9383        va_list ap;
9384        int len;
9385        char buf[5];
9386
9387        va_start(ap, format);
9388        len = vsnprintf(0, 0, format, ap);
9389        va_end(ap);
9390        if (len != 5) exit(1);
9391
9392        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9393
9394        exit(0);
9395 }
9396 main() { foo("hello"); }
9397
9398 EOF
9399 if { (eval echo configure:9400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9400 then
9401   samba_cv_HAVE_C99_VSNPRINTF=yes
9402 else
9403   echo "configure: failed program was:" >&5
9404   cat conftest.$ac_ext >&5
9405   rm -fr conftest*
9406   samba_cv_HAVE_C99_VSNPRINTF=no
9407 fi
9408 rm -fr conftest*
9409 fi
9410
9411 fi
9412
9413 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9414 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9415     cat >> confdefs.h <<\EOF
9416 #define HAVE_C99_VSNPRINTF 1
9417 EOF
9418
9419 fi
9420
9421 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9422 echo "configure:9423: checking for broken readdir" >&5
9423 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9424   echo $ac_n "(cached) $ac_c" 1>&6
9425 else
9426   
9427 if test "$cross_compiling" = yes; then
9428   samba_cv_HAVE_BROKEN_READDIR=cross
9429 else
9430   cat > conftest.$ac_ext <<EOF
9431 #line 9432 "configure"
9432 #include "confdefs.h"
9433 #include <sys/types.h>
9434 #include <dirent.h>
9435 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9436 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9437 di->d_name[0] == 0) exit(0); exit(1);} 
9438 EOF
9439 if { (eval echo configure:9440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9440 then
9441   samba_cv_HAVE_BROKEN_READDIR=yes
9442 else
9443   echo "configure: failed program was:" >&5
9444   cat conftest.$ac_ext >&5
9445   rm -fr conftest*
9446   samba_cv_HAVE_BROKEN_READDIR=no
9447 fi
9448 rm -fr conftest*
9449 fi
9450
9451 fi
9452
9453 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9454 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9455     cat >> confdefs.h <<\EOF
9456 #define HAVE_BROKEN_READDIR 1
9457 EOF
9458
9459 fi
9460
9461 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9462 echo "configure:9463: checking for utimbuf" >&5
9463 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9464   echo $ac_n "(cached) $ac_c" 1>&6
9465 else
9466   
9467 cat > conftest.$ac_ext <<EOF
9468 #line 9469 "configure"
9469 #include "confdefs.h"
9470 #include <sys/types.h>
9471 #include <utime.h>
9472 int main() {
9473 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9474 ; return 0; }
9475 EOF
9476 if { (eval echo configure:9477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9477   rm -rf conftest*
9478   samba_cv_HAVE_UTIMBUF=yes
9479 else
9480   echo "configure: failed program was:" >&5
9481   cat conftest.$ac_ext >&5
9482   rm -rf conftest*
9483   samba_cv_HAVE_UTIMBUF=no
9484 fi
9485 rm -f conftest*
9486 fi
9487
9488 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9489 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9490     cat >> confdefs.h <<\EOF
9491 #define HAVE_UTIMBUF 1
9492 EOF
9493
9494 fi
9495
9496
9497 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9498 do
9499 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9500 echo "configure:9501: checking for $ac_func" >&5
9501 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9502   echo $ac_n "(cached) $ac_c" 1>&6
9503 else
9504   cat > conftest.$ac_ext <<EOF
9505 #line 9506 "configure"
9506 #include "confdefs.h"
9507 /* System header to define __stub macros and hopefully few prototypes,
9508     which can conflict with char $ac_func(); below.  */
9509 #include <assert.h>
9510 /* Override any gcc2 internal prototype to avoid an error.  */
9511 /* We use char because int might match the return type of a gcc2
9512     builtin and then its argument prototype would still apply.  */
9513 char $ac_func();
9514
9515 int main() {
9516
9517 /* The GNU C library defines this for functions which it implements
9518     to always fail with ENOSYS.  Some functions are actually named
9519     something starting with __ and the normal name is an alias.  */
9520 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9521 choke me
9522 #else
9523 $ac_func();
9524 #endif
9525
9526 ; return 0; }
9527 EOF
9528 if { (eval echo configure:9529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9529   rm -rf conftest*
9530   eval "ac_cv_func_$ac_func=yes"
9531 else
9532   echo "configure: failed program was:" >&5
9533   cat conftest.$ac_ext >&5
9534   rm -rf conftest*
9535   eval "ac_cv_func_$ac_func=no"
9536 fi
9537 rm -f conftest*
9538 fi
9539
9540 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9541   echo "$ac_t""yes" 1>&6
9542     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9543   cat >> confdefs.h <<EOF
9544 #define $ac_tr_func 1
9545 EOF
9546  
9547 else
9548   echo "$ac_t""no" 1>&6
9549 fi
9550 done
9551
9552
9553 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9554 echo "configure:9555: checking for ut_name in utmp" >&5
9555 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9556   echo $ac_n "(cached) $ac_c" 1>&6
9557 else
9558   
9559 cat > conftest.$ac_ext <<EOF
9560 #line 9561 "configure"
9561 #include "confdefs.h"
9562 #include <sys/types.h>
9563 #include <utmp.h>
9564 int main() {
9565 struct utmp ut;  ut.ut_name[0] = 'a';
9566 ; return 0; }
9567 EOF
9568 if { (eval echo configure:9569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9569   rm -rf conftest*
9570   samba_cv_HAVE_UT_UT_NAME=yes
9571 else
9572   echo "configure: failed program was:" >&5
9573   cat conftest.$ac_ext >&5
9574   rm -rf conftest*
9575   samba_cv_HAVE_UT_UT_NAME=no
9576 fi
9577 rm -f conftest*
9578 fi
9579
9580 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9581 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9582     cat >> confdefs.h <<\EOF
9583 #define HAVE_UT_UT_NAME 1
9584 EOF
9585
9586 fi 
9587
9588 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9589 echo "configure:9590: checking for ut_user in utmp" >&5
9590 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9591   echo $ac_n "(cached) $ac_c" 1>&6
9592 else
9593   
9594 cat > conftest.$ac_ext <<EOF
9595 #line 9596 "configure"
9596 #include "confdefs.h"
9597 #include <sys/types.h>
9598 #include <utmp.h>
9599 int main() {
9600 struct utmp ut;  ut.ut_user[0] = 'a';
9601 ; return 0; }
9602 EOF
9603 if { (eval echo configure:9604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9604   rm -rf conftest*
9605   samba_cv_HAVE_UT_UT_USER=yes
9606 else
9607   echo "configure: failed program was:" >&5
9608   cat conftest.$ac_ext >&5
9609   rm -rf conftest*
9610   samba_cv_HAVE_UT_UT_USER=no
9611 fi
9612 rm -f conftest*
9613 fi
9614
9615 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9616 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9617     cat >> confdefs.h <<\EOF
9618 #define HAVE_UT_UT_USER 1
9619 EOF
9620
9621 fi 
9622
9623 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9624 echo "configure:9625: checking for ut_id in utmp" >&5
9625 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9626   echo $ac_n "(cached) $ac_c" 1>&6
9627 else
9628   
9629 cat > conftest.$ac_ext <<EOF
9630 #line 9631 "configure"
9631 #include "confdefs.h"
9632 #include <sys/types.h>
9633 #include <utmp.h>
9634 int main() {
9635 struct utmp ut;  ut.ut_id[0] = 'a';
9636 ; return 0; }
9637 EOF
9638 if { (eval echo configure:9639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9639   rm -rf conftest*
9640   samba_cv_HAVE_UT_UT_ID=yes
9641 else
9642   echo "configure: failed program was:" >&5
9643   cat conftest.$ac_ext >&5
9644   rm -rf conftest*
9645   samba_cv_HAVE_UT_UT_ID=no
9646 fi
9647 rm -f conftest*
9648 fi
9649
9650 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9651 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9652     cat >> confdefs.h <<\EOF
9653 #define HAVE_UT_UT_ID 1
9654 EOF
9655
9656 fi 
9657
9658 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9659 echo "configure:9660: checking for ut_host in utmp" >&5
9660 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9661   echo $ac_n "(cached) $ac_c" 1>&6
9662 else
9663   
9664 cat > conftest.$ac_ext <<EOF
9665 #line 9666 "configure"
9666 #include "confdefs.h"
9667 #include <sys/types.h>
9668 #include <utmp.h>
9669 int main() {
9670 struct utmp ut;  ut.ut_host[0] = 'a';
9671 ; return 0; }
9672 EOF
9673 if { (eval echo configure:9674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9674   rm -rf conftest*
9675   samba_cv_HAVE_UT_UT_HOST=yes
9676 else
9677   echo "configure: failed program was:" >&5
9678   cat conftest.$ac_ext >&5
9679   rm -rf conftest*
9680   samba_cv_HAVE_UT_UT_HOST=no
9681 fi
9682 rm -f conftest*
9683 fi
9684
9685 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9686 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9687     cat >> confdefs.h <<\EOF
9688 #define HAVE_UT_UT_HOST 1
9689 EOF
9690
9691 fi 
9692
9693 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9694 echo "configure:9695: checking for ut_time in utmp" >&5
9695 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9696   echo $ac_n "(cached) $ac_c" 1>&6
9697 else
9698   
9699 cat > conftest.$ac_ext <<EOF
9700 #line 9701 "configure"
9701 #include "confdefs.h"
9702 #include <sys/types.h>
9703 #include <utmp.h>
9704 int main() {
9705 struct utmp ut;  time_t t; ut.ut_time = t;
9706 ; return 0; }
9707 EOF
9708 if { (eval echo configure:9709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9709   rm -rf conftest*
9710   samba_cv_HAVE_UT_UT_TIME=yes
9711 else
9712   echo "configure: failed program was:" >&5
9713   cat conftest.$ac_ext >&5
9714   rm -rf conftest*
9715   samba_cv_HAVE_UT_UT_TIME=no
9716 fi
9717 rm -f conftest*
9718 fi
9719
9720 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9721 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9722     cat >> confdefs.h <<\EOF
9723 #define HAVE_UT_UT_TIME 1
9724 EOF
9725
9726 fi 
9727
9728 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9729 echo "configure:9730: checking for ut_tv in utmp" >&5
9730 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9731   echo $ac_n "(cached) $ac_c" 1>&6
9732 else
9733   
9734 cat > conftest.$ac_ext <<EOF
9735 #line 9736 "configure"
9736 #include "confdefs.h"
9737 #include <sys/types.h>
9738 #include <utmp.h>
9739 int main() {
9740 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9741 ; return 0; }
9742 EOF
9743 if { (eval echo configure:9744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9744   rm -rf conftest*
9745   samba_cv_HAVE_UT_UT_TV=yes
9746 else
9747   echo "configure: failed program was:" >&5
9748   cat conftest.$ac_ext >&5
9749   rm -rf conftest*
9750   samba_cv_HAVE_UT_UT_TV=no
9751 fi
9752 rm -f conftest*
9753 fi
9754
9755 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9756 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9757     cat >> confdefs.h <<\EOF
9758 #define HAVE_UT_UT_TV 1
9759 EOF
9760
9761 fi 
9762
9763 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9764 echo "configure:9765: checking for ut_type in utmp" >&5
9765 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9766   echo $ac_n "(cached) $ac_c" 1>&6
9767 else
9768   
9769 cat > conftest.$ac_ext <<EOF
9770 #line 9771 "configure"
9771 #include "confdefs.h"
9772 #include <sys/types.h>
9773 #include <utmp.h>
9774 int main() {
9775 struct utmp ut;  ut.ut_type = 0;
9776 ; return 0; }
9777 EOF
9778 if { (eval echo configure:9779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9779   rm -rf conftest*
9780   samba_cv_HAVE_UT_UT_TYPE=yes
9781 else
9782   echo "configure: failed program was:" >&5
9783   cat conftest.$ac_ext >&5
9784   rm -rf conftest*
9785   samba_cv_HAVE_UT_UT_TYPE=no
9786 fi
9787 rm -f conftest*
9788 fi
9789
9790 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9791 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9792     cat >> confdefs.h <<\EOF
9793 #define HAVE_UT_UT_TYPE 1
9794 EOF
9795
9796 fi 
9797
9798 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9799 echo "configure:9800: checking for ut_pid in utmp" >&5
9800 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9801   echo $ac_n "(cached) $ac_c" 1>&6
9802 else
9803   
9804 cat > conftest.$ac_ext <<EOF
9805 #line 9806 "configure"
9806 #include "confdefs.h"
9807 #include <sys/types.h>
9808 #include <utmp.h>
9809 int main() {
9810 struct utmp ut;  ut.ut_pid = 0;
9811 ; return 0; }
9812 EOF
9813 if { (eval echo configure:9814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9814   rm -rf conftest*
9815   samba_cv_HAVE_UT_UT_PID=yes
9816 else
9817   echo "configure: failed program was:" >&5
9818   cat conftest.$ac_ext >&5
9819   rm -rf conftest*
9820   samba_cv_HAVE_UT_UT_PID=no
9821 fi
9822 rm -f conftest*
9823 fi
9824
9825 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9826 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9827     cat >> confdefs.h <<\EOF
9828 #define HAVE_UT_UT_PID 1
9829 EOF
9830
9831 fi 
9832
9833 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9834 echo "configure:9835: checking for ut_exit in utmp" >&5
9835 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9836   echo $ac_n "(cached) $ac_c" 1>&6
9837 else
9838   
9839 cat > conftest.$ac_ext <<EOF
9840 #line 9841 "configure"
9841 #include "confdefs.h"
9842 #include <sys/types.h>
9843 #include <utmp.h>
9844 int main() {
9845 struct utmp ut;  ut.ut_exit.e_exit = 0;
9846 ; return 0; }
9847 EOF
9848 if { (eval echo configure:9849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9849   rm -rf conftest*
9850   samba_cv_HAVE_UT_UT_EXIT=yes
9851 else
9852   echo "configure: failed program was:" >&5
9853   cat conftest.$ac_ext >&5
9854   rm -rf conftest*
9855   samba_cv_HAVE_UT_UT_EXIT=no
9856 fi
9857 rm -f conftest*
9858 fi
9859
9860 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9861 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9862     cat >> confdefs.h <<\EOF
9863 #define HAVE_UT_UT_EXIT 1
9864 EOF
9865
9866 fi 
9867
9868 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9869 echo "configure:9870: checking for ut_addr in utmp" >&5
9870 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9871   echo $ac_n "(cached) $ac_c" 1>&6
9872 else
9873   
9874 cat > conftest.$ac_ext <<EOF
9875 #line 9876 "configure"
9876 #include "confdefs.h"
9877 #include <sys/types.h>
9878 #include <utmp.h>
9879 int main() {
9880 struct utmp ut;  ut.ut_addr = 0;
9881 ; return 0; }
9882 EOF
9883 if { (eval echo configure:9884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9884   rm -rf conftest*
9885   samba_cv_HAVE_UT_UT_ADDR=yes
9886 else
9887   echo "configure: failed program was:" >&5
9888   cat conftest.$ac_ext >&5
9889   rm -rf conftest*
9890   samba_cv_HAVE_UT_UT_ADDR=no
9891 fi
9892 rm -f conftest*
9893 fi
9894
9895 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9896 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9897     cat >> confdefs.h <<\EOF
9898 #define HAVE_UT_UT_ADDR 1
9899 EOF
9900
9901 fi 
9902
9903 if test x$ac_cv_func_pututline = xyes ; then
9904   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9905 echo "configure:9906: checking whether pututline returns pointer" >&5
9906 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9907   echo $ac_n "(cached) $ac_c" 1>&6
9908 else
9909   
9910   cat > conftest.$ac_ext <<EOF
9911 #line 9912 "configure"
9912 #include "confdefs.h"
9913 #include <sys/types.h>
9914 #include <utmp.h>
9915 int main() {
9916 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9917 ; return 0; }
9918 EOF
9919 if { (eval echo configure:9920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9920   rm -rf conftest*
9921   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9922 else
9923   echo "configure: failed program was:" >&5
9924   cat conftest.$ac_ext >&5
9925   rm -rf conftest*
9926   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9927 fi
9928 rm -f conftest*
9929 fi
9930
9931 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9932   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9933       cat >> confdefs.h <<\EOF
9934 #define PUTUTLINE_RETURNS_UTMP 1
9935 EOF
9936
9937   fi
9938 fi
9939
9940 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9941 echo "configure:9942: checking for ut_syslen in utmpx" >&5
9942 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9943   echo $ac_n "(cached) $ac_c" 1>&6
9944 else
9945   
9946 cat > conftest.$ac_ext <<EOF
9947 #line 9948 "configure"
9948 #include "confdefs.h"
9949 #include <sys/types.h>
9950 #include <utmpx.h>
9951 int main() {
9952 struct utmpx ux;  ux.ut_syslen = 0;
9953 ; return 0; }
9954 EOF
9955 if { (eval echo configure:9956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9956   rm -rf conftest*
9957   samba_cv_HAVE_UX_UT_SYSLEN=yes
9958 else
9959   echo "configure: failed program was:" >&5
9960   cat conftest.$ac_ext >&5
9961   rm -rf conftest*
9962   samba_cv_HAVE_UX_UT_SYSLEN=no
9963 fi
9964 rm -f conftest*
9965 fi
9966
9967 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
9968 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
9969     cat >> confdefs.h <<\EOF
9970 #define HAVE_UX_UT_SYSLEN 1
9971 EOF
9972
9973 fi 
9974
9975 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
9976 echo "configure:9977: checking for Linux kernel oplocks" >&5
9977 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
9978   echo $ac_n "(cached) $ac_c" 1>&6
9979 else
9980   
9981 if test "$cross_compiling" = yes; then
9982   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
9983 else
9984   cat > conftest.$ac_ext <<EOF
9985 #line 9986 "configure"
9986 #include "confdefs.h"
9987
9988 #include <sys/types.h>
9989 #include <fcntl.h>
9990 #ifndef F_GETLEASE
9991 #define F_GETLEASE      1025
9992 #endif
9993 main() {
9994        int fd = open("/dev/null", O_RDONLY);
9995        return fcntl(fd, F_GETLEASE, 0) == -1;
9996 }
9997
9998 EOF
9999 if { (eval echo configure:10000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10000 then
10001   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10002 else
10003   echo "configure: failed program was:" >&5
10004   cat conftest.$ac_ext >&5
10005   rm -fr conftest*
10006   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10007 fi
10008 rm -fr conftest*
10009 fi
10010
10011 fi
10012
10013 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10014 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10015     cat >> confdefs.h <<\EOF
10016 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10017 EOF
10018
10019 fi
10020
10021 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10022 echo "configure:10023: checking for kernel change notify support" >&5
10023 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10024   echo $ac_n "(cached) $ac_c" 1>&6
10025 else
10026   
10027 if test "$cross_compiling" = yes; then
10028   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10029 else
10030   cat > conftest.$ac_ext <<EOF
10031 #line 10032 "configure"
10032 #include "confdefs.h"
10033
10034 #include <sys/types.h>
10035 #include <fcntl.h>
10036 #include <signal.h>
10037 #ifndef F_NOTIFY
10038 #define F_NOTIFY 1026
10039 #endif
10040 main() {
10041         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10042 }
10043
10044 EOF
10045 if { (eval echo configure:10046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10046 then
10047   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10048 else
10049   echo "configure: failed program was:" >&5
10050   cat conftest.$ac_ext >&5
10051   rm -fr conftest*
10052   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10053 fi
10054 rm -fr conftest*
10055 fi
10056
10057 fi
10058
10059 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10060 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10061     cat >> confdefs.h <<\EOF
10062 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10063 EOF
10064
10065 fi
10066
10067 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10068 echo "configure:10069: checking for kernel share modes" >&5
10069 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10070   echo $ac_n "(cached) $ac_c" 1>&6
10071 else
10072   
10073 if test "$cross_compiling" = yes; then
10074   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10075 else
10076   cat > conftest.$ac_ext <<EOF
10077 #line 10078 "configure"
10078 #include "confdefs.h"
10079
10080 #include <sys/types.h>
10081 #include <fcntl.h>
10082 #include <signal.h>
10083 #include <sys/file.h>
10084 #ifndef LOCK_MAND
10085 #define LOCK_MAND       32
10086 #define LOCK_READ       64
10087 #endif
10088 main() {
10089         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10090 }
10091
10092 EOF
10093 if { (eval echo configure:10094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10094 then
10095   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10096 else
10097   echo "configure: failed program was:" >&5
10098   cat conftest.$ac_ext >&5
10099   rm -fr conftest*
10100   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10101 fi
10102 rm -fr conftest*
10103 fi
10104
10105 fi
10106
10107 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10108 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10109     cat >> confdefs.h <<\EOF
10110 #define HAVE_KERNEL_SHARE_MODES 1
10111 EOF
10112
10113 fi
10114
10115
10116
10117
10118 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10119 echo "configure:10120: checking for IRIX kernel oplock type definitions" >&5
10120 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10121   echo $ac_n "(cached) $ac_c" 1>&6
10122 else
10123   
10124 cat > conftest.$ac_ext <<EOF
10125 #line 10126 "configure"
10126 #include "confdefs.h"
10127 #include <sys/types.h>
10128 #include <fcntl.h>
10129 int main() {
10130 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10131 ; return 0; }
10132 EOF
10133 if { (eval echo configure:10134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10134   rm -rf conftest*
10135   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10136 else
10137   echo "configure: failed program was:" >&5
10138   cat conftest.$ac_ext >&5
10139   rm -rf conftest*
10140   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10141 fi
10142 rm -f conftest*
10143 fi
10144
10145 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10146 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10147     cat >> confdefs.h <<\EOF
10148 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10149 EOF
10150
10151 fi
10152
10153 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10154 echo "configure:10155: checking for irix specific capabilities" >&5
10155 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10156   echo $ac_n "(cached) $ac_c" 1>&6
10157 else
10158   
10159 if test "$cross_compiling" = yes; then
10160   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10161 else
10162   cat > conftest.$ac_ext <<EOF
10163 #line 10164 "configure"
10164 #include "confdefs.h"
10165 #include <sys/types.h>
10166 #include <sys/capability.h>
10167 main() {
10168  cap_t cap;
10169  if ((cap = cap_get_proc()) == NULL)
10170    exit(1);
10171  cap->cap_effective |= CAP_NETWORK_MGT;
10172  cap->cap_inheritable |= CAP_NETWORK_MGT;
10173  cap_set_proc(cap);
10174  exit(0);
10175 }
10176
10177 EOF
10178 if { (eval echo configure:10179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10179 then
10180   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10181 else
10182   echo "configure: failed program was:" >&5
10183   cat conftest.$ac_ext >&5
10184   rm -fr conftest*
10185   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10186 fi
10187 rm -fr conftest*
10188 fi
10189
10190 fi
10191
10192 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10193 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10194     cat >> confdefs.h <<\EOF
10195 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10196 EOF
10197
10198 fi
10199
10200 #
10201 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10202 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10203 #
10204
10205 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10206 echo "configure:10207: checking for int16 typedef included by rpc/rpc.h" >&5
10207 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10208   echo $ac_n "(cached) $ac_c" 1>&6
10209 else
10210   
10211 cat > conftest.$ac_ext <<EOF
10212 #line 10213 "configure"
10213 #include "confdefs.h"
10214 #include <sys/types.h>
10215 #if defined(HAVE_RPC_RPC_H)
10216 #include <rpc/rpc.h>
10217 #endif
10218 int main() {
10219 int16 testvar;
10220 ; return 0; }
10221 EOF
10222 if { (eval echo configure:10223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10223   rm -rf conftest*
10224   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10225 else
10226   echo "configure: failed program was:" >&5
10227   cat conftest.$ac_ext >&5
10228   rm -rf conftest*
10229   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10230 fi
10231 rm -f conftest*
10232 fi
10233
10234 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10235 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10236     cat >> confdefs.h <<\EOF
10237 #define HAVE_INT16_FROM_RPC_RPC_H 1
10238 EOF
10239
10240 fi
10241
10242 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10243 echo "configure:10244: checking for uint16 typedef included by rpc/rpc.h" >&5
10244 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10245   echo $ac_n "(cached) $ac_c" 1>&6
10246 else
10247   
10248 cat > conftest.$ac_ext <<EOF
10249 #line 10250 "configure"
10250 #include "confdefs.h"
10251 #include <sys/types.h>
10252 #if defined(HAVE_RPC_RPC_H)
10253 #include <rpc/rpc.h>
10254 #endif
10255 int main() {
10256 uint16 testvar;
10257 ; return 0; }
10258 EOF
10259 if { (eval echo configure:10260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10260   rm -rf conftest*
10261   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10262 else
10263   echo "configure: failed program was:" >&5
10264   cat conftest.$ac_ext >&5
10265   rm -rf conftest*
10266   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10267 fi
10268 rm -f conftest*
10269 fi
10270
10271 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10272 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10273     cat >> confdefs.h <<\EOF
10274 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10275 EOF
10276
10277 fi
10278
10279 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10280 echo "configure:10281: checking for int32 typedef included by rpc/rpc.h" >&5
10281 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10282   echo $ac_n "(cached) $ac_c" 1>&6
10283 else
10284   
10285 cat > conftest.$ac_ext <<EOF
10286 #line 10287 "configure"
10287 #include "confdefs.h"
10288 #include <sys/types.h>
10289 #if defined(HAVE_RPC_RPC_H)
10290 #include <rpc/rpc.h>
10291 #endif
10292 int main() {
10293 int32 testvar;
10294 ; return 0; }
10295 EOF
10296 if { (eval echo configure:10297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10297   rm -rf conftest*
10298   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10299 else
10300   echo "configure: failed program was:" >&5
10301   cat conftest.$ac_ext >&5
10302   rm -rf conftest*
10303   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10304 fi
10305 rm -f conftest*
10306 fi
10307
10308 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10309 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10310     cat >> confdefs.h <<\EOF
10311 #define HAVE_INT32_FROM_RPC_RPC_H 1
10312 EOF
10313
10314 fi
10315
10316 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10317 echo "configure:10318: checking for uint32 typedef included by rpc/rpc.h" >&5
10318 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10319   echo $ac_n "(cached) $ac_c" 1>&6
10320 else
10321   
10322 cat > conftest.$ac_ext <<EOF
10323 #line 10324 "configure"
10324 #include "confdefs.h"
10325 #include <sys/types.h>
10326 #if defined(HAVE_RPC_RPC_H)
10327 #include <rpc/rpc.h>
10328 #endif
10329 int main() {
10330 uint32 testvar;
10331 ; return 0; }
10332 EOF
10333 if { (eval echo configure:10334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10334   rm -rf conftest*
10335   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10336 else
10337   echo "configure: failed program was:" >&5
10338   cat conftest.$ac_ext >&5
10339   rm -rf conftest*
10340   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10341 fi
10342 rm -f conftest*
10343 fi
10344
10345 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10346 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10347     cat >> confdefs.h <<\EOF
10348 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10349 EOF
10350
10351 fi
10352
10353
10354 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10355 echo "configure:10356: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10356 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10357   echo $ac_n "(cached) $ac_c" 1>&6
10358 else
10359   
10360 cat > conftest.$ac_ext <<EOF
10361 #line 10362 "configure"
10362 #include "confdefs.h"
10363 #include <sys/types.h>
10364 #ifdef HAVE_SYS_SECURITY_H
10365 #include <sys/security.h>
10366 #include <prot.h>
10367 #endif  /* HAVE_SYS_SECURITY_H */
10368 #if defined(HAVE_RPC_RPC_H)
10369 #include <rpc/rpc.h>
10370 #endif
10371 int main() {
10372 int testvar;
10373 ; return 0; }
10374 EOF
10375 if { (eval echo configure:10376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10376   rm -rf conftest*
10377   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10378 else
10379   echo "configure: failed program was:" >&5
10380   cat conftest.$ac_ext >&5
10381   rm -rf conftest*
10382   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10383 fi
10384 rm -f conftest*
10385 fi
10386
10387 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10388 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10389     cat >> confdefs.h <<\EOF
10390 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10391 EOF
10392
10393 fi
10394
10395 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10396 echo "configure:10397: checking for test routines" >&5
10397 if test "$cross_compiling" = yes; then
10398   echo "configure: warning: cannot run when cross-compiling" 1>&2
10399 else
10400   cat > conftest.$ac_ext <<EOF
10401 #line 10402 "configure"
10402 #include "confdefs.h"
10403 #include "${srcdir-.}/tests/trivial.c"
10404 EOF
10405 if { (eval echo configure:10406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10406 then
10407   echo "$ac_t""yes" 1>&6
10408 else
10409   echo "configure: failed program was:" >&5
10410   cat conftest.$ac_ext >&5
10411   rm -fr conftest*
10412   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10413 fi
10414 rm -fr conftest*
10415 fi
10416
10417
10418 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10419 echo "configure:10420: checking for ftruncate extend" >&5
10420 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10421   echo $ac_n "(cached) $ac_c" 1>&6
10422 else
10423   
10424 if test "$cross_compiling" = yes; then
10425   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10426 else
10427   cat > conftest.$ac_ext <<EOF
10428 #line 10429 "configure"
10429 #include "confdefs.h"
10430 #include "${srcdir-.}/tests/ftruncate.c"
10431 EOF
10432 if { (eval echo configure:10433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10433 then
10434   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10435 else
10436   echo "configure: failed program was:" >&5
10437   cat conftest.$ac_ext >&5
10438   rm -fr conftest*
10439   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10440 fi
10441 rm -fr conftest*
10442 fi
10443
10444 fi
10445
10446 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10447 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10448     cat >> confdefs.h <<\EOF
10449 #define HAVE_FTRUNCATE_EXTEND 1
10450 EOF
10451
10452 fi
10453
10454 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10455 echo "configure:10456: checking for AF_LOCAL socket support" >&5
10456 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10457   echo $ac_n "(cached) $ac_c" 1>&6
10458 else
10459   
10460 if test "$cross_compiling" = yes; then
10461   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10462 else
10463   cat > conftest.$ac_ext <<EOF
10464 #line 10465 "configure"
10465 #include "confdefs.h"
10466 #include "${srcdir-.}/tests/unixsock.c"
10467 EOF
10468 if { (eval echo configure:10469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10469 then
10470   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10471 else
10472   echo "configure: failed program was:" >&5
10473   cat conftest.$ac_ext >&5
10474   rm -fr conftest*
10475   samba_cv_HAVE_WORKING_AF_LOCAL=no
10476 fi
10477 rm -fr conftest*
10478 fi
10479
10480 fi
10481
10482 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10483 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10484 then
10485     cat >> confdefs.h <<\EOF
10486 #define HAVE_WORKING_AF_LOCAL 1
10487 EOF
10488
10489 fi
10490
10491 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10492 echo "configure:10493: checking for broken getgroups" >&5
10493 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10494   echo $ac_n "(cached) $ac_c" 1>&6
10495 else
10496   
10497 if test "$cross_compiling" = yes; then
10498   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10499 else
10500   cat > conftest.$ac_ext <<EOF
10501 #line 10502 "configure"
10502 #include "confdefs.h"
10503 #include "${srcdir-.}/tests/getgroups.c"
10504 EOF
10505 if { (eval echo configure:10506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10506 then
10507   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10508 else
10509   echo "configure: failed program was:" >&5
10510   cat conftest.$ac_ext >&5
10511   rm -fr conftest*
10512   samba_cv_HAVE_BROKEN_GETGROUPS=no
10513 fi
10514 rm -fr conftest*
10515 fi
10516
10517 fi
10518
10519 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10520 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10521     cat >> confdefs.h <<\EOF
10522 #define HAVE_BROKEN_GETGROUPS 1
10523 EOF
10524
10525 fi
10526
10527 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10528 echo "configure:10529: checking whether getpass should be replaced" >&5
10529 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10530   echo $ac_n "(cached) $ac_c" 1>&6
10531 else
10532   
10533 SAVE_CPPFLAGS="$CPPFLAGS"
10534 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10535 cat > conftest.$ac_ext <<EOF
10536 #line 10537 "configure"
10537 #include "confdefs.h"
10538
10539 #define REPLACE_GETPASS 1
10540 #define NO_CONFIG_H 1
10541 #define main dont_declare_main
10542 #include "${srcdir-.}/lib/getsmbpass.c"
10543 #undef main
10544
10545 int main() {
10546
10547 ; return 0; }
10548 EOF
10549 if { (eval echo configure:10550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10550   rm -rf conftest*
10551   samba_cv_REPLACE_GETPASS=yes
10552 else
10553   echo "configure: failed program was:" >&5
10554   cat conftest.$ac_ext >&5
10555   rm -rf conftest*
10556   samba_cv_REPLACE_GETPASS=no
10557 fi
10558 rm -f conftest*
10559 CPPFLAGS="$SAVE_CPPFLAGS"
10560
10561 fi
10562
10563 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10564 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10565         cat >> confdefs.h <<\EOF
10566 #define REPLACE_GETPASS 1
10567 EOF
10568
10569 fi
10570
10571 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10572 echo "configure:10573: checking for broken inet_ntoa" >&5
10573 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10574   echo $ac_n "(cached) $ac_c" 1>&6
10575 else
10576   
10577 if test "$cross_compiling" = yes; then
10578   samba_cv_REPLACE_INET_NTOA=cross
10579 else
10580   cat > conftest.$ac_ext <<EOF
10581 #line 10582 "configure"
10582 #include "confdefs.h"
10583
10584 #include <stdio.h>
10585 #include <sys/types.h>
10586 #include <netinet/in.h>
10587 #ifdef HAVE_ARPA_INET_H
10588 #include <arpa/inet.h>
10589 #endif
10590 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10591 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10592     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10593 exit(1);}
10594 EOF
10595 if { (eval echo configure:10596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10596 then
10597   samba_cv_REPLACE_INET_NTOA=yes
10598 else
10599   echo "configure: failed program was:" >&5
10600   cat conftest.$ac_ext >&5
10601   rm -fr conftest*
10602   samba_cv_REPLACE_INET_NTOA=no
10603 fi
10604 rm -fr conftest*
10605 fi
10606
10607 fi
10608
10609 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10610 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10611     cat >> confdefs.h <<\EOF
10612 #define REPLACE_INET_NTOA 1
10613 EOF
10614
10615 fi
10616
10617 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10618 echo "configure:10619: checking for secure mkstemp" >&5
10619 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10620   echo $ac_n "(cached) $ac_c" 1>&6
10621 else
10622   
10623 if test "$cross_compiling" = yes; then
10624   samba_cv_HAVE_SECURE_MKSTEMP=cross
10625 else
10626   cat > conftest.$ac_ext <<EOF
10627 #line 10628 "configure"
10628 #include "confdefs.h"
10629 #include <stdlib.h>
10630 #include <sys/types.h>
10631 #include <sys/stat.h>
10632 #include <unistd.h>
10633 main() { 
10634   struct stat st;
10635   char tpl[20]="/tmp/test.XXXXXX"; 
10636   int fd = mkstemp(tpl); 
10637   if (fd == -1) exit(1);
10638   unlink(tpl);
10639   if (fstat(fd, &st) != 0) exit(1);
10640   if ((st.st_mode & 0777) != 0600) exit(1);
10641   exit(0);
10642 }
10643 EOF
10644 if { (eval echo configure:10645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10645 then
10646   samba_cv_HAVE_SECURE_MKSTEMP=yes
10647 else
10648   echo "configure: failed program was:" >&5
10649   cat conftest.$ac_ext >&5
10650   rm -fr conftest*
10651   samba_cv_HAVE_SECURE_MKSTEMP=no
10652 fi
10653 rm -fr conftest*
10654 fi
10655
10656 fi
10657
10658 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10659 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10660     cat >> confdefs.h <<\EOF
10661 #define HAVE_SECURE_MKSTEMP 1
10662 EOF
10663
10664 fi
10665
10666 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10667 echo "configure:10668: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10668 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10669   echo $ac_n "(cached) $ac_c" 1>&6
10670 else
10671   
10672 if test "$cross_compiling" = yes; then
10673   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10674 else
10675   cat > conftest.$ac_ext <<EOF
10676 #line 10677 "configure"
10677 #include "confdefs.h"
10678 #include <unistd.h>
10679 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10680 EOF
10681 if { (eval echo configure:10682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10682 then
10683   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10684 else
10685   echo "configure: failed program was:" >&5
10686   cat conftest.$ac_ext >&5
10687   rm -fr conftest*
10688   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10689 fi
10690 rm -fr conftest*
10691 fi
10692
10693 fi
10694
10695 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10696 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10697     cat >> confdefs.h <<\EOF
10698 #define SYSCONF_SC_NGROUPS_MAX 1
10699 EOF
10700
10701 fi
10702
10703 echo $ac_n "checking for root""... $ac_c" 1>&6
10704 echo "configure:10705: checking for root" >&5
10705 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10706   echo $ac_n "(cached) $ac_c" 1>&6
10707 else
10708   
10709 if test "$cross_compiling" = yes; then
10710   samba_cv_HAVE_ROOT=cross
10711 else
10712   cat > conftest.$ac_ext <<EOF
10713 #line 10714 "configure"
10714 #include "confdefs.h"
10715 main() { exit(getuid() != 0); }
10716 EOF
10717 if { (eval echo configure:10718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10718 then
10719   samba_cv_HAVE_ROOT=yes
10720 else
10721   echo "configure: failed program was:" >&5
10722   cat conftest.$ac_ext >&5
10723   rm -fr conftest*
10724   samba_cv_HAVE_ROOT=no
10725 fi
10726 rm -fr conftest*
10727 fi
10728
10729 fi
10730
10731 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10732 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10733     cat >> confdefs.h <<\EOF
10734 #define HAVE_ROOT 1
10735 EOF
10736
10737 else
10738     echo "configure: warning: running as non-root will disable some tests" 1>&2
10739 fi
10740
10741 ##################
10742 # look for a method of finding the list of network interfaces
10743 iface=no;
10744 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10745 echo "configure:10746: checking for iface AIX" >&5
10746 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10747   echo $ac_n "(cached) $ac_c" 1>&6
10748 else
10749   
10750 if test "$cross_compiling" = yes; then
10751   samba_cv_HAVE_IFACE_AIX=cross
10752 else
10753   cat > conftest.$ac_ext <<EOF
10754 #line 10755 "configure"
10755 #include "confdefs.h"
10756
10757 #define HAVE_IFACE_AIX 1
10758 #define AUTOCONF_TEST 1
10759 #include "confdefs.h"
10760 #include "${srcdir-.}/lib/interfaces.c"
10761 EOF
10762 if { (eval echo configure:10763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10763 then
10764   samba_cv_HAVE_IFACE_AIX=yes
10765 else
10766   echo "configure: failed program was:" >&5
10767   cat conftest.$ac_ext >&5
10768   rm -fr conftest*
10769   samba_cv_HAVE_IFACE_AIX=no
10770 fi
10771 rm -fr conftest*
10772 fi
10773
10774 fi
10775
10776 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10777 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10778     iface=yes;cat >> confdefs.h <<\EOF
10779 #define HAVE_IFACE_AIX 1
10780 EOF
10781
10782 fi
10783
10784 if test $iface = no; then
10785 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10786 echo "configure:10787: checking for iface ifconf" >&5
10787 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10788   echo $ac_n "(cached) $ac_c" 1>&6
10789 else
10790   
10791 if test "$cross_compiling" = yes; then
10792   samba_cv_HAVE_IFACE_IFCONF=cross
10793 else
10794   cat > conftest.$ac_ext <<EOF
10795 #line 10796 "configure"
10796 #include "confdefs.h"
10797
10798 #define HAVE_IFACE_IFCONF 1
10799 #define AUTOCONF_TEST 1
10800 #include "confdefs.h"
10801 #include "${srcdir-.}/lib/interfaces.c"
10802 EOF
10803 if { (eval echo configure:10804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10804 then
10805   samba_cv_HAVE_IFACE_IFCONF=yes
10806 else
10807   echo "configure: failed program was:" >&5
10808   cat conftest.$ac_ext >&5
10809   rm -fr conftest*
10810   samba_cv_HAVE_IFACE_IFCONF=no
10811 fi
10812 rm -fr conftest*
10813 fi
10814
10815 fi
10816
10817 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10818 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10819     iface=yes;cat >> confdefs.h <<\EOF
10820 #define HAVE_IFACE_IFCONF 1
10821 EOF
10822
10823 fi
10824 fi
10825
10826 if test $iface = no; then
10827 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
10828 echo "configure:10829: checking for iface ifreq" >&5
10829 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
10830   echo $ac_n "(cached) $ac_c" 1>&6
10831 else
10832   
10833 if test "$cross_compiling" = yes; then
10834   samba_cv_HAVE_IFACE_IFREQ=cross
10835 else
10836   cat > conftest.$ac_ext <<EOF
10837 #line 10838 "configure"
10838 #include "confdefs.h"
10839
10840 #define HAVE_IFACE_IFREQ 1
10841 #define AUTOCONF_TEST 1
10842 #include "confdefs.h"
10843 #include "${srcdir-.}/lib/interfaces.c"
10844 EOF
10845 if { (eval echo configure:10846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10846 then
10847   samba_cv_HAVE_IFACE_IFREQ=yes
10848 else
10849   echo "configure: failed program was:" >&5
10850   cat conftest.$ac_ext >&5
10851   rm -fr conftest*
10852   samba_cv_HAVE_IFACE_IFREQ=no
10853 fi
10854 rm -fr conftest*
10855 fi
10856
10857 fi
10858
10859 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
10860 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
10861     iface=yes;cat >> confdefs.h <<\EOF
10862 #define HAVE_IFACE_IFREQ 1
10863 EOF
10864
10865 fi
10866 fi
10867
10868
10869 ################################################
10870 # look for a method of setting the effective uid
10871 seteuid=no;
10872 if test $seteuid = no; then
10873 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
10874 echo "configure:10875: checking for setresuid" >&5
10875 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
10876   echo $ac_n "(cached) $ac_c" 1>&6
10877 else
10878   
10879 if test "$cross_compiling" = yes; then
10880   samba_cv_USE_SETRESUID=cross
10881 else
10882   cat > conftest.$ac_ext <<EOF
10883 #line 10884 "configure"
10884 #include "confdefs.h"
10885
10886 #define AUTOCONF_TEST 1
10887 #define USE_SETRESUID 1
10888 #include "confdefs.h"
10889 #include "${srcdir-.}/lib/util_sec.c"
10890 EOF
10891 if { (eval echo configure:10892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10892 then
10893   samba_cv_USE_SETRESUID=yes
10894 else
10895   echo "configure: failed program was:" >&5
10896   cat conftest.$ac_ext >&5
10897   rm -fr conftest*
10898   samba_cv_USE_SETRESUID=no
10899 fi
10900 rm -fr conftest*
10901 fi
10902
10903 fi
10904
10905 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
10906 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
10907     seteuid=yes;cat >> confdefs.h <<\EOF
10908 #define USE_SETRESUID 1
10909 EOF
10910
10911 fi
10912 fi
10913
10914
10915 if test $seteuid = no; then
10916 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
10917 echo "configure:10918: checking for setreuid" >&5
10918 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
10919   echo $ac_n "(cached) $ac_c" 1>&6
10920 else
10921   
10922 if test "$cross_compiling" = yes; then
10923   samba_cv_USE_SETREUID=cross
10924 else
10925   cat > conftest.$ac_ext <<EOF
10926 #line 10927 "configure"
10927 #include "confdefs.h"
10928
10929 #define AUTOCONF_TEST 1
10930 #define USE_SETREUID 1
10931 #include "confdefs.h"
10932 #include "${srcdir-.}/lib/util_sec.c"
10933 EOF
10934 if { (eval echo configure:10935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10935 then
10936   samba_cv_USE_SETREUID=yes
10937 else
10938   echo "configure: failed program was:" >&5
10939   cat conftest.$ac_ext >&5
10940   rm -fr conftest*
10941   samba_cv_USE_SETREUID=no
10942 fi
10943 rm -fr conftest*
10944 fi
10945
10946 fi
10947
10948 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
10949 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
10950     seteuid=yes;cat >> confdefs.h <<\EOF
10951 #define USE_SETREUID 1
10952 EOF
10953
10954 fi
10955 fi
10956
10957 if test $seteuid = no; then
10958 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
10959 echo "configure:10960: checking for seteuid" >&5
10960 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
10961   echo $ac_n "(cached) $ac_c" 1>&6
10962 else
10963   
10964 if test "$cross_compiling" = yes; then
10965   samba_cv_USE_SETEUID=cross
10966 else
10967   cat > conftest.$ac_ext <<EOF
10968 #line 10969 "configure"
10969 #include "confdefs.h"
10970
10971 #define AUTOCONF_TEST 1
10972 #define USE_SETEUID 1
10973 #include "confdefs.h"
10974 #include "${srcdir-.}/lib/util_sec.c"
10975 EOF
10976 if { (eval echo configure:10977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10977 then
10978   samba_cv_USE_SETEUID=yes
10979 else
10980   echo "configure: failed program was:" >&5
10981   cat conftest.$ac_ext >&5
10982   rm -fr conftest*
10983   samba_cv_USE_SETEUID=no
10984 fi
10985 rm -fr conftest*
10986 fi
10987
10988 fi
10989
10990 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
10991 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
10992     seteuid=yes;cat >> confdefs.h <<\EOF
10993 #define USE_SETEUID 1
10994 EOF
10995
10996 fi
10997 fi
10998
10999 if test $seteuid = no; then
11000 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11001 echo "configure:11002: checking for setuidx" >&5
11002 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
11003   echo $ac_n "(cached) $ac_c" 1>&6
11004 else
11005   
11006 if test "$cross_compiling" = yes; then
11007   samba_cv_USE_SETUIDX=cross
11008 else
11009   cat > conftest.$ac_ext <<EOF
11010 #line 11011 "configure"
11011 #include "confdefs.h"
11012
11013 #define AUTOCONF_TEST 1
11014 #define USE_SETUIDX 1
11015 #include "confdefs.h"
11016 #include "${srcdir-.}/lib/util_sec.c"
11017 EOF
11018 if { (eval echo configure:11019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11019 then
11020   samba_cv_USE_SETUIDX=yes
11021 else
11022   echo "configure: failed program was:" >&5
11023   cat conftest.$ac_ext >&5
11024   rm -fr conftest*
11025   samba_cv_USE_SETUIDX=no
11026 fi
11027 rm -fr conftest*
11028 fi
11029
11030 fi
11031
11032 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11033 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11034     seteuid=yes;cat >> confdefs.h <<\EOF
11035 #define USE_SETUIDX 1
11036 EOF
11037
11038 fi
11039 fi
11040
11041
11042 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11043 echo "configure:11044: checking for working mmap" >&5
11044 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11045   echo $ac_n "(cached) $ac_c" 1>&6
11046 else
11047   
11048 if test "$cross_compiling" = yes; then
11049   samba_cv_HAVE_MMAP=cross
11050 else
11051   cat > conftest.$ac_ext <<EOF
11052 #line 11053 "configure"
11053 #include "confdefs.h"
11054 #include "${srcdir-.}/tests/shared_mmap.c"
11055 EOF
11056 if { (eval echo configure:11057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11057 then
11058   samba_cv_HAVE_MMAP=yes
11059 else
11060   echo "configure: failed program was:" >&5
11061   cat conftest.$ac_ext >&5
11062   rm -fr conftest*
11063   samba_cv_HAVE_MMAP=no
11064 fi
11065 rm -fr conftest*
11066 fi
11067
11068 fi
11069
11070 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11071 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11072     cat >> confdefs.h <<\EOF
11073 #define HAVE_MMAP 1
11074 EOF
11075
11076 fi
11077
11078 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11079 echo "configure:11080: checking for ftruncate needs root" >&5
11080 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11081   echo $ac_n "(cached) $ac_c" 1>&6
11082 else
11083   
11084 if test "$cross_compiling" = yes; then
11085   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11086 else
11087   cat > conftest.$ac_ext <<EOF
11088 #line 11089 "configure"
11089 #include "confdefs.h"
11090 #include "${srcdir-.}/tests/ftruncroot.c"
11091 EOF
11092 if { (eval echo configure:11093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11093 then
11094   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11095 else
11096   echo "configure: failed program was:" >&5
11097   cat conftest.$ac_ext >&5
11098   rm -fr conftest*
11099   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11100 fi
11101 rm -fr conftest*
11102 fi
11103
11104 fi
11105
11106 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11107 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11108     cat >> confdefs.h <<\EOF
11109 #define FTRUNCATE_NEEDS_ROOT 1
11110 EOF
11111
11112 fi
11113
11114 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11115 echo "configure:11116: checking for fcntl locking" >&5
11116 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11117   echo $ac_n "(cached) $ac_c" 1>&6
11118 else
11119   
11120 if test "$cross_compiling" = yes; then
11121   samba_cv_HAVE_FCNTL_LOCK=cross
11122 else
11123   cat > conftest.$ac_ext <<EOF
11124 #line 11125 "configure"
11125 #include "confdefs.h"
11126 #include "${srcdir-.}/tests/fcntl_lock.c"
11127 EOF
11128 if { (eval echo configure:11129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11129 then
11130   samba_cv_HAVE_FCNTL_LOCK=yes
11131 else
11132   echo "configure: failed program was:" >&5
11133   cat conftest.$ac_ext >&5
11134   rm -fr conftest*
11135   samba_cv_HAVE_FCNTL_LOCK=no
11136 fi
11137 rm -fr conftest*
11138 fi
11139
11140 fi
11141
11142 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11143 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11144     cat >> confdefs.h <<\EOF
11145 #define HAVE_FCNTL_LOCK 1
11146 EOF
11147
11148 fi
11149
11150 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11151 echo "configure:11152: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11152 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11153   echo $ac_n "(cached) $ac_c" 1>&6
11154 else
11155   
11156 if test "$cross_compiling" = yes; then
11157   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11158 else
11159   cat > conftest.$ac_ext <<EOF
11160 #line 11161 "configure"
11161 #include "confdefs.h"
11162 #include "${srcdir-.}/tests/fcntl_lock64.c"
11163 EOF
11164 if { (eval echo configure:11165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11165 then
11166   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11167 else
11168   echo "configure: failed program was:" >&5
11169   cat conftest.$ac_ext >&5
11170   rm -fr conftest*
11171   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11172 fi
11173 rm -fr conftest*
11174 fi
11175
11176 fi
11177
11178 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11179 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11180     cat >> confdefs.h <<\EOF
11181 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11182 EOF
11183
11184
11185 else
11186
11187
11188   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11189 echo "configure:11190: checking for 64 bit fcntl locking" >&5
11190 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11191   echo $ac_n "(cached) $ac_c" 1>&6
11192 else
11193   
11194   if test "$cross_compiling" = yes; then
11195   samba_cv_HAVE_STRUCT_FLOCK64=cross
11196 else
11197   cat > conftest.$ac_ext <<EOF
11198 #line 11199 "configure"
11199 #include "confdefs.h"
11200
11201 #if defined(HAVE_UNISTD_H)
11202 #include <unistd.h>
11203 #endif
11204 #include <stdio.h>
11205 #include <stdlib.h>
11206
11207 #ifdef HAVE_FCNTL_H
11208 #include <fcntl.h>
11209 #endif
11210
11211 #ifdef HAVE_SYS_FCNTL_H
11212 #include <sys/fcntl.h>
11213 #endif
11214 main() { struct flock64 fl64;
11215 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11216 exit(0);
11217 #else
11218 exit(1);
11219 #endif
11220 }
11221 EOF
11222 if { (eval echo configure:11223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11223 then
11224   samba_cv_HAVE_STRUCT_FLOCK64=yes
11225 else
11226   echo "configure: failed program was:" >&5
11227   cat conftest.$ac_ext >&5
11228   rm -fr conftest*
11229   samba_cv_HAVE_STRUCT_FLOCK64=no
11230 fi
11231 rm -fr conftest*
11232 fi
11233
11234 fi
11235
11236 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11237
11238   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11239       cat >> confdefs.h <<\EOF
11240 #define HAVE_STRUCT_FLOCK64 1
11241 EOF
11242
11243   fi
11244 fi
11245
11246 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
11247 echo "configure:11248: checking for a crypt that needs truncated salt" >&5
11248 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
11249   echo $ac_n "(cached) $ac_c" 1>&6
11250 else
11251   
11252 if test "$cross_compiling" = yes; then
11253   samba_cv_HAVE_TRUNCATED_SALT=cross
11254 else
11255   cat > conftest.$ac_ext <<EOF
11256 #line 11257 "configure"
11257 #include "confdefs.h"
11258 #include "${srcdir-.}/tests/crypttest.c"
11259 EOF
11260 if { (eval echo configure:11261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11261 then
11262   samba_cv_HAVE_TRUNCATED_SALT=no
11263 else
11264   echo "configure: failed program was:" >&5
11265   cat conftest.$ac_ext >&5
11266   rm -fr conftest*
11267   samba_cv_HAVE_TRUNCATED_SALT=yes
11268 fi
11269 rm -fr conftest*
11270 fi
11271
11272 fi
11273
11274 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
11275 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
11276     cat >> confdefs.h <<\EOF
11277 #define HAVE_TRUNCATED_SALT 1
11278 EOF
11279
11280 fi
11281
11282 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11283 echo "configure:11284: checking for broken nisplus include files" >&5
11284 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11285   echo $ac_n "(cached) $ac_c" 1>&6
11286 else
11287   
11288 cat > conftest.$ac_ext <<EOF
11289 #line 11290 "configure"
11290 #include "confdefs.h"
11291 #include <sys/acl.h>
11292 #if defined(HAVE_RPCSVC_NIS_H)
11293 #include <rpcsvc/nis.h>
11294 #endif
11295 int main() {
11296 return 0;
11297 ; return 0; }
11298 EOF
11299 if { (eval echo configure:11300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11300   rm -rf conftest*
11301   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11302 else
11303   echo "configure: failed program was:" >&5
11304   cat conftest.$ac_ext >&5
11305   rm -rf conftest*
11306   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11307 fi
11308 rm -f conftest*
11309 fi
11310
11311 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11312 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11313     cat >> confdefs.h <<\EOF
11314 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11315 EOF
11316
11317 fi
11318
11319
11320 #################################################
11321 # check for smbwrapper support
11322 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11323 echo "configure:11324: checking whether to use smbwrapper" >&5
11324 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11325 if test "${with_smbwrapper+set}" = set; then
11326   withval="$with_smbwrapper"
11327    case "$withval" in
11328   yes)
11329     echo "$ac_t""yes" 1>&6
11330     cat >> confdefs.h <<\EOF
11331 #define WITH_SMBWRAPPER 1
11332 EOF
11333
11334         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11335
11336         if test x$ATTEMPT_WRAP32_BUILD = x; then
11337                 WRAP32=""
11338         else
11339                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11340         fi
11341
11342 # Conditions under which smbwrapper should not be built.
11343
11344         if test x$PICFLAG = x; then
11345            echo No support for PIC code - disabling smbwrapper and smbsh
11346            WRAP=""
11347            WRAP32=""
11348         elif test x$ac_cv_func_syscall = xno; then
11349            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11350            WRAP=""
11351            WRAP32=""
11352         fi
11353     ;;
11354   *)
11355     echo "$ac_t""no" 1>&6
11356     ;;
11357   esac 
11358 else
11359   echo "$ac_t""no" 1>&6
11360
11361 fi
11362
11363
11364 #################################################
11365 # check for the AFS filesystem
11366 echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
11367 echo "configure:11368: checking whether to use AFS" >&5
11368 # Check whether --with-afs or --without-afs was given.
11369 if test "${with_afs+set}" = set; then
11370   withval="$with_afs"
11371    case "$withval" in
11372   yes)
11373     echo "$ac_t""yes" 1>&6
11374     cat >> confdefs.h <<\EOF
11375 #define WITH_AFS 1
11376 EOF
11377
11378     ;;
11379   *)
11380     echo "$ac_t""no" 1>&6
11381     ;;
11382   esac 
11383 else
11384   echo "$ac_t""no" 1>&6
11385
11386 fi
11387
11388
11389
11390 #################################################
11391 # check for the DFS auth system
11392 echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
11393 echo "configure:11394: checking whether to use DFS auth" >&5
11394 # Check whether --with-dfs or --without-dfs was given.
11395 if test "${with_dfs+set}" = set; then
11396   withval="$with_dfs"
11397    case "$withval" in
11398   yes)
11399     echo "$ac_t""yes" 1>&6
11400     cat >> confdefs.h <<\EOF
11401 #define WITH_DFS 1
11402 EOF
11403
11404     ;;
11405   *)
11406     echo "$ac_t""no" 1>&6
11407     ;;
11408   esac 
11409 else
11410   echo "$ac_t""no" 1>&6
11411
11412 fi
11413
11414
11415 #################################################
11416 # check for Kerberos IV auth system
11417 echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
11418 echo "configure:11419: checking whether to use Kerberos IV" >&5
11419 # Check whether --with-krb4 or --without-krb4 was given.
11420 if test "${with_krb4+set}" = set; then
11421   withval="$with_krb4"
11422      echo "$ac_t""yes" 1>&6
11423     cat >> confdefs.h <<\EOF
11424 #define KRB4_AUTH 1
11425 EOF
11426
11427     echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
11428 echo "configure:11429: checking for dn_expand in -lresolv" >&5
11429 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
11430 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11431   echo $ac_n "(cached) $ac_c" 1>&6
11432 else
11433   ac_save_LIBS="$LIBS"
11434 LIBS="-lresolv  $LIBS"
11435 cat > conftest.$ac_ext <<EOF
11436 #line 11437 "configure"
11437 #include "confdefs.h"
11438 /* Override any gcc2 internal prototype to avoid an error.  */
11439 /* We use char because int might match the return type of a gcc2
11440     builtin and then its argument prototype would still apply.  */
11441 char dn_expand();
11442
11443 int main() {
11444 dn_expand()
11445 ; return 0; }
11446 EOF
11447 if { (eval echo configure:11448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11448   rm -rf conftest*
11449   eval "ac_cv_lib_$ac_lib_var=yes"
11450 else
11451   echo "configure: failed program was:" >&5
11452   cat conftest.$ac_ext >&5
11453   rm -rf conftest*
11454   eval "ac_cv_lib_$ac_lib_var=no"
11455 fi
11456 rm -f conftest*
11457 LIBS="$ac_save_LIBS"
11458
11459 fi
11460 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11461   echo "$ac_t""yes" 1>&6
11462     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11463     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11464   cat >> confdefs.h <<EOF
11465 #define $ac_tr_lib 1
11466 EOF
11467
11468   LIBS="-lresolv $LIBS"
11469
11470 else
11471   echo "$ac_t""no" 1>&6
11472 fi
11473
11474     LIBS="$LIBS -lkrb -ldes"
11475     CFLAGS="$CFLAGS -I$withval/include"
11476     LDFLAGS="$LDFLAGS -L$withval/lib"
11477 else
11478   echo "$ac_t""no" 1>&6
11479
11480 fi
11481
11482
11483 #################################################
11484 # check for Kerberos 5 auth system
11485 echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6
11486 echo "configure:11487: checking whether to use Kerberos 5" >&5
11487 # Check whether --with-krb5 or --without-krb5 was given.
11488 if test "${with_krb5+set}" = set; then
11489   withval="$with_krb5"
11490      echo "$ac_t""yes" 1>&6
11491     cat >> confdefs.h <<\EOF
11492 #define KRB5_AUTH 1
11493 EOF
11494
11495     LIBS="$LIBS -ldes425 -lkrb5 -lcrypto -lcom_err"
11496     CFLAGS="$CFLAGS -I$withval/include"
11497     LDFLAGS="$LDFLAGS -L$withval/lib"
11498 else
11499   echo "$ac_t""no" 1>&6
11500
11501 fi
11502
11503
11504 #################################################
11505 # check for automount support
11506 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
11507 echo "configure:11508: checking whether to use AUTOMOUNT" >&5
11508 # Check whether --with-automount or --without-automount was given.
11509 if test "${with_automount+set}" = set; then
11510   withval="$with_automount"
11511    case "$withval" in
11512   yes)
11513     echo "$ac_t""yes" 1>&6
11514     cat >> confdefs.h <<\EOF
11515 #define WITH_AUTOMOUNT 1
11516 EOF
11517
11518     ;;
11519   *)
11520     echo "$ac_t""no" 1>&6
11521     ;;
11522   esac 
11523 else
11524   echo "$ac_t""no" 1>&6
11525
11526 fi
11527
11528
11529 #################################################
11530 # check for smbmount support
11531 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
11532 echo "configure:11533: checking whether to use SMBMOUNT" >&5
11533 # Check whether --with-smbmount or --without-smbmount was given.
11534 if test "${with_smbmount+set}" = set; then
11535   withval="$with_smbmount"
11536    case "$withval" in
11537   yes)
11538     echo "$ac_t""yes" 1>&6
11539     cat >> confdefs.h <<\EOF
11540 #define WITH_SMBMOUNT 1
11541 EOF
11542
11543     MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
11544     ;;
11545   *)
11546     echo "$ac_t""no" 1>&6
11547     MPROGS=
11548     ;;
11549   esac 
11550 else
11551   echo "$ac_t""no" 1>&6
11552   MPROGS=
11553
11554 fi
11555
11556
11557
11558 #################################################
11559 # check for a PAM password database
11560
11561 echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6
11562 echo "configure:11563: checking whether to use PAM password database" >&5
11563 # Check whether --with-pam or --without-pam was given.
11564 if test "${with_pam+set}" = set; then
11565   withval="$with_pam"
11566    case "$withval" in
11567   yes)
11568     echo "$ac_t""yes" 1>&6
11569     cat >> confdefs.h <<\EOF
11570 #define WITH_PAM 1
11571 EOF
11572
11573     LIBS="$LIBS -lpam"
11574     ;;
11575   *)
11576     echo "$ac_t""no" 1>&6
11577     ;;
11578   esac 
11579 else
11580   echo "$ac_t""no" 1>&6
11581
11582 fi
11583
11584
11585 # we can't build a pam module if we don't have pam.
11586 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
11587 echo "configure:11588: checking for pam_get_data in -lpam" >&5
11588 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
11589 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11590   echo $ac_n "(cached) $ac_c" 1>&6
11591 else
11592   ac_save_LIBS="$LIBS"
11593 LIBS="-lpam  $LIBS"
11594 cat > conftest.$ac_ext <<EOF
11595 #line 11596 "configure"
11596 #include "confdefs.h"
11597 /* Override any gcc2 internal prototype to avoid an error.  */
11598 /* We use char because int might match the return type of a gcc2
11599     builtin and then its argument prototype would still apply.  */
11600 char pam_get_data();
11601
11602 int main() {
11603 pam_get_data()
11604 ; return 0; }
11605 EOF
11606 if { (eval echo configure:11607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11607   rm -rf conftest*
11608   eval "ac_cv_lib_$ac_lib_var=yes"
11609 else
11610   echo "configure: failed program was:" >&5
11611   cat conftest.$ac_ext >&5
11612   rm -rf conftest*
11613   eval "ac_cv_lib_$ac_lib_var=no"
11614 fi
11615 rm -f conftest*
11616 LIBS="$ac_save_LIBS"
11617
11618 fi
11619 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11620   echo "$ac_t""yes" 1>&6
11621   cat >> confdefs.h <<\EOF
11622 #define HAVE_LIBPAM 1
11623 EOF
11624
11625 else
11626   echo "$ac_t""no" 1>&6
11627 fi
11628
11629
11630 #################################################
11631 # check for pam_smbpass support
11632 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
11633 echo "configure:11634: checking whether to use pam_smbpass" >&5
11634 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
11635 if test "${with_pam_smbpass+set}" = set; then
11636   withval="$with_pam_smbpass"
11637    case "$withval" in
11638   yes)
11639     echo "$ac_t""yes" 1>&6
11640
11641 # Conditions under which pam_smbpass should not be built.
11642
11643        if test x$PICFLAG = x; then
11644           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
11645           PAM_MOD=""
11646        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
11647           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
11648           PAM_MOD=""
11649        else
11650           cat >> confdefs.h <<\EOF
11651 #define WITH_PAM_SMBPASS 1
11652 EOF
11653
11654           PAM_MOD="bin/pam_smbpass.so"
11655        fi
11656     ;;
11657   *)
11658     echo "$ac_t""no" 1>&6
11659     ;;
11660   esac 
11661 else
11662   echo "$ac_t""no" 1>&6
11663
11664 fi
11665
11666
11667
11668 ###############################################
11669 # test for where we get crypt() from, but only
11670 # if not using PAM
11671 if test "$with_pam" != yes; then
11672 for ac_func in crypt
11673 do
11674 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11675 echo "configure:11676: checking for $ac_func" >&5
11676 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11677   echo $ac_n "(cached) $ac_c" 1>&6
11678 else
11679   cat > conftest.$ac_ext <<EOF
11680 #line 11681 "configure"
11681 #include "confdefs.h"
11682 /* System header to define __stub macros and hopefully few prototypes,
11683     which can conflict with char $ac_func(); below.  */
11684 #include <assert.h>
11685 /* Override any gcc2 internal prototype to avoid an error.  */
11686 /* We use char because int might match the return type of a gcc2
11687     builtin and then its argument prototype would still apply.  */
11688 char $ac_func();
11689
11690 int main() {
11691
11692 /* The GNU C library defines this for functions which it implements
11693     to always fail with ENOSYS.  Some functions are actually named
11694     something starting with __ and the normal name is an alias.  */
11695 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11696 choke me
11697 #else
11698 $ac_func();
11699 #endif
11700
11701 ; return 0; }
11702 EOF
11703 if { (eval echo configure:11704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11704   rm -rf conftest*
11705   eval "ac_cv_func_$ac_func=yes"
11706 else
11707   echo "configure: failed program was:" >&5
11708   cat conftest.$ac_ext >&5
11709   rm -rf conftest*
11710   eval "ac_cv_func_$ac_func=no"
11711 fi
11712 rm -f conftest*
11713 fi
11714
11715 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11716   echo "$ac_t""yes" 1>&6
11717     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11718   cat >> confdefs.h <<EOF
11719 #define $ac_tr_func 1
11720 EOF
11721  
11722 else
11723   echo "$ac_t""no" 1>&6
11724 fi
11725 done
11726
11727 if test x"$ac_cv_func_crypt" = x"no"; then
11728     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
11729 echo "configure:11730: checking for crypt in -lcrypt" >&5
11730 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
11731 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11732   echo $ac_n "(cached) $ac_c" 1>&6
11733 else
11734   ac_save_LIBS="$LIBS"
11735 LIBS="-lcrypt  $LIBS"
11736 cat > conftest.$ac_ext <<EOF
11737 #line 11738 "configure"
11738 #include "confdefs.h"
11739 /* Override any gcc2 internal prototype to avoid an error.  */
11740 /* We use char because int might match the return type of a gcc2
11741     builtin and then its argument prototype would still apply.  */
11742 char crypt();
11743
11744 int main() {
11745 crypt()
11746 ; return 0; }
11747 EOF
11748 if { (eval echo configure:11749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11749   rm -rf conftest*
11750   eval "ac_cv_lib_$ac_lib_var=yes"
11751 else
11752   echo "configure: failed program was:" >&5
11753   cat conftest.$ac_ext >&5
11754   rm -rf conftest*
11755   eval "ac_cv_lib_$ac_lib_var=no"
11756 fi
11757 rm -f conftest*
11758 LIBS="$ac_save_LIBS"
11759
11760 fi
11761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11762   echo "$ac_t""yes" 1>&6
11763   LIBS="$LIBS -lcrypt";
11764         cat >> confdefs.h <<\EOF
11765 #define HAVE_CRYPT 1
11766 EOF
11767
11768 else
11769   echo "$ac_t""no" 1>&6
11770 fi
11771
11772 fi
11773 fi
11774
11775
11776 #################################################
11777 # check for a TDB password database
11778 echo $ac_n "checking whether to use TDB password database""... $ac_c" 1>&6
11779 echo "configure:11780: checking whether to use TDB password database" >&5
11780 # Check whether --with-tdbsam or --without-tdbsam was given.
11781 if test "${with_tdbsam+set}" = set; then
11782   withval="$with_tdbsam"
11783    case "$withval" in
11784   yes)
11785     echo "$ac_t""yes" 1>&6
11786     cat >> confdefs.h <<\EOF
11787 #define WITH_TDBPWD 1
11788 EOF
11789
11790 #    AC_MSG_ERROR([TDB password database not supported in this version.])
11791     ;;
11792   *)
11793     echo "$ac_t""no" 1>&6
11794     ;;
11795   esac 
11796 else
11797   echo "$ac_t""no" 1>&6
11798
11799 fi
11800
11801
11802 #################################################
11803 # check for a LDAP password database
11804 echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6
11805 echo "configure:11806: checking whether to use LDAP password database" >&5
11806 # Check whether --with-ldap or --without-ldap was given.
11807 if test "${with_ldap+set}" = set; then
11808   withval="$with_ldap"
11809    case "$withval" in
11810   yes)
11811     echo "$ac_t""yes" 1>&6
11812     cat >> confdefs.h <<\EOF
11813 #define WITH_LDAP 1
11814 EOF
11815
11816     { echo "configure: error: LDAP password database not supported in this version." 1>&2; exit 1; }
11817     ;;
11818   *)
11819     echo "$ac_t""no" 1>&6
11820     ;;
11821   esac 
11822 else
11823   echo "$ac_t""no" 1>&6
11824
11825 fi
11826
11827
11828 #################################################
11829 # check for a NISPLUS password database
11830 echo $ac_n "checking whether to use NISPLUS password database""... $ac_c" 1>&6
11831 echo "configure:11832: checking whether to use NISPLUS password database" >&5
11832 # Check whether --with-nisplus or --without-nisplus was given.
11833 if test "${with_nisplus+set}" = set; then
11834   withval="$with_nisplus"
11835    case "$withval" in
11836   yes)
11837     echo "$ac_t""yes" 1>&6
11838     cat >> confdefs.h <<\EOF
11839 #define WITH_NISPLUS 1
11840 EOF
11841
11842     ;;
11843   *)
11844     echo "$ac_t""no" 1>&6
11845     ;;
11846   esac 
11847 else
11848   echo "$ac_t""no" 1>&6
11849
11850 fi
11851
11852
11853 #################################################
11854 # check for a NISPLUS_HOME support 
11855 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
11856 echo "configure:11857: checking whether to use NISPLUS_HOME" >&5
11857 # Check whether --with-nisplus-home or --without-nisplus-home was given.
11858 if test "${with_nisplus_home+set}" = set; then
11859   withval="$with_nisplus_home"
11860    case "$withval" in
11861   yes)
11862     echo "$ac_t""yes" 1>&6
11863     cat >> confdefs.h <<\EOF
11864 #define WITH_NISPLUS_HOME 1
11865 EOF
11866
11867     ;;
11868   *)
11869     echo "$ac_t""no" 1>&6
11870     ;;
11871   esac 
11872 else
11873   echo "$ac_t""no" 1>&6
11874
11875 fi
11876
11877
11878 #################################################
11879 # check for the secure socket layer
11880 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
11881 echo "configure:11882: checking whether to use SSL" >&5
11882 # Check whether --with-ssl or --without-ssl was given.
11883 if test "${with_ssl+set}" = set; then
11884   withval="$with_ssl"
11885    case "$withval" in
11886   yes)
11887     echo "$ac_t""yes" 1>&6
11888     cat >> confdefs.h <<\EOF
11889 #define WITH_SSL 1
11890 EOF
11891
11892     withval="/usr/local/ssl"     # default
11893
11894     if test "${with_sslinc+set}" = set; then
11895
11896         withval="$with_sslinc"
11897         case "$withval" in
11898         yes|no)
11899           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
11900           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
11901           LIBS="-lssl -lcrypto $LIBS"
11902           LDFLAGS="=L/usr/local/ssl/lib $LDFLAGS"
11903         ;;
11904         * )
11905           CFLAGS="-I${withval} $CFLAGS"
11906           LIBS="-lssl -lcrypto $LIBS"
11907           LDFLAGS="-L${withval}/lib $LDFLAGS"
11908         ;;
11909         esac
11910
11911     else
11912
11913         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
11914         LIBS="-lssl -lcrypto $LIBS"
11915         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
11916
11917     fi
11918
11919     if test ! -d ${withval}; then
11920       echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
11921       exit 1
11922     fi 
11923
11924     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
11925
11926     ;;
11927   *)
11928     echo "$ac_t""no" 1>&6
11929     ;;
11930   esac 
11931 else
11932   echo "$ac_t""no" 1>&6
11933
11934 fi
11935
11936
11937 #################################################
11938 # check for syslog logging
11939 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
11940 echo "configure:11941: checking whether to use syslog logging" >&5
11941 # Check whether --with-syslog or --without-syslog was given.
11942 if test "${with_syslog+set}" = set; then
11943   withval="$with_syslog"
11944    case "$withval" in
11945   yes)
11946     echo "$ac_t""yes" 1>&6
11947     cat >> confdefs.h <<\EOF
11948 #define WITH_SYSLOG 1
11949 EOF
11950
11951     ;;
11952   *)
11953     echo "$ac_t""no" 1>&6
11954     ;;
11955   esac 
11956 else
11957   echo "$ac_t""no" 1>&6
11958
11959 fi
11960
11961
11962 #################################################
11963 # check for a shared memory profiling support
11964 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
11965 echo "configure:11966: checking whether to use profiling" >&5
11966 # Check whether --with-profile or --without-profile was given.
11967 if test "${with_profile+set}" = set; then
11968   withval="$with_profile"
11969    case "$withval" in
11970   yes)
11971     echo "$ac_t""yes" 1>&6
11972     cat >> confdefs.h <<\EOF
11973 #define WITH_PROFILE 1
11974 EOF
11975
11976     ;;
11977   *)
11978     echo "$ac_t""no" 1>&6
11979     ;;
11980   esac 
11981 else
11982   echo "$ac_t""no" 1>&6
11983
11984 fi
11985
11986
11987
11988 #################################################
11989 # check for experimental netatalk resource fork support
11990 echo $ac_n "checking whether to support netatalk""... $ac_c" 1>&6
11991 echo "configure:11992: checking whether to support netatalk" >&5
11992 # Check whether --with-netatalk or --without-netatalk was given.
11993 if test "${with_netatalk+set}" = set; then
11994   withval="$with_netatalk"
11995    case "$withval" in
11996   yes)
11997     echo "$ac_t""yes" 1>&6
11998     cat >> confdefs.h <<\EOF
11999 #define WITH_NETATALK 1
12000 EOF
12001
12002     ;;
12003   *)
12004     echo "$ac_t""no" 1>&6
12005     ;;
12006   esac 
12007 else
12008   echo "$ac_t""no" 1>&6
12009
12010 fi
12011
12012
12013 #################################################
12014 # check for experimental disk-quotas support
12015 QUOTAOBJS=smbd/noquotas.o
12016
12017 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12018 echo "configure:12019: checking whether to support disk-quotas" >&5
12019 # Check whether --with-quotas or --without-quotas was given.
12020 if test "${with_quotas+set}" = set; then
12021   withval="$with_quotas"
12022    case "$withval" in
12023   yes)
12024     echo "$ac_t""yes" 1>&6
12025     QUOTAOBJS=smbd/quotas.o
12026     ;;
12027   *)
12028     echo "$ac_t""no" 1>&6
12029     ;;
12030   esac 
12031 else
12032   echo "$ac_t""no" 1>&6
12033
12034 fi
12035
12036
12037
12038 #################################################
12039 # check for experimental utmp accounting
12040
12041 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
12042 echo "configure:12043: checking whether to support utmp accounting" >&5
12043 # Check whether --with-utmp or --without-utmp was given.
12044 if test "${with_utmp+set}" = set; then
12045   withval="$with_utmp"
12046    case "$withval" in
12047   yes)
12048     echo "$ac_t""yes" 1>&6
12049     cat >> confdefs.h <<\EOF
12050 #define WITH_UTMP 1
12051 EOF
12052
12053     ;;
12054   *)
12055     echo "$ac_t""no" 1>&6
12056     ;;
12057   esac 
12058 else
12059   echo "$ac_t""no" 1>&6
12060
12061 fi
12062
12063
12064 #################################################
12065 # check for MS Dfs support
12066
12067 echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6
12068 echo "configure:12069: checking whether to support Microsoft Dfs" >&5
12069 # Check whether --with-msdfs or --without-msdfs was given.
12070 if test "${with_msdfs+set}" = set; then
12071   withval="$with_msdfs"
12072    case "$withval" in
12073   yes)
12074      echo "$ac_t""yes" 1>&6
12075      cat >> confdefs.h <<\EOF
12076 #define WITH_MSDFS 1
12077 EOF
12078
12079      ;;
12080   *)
12081     echo "$ac_t""no" 1>&6
12082     ;;
12083   esac 
12084 else
12085   echo "$ac_t""no" 1>&6
12086
12087 fi
12088
12089
12090 #################################################
12091 # set private directory location
12092 # Check whether --with-privatedir or --without-privatedir was given.
12093 if test "${with_privatedir+set}" = set; then
12094   withval="$with_privatedir"
12095    case "$withval" in
12096   yes|no)
12097   #
12098   # Just in case anybody calls it without argument
12099   #
12100     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
12101     privatedir='${prefix}/private'
12102   ;;
12103   * )
12104     privatedir="$withval"
12105     ;;
12106   esac
12107   
12108 else
12109   privatedir='${prefix}/private'
12110    
12111
12112 fi
12113
12114
12115 #################################################
12116 # set lock directory location
12117 # Check whether --with-lockdir or --without-lockdir was given.
12118 if test "${with_lockdir+set}" = set; then
12119   withval="$with_lockdir"
12120    case "$withval" in
12121   yes|no)
12122   #
12123   # Just in case anybody calls it without argument
12124   #
12125     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
12126     lockdir='$(VARDIR)/locks'
12127   ;;
12128   * )
12129     lockdir="$withval"
12130     ;;
12131   esac
12132   
12133 else
12134   lockdir='$(VARDIR)/locks'
12135    
12136
12137 fi
12138
12139
12140 #################################################
12141 # set SWAT directory location
12142 # Check whether --with-swatdir or --without-swatdir was given.
12143 if test "${with_swatdir+set}" = set; then
12144   withval="$with_swatdir"
12145    case "$withval" in
12146   yes|no)
12147   #
12148   # Just in case anybody does it
12149   #
12150     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
12151     swatdir='${prefix}/swat'
12152   ;;
12153   * )
12154     swatdir="$withval"
12155     ;;
12156   esac
12157   
12158 else
12159   swatdir='${prefix}/swat'
12160    
12161
12162 fi
12163
12164
12165 #################################################
12166 # these tests are taken from the GNU fileutils package
12167 echo "checking how to get filesystem space usage" 1>&6
12168 echo "configure:12169: checking how to get filesystem space usage" >&5
12169 space=no
12170
12171 # Test for statvfs64.
12172 if test $space = no; then
12173   # SVR4
12174   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
12175 echo "configure:12176: checking statvfs64 function (SVR4)" >&5
12176 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
12177   echo $ac_n "(cached) $ac_c" 1>&6
12178 else
12179   if test "$cross_compiling" = yes; then
12180   fu_cv_sys_stat_statvfs64=cross
12181 else
12182   cat > conftest.$ac_ext <<EOF
12183 #line 12184 "configure"
12184 #include "confdefs.h"
12185
12186 #if defined(HAVE_UNISTD_H)
12187 #include <unistd.h>
12188 #endif
12189 #include <sys/types.h>
12190 #include <sys/statvfs.h>
12191   main ()
12192   {
12193     struct statvfs64 fsd;
12194     exit (statvfs64 (".", &fsd));
12195   }
12196 EOF
12197 if { (eval echo configure:12198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12198 then
12199   fu_cv_sys_stat_statvfs64=yes
12200 else
12201   echo "configure: failed program was:" >&5
12202   cat conftest.$ac_ext >&5
12203   rm -fr conftest*
12204   fu_cv_sys_stat_statvfs64=no
12205 fi
12206 rm -fr conftest*
12207 fi
12208
12209 fi
12210
12211 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
12212   if test $fu_cv_sys_stat_statvfs64 = yes; then
12213     space=yes
12214     cat >> confdefs.h <<\EOF
12215 #define STAT_STATVFS64 1
12216 EOF
12217
12218   fi
12219 fi
12220
12221 # Perform only the link test since it seems there are no variants of the
12222 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
12223 # because that got a false positive on SCO OSR5.  Adding the declaration
12224 # of a `struct statvfs' causes this test to fail (as it should) on such
12225 # systems.  That system is reported to work fine with STAT_STATFS4 which
12226 # is what it gets when this test fails.
12227 if test $space = no; then
12228   # SVR4
12229   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
12230 echo "configure:12231: checking statvfs function (SVR4)" >&5
12231 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
12232   echo $ac_n "(cached) $ac_c" 1>&6
12233 else
12234   cat > conftest.$ac_ext <<EOF
12235 #line 12236 "configure"
12236 #include "confdefs.h"
12237 #include <sys/types.h>
12238 #include <sys/statvfs.h>
12239 int main() {
12240 struct statvfs fsd; statvfs (0, &fsd);
12241 ; return 0; }
12242 EOF
12243 if { (eval echo configure:12244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12244   rm -rf conftest*
12245   fu_cv_sys_stat_statvfs=yes
12246 else
12247   echo "configure: failed program was:" >&5
12248   cat conftest.$ac_ext >&5
12249   rm -rf conftest*
12250   fu_cv_sys_stat_statvfs=no
12251 fi
12252 rm -f conftest*
12253 fi
12254
12255 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
12256   if test $fu_cv_sys_stat_statvfs = yes; then
12257     space=yes
12258     cat >> confdefs.h <<\EOF
12259 #define STAT_STATVFS 1
12260 EOF
12261
12262   fi
12263 fi
12264
12265 if test $space = no; then
12266   # DEC Alpha running OSF/1
12267   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
12268 echo "configure:12269: checking for 3-argument statfs function (DEC OSF/1)" >&5
12269   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
12270   echo $ac_n "(cached) $ac_c" 1>&6
12271 else
12272   if test "$cross_compiling" = yes; then
12273   fu_cv_sys_stat_statfs3_osf1=no
12274 else
12275   cat > conftest.$ac_ext <<EOF
12276 #line 12277 "configure"
12277 #include "confdefs.h"
12278
12279 #include <sys/param.h>
12280 #include <sys/types.h>
12281 #include <sys/mount.h>
12282   main ()
12283   {
12284     struct statfs fsd;
12285     fsd.f_fsize = 0;
12286     exit (statfs (".", &fsd, sizeof (struct statfs)));
12287   }
12288 EOF
12289 if { (eval echo configure:12290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12290 then
12291   fu_cv_sys_stat_statfs3_osf1=yes
12292 else
12293   echo "configure: failed program was:" >&5
12294   cat conftest.$ac_ext >&5
12295   rm -fr conftest*
12296   fu_cv_sys_stat_statfs3_osf1=no
12297 fi
12298 rm -fr conftest*
12299 fi
12300
12301 fi
12302
12303   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
12304   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
12305     space=yes
12306     cat >> confdefs.h <<\EOF
12307 #define STAT_STATFS3_OSF1 1
12308 EOF
12309
12310   fi
12311 fi
12312
12313 if test $space = no; then
12314 # AIX
12315   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
12316 echo "configure:12317: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
12317   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
12318   echo $ac_n "(cached) $ac_c" 1>&6
12319 else
12320   if test "$cross_compiling" = yes; then
12321   fu_cv_sys_stat_statfs2_bsize=no
12322 else
12323   cat > conftest.$ac_ext <<EOF
12324 #line 12325 "configure"
12325 #include "confdefs.h"
12326
12327 #ifdef HAVE_SYS_PARAM_H
12328 #include <sys/param.h>
12329 #endif
12330 #ifdef HAVE_SYS_MOUNT_H
12331 #include <sys/mount.h>
12332 #endif
12333 #ifdef HAVE_SYS_VFS_H
12334 #include <sys/vfs.h>
12335 #endif
12336   main ()
12337   {
12338   struct statfs fsd;
12339   fsd.f_bsize = 0;
12340   exit (statfs (".", &fsd));
12341   }
12342 EOF
12343 if { (eval echo configure:12344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12344 then
12345   fu_cv_sys_stat_statfs2_bsize=yes
12346 else
12347   echo "configure: failed program was:" >&5
12348   cat conftest.$ac_ext >&5
12349   rm -fr conftest*
12350   fu_cv_sys_stat_statfs2_bsize=no
12351 fi
12352 rm -fr conftest*
12353 fi
12354
12355 fi
12356
12357   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
12358   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
12359     space=yes
12360     cat >> confdefs.h <<\EOF
12361 #define STAT_STATFS2_BSIZE 1
12362 EOF
12363
12364   fi
12365 fi
12366
12367 if test $space = no; then
12368 # SVR3
12369   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
12370 echo "configure:12371: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
12371   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
12372   echo $ac_n "(cached) $ac_c" 1>&6
12373 else
12374   if test "$cross_compiling" = yes; then
12375   fu_cv_sys_stat_statfs4=no
12376 else
12377   cat > conftest.$ac_ext <<EOF
12378 #line 12379 "configure"
12379 #include "confdefs.h"
12380 #include <sys/types.h>
12381 #include <sys/statfs.h>
12382   main ()
12383   {
12384   struct statfs fsd;
12385   exit (statfs (".", &fsd, sizeof fsd, 0));
12386   }
12387 EOF
12388 if { (eval echo configure:12389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12389 then
12390   fu_cv_sys_stat_statfs4=yes
12391 else
12392   echo "configure: failed program was:" >&5
12393   cat conftest.$ac_ext >&5
12394   rm -fr conftest*
12395   fu_cv_sys_stat_statfs4=no
12396 fi
12397 rm -fr conftest*
12398 fi
12399
12400 fi
12401
12402   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
12403   if test $fu_cv_sys_stat_statfs4 = yes; then
12404     space=yes
12405     cat >> confdefs.h <<\EOF
12406 #define STAT_STATFS4 1
12407 EOF
12408
12409   fi
12410 fi
12411
12412 if test $space = no; then
12413 # 4.4BSD and NetBSD
12414   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
12415 echo "configure:12416: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
12416   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
12417   echo $ac_n "(cached) $ac_c" 1>&6
12418 else
12419   if test "$cross_compiling" = yes; then
12420   fu_cv_sys_stat_statfs2_fsize=no
12421 else
12422   cat > conftest.$ac_ext <<EOF
12423 #line 12424 "configure"
12424 #include "confdefs.h"
12425 #include <sys/types.h>
12426 #ifdef HAVE_SYS_PARAM_H
12427 #include <sys/param.h>
12428 #endif
12429 #ifdef HAVE_SYS_MOUNT_H
12430 #include <sys/mount.h>
12431 #endif
12432   main ()
12433   {
12434   struct statfs fsd;
12435   fsd.f_fsize = 0;
12436   exit (statfs (".", &fsd));
12437   }
12438 EOF
12439 if { (eval echo configure:12440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12440 then
12441   fu_cv_sys_stat_statfs2_fsize=yes
12442 else
12443   echo "configure: failed program was:" >&5
12444   cat conftest.$ac_ext >&5
12445   rm -fr conftest*
12446   fu_cv_sys_stat_statfs2_fsize=no
12447 fi
12448 rm -fr conftest*
12449 fi
12450
12451 fi
12452
12453   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
12454   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
12455     space=yes
12456     cat >> confdefs.h <<\EOF
12457 #define STAT_STATFS2_FSIZE 1
12458 EOF
12459
12460   fi
12461 fi
12462
12463 if test $space = no; then
12464   # Ultrix
12465   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
12466 echo "configure:12467: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
12467   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
12468   echo $ac_n "(cached) $ac_c" 1>&6
12469 else
12470   if test "$cross_compiling" = yes; then
12471   fu_cv_sys_stat_fs_data=no
12472 else
12473   cat > conftest.$ac_ext <<EOF
12474 #line 12475 "configure"
12475 #include "confdefs.h"
12476 #include <sys/types.h>
12477 #ifdef HAVE_SYS_PARAM_H
12478 #include <sys/param.h>
12479 #endif
12480 #ifdef HAVE_SYS_MOUNT_H
12481 #include <sys/mount.h>
12482 #endif
12483 #ifdef HAVE_SYS_FS_TYPES_H
12484 #include <sys/fs_types.h>
12485 #endif
12486   main ()
12487   {
12488   struct fs_data fsd;
12489   /* Ultrix's statfs returns 1 for success,
12490      0 for not mounted, -1 for failure.  */
12491   exit (statfs (".", &fsd) != 1);
12492   }
12493 EOF
12494 if { (eval echo configure:12495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12495 then
12496   fu_cv_sys_stat_fs_data=yes
12497 else
12498   echo "configure: failed program was:" >&5
12499   cat conftest.$ac_ext >&5
12500   rm -fr conftest*
12501   fu_cv_sys_stat_fs_data=no
12502 fi
12503 rm -fr conftest*
12504 fi
12505
12506 fi
12507
12508   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
12509   if test $fu_cv_sys_stat_fs_data = yes; then
12510     space=yes
12511     cat >> confdefs.h <<\EOF
12512 #define STAT_STATFS2_FS_DATA 1
12513 EOF
12514
12515   fi
12516 fi
12517
12518 #
12519 # As a gating factor for large file support, in order to
12520 # use <4GB files we must have the following minimal support
12521 # available.
12522 # long long, and a 64 bit off_t or off64_t.
12523 # If we don't have all of these then disable large
12524 # file support.
12525 #
12526 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
12527 echo "configure:12528: checking if large file support can be enabled" >&5
12528 cat > conftest.$ac_ext <<EOF
12529 #line 12530 "configure"
12530 #include "confdefs.h"
12531
12532 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
12533 #include <sys/types.h>
12534 #else
12535 __COMPILE_ERROR_
12536 #endif
12537
12538 int main() {
12539 int i
12540 ; return 0; }
12541 EOF
12542 if { (eval echo configure:12543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12543   rm -rf conftest*
12544   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
12545 else
12546   echo "configure: failed program was:" >&5
12547   cat conftest.$ac_ext >&5
12548   rm -rf conftest*
12549   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
12550 fi
12551 rm -f conftest*
12552 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
12553     cat >> confdefs.h <<\EOF
12554 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
12555 EOF
12556
12557 fi
12558 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
12559
12560 # Check whether --with-spinlocks or --without-spinlocks was given.
12561 if test "${with_spinlocks+set}" = set; then
12562   withval="$with_spinlocks"
12563   :
12564 fi
12565
12566 if test "x$with_spinlocks" = "xyes"; then
12567     cat >> confdefs.h <<\EOF
12568 #define USE_SPINLOCKS 1
12569 EOF
12570
12571
12572     case "$host_cpu" in
12573         sparc)
12574             cat >> confdefs.h <<\EOF
12575 #define SPARC_SPINLOCKS 1
12576 EOF
12577
12578             ;;
12579
12580         i386|i486|i586|i686)
12581             cat >> confdefs.h <<\EOF
12582 #define INTEL_SPINLOCKS 1
12583 EOF
12584
12585             ;;
12586
12587         mips)
12588             cat >> confdefs.h <<\EOF
12589 #define MIPS_SPINLOCKS 1
12590 EOF
12591
12592             ;;
12593
12594         powerpc)
12595             cat >> confdefs.h <<\EOF
12596 #define POWERPC_SPINLOCKS 1
12597 EOF
12598
12599             ;;
12600     esac
12601 fi
12602
12603 #################################################
12604 # check for ACL support
12605
12606 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
12607 echo "configure:12608: checking whether to support ACLs" >&5
12608 # Check whether --with-acl-support or --without-acl-support was given.
12609 if test "${with_acl_support+set}" = set; then
12610   withval="$with_acl_support"
12611    case "$withval" in
12612   yes)
12613
12614         case "$host_os" in
12615         *sysv5*)
12616             echo "$ac_t""Using UnixWare ACLs" 1>&6
12617             cat >> confdefs.h <<\EOF
12618 #define HAVE_UNIXWARE_ACLS 1
12619 EOF
12620
12621             ;;
12622         *solaris*)
12623             echo "$ac_t""Using solaris ACLs" 1>&6
12624             cat >> confdefs.h <<\EOF
12625 #define HAVE_SOLARIS_ACLS 1
12626 EOF
12627
12628             ;;
12629                 *irix*)
12630                         echo "$ac_t""Using IRIX ACLs" 1>&6
12631                         cat >> confdefs.h <<\EOF
12632 #define HAVE_IRIX_ACLS 1
12633 EOF
12634
12635                         ;;
12636                 *aix*)
12637                         echo "$ac_t""Using AIX ACLs" 1>&6
12638                         cat >> confdefs.h <<\EOF
12639 #define HAVE_AIX_ACLS 1
12640 EOF
12641
12642                         ;;
12643         *)
12644                         echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
12645 echo "configure:12646: checking for acl_get_file in -lacl" >&5
12646 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
12647 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12648   echo $ac_n "(cached) $ac_c" 1>&6
12649 else
12650   ac_save_LIBS="$LIBS"
12651 LIBS="-lacl  $LIBS"
12652 cat > conftest.$ac_ext <<EOF
12653 #line 12654 "configure"
12654 #include "confdefs.h"
12655 /* Override any gcc2 internal prototype to avoid an error.  */
12656 /* We use char because int might match the return type of a gcc2
12657     builtin and then its argument prototype would still apply.  */
12658 char acl_get_file();
12659
12660 int main() {
12661 acl_get_file()
12662 ; return 0; }
12663 EOF
12664 if { (eval echo configure:12665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12665   rm -rf conftest*
12666   eval "ac_cv_lib_$ac_lib_var=yes"
12667 else
12668   echo "configure: failed program was:" >&5
12669   cat conftest.$ac_ext >&5
12670   rm -rf conftest*
12671   eval "ac_cv_lib_$ac_lib_var=no"
12672 fi
12673 rm -f conftest*
12674 LIBS="$ac_save_LIBS"
12675
12676 fi
12677 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12678   echo "$ac_t""yes" 1>&6
12679     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12680     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12681   cat >> confdefs.h <<EOF
12682 #define $ac_tr_lib 1
12683 EOF
12684
12685   LIBS="-lacl $LIBS"
12686
12687 else
12688   echo "$ac_t""no" 1>&6
12689 fi
12690
12691                         echo $ac_n "checking for ACL support""... $ac_c" 1>&6
12692 echo "configure:12693: checking for ACL support" >&5
12693 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
12694   echo $ac_n "(cached) $ac_c" 1>&6
12695 else
12696   
12697                         cat > conftest.$ac_ext <<EOF
12698 #line 12699 "configure"
12699 #include "confdefs.h"
12700 #include <sys/types.h>
12701 #include <sys/acl.h>
12702 int main() {
12703  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
12704 ; return 0; }
12705 EOF
12706 if { (eval echo configure:12707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12707   rm -rf conftest*
12708   samba_cv_HAVE_POSIX_ACLS=yes
12709 else
12710   echo "configure: failed program was:" >&5
12711   cat conftest.$ac_ext >&5
12712   rm -rf conftest*
12713   samba_cv_HAVE_POSIX_ACLS=no
12714 fi
12715 rm -f conftest*
12716 fi
12717
12718 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
12719                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
12720                                 echo "$ac_t""Using posix ACLs" 1>&6
12721                                 cat >> confdefs.h <<\EOF
12722 #define HAVE_POSIX_ACLS 1
12723 EOF
12724
12725                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
12726 echo "configure:12727: checking for acl_get_perm_np" >&5
12727 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
12728   echo $ac_n "(cached) $ac_c" 1>&6
12729 else
12730   
12731                                 cat > conftest.$ac_ext <<EOF
12732 #line 12733 "configure"
12733 #include "confdefs.h"
12734 #include <sys/types.h>
12735 #include <sys/acl.h>
12736 int main() {
12737  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
12738 ; return 0; }
12739 EOF
12740 if { (eval echo configure:12741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12741   rm -rf conftest*
12742   samba_cv_HAVE_ACL_GET_PERM_NP=yes
12743 else
12744   echo "configure: failed program was:" >&5
12745   cat conftest.$ac_ext >&5
12746   rm -rf conftest*
12747   samba_cv_HAVE_ACL_GET_PERM_NP=no
12748 fi
12749 rm -f conftest*
12750 fi
12751
12752 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
12753                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
12754                                         cat >> confdefs.h <<\EOF
12755 #define HAVE_ACL_GET_PERM_NP 1
12756 EOF
12757
12758                                 fi
12759                         fi
12760             ;;
12761         esac
12762         ;;
12763   *)
12764     echo "$ac_t""no" 1>&6
12765     cat >> confdefs.h <<\EOF
12766 #define HAVE_NO_ACLS 1
12767 EOF
12768
12769     ;;
12770   esac 
12771 else
12772   cat >> confdefs.h <<\EOF
12773 #define HAVE_NO_ACLS 1
12774 EOF
12775
12776   echo "$ac_t""no" 1>&6
12777
12778 fi
12779
12780
12781 #################################################
12782 # check whether winbind is supported on this platform
12783
12784 echo $ac_n "checking whether to compile winbind""... $ac_c" 1>&6
12785 echo "configure:12786: checking whether to compile winbind" >&5
12786
12787 case "$host_os" in 
12788         *linux*|*solaris*)
12789                 WINBIND_TARGETS="$WINBIND_TARGETS \$(WINBIND_PROGS)"
12790                 case "$with_pam" in
12791                         yes)
12792                                 WINBIND_TARGETS="$WINBIND_TARGETS \$(WINBIND_PAM_PROGS)"
12793                         ;;
12794                         *)
12795                 esac
12796                 ;;
12797         *)
12798                 winbind_no_reason=", unsupported on $host_os"
12799                 ;;
12800 esac
12801
12802 # Check whether --with-winbind or --without-winbind was given.
12803 if test "${with_winbind+set}" = set; then
12804   withval="$with_winbind"
12805    
12806   case "$withval" in
12807         no)
12808                 WINBIND_TARGETS=""
12809                 winbind_reason=""
12810                 ;;
12811   esac 
12812 fi
12813
12814
12815 if test x"$WINBIND_TARGETS" = x; then
12816         echo "$ac_t""no$winbind_no_reason" 1>&6
12817 else
12818         echo "$ac_t""yes" 1>&6
12819 fi
12820
12821
12822
12823 #################################################
12824 # final configure stuff
12825
12826 echo "checking configure summary"
12827 if test "$cross_compiling" = yes; then
12828   :
12829 else
12830   cat > conftest.$ac_ext <<EOF
12831 #line 12832 "configure"
12832 #include "confdefs.h"
12833 #include "${srcdir-.}/tests/summary.c"
12834 EOF
12835 if { (eval echo configure:12836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12836 then
12837   echo "configure OK";
12838 else
12839   echo "configure: failed program was:" >&5
12840   cat conftest.$ac_ext >&5
12841   rm -fr conftest*
12842   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
12843 fi
12844 rm -fr conftest*
12845 fi
12846
12847
12848 builddir=`pwd`
12849
12850
12851 trap '' 1 2 15
12852 cat > confcache <<\EOF
12853 # This file is a shell script that caches the results of configure
12854 # tests run on this system so they can be shared between configure
12855 # scripts and configure runs.  It is not useful on other systems.
12856 # If it contains results you don't want to keep, you may remove or edit it.
12857 #
12858 # By default, configure uses ./config.cache as the cache file,
12859 # creating it if it does not exist already.  You can give configure
12860 # the --cache-file=FILE option to use a different cache file; that is
12861 # what configure does when it calls configure scripts in
12862 # subdirectories, so they share the cache.
12863 # Giving --cache-file=/dev/null disables caching, for debugging configure.
12864 # config.status only pays attention to the cache file if you give it the
12865 # --recheck option to rerun configure.
12866 #
12867 EOF
12868 # The following way of writing the cache mishandles newlines in values,
12869 # but we know of no workaround that is simple, portable, and efficient.
12870 # So, don't put newlines in cache variables' values.
12871 # Ultrix sh set writes to stderr and can't be redirected directly,
12872 # and sets the high bit in the cache file unless we assign to the vars.
12873 (set) 2>&1 |
12874   case `(ac_space=' '; set | grep ac_space) 2>&1` in
12875   *ac_space=\ *)
12876     # `set' does not quote correctly, so add quotes (double-quote substitution
12877     # turns \\\\ into \\, and sed turns \\ into \).
12878     sed -n \
12879       -e "s/'/'\\\\''/g" \
12880       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
12881     ;;
12882   *)
12883     # `set' quotes correctly as required by POSIX, so do not add quotes.
12884     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
12885     ;;
12886   esac >> confcache
12887 if cmp -s $cache_file confcache; then
12888   :
12889 else
12890   if test -w $cache_file; then
12891     echo "updating cache $cache_file"
12892     cat confcache > $cache_file
12893   else
12894     echo "not updating unwritable cache $cache_file"
12895   fi
12896 fi
12897 rm -f confcache
12898
12899 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12900
12901 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12902 # Let make expand exec_prefix.
12903 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12904
12905 # Any assignment to VPATH causes Sun make to only execute
12906 # the first set of double-colon rules, so remove it if not needed.
12907 # If there is a colon in the path, we need to keep it.
12908 if test "x$srcdir" = x.; then
12909   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12910 fi
12911
12912 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12913
12914 DEFS=-DHAVE_CONFIG_H
12915
12916 # Without the "./", some shells look in PATH for config.status.
12917 : ${CONFIG_STATUS=./config.status}
12918
12919 echo creating $CONFIG_STATUS
12920 rm -f $CONFIG_STATUS
12921 cat > $CONFIG_STATUS <<EOF
12922 #! /bin/sh
12923 # Generated automatically by configure.
12924 # Run this file to recreate the current configuration.
12925 # This directory was configured as follows,
12926 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12927 #
12928 # $0 $ac_configure_args
12929 #
12930 # Compiler output produced by configure, useful for debugging
12931 # configure, is in ./config.log if it exists.
12932
12933 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12934 for ac_option
12935 do
12936   case "\$ac_option" in
12937   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12938     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12939     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12940   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12941     echo "$CONFIG_STATUS generated by autoconf version 2.13"
12942     exit 0 ;;
12943   -help | --help | --hel | --he | --h)
12944     echo "\$ac_cs_usage"; exit 0 ;;
12945   *) echo "\$ac_cs_usage"; exit 1 ;;
12946   esac
12947 done
12948
12949 ac_given_srcdir=$srcdir
12950 ac_given_INSTALL="$INSTALL"
12951
12952 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12953 EOF
12954 cat >> $CONFIG_STATUS <<EOF
12955
12956 # Protect against being on the right side of a sed subst in config.status.
12957 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12958  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12959 $ac_vpsub
12960 $extrasub
12961 s%@SHELL@%$SHELL%g
12962 s%@CFLAGS@%$CFLAGS%g
12963 s%@CPPFLAGS@%$CPPFLAGS%g
12964 s%@CXXFLAGS@%$CXXFLAGS%g
12965 s%@FFLAGS@%$FFLAGS%g
12966 s%@DEFS@%$DEFS%g
12967 s%@LDFLAGS@%$LDFLAGS%g
12968 s%@LIBS@%$LIBS%g
12969 s%@exec_prefix@%$exec_prefix%g
12970 s%@prefix@%$prefix%g
12971 s%@program_transform_name@%$program_transform_name%g
12972 s%@bindir@%$bindir%g
12973 s%@sbindir@%$sbindir%g
12974 s%@libexecdir@%$libexecdir%g
12975 s%@datadir@%$datadir%g
12976 s%@sysconfdir@%$sysconfdir%g
12977 s%@sharedstatedir@%$sharedstatedir%g
12978 s%@localstatedir@%$localstatedir%g
12979 s%@libdir@%$libdir%g
12980 s%@includedir@%$includedir%g
12981 s%@oldincludedir@%$oldincludedir%g
12982 s%@infodir@%$infodir%g
12983 s%@mandir@%$mandir%g
12984 s%@RUNPROG@%$RUNPROG%g
12985 s%@MPROGS@%$MPROGS%g
12986 s%@LDSHFLAGS@%$LDSHFLAGS%g
12987 s%@HOST_OS@%$HOST_OS%g
12988 s%@PAM_MOD@%$PAM_MOD%g
12989 s%@WRAP@%$WRAP%g
12990 s%@WRAP32@%$WRAP32%g
12991 s%@PICFLAG@%$PICFLAG%g
12992 s%@SHLIBEXT@%$SHLIBEXT%g
12993 s%@BLDSHARED@%$BLDSHARED%g
12994 s%@CC@%$CC%g
12995 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12996 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
12997 s%@INSTALL_DATA@%$INSTALL_DATA%g
12998 s%@AWK@%$AWK%g
12999 s%@host@%$host%g
13000 s%@host_alias@%$host_alias%g
13001 s%@host_cpu@%$host_cpu%g
13002 s%@host_vendor@%$host_vendor%g
13003 s%@host_os@%$host_os%g
13004 s%@build@%$build%g
13005 s%@build_alias@%$build_alias%g
13006 s%@build_cpu@%$build_cpu%g
13007 s%@build_vendor@%$build_vendor%g
13008 s%@build_os@%$build_os%g
13009 s%@RANLIB@%$RANLIB%g
13010 s%@LN_S@%$LN_S%g
13011 s%@LIBTOOL@%$LIBTOOL%g
13012 s%@LIBTOOL_DEPS@%$LIBTOOL_DEPS%g
13013 s%@BROKEN_CC@%$BROKEN_CC%g
13014 s%@target@%$target%g
13015 s%@target_alias@%$target_alias%g
13016 s%@target_cpu@%$target_cpu%g
13017 s%@target_vendor@%$target_vendor%g
13018 s%@target_os@%$target_os%g
13019 s%@CPP@%$CPP%g
13020 s%@LIBOBJS@%$LIBOBJS%g
13021 s%@TERMLIBS@%$TERMLIBS%g
13022 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
13023 s%@ROFF@%$ROFF%g
13024 s%@QUOTAOBJS@%$QUOTAOBJS%g
13025 s%@privatedir@%$privatedir%g
13026 s%@lockdir@%$lockdir%g
13027 s%@swatdir@%$swatdir%g
13028 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
13029 s%@builddir@%$builddir%g
13030
13031 CEOF
13032 EOF
13033
13034 cat >> $CONFIG_STATUS <<\EOF
13035
13036 # Split the substitutions into bite-sized pieces for seds with
13037 # small command number limits, like on Digital OSF/1 and HP-UX.
13038 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13039 ac_file=1 # Number of current file.
13040 ac_beg=1 # First line for current file.
13041 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13042 ac_more_lines=:
13043 ac_sed_cmds=""
13044 while $ac_more_lines; do
13045   if test $ac_beg -gt 1; then
13046     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13047   else
13048     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13049   fi
13050   if test ! -s conftest.s$ac_file; then
13051     ac_more_lines=false
13052     rm -f conftest.s$ac_file
13053   else
13054     if test -z "$ac_sed_cmds"; then
13055       ac_sed_cmds="sed -f conftest.s$ac_file"
13056     else
13057       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13058     fi
13059     ac_file=`expr $ac_file + 1`
13060     ac_beg=$ac_end
13061     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13062   fi
13063 done
13064 if test -z "$ac_sed_cmds"; then
13065   ac_sed_cmds=cat
13066 fi
13067 EOF
13068
13069 cat >> $CONFIG_STATUS <<EOF
13070
13071 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
13072 EOF
13073 cat >> $CONFIG_STATUS <<\EOF
13074 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13075   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13076   case "$ac_file" in
13077   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13078        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13079   *) ac_file_in="${ac_file}.in" ;;
13080   esac
13081
13082   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13083
13084   # Remove last slash and all that follows it.  Not all systems have dirname.
13085   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13086   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13087     # The file is in a subdirectory.
13088     test ! -d "$ac_dir" && mkdir "$ac_dir"
13089     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13090     # A "../" for each directory in $ac_dir_suffix.
13091     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13092   else
13093     ac_dir_suffix= ac_dots=
13094   fi
13095
13096   case "$ac_given_srcdir" in
13097   .)  srcdir=.
13098       if test -z "$ac_dots"; then top_srcdir=.
13099       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13100   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13101   *) # Relative path.
13102     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13103     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13104   esac
13105
13106   case "$ac_given_INSTALL" in
13107   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13108   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13109   esac
13110
13111   echo creating "$ac_file"
13112   rm -f "$ac_file"
13113   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13114   case "$ac_file" in
13115   *Makefile*) ac_comsub="1i\\
13116 # $configure_input" ;;
13117   *) ac_comsub= ;;
13118   esac
13119
13120   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13121   sed -e "$ac_comsub
13122 s%@configure_input@%$configure_input%g
13123 s%@srcdir@%$srcdir%g
13124 s%@top_srcdir@%$top_srcdir%g
13125 s%@INSTALL@%$INSTALL%g
13126 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13127 fi; done
13128 rm -f conftest.s*
13129
13130 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13131 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13132 #
13133 # ac_d sets the value in "#define NAME VALUE" lines.
13134 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13135 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13136 ac_dC='\3'
13137 ac_dD='%g'
13138 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13139 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13140 ac_uB='\([      ]\)%\1#\2define\3'
13141 ac_uC=' '
13142 ac_uD='\4%g'
13143 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13144 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13145 ac_eB='$%\1#\2define\3'
13146 ac_eC=' '
13147 ac_eD='%g'
13148
13149 if test "${CONFIG_HEADERS+set}" != set; then
13150 EOF
13151 cat >> $CONFIG_STATUS <<EOF
13152   CONFIG_HEADERS="include/config.h"
13153 EOF
13154 cat >> $CONFIG_STATUS <<\EOF
13155 fi
13156 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13157   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13158   case "$ac_file" in
13159   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13160        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13161   *) ac_file_in="${ac_file}.in" ;;
13162   esac
13163
13164   echo creating $ac_file
13165
13166   rm -f conftest.frag conftest.in conftest.out
13167   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13168   cat $ac_file_inputs > conftest.in
13169
13170 EOF
13171
13172 # Transform confdefs.h into a sed script conftest.vals that substitutes
13173 # the proper values into config.h.in to produce config.h.  And first:
13174 # Protect against being on the right side of a sed subst in config.status.
13175 # Protect against being in an unquoted here document in config.status.
13176 rm -f conftest.vals
13177 cat > conftest.hdr <<\EOF
13178 s/[\\&%]/\\&/g
13179 s%[\\$`]%\\&%g
13180 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13181 s%ac_d%ac_u%gp
13182 s%ac_u%ac_e%gp
13183 EOF
13184 sed -n -f conftest.hdr confdefs.h > conftest.vals
13185 rm -f conftest.hdr
13186
13187 # This sed command replaces #undef with comments.  This is necessary, for
13188 # example, in the case of _POSIX_SOURCE, which is predefined and required
13189 # on some systems where configure will not decide to define it.
13190 cat >> conftest.vals <<\EOF
13191 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13192 EOF
13193
13194 # Break up conftest.vals because some shells have a limit on
13195 # the size of here documents, and old seds have small limits too.
13196
13197 rm -f conftest.tail
13198 while :
13199 do
13200   ac_lines=`grep -c . conftest.vals`
13201   # grep -c gives empty output for an empty file on some AIX systems.
13202   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13203   # Write a limited-size here document to conftest.frag.
13204   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13205   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13206   echo 'CEOF
13207   sed -f conftest.frag conftest.in > conftest.out
13208   rm -f conftest.in
13209   mv conftest.out conftest.in
13210 ' >> $CONFIG_STATUS
13211   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13212   rm -f conftest.vals
13213   mv conftest.tail conftest.vals
13214 done
13215 rm -f conftest.vals
13216
13217 cat >> $CONFIG_STATUS <<\EOF
13218   rm -f conftest.frag conftest.h
13219   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13220   cat conftest.in >> conftest.h
13221   rm -f conftest.in
13222   if cmp -s $ac_file conftest.h 2>/dev/null; then
13223     echo "$ac_file is unchanged"
13224     rm -f conftest.h
13225   else
13226     # Remove last slash and all that follows it.  Not all systems have dirname.
13227       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13228       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13229       # The file is in a subdirectory.
13230       test ! -d "$ac_dir" && mkdir "$ac_dir"
13231     fi
13232     rm -f $ac_file
13233     mv conftest.h $ac_file
13234   fi
13235 fi; done
13236
13237 EOF
13238 cat >> $CONFIG_STATUS <<EOF
13239
13240 EOF
13241 cat >> $CONFIG_STATUS <<\EOF
13242
13243 exit 0
13244 EOF
13245 chmod +x $CONFIG_STATUS
13246 rm -fr confdefs* $ac_clean_files
13247 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
13248