The big character set handling changeover!
[kai/samba.git] / source3 / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/samba
15 ac_help="$ac_help
16   --enable-debug        turn on debugging [default=no]"
17 ac_help="$ac_help
18   --enable-shared[=PKGS]  build shared libraries [default=yes]"
19 ac_help="$ac_help
20   --enable-static[=PKGS]  build static libraries [default=yes]"
21 ac_help="$ac_help
22   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
23 ac_help="$ac_help
24   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
25 ac_help="$ac_help
26   --disable-libtool-lock  avoid locking (might break parallel builds)"
27 ac_help="$ac_help
28   --with-codepagedir=DIR     Where to put codepage files (\$libdir/codepages)"
29 ac_help="$ac_help
30   --with-readline[=DIR]   Look for readline include/libs in DIR
31   --without-readline      Don't include readline support"
32 ac_help="$ac_help
33   --with-smbwrapper     Include SMB wrapper support
34   --without-smbwrapper  Don't include SMB wrapper support (default)"
35 ac_help="$ac_help
36   --with-afs     Include AFS support
37   --without-afs  Don't include AFS support (default)"
38 ac_help="$ac_help
39   --with-dfs     Include DFS support
40   --without-dfs  Don't include DFS support (default)"
41 ac_help="$ac_help
42   --with-krb4=base-dir     Include Kerberos IV support
43   --without-krb4          Don't include Kerberos IV support (default)"
44 ac_help="$ac_help
45   --with-krb5=base-dir     Include Kerberos 5 support
46   --without-krb5          Don't include Kerberos 5 support (default)"
47 ac_help="$ac_help
48   --with-automount     Include AUTOMOUNT support
49   --without-automount  Don't include AUTOMOUNT support (default)"
50 ac_help="$ac_help
51   --with-smbmount     Include SMBMOUNT (Linux only) support
52   --without-smbmount  Don't include SMBMOUNT support (default)"
53 ac_help="$ac_help
54   --with-pam     Include PAM password database support
55   --without-pam  Don't include PAM password database support (default)"
56 ac_help="$ac_help
57   --with-pam_smbpass     Include the smbpass PAM module
58   --without-pam_smbpass  Don't include the smbpass PAM module (default)"
59 ac_help="$ac_help
60   --with-tdbsam   Include experimental TDB password database
61   --without-tdbsam  Don't include experimental TDB password database (default)"
62 ac_help="$ac_help
63   --with-ldap     Include LDAP support
64   --without-ldap  Don't include LDAP support (default)"
65 ac_help="$ac_help
66   --with-nisplus     Include NISPLUS password database support
67   --without-nisplus  Don't include NISPLUS password database support (default)"
68 ac_help="$ac_help
69   --with-nisplus-home     Include NISPLUS_HOME support
70   --without-nisplus-home  Don't include NISPLUS_HOME support (default)"
71 ac_help="$ac_help
72   --with-ssl     Include SSL support
73   --without-ssl  Don't include SSL support (default)
74   --with-sslinc=DIR Where the SSL includes are (defaults to /usr/local/ssl)"
75 ac_help="$ac_help
76   --with-syslog     Include experimental SYSLOG support
77   --without-syslog  Don't include SYSLOG support (default)"
78 ac_help="$ac_help
79   --with-profile     Include profile support
80   --without-profile  Don't include profile support (default)"
81 ac_help="$ac_help
82   --with-netatalk     Include experimental Netatalk support
83   --without-netatalk  Don't include experimental Netatalk support (default)"
84 ac_help="$ac_help
85   --with-quotas     Include experimental disk-quota support
86   --without-quotas  Don't include experimental disk-quota support (default)"
87 ac_help="$ac_help
88   --with-utmp     Include experimental utmp accounting
89   --without-utmp  Don't include experimental utmp accounting (default)"
90 ac_help="$ac_help
91   --with-msdfs          Include MS Dfs support
92   --without-msdfs       Don't include MS Dfs support (default)"
93 ac_help="$ac_help
94   --with-privatedir=DIR     Where to put smbpasswd ($ac_default_prefix/private)"
95 ac_help="$ac_help
96   --with-lockdir=DIR     Where to put lock files ($ac_default_prefix/var/locks)"
97 ac_help="$ac_help
98   --with-swatdir=DIR     Where to put SWAT files ($ac_default_prefix/swat)"
99 ac_help="$ac_help
100   --with-spinlocks        use spin locks instead of fcntl locks "
101 ac_help="$ac_help
102   --with-acl-support        Include ACL support
103   --without-acl-support  Don't include ACL support (default)"
104 ac_help="$ac_help
105   --with-winbind        Build winbind library (default, if supported by OS)
106   --without-winbind     Don't build winbind library"
107
108 # Initialize some variables set by options.
109 # The variables have the same names as the options, with
110 # dashes changed to underlines.
111 build=NONE
112 cache_file=./config.cache
113 exec_prefix=NONE
114 host=NONE
115 no_create=
116 nonopt=NONE
117 no_recursion=
118 prefix=NONE
119 program_prefix=NONE
120 program_suffix=NONE
121 program_transform_name=s,x,x,
122 silent=
123 site=
124 srcdir=
125 target=NONE
126 verbose=
127 x_includes=NONE
128 x_libraries=NONE
129 bindir='${exec_prefix}/bin'
130 sbindir='${exec_prefix}/sbin'
131 libexecdir='${exec_prefix}/libexec'
132 datadir='${prefix}/share'
133 sysconfdir='${prefix}/etc'
134 sharedstatedir='${prefix}/com'
135 localstatedir='${prefix}/var'
136 libdir='${exec_prefix}/lib'
137 includedir='${prefix}/include'
138 oldincludedir='/usr/include'
139 infodir='${prefix}/info'
140 mandir='${prefix}/man'
141
142 # Initialize some other variables.
143 subdirs=
144 MFLAGS= MAKEFLAGS=
145 SHELL=${CONFIG_SHELL-/bin/sh}
146 # Maximum number of lines to put in a shell here document.
147 ac_max_here_lines=12
148
149 ac_prev=
150 for ac_option
151 do
152
153   # If the previous option needs an argument, assign it.
154   if test -n "$ac_prev"; then
155     eval "$ac_prev=\$ac_option"
156     ac_prev=
157     continue
158   fi
159
160   case "$ac_option" in
161   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
162   *) ac_optarg= ;;
163   esac
164
165   # Accept the important Cygnus configure options, so we can diagnose typos.
166
167   case "$ac_option" in
168
169   -bindir | --bindir | --bindi | --bind | --bin | --bi)
170     ac_prev=bindir ;;
171   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
172     bindir="$ac_optarg" ;;
173
174   -build | --build | --buil | --bui | --bu)
175     ac_prev=build ;;
176   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
177     build="$ac_optarg" ;;
178
179   -cache-file | --cache-file | --cache-fil | --cache-fi \
180   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
181     ac_prev=cache_file ;;
182   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
183   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
184     cache_file="$ac_optarg" ;;
185
186   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
187     ac_prev=datadir ;;
188   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
189   | --da=*)
190     datadir="$ac_optarg" ;;
191
192   -disable-* | --disable-*)
193     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
194     # Reject names that are not valid shell variable names.
195     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
196       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
197     fi
198     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
199     eval "enable_${ac_feature}=no" ;;
200
201   -enable-* | --enable-*)
202     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
203     # Reject names that are not valid shell variable names.
204     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
205       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
206     fi
207     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
208     case "$ac_option" in
209       *=*) ;;
210       *) ac_optarg=yes ;;
211     esac
212     eval "enable_${ac_feature}='$ac_optarg'" ;;
213
214   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
215   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
216   | --exec | --exe | --ex)
217     ac_prev=exec_prefix ;;
218   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
219   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
220   | --exec=* | --exe=* | --ex=*)
221     exec_prefix="$ac_optarg" ;;
222
223   -gas | --gas | --ga | --g)
224     # Obsolete; use --with-gas.
225     with_gas=yes ;;
226
227   -help | --help | --hel | --he)
228     # Omit some internal or obsolete options to make the list less imposing.
229     # This message is too long to be a string in the A/UX 3.1 sh.
230     cat << EOF
231 Usage: configure [options] [host]
232 Options: [defaults in brackets after descriptions]
233 Configuration:
234   --cache-file=FILE       cache test results in FILE
235   --help                  print this message
236   --no-create             do not create output files
237   --quiet, --silent       do not print \`checking...' messages
238   --version               print the version of autoconf that created configure
239 Directory and file names:
240   --prefix=PREFIX         install architecture-independent files in PREFIX
241                           [$ac_default_prefix]
242   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
243                           [same as prefix]
244   --bindir=DIR            user executables in DIR [EPREFIX/bin]
245   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
246   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
247   --datadir=DIR           read-only architecture-independent data in DIR
248                           [PREFIX/share]
249   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
250   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
251                           [PREFIX/com]
252   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
253   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
254   --includedir=DIR        C header files in DIR [PREFIX/include]
255   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
256   --infodir=DIR           info documentation in DIR [PREFIX/info]
257   --mandir=DIR            man documentation in DIR [PREFIX/man]
258   --srcdir=DIR            find the sources in DIR [configure dir or ..]
259   --program-prefix=PREFIX prepend PREFIX to installed program names
260   --program-suffix=SUFFIX append SUFFIX to installed program names
261   --program-transform-name=PROGRAM
262                           run sed PROGRAM on installed program names
263 EOF
264     cat << EOF
265 Host type:
266   --build=BUILD           configure for building on BUILD [BUILD=HOST]
267   --host=HOST             configure for HOST [guessed]
268   --target=TARGET         configure for TARGET [TARGET=HOST]
269 Features and packages:
270   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
271   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
272   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
273   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
274   --x-includes=DIR        X include files are in DIR
275   --x-libraries=DIR       X library files are in DIR
276 EOF
277     if test -n "$ac_help"; then
278       echo "--enable and --with options recognized:$ac_help"
279     fi
280     exit 0 ;;
281
282   -host | --host | --hos | --ho)
283     ac_prev=host ;;
284   -host=* | --host=* | --hos=* | --ho=*)
285     host="$ac_optarg" ;;
286
287   -includedir | --includedir | --includedi | --included | --include \
288   | --includ | --inclu | --incl | --inc)
289     ac_prev=includedir ;;
290   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
291   | --includ=* | --inclu=* | --incl=* | --inc=*)
292     includedir="$ac_optarg" ;;
293
294   -infodir | --infodir | --infodi | --infod | --info | --inf)
295     ac_prev=infodir ;;
296   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
297     infodir="$ac_optarg" ;;
298
299   -libdir | --libdir | --libdi | --libd)
300     ac_prev=libdir ;;
301   -libdir=* | --libdir=* | --libdi=* | --libd=*)
302     libdir="$ac_optarg" ;;
303
304   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
305   | --libexe | --libex | --libe)
306     ac_prev=libexecdir ;;
307   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
308   | --libexe=* | --libex=* | --libe=*)
309     libexecdir="$ac_optarg" ;;
310
311   -localstatedir | --localstatedir | --localstatedi | --localstated \
312   | --localstate | --localstat | --localsta | --localst \
313   | --locals | --local | --loca | --loc | --lo)
314     ac_prev=localstatedir ;;
315   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
316   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
317   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
318     localstatedir="$ac_optarg" ;;
319
320   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
321     ac_prev=mandir ;;
322   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
323     mandir="$ac_optarg" ;;
324
325   -nfp | --nfp | --nf)
326     # Obsolete; use --without-fp.
327     with_fp=no ;;
328
329   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
330   | --no-cr | --no-c)
331     no_create=yes ;;
332
333   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
334   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
335     no_recursion=yes ;;
336
337   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
338   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
339   | --oldin | --oldi | --old | --ol | --o)
340     ac_prev=oldincludedir ;;
341   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
342   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
343   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
344     oldincludedir="$ac_optarg" ;;
345
346   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
347     ac_prev=prefix ;;
348   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
349     prefix="$ac_optarg" ;;
350
351   -program-prefix | --program-prefix | --program-prefi | --program-pref \
352   | --program-pre | --program-pr | --program-p)
353     ac_prev=program_prefix ;;
354   -program-prefix=* | --program-prefix=* | --program-prefi=* \
355   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
356     program_prefix="$ac_optarg" ;;
357
358   -program-suffix | --program-suffix | --program-suffi | --program-suff \
359   | --program-suf | --program-su | --program-s)
360     ac_prev=program_suffix ;;
361   -program-suffix=* | --program-suffix=* | --program-suffi=* \
362   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
363     program_suffix="$ac_optarg" ;;
364
365   -program-transform-name | --program-transform-name \
366   | --program-transform-nam | --program-transform-na \
367   | --program-transform-n | --program-transform- \
368   | --program-transform | --program-transfor \
369   | --program-transfo | --program-transf \
370   | --program-trans | --program-tran \
371   | --progr-tra | --program-tr | --program-t)
372     ac_prev=program_transform_name ;;
373   -program-transform-name=* | --program-transform-name=* \
374   | --program-transform-nam=* | --program-transform-na=* \
375   | --program-transform-n=* | --program-transform-=* \
376   | --program-transform=* | --program-transfor=* \
377   | --program-transfo=* | --program-transf=* \
378   | --program-trans=* | --program-tran=* \
379   | --progr-tra=* | --program-tr=* | --program-t=*)
380     program_transform_name="$ac_optarg" ;;
381
382   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
383   | -silent | --silent | --silen | --sile | --sil)
384     silent=yes ;;
385
386   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
387     ac_prev=sbindir ;;
388   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
389   | --sbi=* | --sb=*)
390     sbindir="$ac_optarg" ;;
391
392   -sharedstatedir | --sharedstatedir | --sharedstatedi \
393   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
394   | --sharedst | --shareds | --shared | --share | --shar \
395   | --sha | --sh)
396     ac_prev=sharedstatedir ;;
397   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
398   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
399   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
400   | --sha=* | --sh=*)
401     sharedstatedir="$ac_optarg" ;;
402
403   -site | --site | --sit)
404     ac_prev=site ;;
405   -site=* | --site=* | --sit=*)
406     site="$ac_optarg" ;;
407
408   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
409     ac_prev=srcdir ;;
410   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
411     srcdir="$ac_optarg" ;;
412
413   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
414   | --syscon | --sysco | --sysc | --sys | --sy)
415     ac_prev=sysconfdir ;;
416   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
417   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
418     sysconfdir="$ac_optarg" ;;
419
420   -target | --target | --targe | --targ | --tar | --ta | --t)
421     ac_prev=target ;;
422   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
423     target="$ac_optarg" ;;
424
425   -v | -verbose | --verbose | --verbos | --verbo | --verb)
426     verbose=yes ;;
427
428   -version | --version | --versio | --versi | --vers)
429     echo "configure generated by autoconf version 2.13"
430     exit 0 ;;
431
432   -with-* | --with-*)
433     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
434     # Reject names that are not valid shell variable names.
435     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
436       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
437     fi
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case "$ac_option" in
440       *=*) ;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_${ac_package}='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
447     # Reject names that are not valid shell variable names.
448     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
449       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
450     fi
451     ac_package=`echo $ac_package| sed 's/-/_/g'`
452     eval "with_${ac_package}=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes="$ac_optarg" ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries="$ac_optarg" ;;
471
472   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
473     ;;
474
475   *)
476     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
477       echo "configure: warning: $ac_option: invalid host type" 1>&2
478     fi
479     if test "x$nonopt" != xNONE; then
480       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
481     fi
482     nonopt="$ac_option"
483     ;;
484
485   esac
486 done
487
488 if test -n "$ac_prev"; then
489   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
490 fi
491
492 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
493
494 # File descriptor usage:
495 # 0 standard input
496 # 1 file creation
497 # 2 errors and warnings
498 # 3 some systems may open it to /dev/tty
499 # 4 used on the Kubota Titan
500 # 6 checking for... messages and results
501 # 5 compiler messages saved in config.log
502 if test "$silent" = yes; then
503   exec 6>/dev/null
504 else
505   exec 6>&1
506 fi
507 exec 5>./config.log
508
509 echo "\
510 This file contains any messages produced by compilers while
511 running configure, to aid debugging if configure makes a mistake.
512 " 1>&5
513
514 # Strip out --no-create and --no-recursion so they do not pile up.
515 # Also quote any args containing shell metacharacters.
516 ac_configure_args=
517 for ac_arg
518 do
519   case "$ac_arg" in
520   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
521   | --no-cr | --no-c) ;;
522   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
523   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
524   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
525   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
526   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
527   esac
528 done
529
530 # NLS nuisances.
531 # Only set these to C if already set.  These must not be set unconditionally
532 # because not all systems understand e.g. LANG=C (notably SCO).
533 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
534 # Non-C LC_CTYPE values break the ctype check.
535 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
536 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
537 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
538 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
539
540 # confdefs.h avoids OS command line length limits that DEFS can exceed.
541 rm -rf conftest* confdefs.h
542 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
543 echo > confdefs.h
544
545 # A filename unique to this package, relative to the directory that
546 # configure is in, which we can look for to find out if srcdir is correct.
547 ac_unique_file=include/includes.h
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
566   else
567     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
568   fi
569 fi
570 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
571
572 # Prefer explicitly selected file to automatically selected ones.
573 if test -z "$CONFIG_SITE"; then
574   if test "x$prefix" != xNONE; then
575     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
576   else
577     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
578   fi
579 fi
580 for ac_site_file in $CONFIG_SITE; do
581   if test -r "$ac_site_file"; then
582     echo "loading site script $ac_site_file"
583     . "$ac_site_file"
584   fi
585 done
586
587 if test -r "$cache_file"; then
588   echo "loading cache $cache_file"
589   . $cache_file
590 else
591   echo "creating cache $cache_file"
592   > $cache_file
593 fi
594
595 ac_ext=c
596 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
597 ac_cpp='$CPP $CPPFLAGS'
598 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
599 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
600 cross_compiling=$ac_cv_prog_cc_cross
601
602 ac_exeext=
603 ac_objext=o
604 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
605   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
606   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
607     ac_n= ac_c='
608 ' ac_t='        '
609   else
610     ac_n=-n ac_c= ac_t=
611   fi
612 else
613   ac_n= ac_c='\c' ac_t=
614 fi
615
616
617
618 # we want to be compatibe with older versions of Samba
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633 # compile with optimisation and without debugging by default
634 CFLAGS="-O ${CFLAGS}"
635
636 # Check whether --enable-debug or --disable-debug was given.
637 if test "${enable_debug+set}" = set; then
638   enableval="$enable_debug"
639   if eval "test x$enable_debug = xyes"; then
640         CFLAGS="${CFLAGS} -g"
641     fi
642 fi
643
644
645
646 # Extract the first word of "gcc", so it can be a program name with args.
647 set dummy gcc; ac_word=$2
648 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
649 echo "configure:650: checking for $ac_word" >&5
650 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
651   echo $ac_n "(cached) $ac_c" 1>&6
652 else
653   if test -n "$CC"; then
654   ac_cv_prog_CC="$CC" # Let the user override the test.
655 else
656   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
657   ac_dummy="$PATH"
658   for ac_dir in $ac_dummy; do
659     test -z "$ac_dir" && ac_dir=.
660     if test -f $ac_dir/$ac_word; then
661       ac_cv_prog_CC="gcc"
662       break
663     fi
664   done
665   IFS="$ac_save_ifs"
666 fi
667 fi
668 CC="$ac_cv_prog_CC"
669 if test -n "$CC"; then
670   echo "$ac_t""$CC" 1>&6
671 else
672   echo "$ac_t""no" 1>&6
673 fi
674
675 if test -z "$CC"; then
676   # Extract the first word of "cc", so it can be a program name with args.
677 set dummy cc; ac_word=$2
678 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
679 echo "configure:680: checking for $ac_word" >&5
680 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
681   echo $ac_n "(cached) $ac_c" 1>&6
682 else
683   if test -n "$CC"; then
684   ac_cv_prog_CC="$CC" # Let the user override the test.
685 else
686   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
687   ac_prog_rejected=no
688   ac_dummy="$PATH"
689   for ac_dir in $ac_dummy; do
690     test -z "$ac_dir" && ac_dir=.
691     if test -f $ac_dir/$ac_word; then
692       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
693         ac_prog_rejected=yes
694         continue
695       fi
696       ac_cv_prog_CC="cc"
697       break
698     fi
699   done
700   IFS="$ac_save_ifs"
701 if test $ac_prog_rejected = yes; then
702   # We found a bogon in the path, so make sure we never use it.
703   set dummy $ac_cv_prog_CC
704   shift
705   if test $# -gt 0; then
706     # We chose a different compiler from the bogus one.
707     # However, it has the same basename, so the bogon will be chosen
708     # first if we set CC to just the basename; use the full file name.
709     shift
710     set dummy "$ac_dir/$ac_word" "$@"
711     shift
712     ac_cv_prog_CC="$@"
713   fi
714 fi
715 fi
716 fi
717 CC="$ac_cv_prog_CC"
718 if test -n "$CC"; then
719   echo "$ac_t""$CC" 1>&6
720 else
721   echo "$ac_t""no" 1>&6
722 fi
723
724   if test -z "$CC"; then
725     case "`uname -s`" in
726     *win32* | *WIN32*)
727       # Extract the first word of "cl", so it can be a program name with args.
728 set dummy cl; ac_word=$2
729 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
730 echo "configure:731: checking for $ac_word" >&5
731 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
732   echo $ac_n "(cached) $ac_c" 1>&6
733 else
734   if test -n "$CC"; then
735   ac_cv_prog_CC="$CC" # Let the user override the test.
736 else
737   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
738   ac_dummy="$PATH"
739   for ac_dir in $ac_dummy; do
740     test -z "$ac_dir" && ac_dir=.
741     if test -f $ac_dir/$ac_word; then
742       ac_cv_prog_CC="cl"
743       break
744     fi
745   done
746   IFS="$ac_save_ifs"
747 fi
748 fi
749 CC="$ac_cv_prog_CC"
750 if test -n "$CC"; then
751   echo "$ac_t""$CC" 1>&6
752 else
753   echo "$ac_t""no" 1>&6
754 fi
755  ;;
756     esac
757   fi
758   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
759 fi
760
761 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
762 echo "configure:763: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
763
764 ac_ext=c
765 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
766 ac_cpp='$CPP $CPPFLAGS'
767 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
768 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
769 cross_compiling=$ac_cv_prog_cc_cross
770
771 cat > conftest.$ac_ext << EOF
772
773 #line 774 "configure"
774 #include "confdefs.h"
775
776 main(){return(0);}
777 EOF
778 if { (eval echo configure:779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
779   ac_cv_prog_cc_works=yes
780   # If we can't run a trivial program, we are probably using a cross compiler.
781   if (./conftest; exit) 2>/dev/null; then
782     ac_cv_prog_cc_cross=no
783   else
784     ac_cv_prog_cc_cross=yes
785   fi
786 else
787   echo "configure: failed program was:" >&5
788   cat conftest.$ac_ext >&5
789   ac_cv_prog_cc_works=no
790 fi
791 rm -fr conftest*
792 ac_ext=c
793 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
794 ac_cpp='$CPP $CPPFLAGS'
795 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
796 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
797 cross_compiling=$ac_cv_prog_cc_cross
798
799 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
800 if test $ac_cv_prog_cc_works = no; then
801   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
802 fi
803 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
804 echo "configure:805: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
805 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
806 cross_compiling=$ac_cv_prog_cc_cross
807
808 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
809 echo "configure:810: checking whether we are using GNU C" >&5
810 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
811   echo $ac_n "(cached) $ac_c" 1>&6
812 else
813   cat > conftest.c <<EOF
814 #ifdef __GNUC__
815   yes;
816 #endif
817 EOF
818 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
819   ac_cv_prog_gcc=yes
820 else
821   ac_cv_prog_gcc=no
822 fi
823 fi
824
825 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
826
827 if test $ac_cv_prog_gcc = yes; then
828   GCC=yes
829 else
830   GCC=
831 fi
832
833 ac_test_CFLAGS="${CFLAGS+set}"
834 ac_save_CFLAGS="$CFLAGS"
835 CFLAGS=
836 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
837 echo "configure:838: checking whether ${CC-cc} accepts -g" >&5
838 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
839   echo $ac_n "(cached) $ac_c" 1>&6
840 else
841   echo 'void f(){}' > conftest.c
842 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
843   ac_cv_prog_cc_g=yes
844 else
845   ac_cv_prog_cc_g=no
846 fi
847 rm -f conftest*
848
849 fi
850
851 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
852 if test "$ac_test_CFLAGS" = set; then
853   CFLAGS="$ac_save_CFLAGS"
854 elif test $ac_cv_prog_cc_g = yes; then
855   if test "$GCC" = yes; then
856     CFLAGS="-g -O2"
857   else
858     CFLAGS="-g"
859   fi
860 else
861   if test "$GCC" = yes; then
862     CFLAGS="-O2"
863   else
864     CFLAGS=
865   fi
866 fi
867
868 ac_aux_dir=
869 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
870   if test -f $ac_dir/install-sh; then
871     ac_aux_dir=$ac_dir
872     ac_install_sh="$ac_aux_dir/install-sh -c"
873     break
874   elif test -f $ac_dir/install.sh; then
875     ac_aux_dir=$ac_dir
876     ac_install_sh="$ac_aux_dir/install.sh -c"
877     break
878   fi
879 done
880 if test -z "$ac_aux_dir"; then
881   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
882 fi
883 ac_config_guess=$ac_aux_dir/config.guess
884 ac_config_sub=$ac_aux_dir/config.sub
885 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
886
887 # Find a good install program.  We prefer a C program (faster),
888 # so one script is as good as another.  But avoid the broken or
889 # incompatible versions:
890 # SysV /etc/install, /usr/sbin/install
891 # SunOS /usr/etc/install
892 # IRIX /sbin/install
893 # AIX /bin/install
894 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
895 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
896 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
897 # ./install, which can be erroneously created by make from ./install.sh.
898 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
899 echo "configure:900: checking for a BSD compatible install" >&5
900 if test -z "$INSTALL"; then
901 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
902   echo $ac_n "(cached) $ac_c" 1>&6
903 else
904     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
905   for ac_dir in $PATH; do
906     # Account for people who put trailing slashes in PATH elements.
907     case "$ac_dir/" in
908     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
909     *)
910       # OSF1 and SCO ODT 3.0 have their own names for install.
911       # Don't use installbsd from OSF since it installs stuff as root
912       # by default.
913       for ac_prog in ginstall scoinst install; do
914         if test -f $ac_dir/$ac_prog; then
915           if test $ac_prog = install &&
916             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
917             # AIX install.  It has an incompatible calling convention.
918             :
919           else
920             ac_cv_path_install="$ac_dir/$ac_prog -c"
921             break 2
922           fi
923         fi
924       done
925       ;;
926     esac
927   done
928   IFS="$ac_save_IFS"
929
930 fi
931   if test "${ac_cv_path_install+set}" = set; then
932     INSTALL="$ac_cv_path_install"
933   else
934     # As a last resort, use the slow shell script.  We don't cache a
935     # path for INSTALL within a source directory, because that will
936     # break other packages using the cache if that directory is
937     # removed, or if the path is relative.
938     INSTALL="$ac_install_sh"
939   fi
940 fi
941 echo "$ac_t""$INSTALL" 1>&6
942
943 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
944 # It thinks the first close brace ends the variable substitution.
945 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
946
947 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
948
949 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
950
951 for ac_prog in mawk gawk nawk awk
952 do
953 # Extract the first word of "$ac_prog", so it can be a program name with args.
954 set dummy $ac_prog; ac_word=$2
955 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
956 echo "configure:957: checking for $ac_word" >&5
957 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
958   echo $ac_n "(cached) $ac_c" 1>&6
959 else
960   if test -n "$AWK"; then
961   ac_cv_prog_AWK="$AWK" # Let the user override the test.
962 else
963   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
964   ac_dummy="$PATH"
965   for ac_dir in $ac_dummy; do
966     test -z "$ac_dir" && ac_dir=.
967     if test -f $ac_dir/$ac_word; then
968       ac_cv_prog_AWK="$ac_prog"
969       break
970     fi
971   done
972   IFS="$ac_save_ifs"
973 fi
974 fi
975 AWK="$ac_cv_prog_AWK"
976 if test -n "$AWK"; then
977   echo "$ac_t""$AWK" 1>&6
978 else
979   echo "$ac_t""no" 1>&6
980 fi
981
982 test -n "$AWK" && break
983 done
984
985 # Check whether --enable-shared or --disable-shared was given.
986 if test "${enable_shared+set}" = set; then
987   enableval="$enable_shared"
988   p=${PACKAGE-default}
989 case "$enableval" in
990 yes) enable_shared=yes ;;
991 no) enable_shared=no ;;
992 *)
993   enable_shared=no
994   # Look at the argument we got.  We use all the common list separators.
995   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
996   for pkg in $enableval; do
997     if test "X$pkg" = "X$p"; then
998       enable_shared=yes
999     fi
1000   done
1001   IFS="$ac_save_ifs"
1002   ;;
1003 esac
1004 else
1005   enable_shared=yes
1006 fi
1007
1008 # Check whether --enable-static or --disable-static was given.
1009 if test "${enable_static+set}" = set; then
1010   enableval="$enable_static"
1011   p=${PACKAGE-default}
1012 case "$enableval" in
1013 yes) enable_static=yes ;;
1014 no) enable_static=no ;;
1015 *)
1016   enable_static=no
1017   # Look at the argument we got.  We use all the common list separators.
1018   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1019   for pkg in $enableval; do
1020     if test "X$pkg" = "X$p"; then
1021       enable_static=yes
1022     fi
1023   done
1024   IFS="$ac_save_ifs"
1025   ;;
1026 esac
1027 else
1028   enable_static=yes
1029 fi
1030
1031 # Check whether --enable-fast-install or --disable-fast-install was given.
1032 if test "${enable_fast_install+set}" = set; then
1033   enableval="$enable_fast_install"
1034   p=${PACKAGE-default}
1035 case "$enableval" in
1036 yes) enable_fast_install=yes ;;
1037 no) enable_fast_install=no ;;
1038 *)
1039   enable_fast_install=no
1040   # Look at the argument we got.  We use all the common list separators.
1041   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1042   for pkg in $enableval; do
1043     if test "X$pkg" = "X$p"; then
1044       enable_fast_install=yes
1045     fi
1046   done
1047   IFS="$ac_save_ifs"
1048   ;;
1049 esac
1050 else
1051   enable_fast_install=yes
1052 fi
1053
1054
1055 # Make sure we can run config.sub.
1056 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1057 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1058 fi
1059
1060 echo $ac_n "checking host system type""... $ac_c" 1>&6
1061 echo "configure:1062: checking host system type" >&5
1062
1063 host_alias=$host
1064 case "$host_alias" in
1065 NONE)
1066   case $nonopt in
1067   NONE)
1068     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1069     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1070     fi ;;
1071   *) host_alias=$nonopt ;;
1072   esac ;;
1073 esac
1074
1075 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1076 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1077 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1078 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1079 echo "$ac_t""$host" 1>&6
1080
1081 echo $ac_n "checking build system type""... $ac_c" 1>&6
1082 echo "configure:1083: checking build system type" >&5
1083
1084 build_alias=$build
1085 case "$build_alias" in
1086 NONE)
1087   case $nonopt in
1088   NONE) build_alias=$host_alias ;;
1089   *) build_alias=$nonopt ;;
1090   esac ;;
1091 esac
1092
1093 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1094 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1095 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1096 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1097 echo "$ac_t""$build" 1>&6
1098
1099 # Extract the first word of "ranlib", so it can be a program name with args.
1100 set dummy ranlib; ac_word=$2
1101 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1102 echo "configure:1103: checking for $ac_word" >&5
1103 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1104   echo $ac_n "(cached) $ac_c" 1>&6
1105 else
1106   if test -n "$RANLIB"; then
1107   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1108 else
1109   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1110   ac_dummy="$PATH"
1111   for ac_dir in $ac_dummy; do
1112     test -z "$ac_dir" && ac_dir=.
1113     if test -f $ac_dir/$ac_word; then
1114       ac_cv_prog_RANLIB="ranlib"
1115       break
1116     fi
1117   done
1118   IFS="$ac_save_ifs"
1119   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1120 fi
1121 fi
1122 RANLIB="$ac_cv_prog_RANLIB"
1123 if test -n "$RANLIB"; then
1124   echo "$ac_t""$RANLIB" 1>&6
1125 else
1126   echo "$ac_t""no" 1>&6
1127 fi
1128
1129 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1130 if test "${with_gnu_ld+set}" = set; then
1131   withval="$with_gnu_ld"
1132   test "$withval" = no || with_gnu_ld=yes
1133 else
1134   with_gnu_ld=no
1135 fi
1136
1137 ac_prog=ld
1138 if test "$ac_cv_prog_gcc" = yes; then
1139   # Check if gcc -print-prog-name=ld gives a path.
1140   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1141 echo "configure:1142: checking for ld used by GCC" >&5
1142   ac_prog=`($CC -print-prog-name=ld) 2>&5`
1143   case "$ac_prog" in
1144     # Accept absolute paths.
1145     [\\/]* | [A-Za-z]:[\\/]*)
1146       re_direlt='/[^/][^/]*/\.\./'
1147       # Canonicalize the path of ld
1148       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1149       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1150         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1151       done
1152       test -z "$LD" && LD="$ac_prog"
1153       ;;
1154   "")
1155     # If it fails, then pretend we aren't using GCC.
1156     ac_prog=ld
1157     ;;
1158   *)
1159     # If it is relative, then search for the first ld in PATH.
1160     with_gnu_ld=unknown
1161     ;;
1162   esac
1163 elif test "$with_gnu_ld" = yes; then
1164   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1165 echo "configure:1166: checking for GNU ld" >&5
1166 else
1167   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1168 echo "configure:1169: checking for non-GNU ld" >&5
1169 fi
1170 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1171   echo $ac_n "(cached) $ac_c" 1>&6
1172 else
1173   if test -z "$LD"; then
1174   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1175   for ac_dir in $PATH; do
1176     test -z "$ac_dir" && ac_dir=.
1177     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1178       ac_cv_path_LD="$ac_dir/$ac_prog"
1179       # Check to see if the program is GNU ld.  I'd rather use --version,
1180       # but apparently some GNU ld's only accept -v.
1181       # Break only if it was the GNU/non-GNU ld that we prefer.
1182       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1183         test "$with_gnu_ld" != no && break
1184       else
1185         test "$with_gnu_ld" != yes && break
1186       fi
1187     fi
1188   done
1189   IFS="$ac_save_ifs"
1190 else
1191   ac_cv_path_LD="$LD" # Let the user override the test with a path.
1192 fi
1193 fi
1194
1195 LD="$ac_cv_path_LD"
1196 if test -n "$LD"; then
1197   echo "$ac_t""$LD" 1>&6
1198 else
1199   echo "$ac_t""no" 1>&6
1200 fi
1201 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1202 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1203 echo "configure:1204: checking if the linker ($LD) is GNU ld" >&5
1204 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1205   echo $ac_n "(cached) $ac_c" 1>&6
1206 else
1207   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1208 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1209   ac_cv_prog_gnu_ld=yes
1210 else
1211   ac_cv_prog_gnu_ld=no
1212 fi
1213 fi
1214
1215 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1216
1217
1218 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1219 echo "configure:1220: checking for BSD-compatible nm" >&5
1220 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1221   echo $ac_n "(cached) $ac_c" 1>&6
1222 else
1223   if test -n "$NM"; then
1224   # Let the user override the test.
1225   ac_cv_path_NM="$NM"
1226 else
1227   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1228   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1229     test -z "$ac_dir" && ac_dir=.
1230     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
1231       # Check to see if the nm accepts a BSD-compat flag.
1232       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1233       #   nm: unknown option "B" ignored
1234       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1235         ac_cv_path_NM="$ac_dir/nm -B"
1236         break
1237       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1238         ac_cv_path_NM="$ac_dir/nm -p"
1239         break
1240       else
1241         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1242         continue # so that we can try to find one that supports BSD flags
1243       fi
1244     fi
1245   done
1246   IFS="$ac_save_ifs"
1247   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1248 fi
1249 fi
1250
1251 NM="$ac_cv_path_NM"
1252 echo "$ac_t""$NM" 1>&6
1253
1254 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1255 echo "configure:1256: checking whether ln -s works" >&5
1256 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1257   echo $ac_n "(cached) $ac_c" 1>&6
1258 else
1259   rm -f conftestdata
1260 if ln -s X conftestdata 2>/dev/null
1261 then
1262   rm -f conftestdata
1263   ac_cv_prog_LN_S="ln -s"
1264 else
1265   ac_cv_prog_LN_S=ln
1266 fi
1267 fi
1268 LN_S="$ac_cv_prog_LN_S"
1269 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1270   echo "$ac_t""yes" 1>&6
1271 else
1272   echo "$ac_t""no" 1>&6
1273 fi
1274
1275
1276 case "$target" in
1277 NONE) lt_target="$host" ;;
1278 *) lt_target="$target" ;;
1279 esac
1280
1281 # Check for any special flags to pass to ltconfig.
1282 libtool_flags="--cache-file=$cache_file"
1283 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1284 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1285 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1286 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1287 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1288
1289
1290 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1291 if test "${enable_libtool_lock+set}" = set; then
1292   enableval="$enable_libtool_lock"
1293   :
1294 fi
1295
1296 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1297 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1298
1299 # Some flags need to be propagated to the compiler or linker for good
1300 # libtool support.
1301 case "$lt_target" in
1302 *-*-irix6*)
1303   # Find out which ABI we are using.
1304   echo '#line 1305 "configure"' > conftest.$ac_ext
1305   if { (eval echo configure:1306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1306     case "`/usr/bin/file conftest.o`" in
1307     *32-bit*)
1308       LD="${LD-ld} -32"
1309       ;;
1310     *N32*)
1311       LD="${LD-ld} -n32"
1312       ;;
1313     *64-bit*)
1314       LD="${LD-ld} -64"
1315       ;;
1316     esac
1317   fi
1318   rm -rf conftest*
1319   ;;
1320
1321 *-*-sco3.2v5*)
1322   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1323   SAVE_CFLAGS="$CFLAGS"
1324   CFLAGS="$CFLAGS -belf"
1325   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1326 echo "configure:1327: checking whether the C compiler needs -belf" >&5
1327 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1328   echo $ac_n "(cached) $ac_c" 1>&6
1329 else
1330   cat > conftest.$ac_ext <<EOF
1331 #line 1332 "configure"
1332 #include "confdefs.h"
1333
1334 int main() {
1335
1336 ; return 0; }
1337 EOF
1338 if { (eval echo configure:1339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1339   rm -rf conftest*
1340   lt_cv_cc_needs_belf=yes
1341 else
1342   echo "configure: failed program was:" >&5
1343   cat conftest.$ac_ext >&5
1344   rm -rf conftest*
1345   lt_cv_cc_needs_belf=no
1346 fi
1347 rm -f conftest*
1348 fi
1349
1350 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1351   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1352     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1353     CFLAGS="$SAVE_CFLAGS"
1354   fi
1355   ;;
1356
1357
1358 esac
1359
1360
1361 # Save cache, so that ltconfig can load it
1362 cat > confcache <<\EOF
1363 # This file is a shell script that caches the results of configure
1364 # tests run on this system so they can be shared between configure
1365 # scripts and configure runs.  It is not useful on other systems.
1366 # If it contains results you don't want to keep, you may remove or edit it.
1367 #
1368 # By default, configure uses ./config.cache as the cache file,
1369 # creating it if it does not exist already.  You can give configure
1370 # the --cache-file=FILE option to use a different cache file; that is
1371 # what configure does when it calls configure scripts in
1372 # subdirectories, so they share the cache.
1373 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1374 # config.status only pays attention to the cache file if you give it the
1375 # --recheck option to rerun configure.
1376 #
1377 EOF
1378 # The following way of writing the cache mishandles newlines in values,
1379 # but we know of no workaround that is simple, portable, and efficient.
1380 # So, don't put newlines in cache variables' values.
1381 # Ultrix sh set writes to stderr and can't be redirected directly,
1382 # and sets the high bit in the cache file unless we assign to the vars.
1383 (set) 2>&1 |
1384   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1385   *ac_space=\ *)
1386     # `set' does not quote correctly, so add quotes (double-quote substitution
1387     # turns \\\\ into \\, and sed turns \\ into \).
1388     sed -n \
1389       -e "s/'/'\\\\''/g" \
1390       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1391     ;;
1392   *)
1393     # `set' quotes correctly as required by POSIX, so do not add quotes.
1394     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1395     ;;
1396   esac >> confcache
1397 if cmp -s $cache_file confcache; then
1398   :
1399 else
1400   if test -w $cache_file; then
1401     echo "updating cache $cache_file"
1402     cat confcache > $cache_file
1403   else
1404     echo "not updating unwritable cache $cache_file"
1405   fi
1406 fi
1407 rm -f confcache
1408
1409
1410 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
1411 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1412 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1413 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1414 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
1415 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1416 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
1417 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1418
1419 # Reload cache, that may have been modified by ltconfig
1420 if test -r "$cache_file"; then
1421   echo "loading cache $cache_file"
1422   . $cache_file
1423 else
1424   echo "creating cache $cache_file"
1425   > $cache_file
1426 fi
1427
1428
1429 # This can be used to rebuild libtool when needed
1430 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1431
1432 # Always use our own libtool.
1433 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1434
1435 # Redirect the config.log output again, so that the ltconfig log is not
1436 # clobbered by the next message.
1437 exec 5>>./config.log
1438
1439
1440
1441 if test "x$CC" != xcc; then
1442   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1443 echo "configure:1444: checking whether $CC and cc understand -c and -o together" >&5
1444 else
1445   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1446 echo "configure:1447: checking whether cc understands -c and -o together" >&5
1447 fi
1448 set dummy $CC; ac_cc="`echo $2 |
1449                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1450 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1451   echo $ac_n "(cached) $ac_c" 1>&6
1452 else
1453   echo 'foo(){}' > conftest.c
1454 # Make sure it works both with $CC and with simple cc.
1455 # We do the test twice because some compilers refuse to overwrite an
1456 # existing .o file with -o, though they will create one.
1457 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1458 if { (eval echo configure:1459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1459    test -f conftest.o && { (eval echo configure:1460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1460 then
1461   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1462   if test "x$CC" != xcc; then
1463     # Test first that cc exists at all.
1464     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1465       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1466       if { (eval echo configure:1467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1467          test -f conftest.o && { (eval echo configure:1468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1468       then
1469         # cc works too.
1470         :
1471       else
1472         # cc exists but doesn't like -o.
1473         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1474       fi
1475     fi
1476   fi
1477 else
1478   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1479 fi
1480 rm -f conftest*
1481
1482 fi
1483 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1484   echo "$ac_t""yes" 1>&6
1485 else
1486   echo "$ac_t""no" 1>&6
1487   cat >> confdefs.h <<\EOF
1488 #define NO_MINUS_C_MINUS_O 1
1489 EOF
1490
1491 fi
1492
1493 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1494       BROKEN_CC=
1495 else
1496       BROKEN_CC=#
1497 fi
1498
1499
1500 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1501 echo "configure:1502: checking that the C compiler understands volatile" >&5
1502 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1503   echo $ac_n "(cached) $ac_c" 1>&6
1504 else
1505   
1506     cat > conftest.$ac_ext <<EOF
1507 #line 1508 "configure"
1508 #include "confdefs.h"
1509 #include <sys/types.h>
1510 int main() {
1511 volatile int i = 0
1512 ; return 0; }
1513 EOF
1514 if { (eval echo configure:1515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1515   rm -rf conftest*
1516   samba_cv_volatile=yes
1517 else
1518   echo "configure: failed program was:" >&5
1519   cat conftest.$ac_ext >&5
1520   rm -rf conftest*
1521   samba_cv_volatile=no
1522 fi
1523 rm -f conftest*
1524 fi
1525
1526 echo "$ac_t""$samba_cv_volatile" 1>&6
1527 if test x"$samba_cv_volatile" = x"yes"; then
1528    cat >> confdefs.h <<\EOF
1529 #define HAVE_VOLATILE 1
1530 EOF
1531
1532 fi
1533
1534
1535 #################################################
1536 # set codepage directory location
1537 # Check whether --with-codepagedir or --without-codepagedir was given.
1538 if test "${with_codepagedir+set}" = set; then
1539   withval="$with_codepagedir"
1540    case "$withval" in
1541   yes|no)
1542   #
1543   # Just in case anybody does it
1544   #
1545     echo "configure: warning: --with-codepagedir called without argument - will use default" 1>&2
1546   ;;
1547   * )
1548     codepagedir="$withval"
1549     ;;
1550   esac
1551 fi
1552
1553
1554
1555
1556 # Do some error checking and defaulting for the host and target type.
1557 # The inputs are:
1558 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1559 #
1560 # The rules are:
1561 # 1. You are not allowed to specify --host, --target, and nonopt at the
1562 #    same time.
1563 # 2. Host defaults to nonopt.
1564 # 3. If nonopt is not specified, then host defaults to the current host,
1565 #    as determined by config.guess.
1566 # 4. Target and build default to nonopt.
1567 # 5. If nonopt is not specified, then target and build default to host.
1568
1569 # The aliases save the names the user supplied, while $host etc.
1570 # will get canonicalized.
1571 case $host---$target---$nonopt in
1572 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1573 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1574 esac
1575
1576
1577 # Make sure we can run config.sub.
1578 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1579 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1580 fi
1581
1582 echo $ac_n "checking host system type""... $ac_c" 1>&6
1583 echo "configure:1584: checking host system type" >&5
1584
1585 host_alias=$host
1586 case "$host_alias" in
1587 NONE)
1588   case $nonopt in
1589   NONE)
1590     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1591     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1592     fi ;;
1593   *) host_alias=$nonopt ;;
1594   esac ;;
1595 esac
1596
1597 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1598 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1599 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1600 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1601 echo "$ac_t""$host" 1>&6
1602
1603 echo $ac_n "checking target system type""... $ac_c" 1>&6
1604 echo "configure:1605: checking target system type" >&5
1605
1606 target_alias=$target
1607 case "$target_alias" in
1608 NONE)
1609   case $nonopt in
1610   NONE) target_alias=$host_alias ;;
1611   *) target_alias=$nonopt ;;
1612   esac ;;
1613 esac
1614
1615 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1616 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1617 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1618 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1619 echo "$ac_t""$target" 1>&6
1620
1621 echo $ac_n "checking build system type""... $ac_c" 1>&6
1622 echo "configure:1623: checking build system type" >&5
1623
1624 build_alias=$build
1625 case "$build_alias" in
1626 NONE)
1627   case $nonopt in
1628   NONE) build_alias=$host_alias ;;
1629   *) build_alias=$nonopt ;;
1630   esac ;;
1631 esac
1632
1633 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1634 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1635 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1636 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1637 echo "$ac_t""$build" 1>&6
1638
1639 test "$host_alias" != "$target_alias" &&
1640   test "$program_prefix$program_suffix$program_transform_name" = \
1641     NONENONEs,x,x, &&
1642   program_prefix=${target_alias}-
1643
1644
1645   case "$host_os" in
1646         *irix6*) cat >> confdefs.h <<\EOF
1647 #include <standards.h>
1648 EOF
1649
1650         ;;
1651 esac
1652
1653
1654     
1655     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1656 echo "configure:1657: checking config.cache system type" >&5
1657     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1658          test x"$ac_cv_host_system_type" != x"$host"; } ||
1659        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1660          test x"$ac_cv_build_system_type" != x"$build"; } ||
1661        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1662          test x"$ac_cv_target_system_type" != x"$target"; }; then
1663         echo "$ac_t""different" 1>&6
1664         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1665     else
1666         echo "$ac_t""same" 1>&6
1667     fi
1668     ac_cv_host_system_type="$host"
1669     ac_cv_build_system_type="$build"
1670     ac_cv_target_system_type="$target"
1671
1672
1673 #
1674 # Config CPPFLAG settings for strange OS's that must be set
1675 # before other tests.
1676 #
1677 case "$host_os" in
1678 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1679     *hpux*)
1680       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1681 echo "configure:1682: checking whether ${CC-cc} accepts -Ae" >&5
1682 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1683   echo $ac_n "(cached) $ac_c" 1>&6
1684 else
1685   echo 'void f(){}' > conftest.c
1686 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1687   ac_cv_prog_cc_Ae=yes
1688 else
1689   ac_cv_prog_cc_Ae=no
1690 fi
1691 rm -f conftest*
1692
1693 fi
1694
1695 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1696       if test $ac_cv_prog_cc_Ae = yes; then
1697         CPPFLAGS="$CPPFLAGS -Ae"
1698       fi
1699 #
1700 # Defines needed for HPUX support.
1701 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1702 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1703 #
1704       case `uname -r` in
1705                         *9*|*10*)
1706                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
1707                                 cat >> confdefs.h <<\EOF
1708 #define USE_BOTH_CRYPT_CALLS 1
1709 EOF
1710
1711                                 ;;
1712                         *11*)
1713                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
1714                                 cat >> confdefs.h <<\EOF
1715 #define USE_BOTH_CRYPT_CALLS 1
1716 EOF
1717
1718                                 ;;
1719       esac
1720       ;;
1721 #
1722 # AIX4.x doesn't even admit to having large
1723 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1724 #
1725     *aix4*)
1726           echo "$ac_t""enabling large file support" 1>&6
1727       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1728       ;;    
1729 #
1730 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1731 # to the existance of large files..
1732 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1733 # recommendations on large file support, however it makes the
1734 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1735 # recommendation makes the compile fail on gcc2.7. JRA.
1736 #
1737         *solaris*)
1738                 case `uname -r` in
1739                         5.6*|5.7*)
1740                         echo "$ac_t""enabling large file support" 1>&6
1741                         if test "$ac_cv_prog_gcc" = yes; then
1742                                 ${CC-cc} -v >conftest.c 2>&1
1743                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1744                                 rm -fr conftest.c
1745                                 case "$ac_cv_gcc_compiler_version_number" in
1746                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1747                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1748                                                 ;;
1749                                         *)
1750                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1751                                                 ;;
1752                                 esac
1753                         else
1754                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1755                         fi
1756                         ;;
1757                 esac
1758                 ;;
1759 #
1760 # Tests needed for SINIX large file support.
1761 #
1762     *sysv4*)
1763       if test $host = mips-sni-sysv4 ; then
1764         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1765 echo "configure:1766: checking for LFS support" >&5
1766         old_CPPFLAGS="$CPPFLAGS"
1767         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1768         if test "$cross_compiling" = yes; then
1769   SINIX_LFS_SUPPORT=cross
1770 else
1771   cat > conftest.$ac_ext <<EOF
1772 #line 1773 "configure"
1773 #include "confdefs.h"
1774
1775 #include <unistd.h>
1776 main () {
1777 #if _LFS64_LARGEFILE == 1
1778 exit(0);
1779 #else
1780 exit(1);
1781 #endif
1782 }
1783 EOF
1784 if { (eval echo configure:1785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1785 then
1786   SINIX_LFS_SUPPORT=yes
1787 else
1788   echo "configure: failed program was:" >&5
1789   cat conftest.$ac_ext >&5
1790   rm -fr conftest*
1791   SINIX_LFS_SUPPORT=no
1792 fi
1793 rm -fr conftest*
1794 fi
1795
1796         CPPFLAGS="$old_CPPFLAGS"
1797         if test x$SINIX_LFS_SUPPORT = xyes ; then
1798           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1799           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1800           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1801           LIBS="`getconf LFS64_LIBS` $LIBS"
1802         fi
1803       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1804       fi
1805     ;;
1806
1807 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1808 #
1809     *linux*)
1810         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1811 echo "configure:1812: checking for LFS support" >&5
1812         old_CPPFLAGS="$CPPFLAGS"
1813         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1814        if test "$cross_compiling" = yes; then
1815   LINUX_LFS_SUPPORT=cross
1816 else
1817   cat > conftest.$ac_ext <<EOF
1818 #line 1819 "configure"
1819 #include "confdefs.h"
1820
1821 #include <unistd.h>
1822 #include <sys/utsname.h>
1823 main() {
1824 #if _LFS64_LARGEFILE == 1
1825        struct utsname uts;
1826        char *release;
1827        int major, minor;
1828
1829        /* Ensure this is glibc 2.2 or higher */
1830 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1831        int libc_major = __GLIBC__;
1832        int libc_minor = __GLIBC_MINOR__;
1833
1834        if (libc_major < 2)
1835               exit(1);
1836        if (libc_minor < 2)
1837               exit(1);
1838 #endif
1839
1840        /* Ensure this is kernel 2.4 or higher */
1841
1842        uname(&uts);
1843        release = uts.release;
1844        major = atoi(strsep(&release, "."));
1845        minor = atoi(strsep(&release, "."));
1846
1847        if (major > 2 || (major == 2 && minor > 3))
1848                exit(0);
1849        exit(1);
1850 #else
1851        exit(1);
1852 #endif
1853 }
1854
1855 EOF
1856 if { (eval echo configure:1857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1857 then
1858   LINUX_LFS_SUPPORT=yes
1859 else
1860   echo "configure: failed program was:" >&5
1861   cat conftest.$ac_ext >&5
1862   rm -fr conftest*
1863   LINUX_LFS_SUPPORT=no
1864 fi
1865 rm -fr conftest*
1866 fi
1867
1868         CPPFLAGS="$old_CPPFLAGS"
1869         if test x$LINUX_LFS_SUPPORT = xyes ; then
1870           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1871         fi
1872        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1873                 ;;
1874
1875     *hurd*)
1876         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1877 echo "configure:1878: checking for LFS support" >&5
1878         old_CPPFLAGS="$CPPFLAGS"
1879         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1880         if test "$cross_compiling" = yes; then
1881   GLIBC_LFS_SUPPORT=cross
1882 else
1883   cat > conftest.$ac_ext <<EOF
1884 #line 1885 "configure"
1885 #include "confdefs.h"
1886
1887 #include <unistd.h>
1888 main () {
1889 #if _LFS64_LARGEFILE == 1
1890 exit(0);
1891 #else
1892 exit(1);
1893 #endif
1894 }
1895 EOF
1896 if { (eval echo configure:1897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1897 then
1898   GLIBC_LFS_SUPPORT=yes
1899 else
1900   echo "configure: failed program was:" >&5
1901   cat conftest.$ac_ext >&5
1902   rm -fr conftest*
1903   GLIBC_LFS_SUPPORT=no
1904 fi
1905 rm -fr conftest*
1906 fi
1907
1908         CPPFLAGS="$old_CPPFLAGS"
1909         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1910           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1911         fi
1912       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1913     ;;
1914
1915 esac
1916
1917 echo $ac_n "checking for inline""... $ac_c" 1>&6
1918 echo "configure:1919: checking for inline" >&5
1919 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1920   echo $ac_n "(cached) $ac_c" 1>&6
1921 else
1922   ac_cv_c_inline=no
1923 for ac_kw in inline __inline__ __inline; do
1924   cat > conftest.$ac_ext <<EOF
1925 #line 1926 "configure"
1926 #include "confdefs.h"
1927
1928 int main() {
1929 } $ac_kw foo() {
1930 ; return 0; }
1931 EOF
1932 if { (eval echo configure:1933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1933   rm -rf conftest*
1934   ac_cv_c_inline=$ac_kw; break
1935 else
1936   echo "configure: failed program was:" >&5
1937   cat conftest.$ac_ext >&5
1938 fi
1939 rm -f conftest*
1940 done
1941
1942 fi
1943
1944 echo "$ac_t""$ac_cv_c_inline" 1>&6
1945 case "$ac_cv_c_inline" in
1946   inline | yes) ;;
1947   no) cat >> confdefs.h <<\EOF
1948 #define inline 
1949 EOF
1950  ;;
1951   *)  cat >> confdefs.h <<EOF
1952 #define inline $ac_cv_c_inline
1953 EOF
1954  ;;
1955 esac
1956
1957 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1958 echo "configure:1959: checking how to run the C preprocessor" >&5
1959 # On Suns, sometimes $CPP names a directory.
1960 if test -n "$CPP" && test -d "$CPP"; then
1961   CPP=
1962 fi
1963 if test -z "$CPP"; then
1964 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1965   echo $ac_n "(cached) $ac_c" 1>&6
1966 else
1967     # This must be in double quotes, not single quotes, because CPP may get
1968   # substituted into the Makefile and "${CC-cc}" will confuse make.
1969   CPP="${CC-cc} -E"
1970   # On the NeXT, cc -E runs the code through the compiler's parser,
1971   # not just through cpp.
1972   cat > conftest.$ac_ext <<EOF
1973 #line 1974 "configure"
1974 #include "confdefs.h"
1975 #include <assert.h>
1976 Syntax Error
1977 EOF
1978 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1979 { (eval echo configure:1980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1980 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1981 if test -z "$ac_err"; then
1982   :
1983 else
1984   echo "$ac_err" >&5
1985   echo "configure: failed program was:" >&5
1986   cat conftest.$ac_ext >&5
1987   rm -rf conftest*
1988   CPP="${CC-cc} -E -traditional-cpp"
1989   cat > conftest.$ac_ext <<EOF
1990 #line 1991 "configure"
1991 #include "confdefs.h"
1992 #include <assert.h>
1993 Syntax Error
1994 EOF
1995 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1996 { (eval echo configure:1997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1997 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1998 if test -z "$ac_err"; then
1999   :
2000 else
2001   echo "$ac_err" >&5
2002   echo "configure: failed program was:" >&5
2003   cat conftest.$ac_ext >&5
2004   rm -rf conftest*
2005   CPP="${CC-cc} -nologo -E"
2006   cat > conftest.$ac_ext <<EOF
2007 #line 2008 "configure"
2008 #include "confdefs.h"
2009 #include <assert.h>
2010 Syntax Error
2011 EOF
2012 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2013 { (eval echo configure:2014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2014 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2015 if test -z "$ac_err"; then
2016   :
2017 else
2018   echo "$ac_err" >&5
2019   echo "configure: failed program was:" >&5
2020   cat conftest.$ac_ext >&5
2021   rm -rf conftest*
2022   CPP=/lib/cpp
2023 fi
2024 rm -f conftest*
2025 fi
2026 rm -f conftest*
2027 fi
2028 rm -f conftest*
2029   ac_cv_prog_CPP="$CPP"
2030 fi
2031   CPP="$ac_cv_prog_CPP"
2032 else
2033   ac_cv_prog_CPP="$CPP"
2034 fi
2035 echo "$ac_t""$CPP" 1>&6
2036
2037 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2038 echo "configure:2039: checking for ANSI C header files" >&5
2039 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2040   echo $ac_n "(cached) $ac_c" 1>&6
2041 else
2042   cat > conftest.$ac_ext <<EOF
2043 #line 2044 "configure"
2044 #include "confdefs.h"
2045 #include <stdlib.h>
2046 #include <stdarg.h>
2047 #include <string.h>
2048 #include <float.h>
2049 EOF
2050 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2051 { (eval echo configure:2052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2052 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2053 if test -z "$ac_err"; then
2054   rm -rf conftest*
2055   ac_cv_header_stdc=yes
2056 else
2057   echo "$ac_err" >&5
2058   echo "configure: failed program was:" >&5
2059   cat conftest.$ac_ext >&5
2060   rm -rf conftest*
2061   ac_cv_header_stdc=no
2062 fi
2063 rm -f conftest*
2064
2065 if test $ac_cv_header_stdc = yes; then
2066   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2067 cat > conftest.$ac_ext <<EOF
2068 #line 2069 "configure"
2069 #include "confdefs.h"
2070 #include <string.h>
2071 EOF
2072 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2073   egrep "memchr" >/dev/null 2>&1; then
2074   :
2075 else
2076   rm -rf conftest*
2077   ac_cv_header_stdc=no
2078 fi
2079 rm -f conftest*
2080
2081 fi
2082
2083 if test $ac_cv_header_stdc = yes; then
2084   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2085 cat > conftest.$ac_ext <<EOF
2086 #line 2087 "configure"
2087 #include "confdefs.h"
2088 #include <stdlib.h>
2089 EOF
2090 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2091   egrep "free" >/dev/null 2>&1; then
2092   :
2093 else
2094   rm -rf conftest*
2095   ac_cv_header_stdc=no
2096 fi
2097 rm -f conftest*
2098
2099 fi
2100
2101 if test $ac_cv_header_stdc = yes; then
2102   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2103 if test "$cross_compiling" = yes; then
2104   :
2105 else
2106   cat > conftest.$ac_ext <<EOF
2107 #line 2108 "configure"
2108 #include "confdefs.h"
2109 #include <ctype.h>
2110 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2111 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2112 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2113 int main () { int i; for (i = 0; i < 256; i++)
2114 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2115 exit (0); }
2116
2117 EOF
2118 if { (eval echo configure:2119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2119 then
2120   :
2121 else
2122   echo "configure: failed program was:" >&5
2123   cat conftest.$ac_ext >&5
2124   rm -fr conftest*
2125   ac_cv_header_stdc=no
2126 fi
2127 rm -fr conftest*
2128 fi
2129
2130 fi
2131 fi
2132
2133 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2134 if test $ac_cv_header_stdc = yes; then
2135   cat >> confdefs.h <<\EOF
2136 #define STDC_HEADERS 1
2137 EOF
2138
2139 fi
2140
2141 ac_header_dirent=no
2142 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2143 do
2144 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2145 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
2146 echo "configure:2147: checking for $ac_hdr that defines DIR" >&5
2147 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2148   echo $ac_n "(cached) $ac_c" 1>&6
2149 else
2150   cat > conftest.$ac_ext <<EOF
2151 #line 2152 "configure"
2152 #include "confdefs.h"
2153 #include <sys/types.h>
2154 #include <$ac_hdr>
2155 int main() {
2156 DIR *dirp = 0;
2157 ; return 0; }
2158 EOF
2159 if { (eval echo configure:2160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2160   rm -rf conftest*
2161   eval "ac_cv_header_dirent_$ac_safe=yes"
2162 else
2163   echo "configure: failed program was:" >&5
2164   cat conftest.$ac_ext >&5
2165   rm -rf conftest*
2166   eval "ac_cv_header_dirent_$ac_safe=no"
2167 fi
2168 rm -f conftest*
2169 fi
2170 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2171   echo "$ac_t""yes" 1>&6
2172     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2173   cat >> confdefs.h <<EOF
2174 #define $ac_tr_hdr 1
2175 EOF
2176  ac_header_dirent=$ac_hdr; break
2177 else
2178   echo "$ac_t""no" 1>&6
2179 fi
2180 done
2181 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2182 if test $ac_header_dirent = dirent.h; then
2183 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2184 echo "configure:2185: checking for opendir in -ldir" >&5
2185 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2186 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2187   echo $ac_n "(cached) $ac_c" 1>&6
2188 else
2189   ac_save_LIBS="$LIBS"
2190 LIBS="-ldir  $LIBS"
2191 cat > conftest.$ac_ext <<EOF
2192 #line 2193 "configure"
2193 #include "confdefs.h"
2194 /* Override any gcc2 internal prototype to avoid an error.  */
2195 /* We use char because int might match the return type of a gcc2
2196     builtin and then its argument prototype would still apply.  */
2197 char opendir();
2198
2199 int main() {
2200 opendir()
2201 ; return 0; }
2202 EOF
2203 if { (eval echo configure:2204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2204   rm -rf conftest*
2205   eval "ac_cv_lib_$ac_lib_var=yes"
2206 else
2207   echo "configure: failed program was:" >&5
2208   cat conftest.$ac_ext >&5
2209   rm -rf conftest*
2210   eval "ac_cv_lib_$ac_lib_var=no"
2211 fi
2212 rm -f conftest*
2213 LIBS="$ac_save_LIBS"
2214
2215 fi
2216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2217   echo "$ac_t""yes" 1>&6
2218   LIBS="$LIBS -ldir"
2219 else
2220   echo "$ac_t""no" 1>&6
2221 fi
2222
2223 else
2224 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2225 echo "configure:2226: checking for opendir in -lx" >&5
2226 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2227 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2228   echo $ac_n "(cached) $ac_c" 1>&6
2229 else
2230   ac_save_LIBS="$LIBS"
2231 LIBS="-lx  $LIBS"
2232 cat > conftest.$ac_ext <<EOF
2233 #line 2234 "configure"
2234 #include "confdefs.h"
2235 /* Override any gcc2 internal prototype to avoid an error.  */
2236 /* We use char because int might match the return type of a gcc2
2237     builtin and then its argument prototype would still apply.  */
2238 char opendir();
2239
2240 int main() {
2241 opendir()
2242 ; return 0; }
2243 EOF
2244 if { (eval echo configure:2245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2245   rm -rf conftest*
2246   eval "ac_cv_lib_$ac_lib_var=yes"
2247 else
2248   echo "configure: failed program was:" >&5
2249   cat conftest.$ac_ext >&5
2250   rm -rf conftest*
2251   eval "ac_cv_lib_$ac_lib_var=no"
2252 fi
2253 rm -f conftest*
2254 LIBS="$ac_save_LIBS"
2255
2256 fi
2257 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2258   echo "$ac_t""yes" 1>&6
2259   LIBS="$LIBS -lx"
2260 else
2261   echo "$ac_t""no" 1>&6
2262 fi
2263
2264 fi
2265
2266 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2267 echo "configure:2268: checking whether time.h and sys/time.h may both be included" >&5
2268 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2269   echo $ac_n "(cached) $ac_c" 1>&6
2270 else
2271   cat > conftest.$ac_ext <<EOF
2272 #line 2273 "configure"
2273 #include "confdefs.h"
2274 #include <sys/types.h>
2275 #include <sys/time.h>
2276 #include <time.h>
2277 int main() {
2278 struct tm *tp;
2279 ; return 0; }
2280 EOF
2281 if { (eval echo configure:2282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2282   rm -rf conftest*
2283   ac_cv_header_time=yes
2284 else
2285   echo "configure: failed program was:" >&5
2286   cat conftest.$ac_ext >&5
2287   rm -rf conftest*
2288   ac_cv_header_time=no
2289 fi
2290 rm -f conftest*
2291 fi
2292
2293 echo "$ac_t""$ac_cv_header_time" 1>&6
2294 if test $ac_cv_header_time = yes; then
2295   cat >> confdefs.h <<\EOF
2296 #define TIME_WITH_SYS_TIME 1
2297 EOF
2298
2299 fi
2300
2301 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2302 echo "configure:2303: checking for sys/wait.h that is POSIX.1 compatible" >&5
2303 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2304   echo $ac_n "(cached) $ac_c" 1>&6
2305 else
2306   cat > conftest.$ac_ext <<EOF
2307 #line 2308 "configure"
2308 #include "confdefs.h"
2309 #include <sys/types.h>
2310 #include <sys/wait.h>
2311 #ifndef WEXITSTATUS
2312 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2313 #endif
2314 #ifndef WIFEXITED
2315 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2316 #endif
2317 int main() {
2318 int s;
2319 wait (&s);
2320 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2321 ; return 0; }
2322 EOF
2323 if { (eval echo configure:2324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2324   rm -rf conftest*
2325   ac_cv_header_sys_wait_h=yes
2326 else
2327   echo "configure: failed program was:" >&5
2328   cat conftest.$ac_ext >&5
2329   rm -rf conftest*
2330   ac_cv_header_sys_wait_h=no
2331 fi
2332 rm -f conftest*
2333 fi
2334
2335 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2336 if test $ac_cv_header_sys_wait_h = yes; then
2337   cat >> confdefs.h <<\EOF
2338 #define HAVE_SYS_WAIT_H 1
2339 EOF
2340
2341 fi
2342
2343 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
2344 do
2345 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2346 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2347 echo "configure:2348: checking for $ac_hdr" >&5
2348 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2349   echo $ac_n "(cached) $ac_c" 1>&6
2350 else
2351   cat > conftest.$ac_ext <<EOF
2352 #line 2353 "configure"
2353 #include "confdefs.h"
2354 #include <$ac_hdr>
2355 EOF
2356 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2357 { (eval echo configure:2358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2358 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2359 if test -z "$ac_err"; then
2360   rm -rf conftest*
2361   eval "ac_cv_header_$ac_safe=yes"
2362 else
2363   echo "$ac_err" >&5
2364   echo "configure: failed program was:" >&5
2365   cat conftest.$ac_ext >&5
2366   rm -rf conftest*
2367   eval "ac_cv_header_$ac_safe=no"
2368 fi
2369 rm -f conftest*
2370 fi
2371 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2372   echo "$ac_t""yes" 1>&6
2373     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2374   cat >> confdefs.h <<EOF
2375 #define $ac_tr_hdr 1
2376 EOF
2377  
2378 else
2379   echo "$ac_t""no" 1>&6
2380 fi
2381 done
2382
2383 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
2384 do
2385 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2386 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2387 echo "configure:2388: checking for $ac_hdr" >&5
2388 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2389   echo $ac_n "(cached) $ac_c" 1>&6
2390 else
2391   cat > conftest.$ac_ext <<EOF
2392 #line 2393 "configure"
2393 #include "confdefs.h"
2394 #include <$ac_hdr>
2395 EOF
2396 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2397 { (eval echo configure:2398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2398 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2399 if test -z "$ac_err"; then
2400   rm -rf conftest*
2401   eval "ac_cv_header_$ac_safe=yes"
2402 else
2403   echo "$ac_err" >&5
2404   echo "configure: failed program was:" >&5
2405   cat conftest.$ac_ext >&5
2406   rm -rf conftest*
2407   eval "ac_cv_header_$ac_safe=no"
2408 fi
2409 rm -f conftest*
2410 fi
2411 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2412   echo "$ac_t""yes" 1>&6
2413     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2414   cat >> confdefs.h <<EOF
2415 #define $ac_tr_hdr 1
2416 EOF
2417  
2418 else
2419   echo "$ac_t""no" 1>&6
2420 fi
2421 done
2422
2423 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
2424 do
2425 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2426 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2427 echo "configure:2428: checking for $ac_hdr" >&5
2428 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2429   echo $ac_n "(cached) $ac_c" 1>&6
2430 else
2431   cat > conftest.$ac_ext <<EOF
2432 #line 2433 "configure"
2433 #include "confdefs.h"
2434 #include <$ac_hdr>
2435 EOF
2436 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2437 { (eval echo configure:2438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2438 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2439 if test -z "$ac_err"; then
2440   rm -rf conftest*
2441   eval "ac_cv_header_$ac_safe=yes"
2442 else
2443   echo "$ac_err" >&5
2444   echo "configure: failed program was:" >&5
2445   cat conftest.$ac_ext >&5
2446   rm -rf conftest*
2447   eval "ac_cv_header_$ac_safe=no"
2448 fi
2449 rm -f conftest*
2450 fi
2451 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2452   echo "$ac_t""yes" 1>&6
2453     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2454   cat >> confdefs.h <<EOF
2455 #define $ac_tr_hdr 1
2456 EOF
2457  
2458 else
2459   echo "$ac_t""no" 1>&6
2460 fi
2461 done
2462
2463 for ac_hdr in sys/param.h ctype.h sys/un.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
2464 do
2465 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2466 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2467 echo "configure:2468: checking for $ac_hdr" >&5
2468 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2469   echo $ac_n "(cached) $ac_c" 1>&6
2470 else
2471   cat > conftest.$ac_ext <<EOF
2472 #line 2473 "configure"
2473 #include "confdefs.h"
2474 #include <$ac_hdr>
2475 EOF
2476 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2477 { (eval echo configure:2478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2478 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2479 if test -z "$ac_err"; then
2480   rm -rf conftest*
2481   eval "ac_cv_header_$ac_safe=yes"
2482 else
2483   echo "$ac_err" >&5
2484   echo "configure: failed program was:" >&5
2485   cat conftest.$ac_ext >&5
2486   rm -rf conftest*
2487   eval "ac_cv_header_$ac_safe=no"
2488 fi
2489 rm -f conftest*
2490 fi
2491 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2492   echo "$ac_t""yes" 1>&6
2493     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2494   cat >> confdefs.h <<EOF
2495 #define $ac_tr_hdr 1
2496 EOF
2497  
2498 else
2499   echo "$ac_t""no" 1>&6
2500 fi
2501 done
2502
2503 for ac_hdr in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h
2504 do
2505 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2506 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2507 echo "configure:2508: checking for $ac_hdr" >&5
2508 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2509   echo $ac_n "(cached) $ac_c" 1>&6
2510 else
2511   cat > conftest.$ac_ext <<EOF
2512 #line 2513 "configure"
2513 #include "confdefs.h"
2514 #include <$ac_hdr>
2515 EOF
2516 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2517 { (eval echo configure:2518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2518 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2519 if test -z "$ac_err"; then
2520   rm -rf conftest*
2521   eval "ac_cv_header_$ac_safe=yes"
2522 else
2523   echo "$ac_err" >&5
2524   echo "configure: failed program was:" >&5
2525   cat conftest.$ac_ext >&5
2526   rm -rf conftest*
2527   eval "ac_cv_header_$ac_safe=no"
2528 fi
2529 rm -f conftest*
2530 fi
2531 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2532   echo "$ac_t""yes" 1>&6
2533     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2534   cat >> confdefs.h <<EOF
2535 #define $ac_tr_hdr 1
2536 EOF
2537  
2538 else
2539   echo "$ac_t""no" 1>&6
2540 fi
2541 done
2542
2543 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2544 do
2545 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2546 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2547 echo "configure:2548: checking for $ac_hdr" >&5
2548 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2549   echo $ac_n "(cached) $ac_c" 1>&6
2550 else
2551   cat > conftest.$ac_ext <<EOF
2552 #line 2553 "configure"
2553 #include "confdefs.h"
2554 #include <$ac_hdr>
2555 EOF
2556 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2557 { (eval echo configure:2558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2558 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2559 if test -z "$ac_err"; then
2560   rm -rf conftest*
2561   eval "ac_cv_header_$ac_safe=yes"
2562 else
2563   echo "$ac_err" >&5
2564   echo "configure: failed program was:" >&5
2565   cat conftest.$ac_ext >&5
2566   rm -rf conftest*
2567   eval "ac_cv_header_$ac_safe=no"
2568 fi
2569 rm -f conftest*
2570 fi
2571 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2572   echo "$ac_t""yes" 1>&6
2573     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2574   cat >> confdefs.h <<EOF
2575 #define $ac_tr_hdr 1
2576 EOF
2577  
2578 else
2579   echo "$ac_t""no" 1>&6
2580 fi
2581 done
2582
2583 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2584 do
2585 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2586 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2587 echo "configure:2588: checking for $ac_hdr" >&5
2588 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2589   echo $ac_n "(cached) $ac_c" 1>&6
2590 else
2591   cat > conftest.$ac_ext <<EOF
2592 #line 2593 "configure"
2593 #include "confdefs.h"
2594 #include <$ac_hdr>
2595 EOF
2596 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2597 { (eval echo configure:2598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2598 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2599 if test -z "$ac_err"; then
2600   rm -rf conftest*
2601   eval "ac_cv_header_$ac_safe=yes"
2602 else
2603   echo "$ac_err" >&5
2604   echo "configure: failed program was:" >&5
2605   cat conftest.$ac_ext >&5
2606   rm -rf conftest*
2607   eval "ac_cv_header_$ac_safe=no"
2608 fi
2609 rm -f conftest*
2610 fi
2611 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2612   echo "$ac_t""yes" 1>&6
2613     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2614   cat >> confdefs.h <<EOF
2615 #define $ac_tr_hdr 1
2616 EOF
2617  
2618 else
2619   echo "$ac_t""no" 1>&6
2620 fi
2621 done
2622
2623 for ac_hdr in security/pam_modules.h security/_pam_macros.h
2624 do
2625 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2626 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2627 echo "configure:2628: checking for $ac_hdr" >&5
2628 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2629   echo $ac_n "(cached) $ac_c" 1>&6
2630 else
2631   cat > conftest.$ac_ext <<EOF
2632 #line 2633 "configure"
2633 #include "confdefs.h"
2634 #include <$ac_hdr>
2635 EOF
2636 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2637 { (eval echo configure:2638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2638 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2639 if test -z "$ac_err"; then
2640   rm -rf conftest*
2641   eval "ac_cv_header_$ac_safe=yes"
2642 else
2643   echo "$ac_err" >&5
2644   echo "configure: failed program was:" >&5
2645   cat conftest.$ac_ext >&5
2646   rm -rf conftest*
2647   eval "ac_cv_header_$ac_safe=no"
2648 fi
2649 rm -f conftest*
2650 fi
2651 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2652   echo "$ac_t""yes" 1>&6
2653     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2654   cat >> confdefs.h <<EOF
2655 #define $ac_tr_hdr 1
2656 EOF
2657  
2658 else
2659   echo "$ac_t""no" 1>&6
2660 fi
2661 done
2662
2663
2664 #
2665 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2666 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2667 #
2668 case "$host_os" in
2669     *hpux*)
2670                 cat > conftest.$ac_ext <<EOF
2671 #line 2672 "configure"
2672 #include "confdefs.h"
2673 #include <shadow.h>
2674 int main() {
2675 struct spwd testme
2676 ; return 0; }
2677 EOF
2678 if { (eval echo configure:2679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2679   rm -rf conftest*
2680   ac_cv_header_shadow_h=yes
2681 else
2682   echo "configure: failed program was:" >&5
2683   cat conftest.$ac_ext >&5
2684   rm -rf conftest*
2685   ac_cv_header_shadow_h=no
2686 fi
2687 rm -f conftest*
2688                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2689                    cat >> confdefs.h <<\EOF
2690 #define HAVE_SHADOW_H 1
2691 EOF
2692
2693                 fi
2694         ;;
2695 esac
2696 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2697 do
2698 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2699 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2700 echo "configure:2701: checking for $ac_hdr" >&5
2701 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2702   echo $ac_n "(cached) $ac_c" 1>&6
2703 else
2704   cat > conftest.$ac_ext <<EOF
2705 #line 2706 "configure"
2706 #include "confdefs.h"
2707 #include <$ac_hdr>
2708 EOF
2709 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2710 { (eval echo configure:2711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2711 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2712 if test -z "$ac_err"; then
2713   rm -rf conftest*
2714   eval "ac_cv_header_$ac_safe=yes"
2715 else
2716   echo "$ac_err" >&5
2717   echo "configure: failed program was:" >&5
2718   cat conftest.$ac_ext >&5
2719   rm -rf conftest*
2720   eval "ac_cv_header_$ac_safe=no"
2721 fi
2722 rm -f conftest*
2723 fi
2724 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2725   echo "$ac_t""yes" 1>&6
2726     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2727   cat >> confdefs.h <<EOF
2728 #define $ac_tr_hdr 1
2729 EOF
2730  
2731 else
2732   echo "$ac_t""no" 1>&6
2733 fi
2734 done
2735
2736 for ac_hdr in nss.h nss_common.h sys/security.h security/pam_appl.h security/pam_modules.h
2737 do
2738 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2739 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2740 echo "configure:2741: checking for $ac_hdr" >&5
2741 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2742   echo $ac_n "(cached) $ac_c" 1>&6
2743 else
2744   cat > conftest.$ac_ext <<EOF
2745 #line 2746 "configure"
2746 #include "confdefs.h"
2747 #include <$ac_hdr>
2748 EOF
2749 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2750 { (eval echo configure:2751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2751 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2752 if test -z "$ac_err"; then
2753   rm -rf conftest*
2754   eval "ac_cv_header_$ac_safe=yes"
2755 else
2756   echo "$ac_err" >&5
2757   echo "configure: failed program was:" >&5
2758   cat conftest.$ac_ext >&5
2759   rm -rf conftest*
2760   eval "ac_cv_header_$ac_safe=no"
2761 fi
2762 rm -f conftest*
2763 fi
2764 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2765   echo "$ac_t""yes" 1>&6
2766     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2767   cat >> confdefs.h <<EOF
2768 #define $ac_tr_hdr 1
2769 EOF
2770  
2771 else
2772   echo "$ac_t""no" 1>&6
2773 fi
2774 done
2775
2776 for ac_hdr in stropts.h poll.h
2777 do
2778 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2779 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2780 echo "configure:2781: checking for $ac_hdr" >&5
2781 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2782   echo $ac_n "(cached) $ac_c" 1>&6
2783 else
2784   cat > conftest.$ac_ext <<EOF
2785 #line 2786 "configure"
2786 #include "confdefs.h"
2787 #include <$ac_hdr>
2788 EOF
2789 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2790 { (eval echo configure:2791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2791 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2792 if test -z "$ac_err"; then
2793   rm -rf conftest*
2794   eval "ac_cv_header_$ac_safe=yes"
2795 else
2796   echo "$ac_err" >&5
2797   echo "configure: failed program was:" >&5
2798   cat conftest.$ac_ext >&5
2799   rm -rf conftest*
2800   eval "ac_cv_header_$ac_safe=no"
2801 fi
2802 rm -f conftest*
2803 fi
2804 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2805   echo "$ac_t""yes" 1>&6
2806     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2807   cat >> confdefs.h <<EOF
2808 #define $ac_tr_hdr 1
2809 EOF
2810  
2811 else
2812   echo "$ac_t""no" 1>&6
2813 fi
2814 done
2815
2816 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2817 do
2818 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2819 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2820 echo "configure:2821: checking for $ac_hdr" >&5
2821 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2822   echo $ac_n "(cached) $ac_c" 1>&6
2823 else
2824   cat > conftest.$ac_ext <<EOF
2825 #line 2826 "configure"
2826 #include "confdefs.h"
2827 #include <$ac_hdr>
2828 EOF
2829 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2830 { (eval echo configure:2831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2831 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2832 if test -z "$ac_err"; then
2833   rm -rf conftest*
2834   eval "ac_cv_header_$ac_safe=yes"
2835 else
2836   echo "$ac_err" >&5
2837   echo "configure: failed program was:" >&5
2838   cat conftest.$ac_ext >&5
2839   rm -rf conftest*
2840   eval "ac_cv_header_$ac_safe=no"
2841 fi
2842 rm -f conftest*
2843 fi
2844 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2845   echo "$ac_t""yes" 1>&6
2846     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2847   cat >> confdefs.h <<EOF
2848 #define $ac_tr_hdr 1
2849 EOF
2850  
2851 else
2852   echo "$ac_t""no" 1>&6
2853 fi
2854 done
2855
2856 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2857 do
2858 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2859 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2860 echo "configure:2861: checking for $ac_hdr" >&5
2861 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2862   echo $ac_n "(cached) $ac_c" 1>&6
2863 else
2864   cat > conftest.$ac_ext <<EOF
2865 #line 2866 "configure"
2866 #include "confdefs.h"
2867 #include <$ac_hdr>
2868 EOF
2869 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2870 { (eval echo configure:2871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2871 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2872 if test -z "$ac_err"; then
2873   rm -rf conftest*
2874   eval "ac_cv_header_$ac_safe=yes"
2875 else
2876   echo "$ac_err" >&5
2877   echo "configure: failed program was:" >&5
2878   cat conftest.$ac_ext >&5
2879   rm -rf conftest*
2880   eval "ac_cv_header_$ac_safe=no"
2881 fi
2882 rm -f conftest*
2883 fi
2884 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2885   echo "$ac_t""yes" 1>&6
2886     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2887   cat >> confdefs.h <<EOF
2888 #define $ac_tr_hdr 1
2889 EOF
2890  
2891 else
2892   echo "$ac_t""no" 1>&6
2893 fi
2894 done
2895
2896
2897 # For experimental utmp support (lastlog on some BSD-like systems)
2898 for ac_hdr in utmp.h utmpx.h lastlog.h
2899 do
2900 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2901 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2902 echo "configure:2903: checking for $ac_hdr" >&5
2903 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2904   echo $ac_n "(cached) $ac_c" 1>&6
2905 else
2906   cat > conftest.$ac_ext <<EOF
2907 #line 2908 "configure"
2908 #include "confdefs.h"
2909 #include <$ac_hdr>
2910 EOF
2911 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2912 { (eval echo configure:2913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2913 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2914 if test -z "$ac_err"; then
2915   rm -rf conftest*
2916   eval "ac_cv_header_$ac_safe=yes"
2917 else
2918   echo "$ac_err" >&5
2919   echo "configure: failed program was:" >&5
2920   cat conftest.$ac_ext >&5
2921   rm -rf conftest*
2922   eval "ac_cv_header_$ac_safe=no"
2923 fi
2924 rm -f conftest*
2925 fi
2926 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2927   echo "$ac_t""yes" 1>&6
2928     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2929   cat >> confdefs.h <<EOF
2930 #define $ac_tr_hdr 1
2931 EOF
2932  
2933 else
2934   echo "$ac_t""no" 1>&6
2935 fi
2936 done
2937
2938  
2939 # For quotas on Veritas VxFS filesystems
2940 for ac_hdr in sys/fs/vx_quota.h
2941 do
2942 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2943 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2944 echo "configure:2945: checking for $ac_hdr" >&5
2945 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2946   echo $ac_n "(cached) $ac_c" 1>&6
2947 else
2948   cat > conftest.$ac_ext <<EOF
2949 #line 2950 "configure"
2950 #include "confdefs.h"
2951 #include <$ac_hdr>
2952 EOF
2953 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2954 { (eval echo configure:2955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2955 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2956 if test -z "$ac_err"; then
2957   rm -rf conftest*
2958   eval "ac_cv_header_$ac_safe=yes"
2959 else
2960   echo "$ac_err" >&5
2961   echo "configure: failed program was:" >&5
2962   cat conftest.$ac_ext >&5
2963   rm -rf conftest*
2964   eval "ac_cv_header_$ac_safe=no"
2965 fi
2966 rm -f conftest*
2967 fi
2968 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2969   echo "$ac_t""yes" 1>&6
2970     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2971   cat >> confdefs.h <<EOF
2972 #define $ac_tr_hdr 1
2973 EOF
2974  
2975 else
2976   echo "$ac_t""no" 1>&6
2977 fi
2978 done
2979
2980
2981 echo $ac_n "checking size of int""... $ac_c" 1>&6
2982 echo "configure:2983: checking size of int" >&5
2983 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2984   echo $ac_n "(cached) $ac_c" 1>&6
2985 else
2986   if test "$cross_compiling" = yes; then
2987   ac_cv_sizeof_int=cross
2988 else
2989   cat > conftest.$ac_ext <<EOF
2990 #line 2991 "configure"
2991 #include "confdefs.h"
2992 #include <stdio.h>
2993 #include <sys/types.h>
2994 main()
2995 {
2996   FILE *f=fopen("conftestval", "w");
2997   if (!f) exit(1);
2998   fprintf(f, "%d\n", sizeof(int));
2999   exit(0);
3000 }
3001 EOF
3002 if { (eval echo configure:3003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3003 then
3004   ac_cv_sizeof_int=`cat conftestval`
3005 else
3006   echo "configure: failed program was:" >&5
3007   cat conftest.$ac_ext >&5
3008   rm -fr conftest*
3009   ac_cv_sizeof_int=0
3010 fi
3011 rm -fr conftest*
3012 fi
3013
3014 fi
3015 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
3016 cat >> confdefs.h <<EOF
3017 #define SIZEOF_INT $ac_cv_sizeof_int
3018 EOF
3019
3020
3021 echo $ac_n "checking size of long""... $ac_c" 1>&6
3022 echo "configure:3023: checking size of long" >&5
3023 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
3024   echo $ac_n "(cached) $ac_c" 1>&6
3025 else
3026   if test "$cross_compiling" = yes; then
3027   ac_cv_sizeof_long=cross
3028 else
3029   cat > conftest.$ac_ext <<EOF
3030 #line 3031 "configure"
3031 #include "confdefs.h"
3032 #include <stdio.h>
3033 #include <sys/types.h>
3034 main()
3035 {
3036   FILE *f=fopen("conftestval", "w");
3037   if (!f) exit(1);
3038   fprintf(f, "%d\n", sizeof(long));
3039   exit(0);
3040 }
3041 EOF
3042 if { (eval echo configure:3043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3043 then
3044   ac_cv_sizeof_long=`cat conftestval`
3045 else
3046   echo "configure: failed program was:" >&5
3047   cat conftest.$ac_ext >&5
3048   rm -fr conftest*
3049   ac_cv_sizeof_long=0
3050 fi
3051 rm -fr conftest*
3052 fi
3053
3054 fi
3055 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
3056 cat >> confdefs.h <<EOF
3057 #define SIZEOF_LONG $ac_cv_sizeof_long
3058 EOF
3059
3060
3061 echo $ac_n "checking size of short""... $ac_c" 1>&6
3062 echo "configure:3063: checking size of short" >&5
3063 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
3064   echo $ac_n "(cached) $ac_c" 1>&6
3065 else
3066   if test "$cross_compiling" = yes; then
3067   ac_cv_sizeof_short=cross
3068 else
3069   cat > conftest.$ac_ext <<EOF
3070 #line 3071 "configure"
3071 #include "confdefs.h"
3072 #include <stdio.h>
3073 #include <sys/types.h>
3074 main()
3075 {
3076   FILE *f=fopen("conftestval", "w");
3077   if (!f) exit(1);
3078   fprintf(f, "%d\n", sizeof(short));
3079   exit(0);
3080 }
3081 EOF
3082 if { (eval echo configure:3083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3083 then
3084   ac_cv_sizeof_short=`cat conftestval`
3085 else
3086   echo "configure: failed program was:" >&5
3087   cat conftest.$ac_ext >&5
3088   rm -fr conftest*
3089   ac_cv_sizeof_short=0
3090 fi
3091 rm -fr conftest*
3092 fi
3093
3094 fi
3095 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3096 cat >> confdefs.h <<EOF
3097 #define SIZEOF_SHORT $ac_cv_sizeof_short
3098 EOF
3099
3100
3101
3102 echo $ac_n "checking for working const""... $ac_c" 1>&6
3103 echo "configure:3104: checking for working const" >&5
3104 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3105   echo $ac_n "(cached) $ac_c" 1>&6
3106 else
3107   cat > conftest.$ac_ext <<EOF
3108 #line 3109 "configure"
3109 #include "confdefs.h"
3110
3111 int main() {
3112
3113 /* Ultrix mips cc rejects this.  */
3114 typedef int charset[2]; const charset x;
3115 /* SunOS 4.1.1 cc rejects this.  */
3116 char const *const *ccp;
3117 char **p;
3118 /* NEC SVR4.0.2 mips cc rejects this.  */
3119 struct point {int x, y;};
3120 static struct point const zero = {0,0};
3121 /* AIX XL C 1.02.0.0 rejects this.
3122    It does not let you subtract one const X* pointer from another in an arm
3123    of an if-expression whose if-part is not a constant expression */
3124 const char *g = "string";
3125 ccp = &g + (g ? g-g : 0);
3126 /* HPUX 7.0 cc rejects these. */
3127 ++ccp;
3128 p = (char**) ccp;
3129 ccp = (char const *const *) p;
3130 { /* SCO 3.2v4 cc rejects this.  */
3131   char *t;
3132   char const *s = 0 ? (char *) 0 : (char const *) 0;
3133
3134   *t++ = 0;
3135 }
3136 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3137   int x[] = {25, 17};
3138   const int *foo = &x[0];
3139   ++foo;
3140 }
3141 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3142   typedef const int *iptr;
3143   iptr p = 0;
3144   ++p;
3145 }
3146 { /* AIX XL C 1.02.0.0 rejects this saying
3147      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3148   struct s { int j; const int *ap[3]; };
3149   struct s *b; b->j = 5;
3150 }
3151 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3152   const int foo = 10;
3153 }
3154
3155 ; return 0; }
3156 EOF
3157 if { (eval echo configure:3158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3158   rm -rf conftest*
3159   ac_cv_c_const=yes
3160 else
3161   echo "configure: failed program was:" >&5
3162   cat conftest.$ac_ext >&5
3163   rm -rf conftest*
3164   ac_cv_c_const=no
3165 fi
3166 rm -f conftest*
3167 fi
3168
3169 echo "$ac_t""$ac_cv_c_const" 1>&6
3170 if test $ac_cv_c_const = no; then
3171   cat >> confdefs.h <<\EOF
3172 #define const 
3173 EOF
3174
3175 fi
3176
3177 echo $ac_n "checking for inline""... $ac_c" 1>&6
3178 echo "configure:3179: checking for inline" >&5
3179 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3180   echo $ac_n "(cached) $ac_c" 1>&6
3181 else
3182   ac_cv_c_inline=no
3183 for ac_kw in inline __inline__ __inline; do
3184   cat > conftest.$ac_ext <<EOF
3185 #line 3186 "configure"
3186 #include "confdefs.h"
3187
3188 int main() {
3189 } $ac_kw foo() {
3190 ; return 0; }
3191 EOF
3192 if { (eval echo configure:3193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3193   rm -rf conftest*
3194   ac_cv_c_inline=$ac_kw; break
3195 else
3196   echo "configure: failed program was:" >&5
3197   cat conftest.$ac_ext >&5
3198 fi
3199 rm -f conftest*
3200 done
3201
3202 fi
3203
3204 echo "$ac_t""$ac_cv_c_inline" 1>&6
3205 case "$ac_cv_c_inline" in
3206   inline | yes) ;;
3207   no) cat >> confdefs.h <<\EOF
3208 #define inline 
3209 EOF
3210  ;;
3211   *)  cat >> confdefs.h <<EOF
3212 #define inline $ac_cv_c_inline
3213 EOF
3214  ;;
3215 esac
3216
3217 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3218 echo "configure:3219: checking whether byte ordering is bigendian" >&5
3219 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3220   echo $ac_n "(cached) $ac_c" 1>&6
3221 else
3222   ac_cv_c_bigendian=unknown
3223 # See if sys/param.h defines the BYTE_ORDER macro.
3224 cat > conftest.$ac_ext <<EOF
3225 #line 3226 "configure"
3226 #include "confdefs.h"
3227 #include <sys/types.h>
3228 #include <sys/param.h>
3229 int main() {
3230
3231 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3232  bogus endian macros
3233 #endif
3234 ; return 0; }
3235 EOF
3236 if { (eval echo configure:3237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3237   rm -rf conftest*
3238   # It does; now see whether it defined to BIG_ENDIAN or not.
3239 cat > conftest.$ac_ext <<EOF
3240 #line 3241 "configure"
3241 #include "confdefs.h"
3242 #include <sys/types.h>
3243 #include <sys/param.h>
3244 int main() {
3245
3246 #if BYTE_ORDER != BIG_ENDIAN
3247  not big endian
3248 #endif
3249 ; return 0; }
3250 EOF
3251 if { (eval echo configure:3252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3252   rm -rf conftest*
3253   ac_cv_c_bigendian=yes
3254 else
3255   echo "configure: failed program was:" >&5
3256   cat conftest.$ac_ext >&5
3257   rm -rf conftest*
3258   ac_cv_c_bigendian=no
3259 fi
3260 rm -f conftest*
3261 else
3262   echo "configure: failed program was:" >&5
3263   cat conftest.$ac_ext >&5
3264 fi
3265 rm -f conftest*
3266 if test $ac_cv_c_bigendian = unknown; then
3267 if test "$cross_compiling" = yes; then
3268     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3269 else
3270   cat > conftest.$ac_ext <<EOF
3271 #line 3272 "configure"
3272 #include "confdefs.h"
3273 main () {
3274   /* Are we little or big endian?  From Harbison&Steele.  */
3275   union
3276   {
3277     long l;
3278     char c[sizeof (long)];
3279   } u;
3280   u.l = 1;
3281   exit (u.c[sizeof (long) - 1] == 1);
3282 }
3283 EOF
3284 if { (eval echo configure:3285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3285 then
3286   ac_cv_c_bigendian=no
3287 else
3288   echo "configure: failed program was:" >&5
3289   cat conftest.$ac_ext >&5
3290   rm -fr conftest*
3291   ac_cv_c_bigendian=yes
3292 fi
3293 rm -fr conftest*
3294 fi
3295
3296 fi
3297 fi
3298
3299 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3300 if test $ac_cv_c_bigendian = yes; then
3301   cat >> confdefs.h <<\EOF
3302 #define WORDS_BIGENDIAN 1
3303 EOF
3304
3305 fi
3306
3307 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
3308 echo "configure:3309: checking whether char is unsigned" >&5
3309 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3310   echo $ac_n "(cached) $ac_c" 1>&6
3311 else
3312   if test "$GCC" = yes; then
3313   # GCC predefines this symbol on systems where it applies.
3314 cat > conftest.$ac_ext <<EOF
3315 #line 3316 "configure"
3316 #include "confdefs.h"
3317 #ifdef __CHAR_UNSIGNED__
3318   yes
3319 #endif
3320
3321 EOF
3322 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3323   egrep "yes" >/dev/null 2>&1; then
3324   rm -rf conftest*
3325   ac_cv_c_char_unsigned=yes
3326 else
3327   rm -rf conftest*
3328   ac_cv_c_char_unsigned=no
3329 fi
3330 rm -f conftest*
3331
3332 else
3333 if test "$cross_compiling" = yes; then
3334     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3335 else
3336   cat > conftest.$ac_ext <<EOF
3337 #line 3338 "configure"
3338 #include "confdefs.h"
3339 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
3340 #if !defined(__STDC__) || __STDC__ != 1
3341 #define volatile
3342 #endif
3343 main() {
3344   volatile char c = 255; exit(c < 0);
3345 }
3346 EOF
3347 if { (eval echo configure:3348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3348 then
3349   ac_cv_c_char_unsigned=yes
3350 else
3351   echo "configure: failed program was:" >&5
3352   cat conftest.$ac_ext >&5
3353   rm -fr conftest*
3354   ac_cv_c_char_unsigned=no
3355 fi
3356 rm -fr conftest*
3357 fi
3358
3359 fi
3360 fi
3361
3362 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
3363 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3364   cat >> confdefs.h <<\EOF
3365 #define __CHAR_UNSIGNED__ 1
3366 EOF
3367
3368 fi
3369
3370
3371 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3372 echo "configure:3373: checking return type of signal handlers" >&5
3373 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3374   echo $ac_n "(cached) $ac_c" 1>&6
3375 else
3376   cat > conftest.$ac_ext <<EOF
3377 #line 3378 "configure"
3378 #include "confdefs.h"
3379 #include <sys/types.h>
3380 #include <signal.h>
3381 #ifdef signal
3382 #undef signal
3383 #endif
3384 #ifdef __cplusplus
3385 extern "C" void (*signal (int, void (*)(int)))(int);
3386 #else
3387 void (*signal ()) ();
3388 #endif
3389
3390 int main() {
3391 int i;
3392 ; return 0; }
3393 EOF
3394 if { (eval echo configure:3395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3395   rm -rf conftest*
3396   ac_cv_type_signal=void
3397 else
3398   echo "configure: failed program was:" >&5
3399   cat conftest.$ac_ext >&5
3400   rm -rf conftest*
3401   ac_cv_type_signal=int
3402 fi
3403 rm -f conftest*
3404 fi
3405
3406 echo "$ac_t""$ac_cv_type_signal" 1>&6
3407 cat >> confdefs.h <<EOF
3408 #define RETSIGTYPE $ac_cv_type_signal
3409 EOF
3410
3411
3412 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3413 echo "configure:3414: checking for uid_t in sys/types.h" >&5
3414 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3415   echo $ac_n "(cached) $ac_c" 1>&6
3416 else
3417   cat > conftest.$ac_ext <<EOF
3418 #line 3419 "configure"
3419 #include "confdefs.h"
3420 #include <sys/types.h>
3421 EOF
3422 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3423   egrep "uid_t" >/dev/null 2>&1; then
3424   rm -rf conftest*
3425   ac_cv_type_uid_t=yes
3426 else
3427   rm -rf conftest*
3428   ac_cv_type_uid_t=no
3429 fi
3430 rm -f conftest*
3431
3432 fi
3433
3434 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3435 if test $ac_cv_type_uid_t = no; then
3436   cat >> confdefs.h <<\EOF
3437 #define uid_t int
3438 EOF
3439
3440   cat >> confdefs.h <<\EOF
3441 #define gid_t int
3442 EOF
3443
3444 fi
3445
3446 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3447 echo "configure:3448: checking for mode_t" >&5
3448 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3449   echo $ac_n "(cached) $ac_c" 1>&6
3450 else
3451   cat > conftest.$ac_ext <<EOF
3452 #line 3453 "configure"
3453 #include "confdefs.h"
3454 #include <sys/types.h>
3455 #if STDC_HEADERS
3456 #include <stdlib.h>
3457 #include <stddef.h>
3458 #endif
3459 EOF
3460 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3461   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3462   rm -rf conftest*
3463   ac_cv_type_mode_t=yes
3464 else
3465   rm -rf conftest*
3466   ac_cv_type_mode_t=no
3467 fi
3468 rm -f conftest*
3469
3470 fi
3471 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3472 if test $ac_cv_type_mode_t = no; then
3473   cat >> confdefs.h <<\EOF
3474 #define mode_t int
3475 EOF
3476
3477 fi
3478
3479 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3480 echo "configure:3481: checking for off_t" >&5
3481 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3482   echo $ac_n "(cached) $ac_c" 1>&6
3483 else
3484   cat > conftest.$ac_ext <<EOF
3485 #line 3486 "configure"
3486 #include "confdefs.h"
3487 #include <sys/types.h>
3488 #if STDC_HEADERS
3489 #include <stdlib.h>
3490 #include <stddef.h>
3491 #endif
3492 EOF
3493 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3494   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3495   rm -rf conftest*
3496   ac_cv_type_off_t=yes
3497 else
3498   rm -rf conftest*
3499   ac_cv_type_off_t=no
3500 fi
3501 rm -f conftest*
3502
3503 fi
3504 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3505 if test $ac_cv_type_off_t = no; then
3506   cat >> confdefs.h <<\EOF
3507 #define off_t long
3508 EOF
3509
3510 fi
3511
3512 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3513 echo "configure:3514: checking for size_t" >&5
3514 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3515   echo $ac_n "(cached) $ac_c" 1>&6
3516 else
3517   cat > conftest.$ac_ext <<EOF
3518 #line 3519 "configure"
3519 #include "confdefs.h"
3520 #include <sys/types.h>
3521 #if STDC_HEADERS
3522 #include <stdlib.h>
3523 #include <stddef.h>
3524 #endif
3525 EOF
3526 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3527   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3528   rm -rf conftest*
3529   ac_cv_type_size_t=yes
3530 else
3531   rm -rf conftest*
3532   ac_cv_type_size_t=no
3533 fi
3534 rm -f conftest*
3535
3536 fi
3537 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3538 if test $ac_cv_type_size_t = no; then
3539   cat >> confdefs.h <<\EOF
3540 #define size_t unsigned
3541 EOF
3542
3543 fi
3544
3545 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3546 echo "configure:3547: checking for pid_t" >&5
3547 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3548   echo $ac_n "(cached) $ac_c" 1>&6
3549 else
3550   cat > conftest.$ac_ext <<EOF
3551 #line 3552 "configure"
3552 #include "confdefs.h"
3553 #include <sys/types.h>
3554 #if STDC_HEADERS
3555 #include <stdlib.h>
3556 #include <stddef.h>
3557 #endif
3558 EOF
3559 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3560   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3561   rm -rf conftest*
3562   ac_cv_type_pid_t=yes
3563 else
3564   rm -rf conftest*
3565   ac_cv_type_pid_t=no
3566 fi
3567 rm -f conftest*
3568
3569 fi
3570 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3571 if test $ac_cv_type_pid_t = no; then
3572   cat >> confdefs.h <<\EOF
3573 #define pid_t int
3574 EOF
3575
3576 fi
3577
3578 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3579 echo "configure:3580: checking for st_rdev in struct stat" >&5
3580 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3581   echo $ac_n "(cached) $ac_c" 1>&6
3582 else
3583   cat > conftest.$ac_ext <<EOF
3584 #line 3585 "configure"
3585 #include "confdefs.h"
3586 #include <sys/types.h>
3587 #include <sys/stat.h>
3588 int main() {
3589 struct stat s; s.st_rdev;
3590 ; return 0; }
3591 EOF
3592 if { (eval echo configure:3593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3593   rm -rf conftest*
3594   ac_cv_struct_st_rdev=yes
3595 else
3596   echo "configure: failed program was:" >&5
3597   cat conftest.$ac_ext >&5
3598   rm -rf conftest*
3599   ac_cv_struct_st_rdev=no
3600 fi
3601 rm -f conftest*
3602 fi
3603
3604 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3605 if test $ac_cv_struct_st_rdev = yes; then
3606   cat >> confdefs.h <<\EOF
3607 #define HAVE_ST_RDEV 1
3608 EOF
3609
3610 fi
3611
3612 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3613 echo "configure:3614: checking for d_off in dirent" >&5
3614 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3615   echo $ac_n "(cached) $ac_c" 1>&6
3616 else
3617   cat > conftest.$ac_ext <<EOF
3618 #line 3619 "configure"
3619 #include "confdefs.h"
3620
3621 #include <unistd.h>
3622 #include <sys/types.h>
3623 #include <dirent.h>
3624 int main() {
3625 struct dirent d; d.d_off;
3626 ; return 0; }
3627 EOF
3628 if { (eval echo configure:3629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3629   rm -rf conftest*
3630   ac_cv_dirent_d_off=yes
3631 else
3632   echo "configure: failed program was:" >&5
3633   cat conftest.$ac_ext >&5
3634   rm -rf conftest*
3635   ac_cv_dirent_d_off=no
3636 fi
3637 rm -f conftest*
3638 fi
3639
3640 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3641 if test $ac_cv_dirent_d_off = yes; then
3642   cat >> confdefs.h <<\EOF
3643 #define HAVE_DIRENT_D_OFF 1
3644 EOF
3645
3646 fi
3647
3648 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3649 echo "configure:3650: checking for ino_t" >&5
3650 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3651   echo $ac_n "(cached) $ac_c" 1>&6
3652 else
3653   cat > conftest.$ac_ext <<EOF
3654 #line 3655 "configure"
3655 #include "confdefs.h"
3656 #include <sys/types.h>
3657 #if STDC_HEADERS
3658 #include <stdlib.h>
3659 #include <stddef.h>
3660 #endif
3661 EOF
3662 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3663   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3664   rm -rf conftest*
3665   ac_cv_type_ino_t=yes
3666 else
3667   rm -rf conftest*
3668   ac_cv_type_ino_t=no
3669 fi
3670 rm -f conftest*
3671
3672 fi
3673 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3674 if test $ac_cv_type_ino_t = no; then
3675   cat >> confdefs.h <<\EOF
3676 #define ino_t unsigned
3677 EOF
3678
3679 fi
3680
3681 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3682 echo "configure:3683: checking for loff_t" >&5
3683 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3684   echo $ac_n "(cached) $ac_c" 1>&6
3685 else
3686   cat > conftest.$ac_ext <<EOF
3687 #line 3688 "configure"
3688 #include "confdefs.h"
3689 #include <sys/types.h>
3690 #if STDC_HEADERS
3691 #include <stdlib.h>
3692 #include <stddef.h>
3693 #endif
3694 EOF
3695 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3696   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3697   rm -rf conftest*
3698   ac_cv_type_loff_t=yes
3699 else
3700   rm -rf conftest*
3701   ac_cv_type_loff_t=no
3702 fi
3703 rm -f conftest*
3704
3705 fi
3706 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3707 if test $ac_cv_type_loff_t = no; then
3708   cat >> confdefs.h <<\EOF
3709 #define loff_t off_t
3710 EOF
3711
3712 fi
3713
3714 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3715 echo "configure:3716: checking for offset_t" >&5
3716 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3717   echo $ac_n "(cached) $ac_c" 1>&6
3718 else
3719   cat > conftest.$ac_ext <<EOF
3720 #line 3721 "configure"
3721 #include "confdefs.h"
3722 #include <sys/types.h>
3723 #if STDC_HEADERS
3724 #include <stdlib.h>
3725 #include <stddef.h>
3726 #endif
3727 EOF
3728 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3729   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3730   rm -rf conftest*
3731   ac_cv_type_offset_t=yes
3732 else
3733   rm -rf conftest*
3734   ac_cv_type_offset_t=no
3735 fi
3736 rm -f conftest*
3737
3738 fi
3739 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3740 if test $ac_cv_type_offset_t = no; then
3741   cat >> confdefs.h <<\EOF
3742 #define offset_t loff_t
3743 EOF
3744
3745 fi
3746
3747 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3748 echo "configure:3749: checking for ssize_t" >&5
3749 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3750   echo $ac_n "(cached) $ac_c" 1>&6
3751 else
3752   cat > conftest.$ac_ext <<EOF
3753 #line 3754 "configure"
3754 #include "confdefs.h"
3755 #include <sys/types.h>
3756 #if STDC_HEADERS
3757 #include <stdlib.h>
3758 #include <stddef.h>
3759 #endif
3760 EOF
3761 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3762   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3763   rm -rf conftest*
3764   ac_cv_type_ssize_t=yes
3765 else
3766   rm -rf conftest*
3767   ac_cv_type_ssize_t=no
3768 fi
3769 rm -f conftest*
3770
3771 fi
3772 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3773 if test $ac_cv_type_ssize_t = no; then
3774   cat >> confdefs.h <<\EOF
3775 #define ssize_t int
3776 EOF
3777
3778 fi
3779
3780 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3781 echo "configure:3782: checking for wchar_t" >&5
3782 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3783   echo $ac_n "(cached) $ac_c" 1>&6
3784 else
3785   cat > conftest.$ac_ext <<EOF
3786 #line 3787 "configure"
3787 #include "confdefs.h"
3788 #include <sys/types.h>
3789 #if STDC_HEADERS
3790 #include <stdlib.h>
3791 #include <stddef.h>
3792 #endif
3793 EOF
3794 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3795   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3796   rm -rf conftest*
3797   ac_cv_type_wchar_t=yes
3798 else
3799   rm -rf conftest*
3800   ac_cv_type_wchar_t=no
3801 fi
3802 rm -f conftest*
3803
3804 fi
3805 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3806 if test $ac_cv_type_wchar_t = no; then
3807   cat >> confdefs.h <<\EOF
3808 #define wchar_t unsigned short
3809 EOF
3810
3811 fi
3812
3813
3814 # we need libcups for CUPS support...
3815 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3816 echo "configure:3817: checking for httpConnect in -lcups" >&5
3817 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3818 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3819   echo $ac_n "(cached) $ac_c" 1>&6
3820 else
3821   ac_save_LIBS="$LIBS"
3822 LIBS="-lcups  $LIBS"
3823 cat > conftest.$ac_ext <<EOF
3824 #line 3825 "configure"
3825 #include "confdefs.h"
3826 /* Override any gcc2 internal prototype to avoid an error.  */
3827 /* We use char because int might match the return type of a gcc2
3828     builtin and then its argument prototype would still apply.  */
3829 char httpConnect();
3830
3831 int main() {
3832 httpConnect()
3833 ; return 0; }
3834 EOF
3835 if { (eval echo configure:3836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3836   rm -rf conftest*
3837   eval "ac_cv_lib_$ac_lib_var=yes"
3838 else
3839   echo "configure: failed program was:" >&5
3840   cat conftest.$ac_ext >&5
3841   rm -rf conftest*
3842   eval "ac_cv_lib_$ac_lib_var=no"
3843 fi
3844 rm -f conftest*
3845 LIBS="$ac_save_LIBS"
3846
3847 fi
3848 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3849   echo "$ac_t""yes" 1>&6
3850     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3851     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3852   cat >> confdefs.h <<EOF
3853 #define $ac_tr_lib 1
3854 EOF
3855
3856   LIBS="-lcups $LIBS"
3857
3858 else
3859   echo "$ac_t""no" 1>&6
3860 fi
3861
3862
3863 # we need libdl for PAM and the new VFS code
3864 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3865 echo "configure:3866: checking for dlopen in -ldl" >&5
3866 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3867 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3868   echo $ac_n "(cached) $ac_c" 1>&6
3869 else
3870   ac_save_LIBS="$LIBS"
3871 LIBS="-ldl  $LIBS"
3872 cat > conftest.$ac_ext <<EOF
3873 #line 3874 "configure"
3874 #include "confdefs.h"
3875 /* Override any gcc2 internal prototype to avoid an error.  */
3876 /* We use char because int might match the return type of a gcc2
3877     builtin and then its argument prototype would still apply.  */
3878 char dlopen();
3879
3880 int main() {
3881 dlopen()
3882 ; return 0; }
3883 EOF
3884 if { (eval echo configure:3885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3885   rm -rf conftest*
3886   eval "ac_cv_lib_$ac_lib_var=yes"
3887 else
3888   echo "configure: failed program was:" >&5
3889   cat conftest.$ac_ext >&5
3890   rm -rf conftest*
3891   eval "ac_cv_lib_$ac_lib_var=no"
3892 fi
3893 rm -f conftest*
3894 LIBS="$ac_save_LIBS"
3895
3896 fi
3897 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3898   echo "$ac_t""yes" 1>&6
3899   LIBS="$LIBS -ldl";
3900         cat >> confdefs.h <<\EOF
3901 #define HAVE_LIBDL 1
3902 EOF
3903
3904 else
3905   echo "$ac_t""no" 1>&6
3906 fi
3907
3908
3909 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3910 echo "configure:3911: checking for socklen_t type" >&5
3911 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3912   echo $ac_n "(cached) $ac_c" 1>&6
3913 else
3914   
3915     cat > conftest.$ac_ext <<EOF
3916 #line 3917 "configure"
3917 #include "confdefs.h"
3918
3919 #include <sys/types.h>
3920 #if STDC_HEADERS
3921 #include <stdlib.h>
3922 #include <stddef.h>
3923 #endif
3924 #include <sys/socket.h>
3925 int main() {
3926 socklen_t i = 0
3927 ; return 0; }
3928 EOF
3929 if { (eval echo configure:3930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3930   rm -rf conftest*
3931   samba_cv_socklen_t=yes
3932 else
3933   echo "configure: failed program was:" >&5
3934   cat conftest.$ac_ext >&5
3935   rm -rf conftest*
3936   samba_cv_socklen_t=no
3937 fi
3938 rm -f conftest*
3939 fi
3940
3941 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3942 if test x"$samba_cv_socklen_t" = x"yes"; then
3943    cat >> confdefs.h <<\EOF
3944 #define HAVE_SOCKLEN_T_TYPE 1
3945 EOF
3946
3947 fi
3948
3949 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3950 echo "configure:3951: checking for sig_atomic_t type" >&5
3951 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3952   echo $ac_n "(cached) $ac_c" 1>&6
3953 else
3954   
3955     cat > conftest.$ac_ext <<EOF
3956 #line 3957 "configure"
3957 #include "confdefs.h"
3958
3959 #include <sys/types.h>
3960 #if STDC_HEADERS
3961 #include <stdlib.h>
3962 #include <stddef.h>
3963 #endif
3964 #include <signal.h>
3965 int main() {
3966 sig_atomic_t i = 0
3967 ; return 0; }
3968 EOF
3969 if { (eval echo configure:3970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3970   rm -rf conftest*
3971   samba_cv_sig_atomic_t=yes
3972 else
3973   echo "configure: failed program was:" >&5
3974   cat conftest.$ac_ext >&5
3975   rm -rf conftest*
3976   samba_cv_sig_atomic_t=no
3977 fi
3978 rm -f conftest*
3979 fi
3980
3981 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3982 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3983    cat >> confdefs.h <<\EOF
3984 #define HAVE_SIG_ATOMIC_T_TYPE 1
3985 EOF
3986
3987 fi
3988
3989 # stupid headers have the functions but no declaration. grrrr.
3990
3991  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
3992 echo "configure:3993: checking for errno declaration" >&5
3993 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
3994   echo $ac_n "(cached) $ac_c" 1>&6
3995 else
3996   
3997     cat > conftest.$ac_ext <<EOF
3998 #line 3999 "configure"
3999 #include "confdefs.h"
4000 #include <errno.h>
4001 int main() {
4002 int i = (int)errno
4003 ; return 0; }
4004 EOF
4005 if { (eval echo configure:4006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4006   rm -rf conftest*
4007   ac_cv_have_errno_decl=yes
4008 else
4009   echo "configure: failed program was:" >&5
4010   cat conftest.$ac_ext >&5
4011   rm -rf conftest*
4012   ac_cv_have_errno_decl=no
4013 fi
4014 rm -f conftest*
4015 fi
4016
4017 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
4018  if test x"$ac_cv_have_errno_decl" = x"yes"; then
4019     cat >> confdefs.h <<\EOF
4020 #define HAVE_ERRNO_DECL 1
4021 EOF
4022
4023  fi
4024
4025
4026  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
4027 echo "configure:4028: checking for setresuid declaration" >&5
4028 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
4029   echo $ac_n "(cached) $ac_c" 1>&6
4030 else
4031   
4032     cat > conftest.$ac_ext <<EOF
4033 #line 4034 "configure"
4034 #include "confdefs.h"
4035 #include <unistd.h>
4036 int main() {
4037 int i = (int)setresuid
4038 ; return 0; }
4039 EOF
4040 if { (eval echo configure:4041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4041   rm -rf conftest*
4042   ac_cv_have_setresuid_decl=yes
4043 else
4044   echo "configure: failed program was:" >&5
4045   cat conftest.$ac_ext >&5
4046   rm -rf conftest*
4047   ac_cv_have_setresuid_decl=no
4048 fi
4049 rm -f conftest*
4050 fi
4051
4052 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
4053  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
4054     cat >> confdefs.h <<\EOF
4055 #define HAVE_SETRESUID_DECL 1
4056 EOF
4057
4058  fi
4059
4060
4061  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
4062 echo "configure:4063: checking for setresgid declaration" >&5
4063 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
4064   echo $ac_n "(cached) $ac_c" 1>&6
4065 else
4066   
4067     cat > conftest.$ac_ext <<EOF
4068 #line 4069 "configure"
4069 #include "confdefs.h"
4070 #include <unistd.h>
4071 int main() {
4072 int i = (int)setresgid
4073 ; return 0; }
4074 EOF
4075 if { (eval echo configure:4076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4076   rm -rf conftest*
4077   ac_cv_have_setresgid_decl=yes
4078 else
4079   echo "configure: failed program was:" >&5
4080   cat conftest.$ac_ext >&5
4081   rm -rf conftest*
4082   ac_cv_have_setresgid_decl=no
4083 fi
4084 rm -f conftest*
4085 fi
4086
4087 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
4088  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
4089     cat >> confdefs.h <<\EOF
4090 #define HAVE_SETRESGID_DECL 1
4091 EOF
4092
4093  fi
4094
4095
4096  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
4097 echo "configure:4098: checking for asprintf declaration" >&5
4098 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
4099   echo $ac_n "(cached) $ac_c" 1>&6
4100 else
4101   
4102     cat > conftest.$ac_ext <<EOF
4103 #line 4104 "configure"
4104 #include "confdefs.h"
4105 #include <stdio.h>
4106 int main() {
4107 int i = (int)asprintf
4108 ; return 0; }
4109 EOF
4110 if { (eval echo configure:4111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4111   rm -rf conftest*
4112   ac_cv_have_asprintf_decl=yes
4113 else
4114   echo "configure: failed program was:" >&5
4115   cat conftest.$ac_ext >&5
4116   rm -rf conftest*
4117   ac_cv_have_asprintf_decl=no
4118 fi
4119 rm -f conftest*
4120 fi
4121
4122 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
4123  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
4124     cat >> confdefs.h <<\EOF
4125 #define HAVE_ASPRINTF_DECL 1
4126 EOF
4127
4128  fi
4129
4130
4131  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
4132 echo "configure:4133: checking for vasprintf declaration" >&5
4133 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
4134   echo $ac_n "(cached) $ac_c" 1>&6
4135 else
4136   
4137     cat > conftest.$ac_ext <<EOF
4138 #line 4139 "configure"
4139 #include "confdefs.h"
4140 #include <stdio.h>
4141 int main() {
4142 int i = (int)vasprintf
4143 ; return 0; }
4144 EOF
4145 if { (eval echo configure:4146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4146   rm -rf conftest*
4147   ac_cv_have_vasprintf_decl=yes
4148 else
4149   echo "configure: failed program was:" >&5
4150   cat conftest.$ac_ext >&5
4151   rm -rf conftest*
4152   ac_cv_have_vasprintf_decl=no
4153 fi
4154 rm -f conftest*
4155 fi
4156
4157 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
4158  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
4159     cat >> confdefs.h <<\EOF
4160 #define HAVE_VASPRINTF_DECL 1
4161 EOF
4162
4163  fi
4164
4165
4166  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
4167 echo "configure:4168: checking for vsnprintf declaration" >&5
4168 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
4169   echo $ac_n "(cached) $ac_c" 1>&6
4170 else
4171   
4172     cat > conftest.$ac_ext <<EOF
4173 #line 4174 "configure"
4174 #include "confdefs.h"
4175 #include <stdio.h>
4176 int main() {
4177 int i = (int)vsnprintf
4178 ; return 0; }
4179 EOF
4180 if { (eval echo configure:4181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4181   rm -rf conftest*
4182   ac_cv_have_vsnprintf_decl=yes
4183 else
4184   echo "configure: failed program was:" >&5
4185   cat conftest.$ac_ext >&5
4186   rm -rf conftest*
4187   ac_cv_have_vsnprintf_decl=no
4188 fi
4189 rm -f conftest*
4190 fi
4191
4192 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
4193  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
4194     cat >> confdefs.h <<\EOF
4195 #define HAVE_VSNPRINTF_DECL 1
4196 EOF
4197
4198  fi
4199
4200
4201  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
4202 echo "configure:4203: checking for snprintf declaration" >&5
4203 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
4204   echo $ac_n "(cached) $ac_c" 1>&6
4205 else
4206   
4207     cat > conftest.$ac_ext <<EOF
4208 #line 4209 "configure"
4209 #include "confdefs.h"
4210 #include <stdio.h>
4211 int main() {
4212 int i = (int)snprintf
4213 ; return 0; }
4214 EOF
4215 if { (eval echo configure:4216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4216   rm -rf conftest*
4217   ac_cv_have_snprintf_decl=yes
4218 else
4219   echo "configure: failed program was:" >&5
4220   cat conftest.$ac_ext >&5
4221   rm -rf conftest*
4222   ac_cv_have_snprintf_decl=no
4223 fi
4224 rm -f conftest*
4225 fi
4226
4227 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
4228  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
4229     cat >> confdefs.h <<\EOF
4230 #define HAVE_SNPRINTF_DECL 1
4231 EOF
4232
4233  fi
4234
4235
4236 # and glibc has setresuid under linux but the function does
4237 # nothing until kernel 2.1.44! very dumb.
4238 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
4239 echo "configure:4240: checking for real setresuid" >&5
4240 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
4241   echo $ac_n "(cached) $ac_c" 1>&6
4242 else
4243   
4244     if test "$cross_compiling" = yes; then
4245   samba_cv_have_setresuid=cross
4246 else
4247   cat > conftest.$ac_ext <<EOF
4248 #line 4249 "configure"
4249 #include "confdefs.h"
4250 #include <errno.h>
4251 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4252 EOF
4253 if { (eval echo configure:4254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4254 then
4255   samba_cv_have_setresuid=yes
4256 else
4257   echo "configure: failed program was:" >&5
4258   cat conftest.$ac_ext >&5
4259   rm -fr conftest*
4260   samba_cv_have_setresuid=no
4261 fi
4262 rm -fr conftest*
4263 fi
4264
4265 fi
4266
4267 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4268 if test x"$samba_cv_have_setresuid" = x"yes"; then
4269     cat >> confdefs.h <<\EOF
4270 #define HAVE_SETRESUID 1
4271 EOF
4272
4273 fi
4274
4275 # Do the same check for setresguid...
4276 #
4277 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4278 echo "configure:4279: checking for real setresgid" >&5
4279 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4280   echo $ac_n "(cached) $ac_c" 1>&6
4281 else
4282   
4283     if test "$cross_compiling" = yes; then
4284   samba_cv_have_setresgid=cross
4285 else
4286   cat > conftest.$ac_ext <<EOF
4287 #line 4288 "configure"
4288 #include "confdefs.h"
4289 #include <unistd.h>
4290 #include <errno.h>
4291 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4292 EOF
4293 if { (eval echo configure:4294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4294 then
4295   samba_cv_have_setresgid=yes
4296 else
4297   echo "configure: failed program was:" >&5
4298   cat conftest.$ac_ext >&5
4299   rm -fr conftest*
4300   samba_cv_have_setresgid=no
4301 fi
4302 rm -fr conftest*
4303 fi
4304
4305 fi
4306
4307 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4308 if test x"$samba_cv_have_setresgid" = x"yes"; then
4309     cat >> confdefs.h <<\EOF
4310 #define HAVE_SETRESGID 1
4311 EOF
4312
4313 fi
4314
4315 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4316 echo "configure:4317: checking for 8-bit clean memcmp" >&5
4317 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4318   echo $ac_n "(cached) $ac_c" 1>&6
4319 else
4320   if test "$cross_compiling" = yes; then
4321   ac_cv_func_memcmp_clean=no
4322 else
4323   cat > conftest.$ac_ext <<EOF
4324 #line 4325 "configure"
4325 #include "confdefs.h"
4326
4327 main()
4328 {
4329   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4330   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4331 }
4332
4333 EOF
4334 if { (eval echo configure:4335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4335 then
4336   ac_cv_func_memcmp_clean=yes
4337 else
4338   echo "configure: failed program was:" >&5
4339   cat conftest.$ac_ext >&5
4340   rm -fr conftest*
4341   ac_cv_func_memcmp_clean=no
4342 fi
4343 rm -fr conftest*
4344 fi
4345
4346 fi
4347
4348 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4349 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4350
4351
4352 ###############################################
4353 # test for where we get crypt() from
4354 for ac_func in crypt
4355 do
4356 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4357 echo "configure:4358: checking for $ac_func" >&5
4358 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4359   echo $ac_n "(cached) $ac_c" 1>&6
4360 else
4361   cat > conftest.$ac_ext <<EOF
4362 #line 4363 "configure"
4363 #include "confdefs.h"
4364 /* System header to define __stub macros and hopefully few prototypes,
4365     which can conflict with char $ac_func(); below.  */
4366 #include <assert.h>
4367 /* Override any gcc2 internal prototype to avoid an error.  */
4368 /* We use char because int might match the return type of a gcc2
4369     builtin and then its argument prototype would still apply.  */
4370 char $ac_func();
4371
4372 int main() {
4373
4374 /* The GNU C library defines this for functions which it implements
4375     to always fail with ENOSYS.  Some functions are actually named
4376     something starting with __ and the normal name is an alias.  */
4377 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4378 choke me
4379 #else
4380 $ac_func();
4381 #endif
4382
4383 ; return 0; }
4384 EOF
4385 if { (eval echo configure:4386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4386   rm -rf conftest*
4387   eval "ac_cv_func_$ac_func=yes"
4388 else
4389   echo "configure: failed program was:" >&5
4390   cat conftest.$ac_ext >&5
4391   rm -rf conftest*
4392   eval "ac_cv_func_$ac_func=no"
4393 fi
4394 rm -f conftest*
4395 fi
4396
4397 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4398   echo "$ac_t""yes" 1>&6
4399     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4400   cat >> confdefs.h <<EOF
4401 #define $ac_tr_func 1
4402 EOF
4403  
4404 else
4405   echo "$ac_t""no" 1>&6
4406 fi
4407 done
4408
4409 if test x"$ac_cv_func_crypt" = x"no"; then
4410     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4411 echo "configure:4412: checking for crypt in -lcrypt" >&5
4412 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4413 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4414   echo $ac_n "(cached) $ac_c" 1>&6
4415 else
4416   ac_save_LIBS="$LIBS"
4417 LIBS="-lcrypt  $LIBS"
4418 cat > conftest.$ac_ext <<EOF
4419 #line 4420 "configure"
4420 #include "confdefs.h"
4421 /* Override any gcc2 internal prototype to avoid an error.  */
4422 /* We use char because int might match the return type of a gcc2
4423     builtin and then its argument prototype would still apply.  */
4424 char crypt();
4425
4426 int main() {
4427 crypt()
4428 ; return 0; }
4429 EOF
4430 if { (eval echo configure:4431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4431   rm -rf conftest*
4432   eval "ac_cv_lib_$ac_lib_var=yes"
4433 else
4434   echo "configure: failed program was:" >&5
4435   cat conftest.$ac_ext >&5
4436   rm -rf conftest*
4437   eval "ac_cv_lib_$ac_lib_var=no"
4438 fi
4439 rm -f conftest*
4440 LIBS="$ac_save_LIBS"
4441
4442 fi
4443 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4444   echo "$ac_t""yes" 1>&6
4445   LIBS="$LIBS -lcrypt";
4446         cat >> confdefs.h <<\EOF
4447 #define HAVE_CRYPT 1
4448 EOF
4449
4450 else
4451   echo "$ac_t""no" 1>&6
4452 fi
4453
4454 fi
4455
4456
4457 ###############################################
4458 # Readline included by default unless explicitly asked not to
4459 test "${with_readline+set}" != "set" && with_readline=yes
4460
4461 # test for where we get readline() from
4462 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4463 echo "configure:4464: checking whether to use readline" >&5
4464 # Check whether --with-readline or --without-readline was given.
4465 if test "${with_readline+set}" = set; then
4466   withval="$with_readline"
4467     case "$with_readline" in
4468   yes)
4469     echo "$ac_t""yes" 1>&6
4470
4471     for ac_hdr in readline.h history.h readline/readline.h
4472 do
4473 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4474 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4475 echo "configure:4476: checking for $ac_hdr" >&5
4476 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4477   echo $ac_n "(cached) $ac_c" 1>&6
4478 else
4479   cat > conftest.$ac_ext <<EOF
4480 #line 4481 "configure"
4481 #include "confdefs.h"
4482 #include <$ac_hdr>
4483 EOF
4484 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4485 { (eval echo configure:4486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4486 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4487 if test -z "$ac_err"; then
4488   rm -rf conftest*
4489   eval "ac_cv_header_$ac_safe=yes"
4490 else
4491   echo "$ac_err" >&5
4492   echo "configure: failed program was:" >&5
4493   cat conftest.$ac_ext >&5
4494   rm -rf conftest*
4495   eval "ac_cv_header_$ac_safe=no"
4496 fi
4497 rm -f conftest*
4498 fi
4499 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4500   echo "$ac_t""yes" 1>&6
4501     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4502   cat >> confdefs.h <<EOF
4503 #define $ac_tr_hdr 1
4504 EOF
4505  
4506 else
4507   echo "$ac_t""no" 1>&6
4508 fi
4509 done
4510
4511     for ac_hdr in readline/history.h
4512 do
4513 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4514 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4515 echo "configure:4516: checking for $ac_hdr" >&5
4516 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4517   echo $ac_n "(cached) $ac_c" 1>&6
4518 else
4519   cat > conftest.$ac_ext <<EOF
4520 #line 4521 "configure"
4521 #include "confdefs.h"
4522 #include <$ac_hdr>
4523 EOF
4524 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4525 { (eval echo configure:4526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4526 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4527 if test -z "$ac_err"; then
4528   rm -rf conftest*
4529   eval "ac_cv_header_$ac_safe=yes"
4530 else
4531   echo "$ac_err" >&5
4532   echo "configure: failed program was:" >&5
4533   cat conftest.$ac_ext >&5
4534   rm -rf conftest*
4535   eval "ac_cv_header_$ac_safe=no"
4536 fi
4537 rm -f conftest*
4538 fi
4539 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4540   echo "$ac_t""yes" 1>&6
4541     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4542   cat >> confdefs.h <<EOF
4543 #define $ac_tr_hdr 1
4544 EOF
4545  
4546 else
4547   echo "$ac_t""no" 1>&6
4548 fi
4549 done
4550
4551
4552     for ac_hdr in readline.h readline/readline.h
4553 do
4554 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4555 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4556 echo "configure:4557: checking for $ac_hdr" >&5
4557 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4558   echo $ac_n "(cached) $ac_c" 1>&6
4559 else
4560   cat > conftest.$ac_ext <<EOF
4561 #line 4562 "configure"
4562 #include "confdefs.h"
4563 #include <$ac_hdr>
4564 EOF
4565 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4566 { (eval echo configure:4567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4567 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4568 if test -z "$ac_err"; then
4569   rm -rf conftest*
4570   eval "ac_cv_header_$ac_safe=yes"
4571 else
4572   echo "$ac_err" >&5
4573   echo "configure: failed program was:" >&5
4574   cat conftest.$ac_ext >&5
4575   rm -rf conftest*
4576   eval "ac_cv_header_$ac_safe=no"
4577 fi
4578 rm -f conftest*
4579 fi
4580 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4581   echo "$ac_t""yes" 1>&6
4582     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4583   cat >> confdefs.h <<EOF
4584 #define $ac_tr_hdr 1
4585 EOF
4586  
4587       for termlib in ncurses curses termcap terminfo termlib; do
4588        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4589 echo "configure:4590: checking for tgetent in -l${termlib}" >&5
4590 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4591 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4592   echo $ac_n "(cached) $ac_c" 1>&6
4593 else
4594   ac_save_LIBS="$LIBS"
4595 LIBS="-l${termlib}  $LIBS"
4596 cat > conftest.$ac_ext <<EOF
4597 #line 4598 "configure"
4598 #include "confdefs.h"
4599 /* Override any gcc2 internal prototype to avoid an error.  */
4600 /* We use char because int might match the return type of a gcc2
4601     builtin and then its argument prototype would still apply.  */
4602 char tgetent();
4603
4604 int main() {
4605 tgetent()
4606 ; return 0; }
4607 EOF
4608 if { (eval echo configure:4609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4609   rm -rf conftest*
4610   eval "ac_cv_lib_$ac_lib_var=yes"
4611 else
4612   echo "configure: failed program was:" >&5
4613   cat conftest.$ac_ext >&5
4614   rm -rf conftest*
4615   eval "ac_cv_lib_$ac_lib_var=no"
4616 fi
4617 rm -f conftest*
4618 LIBS="$ac_save_LIBS"
4619
4620 fi
4621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4622   echo "$ac_t""yes" 1>&6
4623   TERMLIBS="-l${termlib}"; break
4624 else
4625   echo "$ac_t""no" 1>&6
4626 fi
4627
4628       done
4629       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4630 echo "configure:4631: checking for rl_callback_handler_install in -lreadline" >&5
4631 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4632 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4633   echo $ac_n "(cached) $ac_c" 1>&6
4634 else
4635   ac_save_LIBS="$LIBS"
4636 LIBS="-lreadline $TERMLIBS $LIBS"
4637 cat > conftest.$ac_ext <<EOF
4638 #line 4639 "configure"
4639 #include "confdefs.h"
4640 /* Override any gcc2 internal prototype to avoid an error.  */
4641 /* We use char because int might match the return type of a gcc2
4642     builtin and then its argument prototype would still apply.  */
4643 char rl_callback_handler_install();
4644
4645 int main() {
4646 rl_callback_handler_install()
4647 ; return 0; }
4648 EOF
4649 if { (eval echo configure:4650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4650   rm -rf conftest*
4651   eval "ac_cv_lib_$ac_lib_var=yes"
4652 else
4653   echo "configure: failed program was:" >&5
4654   cat conftest.$ac_ext >&5
4655   rm -rf conftest*
4656   eval "ac_cv_lib_$ac_lib_var=no"
4657 fi
4658 rm -f conftest*
4659 LIBS="$ac_save_LIBS"
4660
4661 fi
4662 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4663   echo "$ac_t""yes" 1>&6
4664   TERMLIBS="-lreadline $TERMLIBS"
4665        cat >> confdefs.h <<\EOF
4666 #define HAVE_LIBREADLINE 1
4667 EOF
4668
4669        break
4670 else
4671   echo "$ac_t""no" 1>&6
4672 TERMLIBS=
4673 fi
4674
4675 else
4676   echo "$ac_t""no" 1>&6
4677 fi
4678 done
4679
4680     ;;
4681   no)
4682     echo "$ac_t""no" 1>&6
4683     ;;
4684   *)
4685     echo "$ac_t""yes" 1>&6
4686
4687     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4688     # alternate readline path
4689     _ldflags=${LDFLAGS}
4690     _cppflags=${CPPFLAGS}
4691
4692     # Add additional search path
4693     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4694     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4695
4696     for ac_hdr in readline.h history.h readline/readline.h
4697 do
4698 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4699 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4700 echo "configure:4701: checking for $ac_hdr" >&5
4701 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4702   echo $ac_n "(cached) $ac_c" 1>&6
4703 else
4704   cat > conftest.$ac_ext <<EOF
4705 #line 4706 "configure"
4706 #include "confdefs.h"
4707 #include <$ac_hdr>
4708 EOF
4709 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4710 { (eval echo configure:4711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4711 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4712 if test -z "$ac_err"; then
4713   rm -rf conftest*
4714   eval "ac_cv_header_$ac_safe=yes"
4715 else
4716   echo "$ac_err" >&5
4717   echo "configure: failed program was:" >&5
4718   cat conftest.$ac_ext >&5
4719   rm -rf conftest*
4720   eval "ac_cv_header_$ac_safe=no"
4721 fi
4722 rm -f conftest*
4723 fi
4724 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4725   echo "$ac_t""yes" 1>&6
4726     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4727   cat >> confdefs.h <<EOF
4728 #define $ac_tr_hdr 1
4729 EOF
4730  
4731 else
4732   echo "$ac_t""no" 1>&6
4733 fi
4734 done
4735
4736     for ac_hdr in readline/history.h
4737 do
4738 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4739 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4740 echo "configure:4741: checking for $ac_hdr" >&5
4741 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4742   echo $ac_n "(cached) $ac_c" 1>&6
4743 else
4744   cat > conftest.$ac_ext <<EOF
4745 #line 4746 "configure"
4746 #include "confdefs.h"
4747 #include <$ac_hdr>
4748 EOF
4749 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4750 { (eval echo configure:4751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4751 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4752 if test -z "$ac_err"; then
4753   rm -rf conftest*
4754   eval "ac_cv_header_$ac_safe=yes"
4755 else
4756   echo "$ac_err" >&5
4757   echo "configure: failed program was:" >&5
4758   cat conftest.$ac_ext >&5
4759   rm -rf conftest*
4760   eval "ac_cv_header_$ac_safe=no"
4761 fi
4762 rm -f conftest*
4763 fi
4764 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4765   echo "$ac_t""yes" 1>&6
4766     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4767   cat >> confdefs.h <<EOF
4768 #define $ac_tr_hdr 1
4769 EOF
4770  
4771 else
4772   echo "$ac_t""no" 1>&6
4773 fi
4774 done
4775
4776
4777     for ac_hdr in readline.h readline/readline.h
4778 do
4779 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4780 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4781 echo "configure:4782: checking for $ac_hdr" >&5
4782 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4783   echo $ac_n "(cached) $ac_c" 1>&6
4784 else
4785   cat > conftest.$ac_ext <<EOF
4786 #line 4787 "configure"
4787 #include "confdefs.h"
4788 #include <$ac_hdr>
4789 EOF
4790 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4791 { (eval echo configure:4792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4792 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4793 if test -z "$ac_err"; then
4794   rm -rf conftest*
4795   eval "ac_cv_header_$ac_safe=yes"
4796 else
4797   echo "$ac_err" >&5
4798   echo "configure: failed program was:" >&5
4799   cat conftest.$ac_ext >&5
4800   rm -rf conftest*
4801   eval "ac_cv_header_$ac_safe=no"
4802 fi
4803 rm -f conftest*
4804 fi
4805 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4806   echo "$ac_t""yes" 1>&6
4807     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4808   cat >> confdefs.h <<EOF
4809 #define $ac_tr_hdr 1
4810 EOF
4811  
4812       for termlib in ncurses curses termcap terminfo termlib; do
4813        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4814 echo "configure:4815: checking for tgetent in -l${termlib}" >&5
4815 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4816 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4817   echo $ac_n "(cached) $ac_c" 1>&6
4818 else
4819   ac_save_LIBS="$LIBS"
4820 LIBS="-l${termlib}  $LIBS"
4821 cat > conftest.$ac_ext <<EOF
4822 #line 4823 "configure"
4823 #include "confdefs.h"
4824 /* Override any gcc2 internal prototype to avoid an error.  */
4825 /* We use char because int might match the return type of a gcc2
4826     builtin and then its argument prototype would still apply.  */
4827 char tgetent();
4828
4829 int main() {
4830 tgetent()
4831 ; return 0; }
4832 EOF
4833 if { (eval echo configure:4834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4834   rm -rf conftest*
4835   eval "ac_cv_lib_$ac_lib_var=yes"
4836 else
4837   echo "configure: failed program was:" >&5
4838   cat conftest.$ac_ext >&5
4839   rm -rf conftest*
4840   eval "ac_cv_lib_$ac_lib_var=no"
4841 fi
4842 rm -f conftest*
4843 LIBS="$ac_save_LIBS"
4844
4845 fi
4846 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4847   echo "$ac_t""yes" 1>&6
4848   TERMLIBS="-l${termlib}"; break
4849 else
4850   echo "$ac_t""no" 1>&6
4851 fi
4852
4853       done
4854       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4855 echo "configure:4856: checking for rl_callback_handler_install in -lreadline" >&5
4856 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4857 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4858   echo $ac_n "(cached) $ac_c" 1>&6
4859 else
4860   ac_save_LIBS="$LIBS"
4861 LIBS="-lreadline $TERMLIBS $LIBS"
4862 cat > conftest.$ac_ext <<EOF
4863 #line 4864 "configure"
4864 #include "confdefs.h"
4865 /* Override any gcc2 internal prototype to avoid an error.  */
4866 /* We use char because int might match the return type of a gcc2
4867     builtin and then its argument prototype would still apply.  */
4868 char rl_callback_handler_install();
4869
4870 int main() {
4871 rl_callback_handler_install()
4872 ; return 0; }
4873 EOF
4874 if { (eval echo configure:4875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4875   rm -rf conftest*
4876   eval "ac_cv_lib_$ac_lib_var=yes"
4877 else
4878   echo "configure: failed program was:" >&5
4879   cat conftest.$ac_ext >&5
4880   rm -rf conftest*
4881   eval "ac_cv_lib_$ac_lib_var=no"
4882 fi
4883 rm -f conftest*
4884 LIBS="$ac_save_LIBS"
4885
4886 fi
4887 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4888   echo "$ac_t""yes" 1>&6
4889   TERMLDFLAGS="-L$with_readline/lib"
4890        TERMCPPFLAGS="-I$with_readline/include"
4891        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4892        TERMLIBS="-lreadline $TERMLIBS"
4893        cat >> confdefs.h <<\EOF
4894 #define HAVE_LIBREADLINE 1
4895 EOF
4896
4897        break
4898 else
4899   echo "$ac_t""no" 1>&6
4900 TERMLIBS= CPPFLAGS=$_cppflags
4901 fi
4902
4903 else
4904   echo "$ac_t""no" 1>&6
4905 fi
4906 done
4907
4908
4909     LDFLAGS=$_ldflags
4910     ;;
4911   esac
4912 else
4913   echo "$ac_t""no" 1>&6
4914
4915 fi
4916
4917
4918
4919
4920 # The following test taken from the cvs sources
4921 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4922 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4923 # libsocket.so which has a bad implementation of gethostbyname (it
4924 # only looks in /etc/hosts), so we only look for -lsocket if we need
4925 # it.
4926 for ac_func in connect
4927 do
4928 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4929 echo "configure:4930: checking for $ac_func" >&5
4930 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4931   echo $ac_n "(cached) $ac_c" 1>&6
4932 else
4933   cat > conftest.$ac_ext <<EOF
4934 #line 4935 "configure"
4935 #include "confdefs.h"
4936 /* System header to define __stub macros and hopefully few prototypes,
4937     which can conflict with char $ac_func(); below.  */
4938 #include <assert.h>
4939 /* Override any gcc2 internal prototype to avoid an error.  */
4940 /* We use char because int might match the return type of a gcc2
4941     builtin and then its argument prototype would still apply.  */
4942 char $ac_func();
4943
4944 int main() {
4945
4946 /* The GNU C library defines this for functions which it implements
4947     to always fail with ENOSYS.  Some functions are actually named
4948     something starting with __ and the normal name is an alias.  */
4949 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4950 choke me
4951 #else
4952 $ac_func();
4953 #endif
4954
4955 ; return 0; }
4956 EOF
4957 if { (eval echo configure:4958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4958   rm -rf conftest*
4959   eval "ac_cv_func_$ac_func=yes"
4960 else
4961   echo "configure: failed program was:" >&5
4962   cat conftest.$ac_ext >&5
4963   rm -rf conftest*
4964   eval "ac_cv_func_$ac_func=no"
4965 fi
4966 rm -f conftest*
4967 fi
4968
4969 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4970   echo "$ac_t""yes" 1>&6
4971     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4972   cat >> confdefs.h <<EOF
4973 #define $ac_tr_func 1
4974 EOF
4975  
4976 else
4977   echo "$ac_t""no" 1>&6
4978 fi
4979 done
4980
4981 if test x"$ac_cv_func_connect" = x"no"; then
4982     case "$LIBS" in
4983     *-lnsl*) ;;
4984     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4985 echo "configure:4986: checking for printf in -lnsl_s" >&5
4986 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4987 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4988   echo $ac_n "(cached) $ac_c" 1>&6
4989 else
4990   ac_save_LIBS="$LIBS"
4991 LIBS="-lnsl_s  $LIBS"
4992 cat > conftest.$ac_ext <<EOF
4993 #line 4994 "configure"
4994 #include "confdefs.h"
4995 /* Override any gcc2 internal prototype to avoid an error.  */
4996 /* We use char because int might match the return type of a gcc2
4997     builtin and then its argument prototype would still apply.  */
4998 char printf();
4999
5000 int main() {
5001 printf()
5002 ; return 0; }
5003 EOF
5004 if { (eval echo configure:5005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5005   rm -rf conftest*
5006   eval "ac_cv_lib_$ac_lib_var=yes"
5007 else
5008   echo "configure: failed program was:" >&5
5009   cat conftest.$ac_ext >&5
5010   rm -rf conftest*
5011   eval "ac_cv_lib_$ac_lib_var=no"
5012 fi
5013 rm -f conftest*
5014 LIBS="$ac_save_LIBS"
5015
5016 fi
5017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5018   echo "$ac_t""yes" 1>&6
5019     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5020     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5021   cat >> confdefs.h <<EOF
5022 #define $ac_tr_lib 1
5023 EOF
5024
5025   LIBS="-lnsl_s $LIBS"
5026
5027 else
5028   echo "$ac_t""no" 1>&6
5029 fi
5030  ;;
5031     esac
5032     case "$LIBS" in
5033     *-lnsl*) ;;
5034     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
5035 echo "configure:5036: checking for printf in -lnsl" >&5
5036 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
5037 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5038   echo $ac_n "(cached) $ac_c" 1>&6
5039 else
5040   ac_save_LIBS="$LIBS"
5041 LIBS="-lnsl  $LIBS"
5042 cat > conftest.$ac_ext <<EOF
5043 #line 5044 "configure"
5044 #include "confdefs.h"
5045 /* Override any gcc2 internal prototype to avoid an error.  */
5046 /* We use char because int might match the return type of a gcc2
5047     builtin and then its argument prototype would still apply.  */
5048 char printf();
5049
5050 int main() {
5051 printf()
5052 ; return 0; }
5053 EOF
5054 if { (eval echo configure:5055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5055   rm -rf conftest*
5056   eval "ac_cv_lib_$ac_lib_var=yes"
5057 else
5058   echo "configure: failed program was:" >&5
5059   cat conftest.$ac_ext >&5
5060   rm -rf conftest*
5061   eval "ac_cv_lib_$ac_lib_var=no"
5062 fi
5063 rm -f conftest*
5064 LIBS="$ac_save_LIBS"
5065
5066 fi
5067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5068   echo "$ac_t""yes" 1>&6
5069     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5070     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5071   cat >> confdefs.h <<EOF
5072 #define $ac_tr_lib 1
5073 EOF
5074
5075   LIBS="-lnsl $LIBS"
5076
5077 else
5078   echo "$ac_t""no" 1>&6
5079 fi
5080  ;;
5081     esac
5082     case "$LIBS" in
5083     *-lsocket*) ;;
5084     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5085 echo "configure:5086: checking for connect in -lsocket" >&5
5086 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5087 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5088   echo $ac_n "(cached) $ac_c" 1>&6
5089 else
5090   ac_save_LIBS="$LIBS"
5091 LIBS="-lsocket  $LIBS"
5092 cat > conftest.$ac_ext <<EOF
5093 #line 5094 "configure"
5094 #include "confdefs.h"
5095 /* Override any gcc2 internal prototype to avoid an error.  */
5096 /* We use char because int might match the return type of a gcc2
5097     builtin and then its argument prototype would still apply.  */
5098 char connect();
5099
5100 int main() {
5101 connect()
5102 ; return 0; }
5103 EOF
5104 if { (eval echo configure:5105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5105   rm -rf conftest*
5106   eval "ac_cv_lib_$ac_lib_var=yes"
5107 else
5108   echo "configure: failed program was:" >&5
5109   cat conftest.$ac_ext >&5
5110   rm -rf conftest*
5111   eval "ac_cv_lib_$ac_lib_var=no"
5112 fi
5113 rm -f conftest*
5114 LIBS="$ac_save_LIBS"
5115
5116 fi
5117 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5118   echo "$ac_t""yes" 1>&6
5119     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5120     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5121   cat >> confdefs.h <<EOF
5122 #define $ac_tr_lib 1
5123 EOF
5124
5125   LIBS="-lsocket $LIBS"
5126
5127 else
5128   echo "$ac_t""no" 1>&6
5129 fi
5130  ;;
5131     esac
5132     case "$LIBS" in
5133     *-linet*) ;;
5134     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
5135 echo "configure:5136: checking for connect in -linet" >&5
5136 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
5137 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5138   echo $ac_n "(cached) $ac_c" 1>&6
5139 else
5140   ac_save_LIBS="$LIBS"
5141 LIBS="-linet  $LIBS"
5142 cat > conftest.$ac_ext <<EOF
5143 #line 5144 "configure"
5144 #include "confdefs.h"
5145 /* Override any gcc2 internal prototype to avoid an error.  */
5146 /* We use char because int might match the return type of a gcc2
5147     builtin and then its argument prototype would still apply.  */
5148 char connect();
5149
5150 int main() {
5151 connect()
5152 ; return 0; }
5153 EOF
5154 if { (eval echo configure:5155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5155   rm -rf conftest*
5156   eval "ac_cv_lib_$ac_lib_var=yes"
5157 else
5158   echo "configure: failed program was:" >&5
5159   cat conftest.$ac_ext >&5
5160   rm -rf conftest*
5161   eval "ac_cv_lib_$ac_lib_var=no"
5162 fi
5163 rm -f conftest*
5164 LIBS="$ac_save_LIBS"
5165
5166 fi
5167 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5168   echo "$ac_t""yes" 1>&6
5169     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5170     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5171   cat >> confdefs.h <<EOF
5172 #define $ac_tr_lib 1
5173 EOF
5174
5175   LIBS="-linet $LIBS"
5176
5177 else
5178   echo "$ac_t""no" 1>&6
5179 fi
5180  ;;
5181     esac
5182             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
5183        test x"$ac_cv_lib_inet_connect" = x"yes"; then
5184         # ac_cv_func_connect=yes
5185         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
5186         cat >> confdefs.h <<\EOF
5187 #define HAVE_CONNECT 1
5188 EOF
5189
5190     fi
5191 fi
5192
5193 ###############################################
5194 # test for where we get get_yp_default_domain() from
5195 for ac_func in yp_get_default_domain
5196 do
5197 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5198 echo "configure:5199: checking for $ac_func" >&5
5199 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5200   echo $ac_n "(cached) $ac_c" 1>&6
5201 else
5202   cat > conftest.$ac_ext <<EOF
5203 #line 5204 "configure"
5204 #include "confdefs.h"
5205 /* System header to define __stub macros and hopefully few prototypes,
5206     which can conflict with char $ac_func(); below.  */
5207 #include <assert.h>
5208 /* Override any gcc2 internal prototype to avoid an error.  */
5209 /* We use char because int might match the return type of a gcc2
5210     builtin and then its argument prototype would still apply.  */
5211 char $ac_func();
5212
5213 int main() {
5214
5215 /* The GNU C library defines this for functions which it implements
5216     to always fail with ENOSYS.  Some functions are actually named
5217     something starting with __ and the normal name is an alias.  */
5218 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5219 choke me
5220 #else
5221 $ac_func();
5222 #endif
5223
5224 ; return 0; }
5225 EOF
5226 if { (eval echo configure:5227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5227   rm -rf conftest*
5228   eval "ac_cv_func_$ac_func=yes"
5229 else
5230   echo "configure: failed program was:" >&5
5231   cat conftest.$ac_ext >&5
5232   rm -rf conftest*
5233   eval "ac_cv_func_$ac_func=no"
5234 fi
5235 rm -f conftest*
5236 fi
5237
5238 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5239   echo "$ac_t""yes" 1>&6
5240     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5241   cat >> confdefs.h <<EOF
5242 #define $ac_tr_func 1
5243 EOF
5244  
5245 else
5246   echo "$ac_t""no" 1>&6
5247 fi
5248 done
5249
5250 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5251         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5252 echo "configure:5253: checking for yp_get_default_domain in -lnsl" >&5
5253 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5254 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5255   echo $ac_n "(cached) $ac_c" 1>&6
5256 else
5257   ac_save_LIBS="$LIBS"
5258 LIBS="-lnsl  $LIBS"
5259 cat > conftest.$ac_ext <<EOF
5260 #line 5261 "configure"
5261 #include "confdefs.h"
5262 /* Override any gcc2 internal prototype to avoid an error.  */
5263 /* We use char because int might match the return type of a gcc2
5264     builtin and then its argument prototype would still apply.  */
5265 char yp_get_default_domain();
5266
5267 int main() {
5268 yp_get_default_domain()
5269 ; return 0; }
5270 EOF
5271 if { (eval echo configure:5272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5272   rm -rf conftest*
5273   eval "ac_cv_lib_$ac_lib_var=yes"
5274 else
5275   echo "configure: failed program was:" >&5
5276   cat conftest.$ac_ext >&5
5277   rm -rf conftest*
5278   eval "ac_cv_lib_$ac_lib_var=no"
5279 fi
5280 rm -f conftest*
5281 LIBS="$ac_save_LIBS"
5282
5283 fi
5284 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5285   echo "$ac_t""yes" 1>&6
5286   LIBS="$LIBS -lnsl";
5287         cat >> confdefs.h <<\EOF
5288 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5289 EOF
5290
5291 else
5292   echo "$ac_t""no" 1>&6
5293 fi
5294  
5295 fi
5296
5297 # Check if we have execl, if not we need to compile smbrun.
5298 for ac_func in execl
5299 do
5300 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5301 echo "configure:5302: checking for $ac_func" >&5
5302 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5303   echo $ac_n "(cached) $ac_c" 1>&6
5304 else
5305   cat > conftest.$ac_ext <<EOF
5306 #line 5307 "configure"
5307 #include "confdefs.h"
5308 /* System header to define __stub macros and hopefully few prototypes,
5309     which can conflict with char $ac_func(); below.  */
5310 #include <assert.h>
5311 /* Override any gcc2 internal prototype to avoid an error.  */
5312 /* We use char because int might match the return type of a gcc2
5313     builtin and then its argument prototype would still apply.  */
5314 char $ac_func();
5315
5316 int main() {
5317
5318 /* The GNU C library defines this for functions which it implements
5319     to always fail with ENOSYS.  Some functions are actually named
5320     something starting with __ and the normal name is an alias.  */
5321 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5322 choke me
5323 #else
5324 $ac_func();
5325 #endif
5326
5327 ; return 0; }
5328 EOF
5329 if { (eval echo configure:5330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5330   rm -rf conftest*
5331   eval "ac_cv_func_$ac_func=yes"
5332 else
5333   echo "configure: failed program was:" >&5
5334   cat conftest.$ac_ext >&5
5335   rm -rf conftest*
5336   eval "ac_cv_func_$ac_func=no"
5337 fi
5338 rm -f conftest*
5339 fi
5340
5341 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5342   echo "$ac_t""yes" 1>&6
5343     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5344   cat >> confdefs.h <<EOF
5345 #define $ac_tr_func 1
5346 EOF
5347  
5348 else
5349   echo "$ac_t""no" 1>&6
5350 fi
5351 done
5352
5353 if test x"$ac_cv_func_execl" = x"no"; then
5354     RUNPROG="bin/smbrun"
5355 else
5356     RUNPROG=""
5357 fi
5358
5359 for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot
5360 do
5361 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5362 echo "configure:5363: checking for $ac_func" >&5
5363 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5364   echo $ac_n "(cached) $ac_c" 1>&6
5365 else
5366   cat > conftest.$ac_ext <<EOF
5367 #line 5368 "configure"
5368 #include "confdefs.h"
5369 /* System header to define __stub macros and hopefully few prototypes,
5370     which can conflict with char $ac_func(); below.  */
5371 #include <assert.h>
5372 /* Override any gcc2 internal prototype to avoid an error.  */
5373 /* We use char because int might match the return type of a gcc2
5374     builtin and then its argument prototype would still apply.  */
5375 char $ac_func();
5376
5377 int main() {
5378
5379 /* The GNU C library defines this for functions which it implements
5380     to always fail with ENOSYS.  Some functions are actually named
5381     something starting with __ and the normal name is an alias.  */
5382 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5383 choke me
5384 #else
5385 $ac_func();
5386 #endif
5387
5388 ; return 0; }
5389 EOF
5390 if { (eval echo configure:5391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5391   rm -rf conftest*
5392   eval "ac_cv_func_$ac_func=yes"
5393 else
5394   echo "configure: failed program was:" >&5
5395   cat conftest.$ac_ext >&5
5396   rm -rf conftest*
5397   eval "ac_cv_func_$ac_func=no"
5398 fi
5399 rm -f conftest*
5400 fi
5401
5402 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5403   echo "$ac_t""yes" 1>&6
5404     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5405   cat >> confdefs.h <<EOF
5406 #define $ac_tr_func 1
5407 EOF
5408  
5409 else
5410   echo "$ac_t""no" 1>&6
5411 fi
5412 done
5413
5414 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset
5415 do
5416 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5417 echo "configure:5418: checking for $ac_func" >&5
5418 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5419   echo $ac_n "(cached) $ac_c" 1>&6
5420 else
5421   cat > conftest.$ac_ext <<EOF
5422 #line 5423 "configure"
5423 #include "confdefs.h"
5424 /* System header to define __stub macros and hopefully few prototypes,
5425     which can conflict with char $ac_func(); below.  */
5426 #include <assert.h>
5427 /* Override any gcc2 internal prototype to avoid an error.  */
5428 /* We use char because int might match the return type of a gcc2
5429     builtin and then its argument prototype would still apply.  */
5430 char $ac_func();
5431
5432 int main() {
5433
5434 /* The GNU C library defines this for functions which it implements
5435     to always fail with ENOSYS.  Some functions are actually named
5436     something starting with __ and the normal name is an alias.  */
5437 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5438 choke me
5439 #else
5440 $ac_func();
5441 #endif
5442
5443 ; return 0; }
5444 EOF
5445 if { (eval echo configure:5446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5446   rm -rf conftest*
5447   eval "ac_cv_func_$ac_func=yes"
5448 else
5449   echo "configure: failed program was:" >&5
5450   cat conftest.$ac_ext >&5
5451   rm -rf conftest*
5452   eval "ac_cv_func_$ac_func=no"
5453 fi
5454 rm -f conftest*
5455 fi
5456
5457 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5458   echo "$ac_t""yes" 1>&6
5459     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5460   cat >> confdefs.h <<EOF
5461 #define $ac_tr_func 1
5462 EOF
5463  
5464 else
5465   echo "$ac_t""no" 1>&6
5466 fi
5467 done
5468
5469 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5470 do
5471 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5472 echo "configure:5473: checking for $ac_func" >&5
5473 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5474   echo $ac_n "(cached) $ac_c" 1>&6
5475 else
5476   cat > conftest.$ac_ext <<EOF
5477 #line 5478 "configure"
5478 #include "confdefs.h"
5479 /* System header to define __stub macros and hopefully few prototypes,
5480     which can conflict with char $ac_func(); below.  */
5481 #include <assert.h>
5482 /* Override any gcc2 internal prototype to avoid an error.  */
5483 /* We use char because int might match the return type of a gcc2
5484     builtin and then its argument prototype would still apply.  */
5485 char $ac_func();
5486
5487 int main() {
5488
5489 /* The GNU C library defines this for functions which it implements
5490     to always fail with ENOSYS.  Some functions are actually named
5491     something starting with __ and the normal name is an alias.  */
5492 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5493 choke me
5494 #else
5495 $ac_func();
5496 #endif
5497
5498 ; return 0; }
5499 EOF
5500 if { (eval echo configure:5501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5501   rm -rf conftest*
5502   eval "ac_cv_func_$ac_func=yes"
5503 else
5504   echo "configure: failed program was:" >&5
5505   cat conftest.$ac_ext >&5
5506   rm -rf conftest*
5507   eval "ac_cv_func_$ac_func=no"
5508 fi
5509 rm -f conftest*
5510 fi
5511
5512 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5513   echo "$ac_t""yes" 1>&6
5514     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5515   cat >> confdefs.h <<EOF
5516 #define $ac_tr_func 1
5517 EOF
5518  
5519 else
5520   echo "$ac_t""no" 1>&6
5521 fi
5522 done
5523
5524 for ac_func in strftime sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent
5525 do
5526 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5527 echo "configure:5528: checking for $ac_func" >&5
5528 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5529   echo $ac_n "(cached) $ac_c" 1>&6
5530 else
5531   cat > conftest.$ac_ext <<EOF
5532 #line 5533 "configure"
5533 #include "confdefs.h"
5534 /* System header to define __stub macros and hopefully few prototypes,
5535     which can conflict with char $ac_func(); below.  */
5536 #include <assert.h>
5537 /* Override any gcc2 internal prototype to avoid an error.  */
5538 /* We use char because int might match the return type of a gcc2
5539     builtin and then its argument prototype would still apply.  */
5540 char $ac_func();
5541
5542 int main() {
5543
5544 /* The GNU C library defines this for functions which it implements
5545     to always fail with ENOSYS.  Some functions are actually named
5546     something starting with __ and the normal name is an alias.  */
5547 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5548 choke me
5549 #else
5550 $ac_func();
5551 #endif
5552
5553 ; return 0; }
5554 EOF
5555 if { (eval echo configure:5556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5556   rm -rf conftest*
5557   eval "ac_cv_func_$ac_func=yes"
5558 else
5559   echo "configure: failed program was:" >&5
5560   cat conftest.$ac_ext >&5
5561   rm -rf conftest*
5562   eval "ac_cv_func_$ac_func=no"
5563 fi
5564 rm -f conftest*
5565 fi
5566
5567 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5568   echo "$ac_t""yes" 1>&6
5569     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5570   cat >> confdefs.h <<EOF
5571 #define $ac_tr_func 1
5572 EOF
5573  
5574 else
5575   echo "$ac_t""no" 1>&6
5576 fi
5577 done
5578
5579 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
5580 do
5581 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5582 echo "configure:5583: checking for $ac_func" >&5
5583 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5584   echo $ac_n "(cached) $ac_c" 1>&6
5585 else
5586   cat > conftest.$ac_ext <<EOF
5587 #line 5588 "configure"
5588 #include "confdefs.h"
5589 /* System header to define __stub macros and hopefully few prototypes,
5590     which can conflict with char $ac_func(); below.  */
5591 #include <assert.h>
5592 /* Override any gcc2 internal prototype to avoid an error.  */
5593 /* We use char because int might match the return type of a gcc2
5594     builtin and then its argument prototype would still apply.  */
5595 char $ac_func();
5596
5597 int main() {
5598
5599 /* The GNU C library defines this for functions which it implements
5600     to always fail with ENOSYS.  Some functions are actually named
5601     something starting with __ and the normal name is an alias.  */
5602 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5603 choke me
5604 #else
5605 $ac_func();
5606 #endif
5607
5608 ; return 0; }
5609 EOF
5610 if { (eval echo configure:5611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5611   rm -rf conftest*
5612   eval "ac_cv_func_$ac_func=yes"
5613 else
5614   echo "configure: failed program was:" >&5
5615   cat conftest.$ac_ext >&5
5616   rm -rf conftest*
5617   eval "ac_cv_func_$ac_func=no"
5618 fi
5619 rm -f conftest*
5620 fi
5621
5622 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5623   echo "$ac_t""yes" 1>&6
5624     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5625   cat >> confdefs.h <<EOF
5626 #define $ac_tr_func 1
5627 EOF
5628  
5629 else
5630   echo "$ac_t""no" 1>&6
5631 fi
5632 done
5633
5634 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5635 do
5636 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5637 echo "configure:5638: checking for $ac_func" >&5
5638 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5639   echo $ac_n "(cached) $ac_c" 1>&6
5640 else
5641   cat > conftest.$ac_ext <<EOF
5642 #line 5643 "configure"
5643 #include "confdefs.h"
5644 /* System header to define __stub macros and hopefully few prototypes,
5645     which can conflict with char $ac_func(); below.  */
5646 #include <assert.h>
5647 /* Override any gcc2 internal prototype to avoid an error.  */
5648 /* We use char because int might match the return type of a gcc2
5649     builtin and then its argument prototype would still apply.  */
5650 char $ac_func();
5651
5652 int main() {
5653
5654 /* The GNU C library defines this for functions which it implements
5655     to always fail with ENOSYS.  Some functions are actually named
5656     something starting with __ and the normal name is an alias.  */
5657 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5658 choke me
5659 #else
5660 $ac_func();
5661 #endif
5662
5663 ; return 0; }
5664 EOF
5665 if { (eval echo configure:5666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5666   rm -rf conftest*
5667   eval "ac_cv_func_$ac_func=yes"
5668 else
5669   echo "configure: failed program was:" >&5
5670   cat conftest.$ac_ext >&5
5671   rm -rf conftest*
5672   eval "ac_cv_func_$ac_func=no"
5673 fi
5674 rm -f conftest*
5675 fi
5676
5677 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5678   echo "$ac_t""yes" 1>&6
5679     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5680   cat >> confdefs.h <<EOF
5681 #define $ac_tr_func 1
5682 EOF
5683  
5684 else
5685   echo "$ac_t""no" 1>&6
5686 fi
5687 done
5688
5689 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5690 do
5691 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5692 echo "configure:5693: checking for $ac_func" >&5
5693 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5694   echo $ac_n "(cached) $ac_c" 1>&6
5695 else
5696   cat > conftest.$ac_ext <<EOF
5697 #line 5698 "configure"
5698 #include "confdefs.h"
5699 /* System header to define __stub macros and hopefully few prototypes,
5700     which can conflict with char $ac_func(); below.  */
5701 #include <assert.h>
5702 /* Override any gcc2 internal prototype to avoid an error.  */
5703 /* We use char because int might match the return type of a gcc2
5704     builtin and then its argument prototype would still apply.  */
5705 char $ac_func();
5706
5707 int main() {
5708
5709 /* The GNU C library defines this for functions which it implements
5710     to always fail with ENOSYS.  Some functions are actually named
5711     something starting with __ and the normal name is an alias.  */
5712 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5713 choke me
5714 #else
5715 $ac_func();
5716 #endif
5717
5718 ; return 0; }
5719 EOF
5720 if { (eval echo configure:5721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5721   rm -rf conftest*
5722   eval "ac_cv_func_$ac_func=yes"
5723 else
5724   echo "configure: failed program was:" >&5
5725   cat conftest.$ac_ext >&5
5726   rm -rf conftest*
5727   eval "ac_cv_func_$ac_func=no"
5728 fi
5729 rm -f conftest*
5730 fi
5731
5732 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5733   echo "$ac_t""yes" 1>&6
5734     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5735   cat >> confdefs.h <<EOF
5736 #define $ac_tr_func 1
5737 EOF
5738  
5739 else
5740   echo "$ac_t""no" 1>&6
5741 fi
5742 done
5743
5744 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5745 do
5746 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5747 echo "configure:5748: checking for $ac_func" >&5
5748 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5749   echo $ac_n "(cached) $ac_c" 1>&6
5750 else
5751   cat > conftest.$ac_ext <<EOF
5752 #line 5753 "configure"
5753 #include "confdefs.h"
5754 /* System header to define __stub macros and hopefully few prototypes,
5755     which can conflict with char $ac_func(); below.  */
5756 #include <assert.h>
5757 /* Override any gcc2 internal prototype to avoid an error.  */
5758 /* We use char because int might match the return type of a gcc2
5759     builtin and then its argument prototype would still apply.  */
5760 char $ac_func();
5761
5762 int main() {
5763
5764 /* The GNU C library defines this for functions which it implements
5765     to always fail with ENOSYS.  Some functions are actually named
5766     something starting with __ and the normal name is an alias.  */
5767 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5768 choke me
5769 #else
5770 $ac_func();
5771 #endif
5772
5773 ; return 0; }
5774 EOF
5775 if { (eval echo configure:5776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5776   rm -rf conftest*
5777   eval "ac_cv_func_$ac_func=yes"
5778 else
5779   echo "configure: failed program was:" >&5
5780   cat conftest.$ac_ext >&5
5781   rm -rf conftest*
5782   eval "ac_cv_func_$ac_func=no"
5783 fi
5784 rm -f conftest*
5785 fi
5786
5787 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5788   echo "$ac_t""yes" 1>&6
5789     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5790   cat >> confdefs.h <<EOF
5791 #define $ac_tr_func 1
5792 EOF
5793  
5794 else
5795   echo "$ac_t""no" 1>&6
5796 fi
5797 done
5798
5799 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5800 do
5801 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5802 echo "configure:5803: checking for $ac_func" >&5
5803 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5804   echo $ac_n "(cached) $ac_c" 1>&6
5805 else
5806   cat > conftest.$ac_ext <<EOF
5807 #line 5808 "configure"
5808 #include "confdefs.h"
5809 /* System header to define __stub macros and hopefully few prototypes,
5810     which can conflict with char $ac_func(); below.  */
5811 #include <assert.h>
5812 /* Override any gcc2 internal prototype to avoid an error.  */
5813 /* We use char because int might match the return type of a gcc2
5814     builtin and then its argument prototype would still apply.  */
5815 char $ac_func();
5816
5817 int main() {
5818
5819 /* The GNU C library defines this for functions which it implements
5820     to always fail with ENOSYS.  Some functions are actually named
5821     something starting with __ and the normal name is an alias.  */
5822 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5823 choke me
5824 #else
5825 $ac_func();
5826 #endif
5827
5828 ; return 0; }
5829 EOF
5830 if { (eval echo configure:5831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5831   rm -rf conftest*
5832   eval "ac_cv_func_$ac_func=yes"
5833 else
5834   echo "configure: failed program was:" >&5
5835   cat conftest.$ac_ext >&5
5836   rm -rf conftest*
5837   eval "ac_cv_func_$ac_func=no"
5838 fi
5839 rm -f conftest*
5840 fi
5841
5842 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5843   echo "$ac_t""yes" 1>&6
5844     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5845   cat >> confdefs.h <<EOF
5846 #define $ac_tr_func 1
5847 EOF
5848  
5849 else
5850   echo "$ac_t""no" 1>&6
5851 fi
5852 done
5853
5854 # setbuffer is needed for smbtorture
5855 for ac_func in setbuffer
5856 do
5857 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5858 echo "configure:5859: checking for $ac_func" >&5
5859 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5860   echo $ac_n "(cached) $ac_c" 1>&6
5861 else
5862   cat > conftest.$ac_ext <<EOF
5863 #line 5864 "configure"
5864 #include "confdefs.h"
5865 /* System header to define __stub macros and hopefully few prototypes,
5866     which can conflict with char $ac_func(); below.  */
5867 #include <assert.h>
5868 /* Override any gcc2 internal prototype to avoid an error.  */
5869 /* We use char because int might match the return type of a gcc2
5870     builtin and then its argument prototype would still apply.  */
5871 char $ac_func();
5872
5873 int main() {
5874
5875 /* The GNU C library defines this for functions which it implements
5876     to always fail with ENOSYS.  Some functions are actually named
5877     something starting with __ and the normal name is an alias.  */
5878 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5879 choke me
5880 #else
5881 $ac_func();
5882 #endif
5883
5884 ; return 0; }
5885 EOF
5886 if { (eval echo configure:5887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5887   rm -rf conftest*
5888   eval "ac_cv_func_$ac_func=yes"
5889 else
5890   echo "configure: failed program was:" >&5
5891   cat conftest.$ac_ext >&5
5892   rm -rf conftest*
5893   eval "ac_cv_func_$ac_func=no"
5894 fi
5895 rm -f conftest*
5896 fi
5897
5898 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5899   echo "$ac_t""yes" 1>&6
5900     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5901   cat >> confdefs.h <<EOF
5902 #define $ac_tr_func 1
5903 EOF
5904  
5905 else
5906   echo "$ac_t""no" 1>&6
5907 fi
5908 done
5909
5910
5911 # syscall() is needed for smbwrapper.
5912 for ac_func in syscall
5913 do
5914 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5915 echo "configure:5916: checking for $ac_func" >&5
5916 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5917   echo $ac_n "(cached) $ac_c" 1>&6
5918 else
5919   cat > conftest.$ac_ext <<EOF
5920 #line 5921 "configure"
5921 #include "confdefs.h"
5922 /* System header to define __stub macros and hopefully few prototypes,
5923     which can conflict with char $ac_func(); below.  */
5924 #include <assert.h>
5925 /* Override any gcc2 internal prototype to avoid an error.  */
5926 /* We use char because int might match the return type of a gcc2
5927     builtin and then its argument prototype would still apply.  */
5928 char $ac_func();
5929
5930 int main() {
5931
5932 /* The GNU C library defines this for functions which it implements
5933     to always fail with ENOSYS.  Some functions are actually named
5934     something starting with __ and the normal name is an alias.  */
5935 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5936 choke me
5937 #else
5938 $ac_func();
5939 #endif
5940
5941 ; return 0; }
5942 EOF
5943 if { (eval echo configure:5944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5944   rm -rf conftest*
5945   eval "ac_cv_func_$ac_func=yes"
5946 else
5947   echo "configure: failed program was:" >&5
5948   cat conftest.$ac_ext >&5
5949   rm -rf conftest*
5950   eval "ac_cv_func_$ac_func=no"
5951 fi
5952 rm -f conftest*
5953 fi
5954
5955 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5956   echo "$ac_t""yes" 1>&6
5957     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5958   cat >> confdefs.h <<EOF
5959 #define $ac_tr_func 1
5960 EOF
5961  
5962 else
5963   echo "$ac_t""no" 1>&6
5964 fi
5965 done
5966
5967
5968 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5969 do
5970 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5971 echo "configure:5972: checking for $ac_func" >&5
5972 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5973   echo $ac_n "(cached) $ac_c" 1>&6
5974 else
5975   cat > conftest.$ac_ext <<EOF
5976 #line 5977 "configure"
5977 #include "confdefs.h"
5978 /* System header to define __stub macros and hopefully few prototypes,
5979     which can conflict with char $ac_func(); below.  */
5980 #include <assert.h>
5981 /* Override any gcc2 internal prototype to avoid an error.  */
5982 /* We use char because int might match the return type of a gcc2
5983     builtin and then its argument prototype would still apply.  */
5984 char $ac_func();
5985
5986 int main() {
5987
5988 /* The GNU C library defines this for functions which it implements
5989     to always fail with ENOSYS.  Some functions are actually named
5990     something starting with __ and the normal name is an alias.  */
5991 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5992 choke me
5993 #else
5994 $ac_func();
5995 #endif
5996
5997 ; return 0; }
5998 EOF
5999 if { (eval echo configure:6000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6000   rm -rf conftest*
6001   eval "ac_cv_func_$ac_func=yes"
6002 else
6003   echo "configure: failed program was:" >&5
6004   cat conftest.$ac_ext >&5
6005   rm -rf conftest*
6006   eval "ac_cv_func_$ac_func=no"
6007 fi
6008 rm -f conftest*
6009 fi
6010
6011 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6012   echo "$ac_t""yes" 1>&6
6013     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6014   cat >> confdefs.h <<EOF
6015 #define $ac_tr_func 1
6016 EOF
6017  
6018 else
6019   echo "$ac_t""no" 1>&6
6020 fi
6021 done
6022
6023 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
6024 do
6025 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6026 echo "configure:6027: checking for $ac_func" >&5
6027 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6028   echo $ac_n "(cached) $ac_c" 1>&6
6029 else
6030   cat > conftest.$ac_ext <<EOF
6031 #line 6032 "configure"
6032 #include "confdefs.h"
6033 /* System header to define __stub macros and hopefully few prototypes,
6034     which can conflict with char $ac_func(); below.  */
6035 #include <assert.h>
6036 /* Override any gcc2 internal prototype to avoid an error.  */
6037 /* We use char because int might match the return type of a gcc2
6038     builtin and then its argument prototype would still apply.  */
6039 char $ac_func();
6040
6041 int main() {
6042
6043 /* The GNU C library defines this for functions which it implements
6044     to always fail with ENOSYS.  Some functions are actually named
6045     something starting with __ and the normal name is an alias.  */
6046 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6047 choke me
6048 #else
6049 $ac_func();
6050 #endif
6051
6052 ; return 0; }
6053 EOF
6054 if { (eval echo configure:6055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6055   rm -rf conftest*
6056   eval "ac_cv_func_$ac_func=yes"
6057 else
6058   echo "configure: failed program was:" >&5
6059   cat conftest.$ac_ext >&5
6060   rm -rf conftest*
6061   eval "ac_cv_func_$ac_func=no"
6062 fi
6063 rm -f conftest*
6064 fi
6065
6066 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6067   echo "$ac_t""yes" 1>&6
6068     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6069   cat >> confdefs.h <<EOF
6070 #define $ac_tr_func 1
6071 EOF
6072  
6073 else
6074   echo "$ac_t""no" 1>&6
6075 fi
6076 done
6077
6078 for ac_func in __getcwd _getcwd
6079 do
6080 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6081 echo "configure:6082: checking for $ac_func" >&5
6082 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6083   echo $ac_n "(cached) $ac_c" 1>&6
6084 else
6085   cat > conftest.$ac_ext <<EOF
6086 #line 6087 "configure"
6087 #include "confdefs.h"
6088 /* System header to define __stub macros and hopefully few prototypes,
6089     which can conflict with char $ac_func(); below.  */
6090 #include <assert.h>
6091 /* Override any gcc2 internal prototype to avoid an error.  */
6092 /* We use char because int might match the return type of a gcc2
6093     builtin and then its argument prototype would still apply.  */
6094 char $ac_func();
6095
6096 int main() {
6097
6098 /* The GNU C library defines this for functions which it implements
6099     to always fail with ENOSYS.  Some functions are actually named
6100     something starting with __ and the normal name is an alias.  */
6101 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6102 choke me
6103 #else
6104 $ac_func();
6105 #endif
6106
6107 ; return 0; }
6108 EOF
6109 if { (eval echo configure:6110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6110   rm -rf conftest*
6111   eval "ac_cv_func_$ac_func=yes"
6112 else
6113   echo "configure: failed program was:" >&5
6114   cat conftest.$ac_ext >&5
6115   rm -rf conftest*
6116   eval "ac_cv_func_$ac_func=no"
6117 fi
6118 rm -f conftest*
6119 fi
6120
6121 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6122   echo "$ac_t""yes" 1>&6
6123     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6124   cat >> confdefs.h <<EOF
6125 #define $ac_tr_func 1
6126 EOF
6127  
6128 else
6129   echo "$ac_t""no" 1>&6
6130 fi
6131 done
6132
6133 for ac_func in __xstat __fxstat __lxstat
6134 do
6135 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6136 echo "configure:6137: checking for $ac_func" >&5
6137 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6138   echo $ac_n "(cached) $ac_c" 1>&6
6139 else
6140   cat > conftest.$ac_ext <<EOF
6141 #line 6142 "configure"
6142 #include "confdefs.h"
6143 /* System header to define __stub macros and hopefully few prototypes,
6144     which can conflict with char $ac_func(); below.  */
6145 #include <assert.h>
6146 /* Override any gcc2 internal prototype to avoid an error.  */
6147 /* We use char because int might match the return type of a gcc2
6148     builtin and then its argument prototype would still apply.  */
6149 char $ac_func();
6150
6151 int main() {
6152
6153 /* The GNU C library defines this for functions which it implements
6154     to always fail with ENOSYS.  Some functions are actually named
6155     something starting with __ and the normal name is an alias.  */
6156 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6157 choke me
6158 #else
6159 $ac_func();
6160 #endif
6161
6162 ; return 0; }
6163 EOF
6164 if { (eval echo configure:6165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6165   rm -rf conftest*
6166   eval "ac_cv_func_$ac_func=yes"
6167 else
6168   echo "configure: failed program was:" >&5
6169   cat conftest.$ac_ext >&5
6170   rm -rf conftest*
6171   eval "ac_cv_func_$ac_func=no"
6172 fi
6173 rm -f conftest*
6174 fi
6175
6176 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6177   echo "$ac_t""yes" 1>&6
6178     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6179   cat >> confdefs.h <<EOF
6180 #define $ac_tr_func 1
6181 EOF
6182  
6183 else
6184   echo "$ac_t""no" 1>&6
6185 fi
6186 done
6187
6188 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6189 do
6190 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6191 echo "configure:6192: checking for $ac_func" >&5
6192 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6193   echo $ac_n "(cached) $ac_c" 1>&6
6194 else
6195   cat > conftest.$ac_ext <<EOF
6196 #line 6197 "configure"
6197 #include "confdefs.h"
6198 /* System header to define __stub macros and hopefully few prototypes,
6199     which can conflict with char $ac_func(); below.  */
6200 #include <assert.h>
6201 /* Override any gcc2 internal prototype to avoid an error.  */
6202 /* We use char because int might match the return type of a gcc2
6203     builtin and then its argument prototype would still apply.  */
6204 char $ac_func();
6205
6206 int main() {
6207
6208 /* The GNU C library defines this for functions which it implements
6209     to always fail with ENOSYS.  Some functions are actually named
6210     something starting with __ and the normal name is an alias.  */
6211 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6212 choke me
6213 #else
6214 $ac_func();
6215 #endif
6216
6217 ; return 0; }
6218 EOF
6219 if { (eval echo configure:6220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6220   rm -rf conftest*
6221   eval "ac_cv_func_$ac_func=yes"
6222 else
6223   echo "configure: failed program was:" >&5
6224   cat conftest.$ac_ext >&5
6225   rm -rf conftest*
6226   eval "ac_cv_func_$ac_func=no"
6227 fi
6228 rm -f conftest*
6229 fi
6230
6231 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6232   echo "$ac_t""yes" 1>&6
6233     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6234   cat >> confdefs.h <<EOF
6235 #define $ac_tr_func 1
6236 EOF
6237  
6238 else
6239   echo "$ac_t""no" 1>&6
6240 fi
6241 done
6242
6243 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6244 do
6245 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6246 echo "configure:6247: checking for $ac_func" >&5
6247 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6248   echo $ac_n "(cached) $ac_c" 1>&6
6249 else
6250   cat > conftest.$ac_ext <<EOF
6251 #line 6252 "configure"
6252 #include "confdefs.h"
6253 /* System header to define __stub macros and hopefully few prototypes,
6254     which can conflict with char $ac_func(); below.  */
6255 #include <assert.h>
6256 /* Override any gcc2 internal prototype to avoid an error.  */
6257 /* We use char because int might match the return type of a gcc2
6258     builtin and then its argument prototype would still apply.  */
6259 char $ac_func();
6260
6261 int main() {
6262
6263 /* The GNU C library defines this for functions which it implements
6264     to always fail with ENOSYS.  Some functions are actually named
6265     something starting with __ and the normal name is an alias.  */
6266 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6267 choke me
6268 #else
6269 $ac_func();
6270 #endif
6271
6272 ; return 0; }
6273 EOF
6274 if { (eval echo configure:6275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6275   rm -rf conftest*
6276   eval "ac_cv_func_$ac_func=yes"
6277 else
6278   echo "configure: failed program was:" >&5
6279   cat conftest.$ac_ext >&5
6280   rm -rf conftest*
6281   eval "ac_cv_func_$ac_func=no"
6282 fi
6283 rm -f conftest*
6284 fi
6285
6286 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6287   echo "$ac_t""yes" 1>&6
6288     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6289   cat >> confdefs.h <<EOF
6290 #define $ac_tr_func 1
6291 EOF
6292  
6293 else
6294   echo "$ac_t""no" 1>&6
6295 fi
6296 done
6297
6298 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6299 do
6300 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6301 echo "configure:6302: checking for $ac_func" >&5
6302 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6303   echo $ac_n "(cached) $ac_c" 1>&6
6304 else
6305   cat > conftest.$ac_ext <<EOF
6306 #line 6307 "configure"
6307 #include "confdefs.h"
6308 /* System header to define __stub macros and hopefully few prototypes,
6309     which can conflict with char $ac_func(); below.  */
6310 #include <assert.h>
6311 /* Override any gcc2 internal prototype to avoid an error.  */
6312 /* We use char because int might match the return type of a gcc2
6313     builtin and then its argument prototype would still apply.  */
6314 char $ac_func();
6315
6316 int main() {
6317
6318 /* The GNU C library defines this for functions which it implements
6319     to always fail with ENOSYS.  Some functions are actually named
6320     something starting with __ and the normal name is an alias.  */
6321 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6322 choke me
6323 #else
6324 $ac_func();
6325 #endif
6326
6327 ; return 0; }
6328 EOF
6329 if { (eval echo configure:6330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6330   rm -rf conftest*
6331   eval "ac_cv_func_$ac_func=yes"
6332 else
6333   echo "configure: failed program was:" >&5
6334   cat conftest.$ac_ext >&5
6335   rm -rf conftest*
6336   eval "ac_cv_func_$ac_func=no"
6337 fi
6338 rm -f conftest*
6339 fi
6340
6341 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6342   echo "$ac_t""yes" 1>&6
6343     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6344   cat >> confdefs.h <<EOF
6345 #define $ac_tr_func 1
6346 EOF
6347  
6348 else
6349   echo "$ac_t""no" 1>&6
6350 fi
6351 done
6352
6353 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6354 do
6355 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6356 echo "configure:6357: checking for $ac_func" >&5
6357 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6358   echo $ac_n "(cached) $ac_c" 1>&6
6359 else
6360   cat > conftest.$ac_ext <<EOF
6361 #line 6362 "configure"
6362 #include "confdefs.h"
6363 /* System header to define __stub macros and hopefully few prototypes,
6364     which can conflict with char $ac_func(); below.  */
6365 #include <assert.h>
6366 /* Override any gcc2 internal prototype to avoid an error.  */
6367 /* We use char because int might match the return type of a gcc2
6368     builtin and then its argument prototype would still apply.  */
6369 char $ac_func();
6370
6371 int main() {
6372
6373 /* The GNU C library defines this for functions which it implements
6374     to always fail with ENOSYS.  Some functions are actually named
6375     something starting with __ and the normal name is an alias.  */
6376 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6377 choke me
6378 #else
6379 $ac_func();
6380 #endif
6381
6382 ; return 0; }
6383 EOF
6384 if { (eval echo configure:6385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6385   rm -rf conftest*
6386   eval "ac_cv_func_$ac_func=yes"
6387 else
6388   echo "configure: failed program was:" >&5
6389   cat conftest.$ac_ext >&5
6390   rm -rf conftest*
6391   eval "ac_cv_func_$ac_func=no"
6392 fi
6393 rm -f conftest*
6394 fi
6395
6396 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6397   echo "$ac_t""yes" 1>&6
6398     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6399   cat >> confdefs.h <<EOF
6400 #define $ac_tr_func 1
6401 EOF
6402  
6403 else
6404   echo "$ac_t""no" 1>&6
6405 fi
6406 done
6407
6408 for ac_func in _write __write _fork __fork
6409 do
6410 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6411 echo "configure:6412: checking for $ac_func" >&5
6412 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6413   echo $ac_n "(cached) $ac_c" 1>&6
6414 else
6415   cat > conftest.$ac_ext <<EOF
6416 #line 6417 "configure"
6417 #include "confdefs.h"
6418 /* System header to define __stub macros and hopefully few prototypes,
6419     which can conflict with char $ac_func(); below.  */
6420 #include <assert.h>
6421 /* Override any gcc2 internal prototype to avoid an error.  */
6422 /* We use char because int might match the return type of a gcc2
6423     builtin and then its argument prototype would still apply.  */
6424 char $ac_func();
6425
6426 int main() {
6427
6428 /* The GNU C library defines this for functions which it implements
6429     to always fail with ENOSYS.  Some functions are actually named
6430     something starting with __ and the normal name is an alias.  */
6431 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6432 choke me
6433 #else
6434 $ac_func();
6435 #endif
6436
6437 ; return 0; }
6438 EOF
6439 if { (eval echo configure:6440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6440   rm -rf conftest*
6441   eval "ac_cv_func_$ac_func=yes"
6442 else
6443   echo "configure: failed program was:" >&5
6444   cat conftest.$ac_ext >&5
6445   rm -rf conftest*
6446   eval "ac_cv_func_$ac_func=no"
6447 fi
6448 rm -f conftest*
6449 fi
6450
6451 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6452   echo "$ac_t""yes" 1>&6
6453     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6454   cat >> confdefs.h <<EOF
6455 #define $ac_tr_func 1
6456 EOF
6457  
6458 else
6459   echo "$ac_t""no" 1>&6
6460 fi
6461 done
6462
6463 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6464 do
6465 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6466 echo "configure:6467: checking for $ac_func" >&5
6467 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6468   echo $ac_n "(cached) $ac_c" 1>&6
6469 else
6470   cat > conftest.$ac_ext <<EOF
6471 #line 6472 "configure"
6472 #include "confdefs.h"
6473 /* System header to define __stub macros and hopefully few prototypes,
6474     which can conflict with char $ac_func(); below.  */
6475 #include <assert.h>
6476 /* Override any gcc2 internal prototype to avoid an error.  */
6477 /* We use char because int might match the return type of a gcc2
6478     builtin and then its argument prototype would still apply.  */
6479 char $ac_func();
6480
6481 int main() {
6482
6483 /* The GNU C library defines this for functions which it implements
6484     to always fail with ENOSYS.  Some functions are actually named
6485     something starting with __ and the normal name is an alias.  */
6486 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6487 choke me
6488 #else
6489 $ac_func();
6490 #endif
6491
6492 ; return 0; }
6493 EOF
6494 if { (eval echo configure:6495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6495   rm -rf conftest*
6496   eval "ac_cv_func_$ac_func=yes"
6497 else
6498   echo "configure: failed program was:" >&5
6499   cat conftest.$ac_ext >&5
6500   rm -rf conftest*
6501   eval "ac_cv_func_$ac_func=no"
6502 fi
6503 rm -f conftest*
6504 fi
6505
6506 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6507   echo "$ac_t""yes" 1>&6
6508     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6509   cat >> confdefs.h <<EOF
6510 #define $ac_tr_func 1
6511 EOF
6512  
6513 else
6514   echo "$ac_t""no" 1>&6
6515 fi
6516 done
6517
6518 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6519 do
6520 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6521 echo "configure:6522: checking for $ac_func" >&5
6522 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6523   echo $ac_n "(cached) $ac_c" 1>&6
6524 else
6525   cat > conftest.$ac_ext <<EOF
6526 #line 6527 "configure"
6527 #include "confdefs.h"
6528 /* System header to define __stub macros and hopefully few prototypes,
6529     which can conflict with char $ac_func(); below.  */
6530 #include <assert.h>
6531 /* Override any gcc2 internal prototype to avoid an error.  */
6532 /* We use char because int might match the return type of a gcc2
6533     builtin and then its argument prototype would still apply.  */
6534 char $ac_func();
6535
6536 int main() {
6537
6538 /* The GNU C library defines this for functions which it implements
6539     to always fail with ENOSYS.  Some functions are actually named
6540     something starting with __ and the normal name is an alias.  */
6541 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6542 choke me
6543 #else
6544 $ac_func();
6545 #endif
6546
6547 ; return 0; }
6548 EOF
6549 if { (eval echo configure:6550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6550   rm -rf conftest*
6551   eval "ac_cv_func_$ac_func=yes"
6552 else
6553   echo "configure: failed program was:" >&5
6554   cat conftest.$ac_ext >&5
6555   rm -rf conftest*
6556   eval "ac_cv_func_$ac_func=no"
6557 fi
6558 rm -f conftest*
6559 fi
6560
6561 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6562   echo "$ac_t""yes" 1>&6
6563     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6564   cat >> confdefs.h <<EOF
6565 #define $ac_tr_func 1
6566 EOF
6567  
6568 else
6569   echo "$ac_t""no" 1>&6
6570 fi
6571 done
6572
6573 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6574 do
6575 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6576 echo "configure:6577: checking for $ac_func" >&5
6577 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6578   echo $ac_n "(cached) $ac_c" 1>&6
6579 else
6580   cat > conftest.$ac_ext <<EOF
6581 #line 6582 "configure"
6582 #include "confdefs.h"
6583 /* System header to define __stub macros and hopefully few prototypes,
6584     which can conflict with char $ac_func(); below.  */
6585 #include <assert.h>
6586 /* Override any gcc2 internal prototype to avoid an error.  */
6587 /* We use char because int might match the return type of a gcc2
6588     builtin and then its argument prototype would still apply.  */
6589 char $ac_func();
6590
6591 int main() {
6592
6593 /* The GNU C library defines this for functions which it implements
6594     to always fail with ENOSYS.  Some functions are actually named
6595     something starting with __ and the normal name is an alias.  */
6596 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6597 choke me
6598 #else
6599 $ac_func();
6600 #endif
6601
6602 ; return 0; }
6603 EOF
6604 if { (eval echo configure:6605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6605   rm -rf conftest*
6606   eval "ac_cv_func_$ac_func=yes"
6607 else
6608   echo "configure: failed program was:" >&5
6609   cat conftest.$ac_ext >&5
6610   rm -rf conftest*
6611   eval "ac_cv_func_$ac_func=no"
6612 fi
6613 rm -f conftest*
6614 fi
6615
6616 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6617   echo "$ac_t""yes" 1>&6
6618     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6619   cat >> confdefs.h <<EOF
6620 #define $ac_tr_func 1
6621 EOF
6622  
6623 else
6624   echo "$ac_t""no" 1>&6
6625 fi
6626 done
6627
6628 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6629 do
6630 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6631 echo "configure:6632: checking for $ac_func" >&5
6632 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6633   echo $ac_n "(cached) $ac_c" 1>&6
6634 else
6635   cat > conftest.$ac_ext <<EOF
6636 #line 6637 "configure"
6637 #include "confdefs.h"
6638 /* System header to define __stub macros and hopefully few prototypes,
6639     which can conflict with char $ac_func(); below.  */
6640 #include <assert.h>
6641 /* Override any gcc2 internal prototype to avoid an error.  */
6642 /* We use char because int might match the return type of a gcc2
6643     builtin and then its argument prototype would still apply.  */
6644 char $ac_func();
6645
6646 int main() {
6647
6648 /* The GNU C library defines this for functions which it implements
6649     to always fail with ENOSYS.  Some functions are actually named
6650     something starting with __ and the normal name is an alias.  */
6651 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6652 choke me
6653 #else
6654 $ac_func();
6655 #endif
6656
6657 ; return 0; }
6658 EOF
6659 if { (eval echo configure:6660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6660   rm -rf conftest*
6661   eval "ac_cv_func_$ac_func=yes"
6662 else
6663   echo "configure: failed program was:" >&5
6664   cat conftest.$ac_ext >&5
6665   rm -rf conftest*
6666   eval "ac_cv_func_$ac_func=no"
6667 fi
6668 rm -f conftest*
6669 fi
6670
6671 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6672   echo "$ac_t""yes" 1>&6
6673     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6674   cat >> confdefs.h <<EOF
6675 #define $ac_tr_func 1
6676 EOF
6677  
6678 else
6679   echo "$ac_t""no" 1>&6
6680 fi
6681 done
6682
6683 for ac_func in open64 _open64 __open64 creat64
6684 do
6685 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6686 echo "configure:6687: checking for $ac_func" >&5
6687 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6688   echo $ac_n "(cached) $ac_c" 1>&6
6689 else
6690   cat > conftest.$ac_ext <<EOF
6691 #line 6692 "configure"
6692 #include "confdefs.h"
6693 /* System header to define __stub macros and hopefully few prototypes,
6694     which can conflict with char $ac_func(); below.  */
6695 #include <assert.h>
6696 /* Override any gcc2 internal prototype to avoid an error.  */
6697 /* We use char because int might match the return type of a gcc2
6698     builtin and then its argument prototype would still apply.  */
6699 char $ac_func();
6700
6701 int main() {
6702
6703 /* The GNU C library defines this for functions which it implements
6704     to always fail with ENOSYS.  Some functions are actually named
6705     something starting with __ and the normal name is an alias.  */
6706 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6707 choke me
6708 #else
6709 $ac_func();
6710 #endif
6711
6712 ; return 0; }
6713 EOF
6714 if { (eval echo configure:6715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6715   rm -rf conftest*
6716   eval "ac_cv_func_$ac_func=yes"
6717 else
6718   echo "configure: failed program was:" >&5
6719   cat conftest.$ac_ext >&5
6720   rm -rf conftest*
6721   eval "ac_cv_func_$ac_func=no"
6722 fi
6723 rm -f conftest*
6724 fi
6725
6726 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6727   echo "$ac_t""yes" 1>&6
6728     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6729   cat >> confdefs.h <<EOF
6730 #define $ac_tr_func 1
6731 EOF
6732  
6733 else
6734   echo "$ac_t""no" 1>&6
6735 fi
6736 done
6737
6738
6739 #
6740 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6741 #
6742
6743 if test x$ac_cv_func_stat64 = xno ; then
6744   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6745 echo "configure:6746: checking for stat64 in <sys/stat.h>" >&5
6746   cat > conftest.$ac_ext <<EOF
6747 #line 6748 "configure"
6748 #include "confdefs.h"
6749
6750 #if defined(HAVE_UNISTD_H)
6751 #include <unistd.h>
6752 #endif
6753 #include <sys/stat.h>
6754
6755 int main() {
6756 struct stat64 st64; exit(stat64(".",&st64));
6757 ; return 0; }
6758 EOF
6759 if { (eval echo configure:6760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6760   rm -rf conftest*
6761   ac_cv_func_stat64=yes
6762 else
6763   echo "configure: failed program was:" >&5
6764   cat conftest.$ac_ext >&5
6765 fi
6766 rm -f conftest*
6767   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6768   if test x$ac_cv_func_stat64 = xyes ; then
6769     cat >> confdefs.h <<\EOF
6770 #define HAVE_STAT64 1
6771 EOF
6772
6773   fi
6774 fi
6775
6776 if test x$ac_cv_func_lstat64 = xno ; then
6777   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6778 echo "configure:6779: checking for lstat64 in <sys/stat.h>" >&5
6779   cat > conftest.$ac_ext <<EOF
6780 #line 6781 "configure"
6781 #include "confdefs.h"
6782
6783 #if defined(HAVE_UNISTD_H)
6784 #include <unistd.h>
6785 #endif
6786 #include <sys/stat.h>
6787
6788 int main() {
6789 struct stat64 st64; exit(lstat64(".",&st64));
6790 ; return 0; }
6791 EOF
6792 if { (eval echo configure:6793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6793   rm -rf conftest*
6794   ac_cv_func_lstat64=yes
6795 else
6796   echo "configure: failed program was:" >&5
6797   cat conftest.$ac_ext >&5
6798 fi
6799 rm -f conftest*
6800   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6801   if test x$ac_cv_func_lstat64 = xyes ; then
6802     cat >> confdefs.h <<\EOF
6803 #define HAVE_LSTAT64 1
6804 EOF
6805
6806   fi
6807 fi
6808
6809 if test x$ac_cv_func_fstat64 = xno ; then
6810   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6811 echo "configure:6812: checking for fstat64 in <sys/stat.h>" >&5
6812   cat > conftest.$ac_ext <<EOF
6813 #line 6814 "configure"
6814 #include "confdefs.h"
6815
6816 #if defined(HAVE_UNISTD_H)
6817 #include <unistd.h>
6818 #endif
6819 #include <sys/stat.h>
6820
6821 int main() {
6822 struct stat64 st64; exit(fstat64(0,&st64));
6823 ; return 0; }
6824 EOF
6825 if { (eval echo configure:6826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6826   rm -rf conftest*
6827   ac_cv_func_fstat64=yes
6828 else
6829   echo "configure: failed program was:" >&5
6830   cat conftest.$ac_ext >&5
6831 fi
6832 rm -f conftest*
6833   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6834   if test x$ac_cv_func_fstat64 = xyes ; then
6835     cat >> confdefs.h <<\EOF
6836 #define HAVE_FSTAT64 1
6837 EOF
6838
6839   fi
6840 fi
6841
6842 #
6843 # If no strcasecmp, check for it in some known places
6844 # It is in -lresolv on ReliantUNIX and UnixWare
6845 #   -lresolve *must* follow -lnsl for name resolution to work properly
6846 #
6847
6848 if test x$ac_cv_func_strcasecmp = xno ; then
6849         echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6
6850 echo "configure:6851: checking for strcasecmp in -lresolv" >&5
6851 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'`
6852 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6853   echo $ac_n "(cached) $ac_c" 1>&6
6854 else
6855   ac_save_LIBS="$LIBS"
6856 LIBS="-lresolv  $LIBS"
6857 cat > conftest.$ac_ext <<EOF
6858 #line 6859 "configure"
6859 #include "confdefs.h"
6860 /* Override any gcc2 internal prototype to avoid an error.  */
6861 /* We use char because int might match the return type of a gcc2
6862     builtin and then its argument prototype would still apply.  */
6863 char strcasecmp();
6864
6865 int main() {
6866 strcasecmp()
6867 ; return 0; }
6868 EOF
6869 if { (eval echo configure:6870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6870   rm -rf conftest*
6871   eval "ac_cv_lib_$ac_lib_var=yes"
6872 else
6873   echo "configure: failed program was:" >&5
6874   cat conftest.$ac_ext >&5
6875   rm -rf conftest*
6876   eval "ac_cv_lib_$ac_lib_var=no"
6877 fi
6878 rm -f conftest*
6879 LIBS="$ac_save_LIBS"
6880
6881 fi
6882 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6883   echo "$ac_t""yes" 1>&6
6884   LIBS="$LIBS -lresolv"
6885                 cat >> confdefs.h <<\EOF
6886 #define HAVE_STRCASECMP 1
6887 EOF
6888
6889 else
6890   echo "$ac_t""no" 1>&6
6891 fi
6892
6893 fi
6894
6895 #
6896 # Check for the functions putprpwnam, set_auth_parameters,
6897 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6898 # Needed for OSF1 and HPUX.
6899 #
6900
6901 case "$LIBS" in
6902   *-lsecurity*) for ac_func in putprpwnam
6903 do
6904 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6905 echo "configure:6906: checking for $ac_func" >&5
6906 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6907   echo $ac_n "(cached) $ac_c" 1>&6
6908 else
6909   cat > conftest.$ac_ext <<EOF
6910 #line 6911 "configure"
6911 #include "confdefs.h"
6912 /* System header to define __stub macros and hopefully few prototypes,
6913     which can conflict with char $ac_func(); below.  */
6914 #include <assert.h>
6915 /* Override any gcc2 internal prototype to avoid an error.  */
6916 /* We use char because int might match the return type of a gcc2
6917     builtin and then its argument prototype would still apply.  */
6918 char $ac_func();
6919
6920 int main() {
6921
6922 /* The GNU C library defines this for functions which it implements
6923     to always fail with ENOSYS.  Some functions are actually named
6924     something starting with __ and the normal name is an alias.  */
6925 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6926 choke me
6927 #else
6928 $ac_func();
6929 #endif
6930
6931 ; return 0; }
6932 EOF
6933 if { (eval echo configure:6934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6934   rm -rf conftest*
6935   eval "ac_cv_func_$ac_func=yes"
6936 else
6937   echo "configure: failed program was:" >&5
6938   cat conftest.$ac_ext >&5
6939   rm -rf conftest*
6940   eval "ac_cv_func_$ac_func=no"
6941 fi
6942 rm -f conftest*
6943 fi
6944
6945 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6946   echo "$ac_t""yes" 1>&6
6947     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6948   cat >> confdefs.h <<EOF
6949 #define $ac_tr_func 1
6950 EOF
6951  
6952 else
6953   echo "$ac_t""no" 1>&6
6954 fi
6955 done
6956  ;;
6957   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6958 echo "configure:6959: checking for putprpwnam in -lsecurity" >&5
6959 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6960 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6961   echo $ac_n "(cached) $ac_c" 1>&6
6962 else
6963   ac_save_LIBS="$LIBS"
6964 LIBS="-lsecurity  $LIBS"
6965 cat > conftest.$ac_ext <<EOF
6966 #line 6967 "configure"
6967 #include "confdefs.h"
6968 /* Override any gcc2 internal prototype to avoid an error.  */
6969 /* We use char because int might match the return type of a gcc2
6970     builtin and then its argument prototype would still apply.  */
6971 char putprpwnam();
6972
6973 int main() {
6974 putprpwnam()
6975 ; return 0; }
6976 EOF
6977 if { (eval echo configure:6978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6978   rm -rf conftest*
6979   eval "ac_cv_lib_$ac_lib_var=yes"
6980 else
6981   echo "configure: failed program was:" >&5
6982   cat conftest.$ac_ext >&5
6983   rm -rf conftest*
6984   eval "ac_cv_lib_$ac_lib_var=no"
6985 fi
6986 rm -f conftest*
6987 LIBS="$ac_save_LIBS"
6988
6989 fi
6990 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6991   echo "$ac_t""yes" 1>&6
6992     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6993     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6994   cat >> confdefs.h <<EOF
6995 #define $ac_tr_lib 1
6996 EOF
6997
6998   LIBS="-lsecurity $LIBS"
6999
7000 else
7001   echo "$ac_t""no" 1>&6
7002 fi
7003  
7004      for ac_func in putprpwnam
7005 do
7006 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7007 echo "configure:7008: checking for $ac_func" >&5
7008 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7009   echo $ac_n "(cached) $ac_c" 1>&6
7010 else
7011   cat > conftest.$ac_ext <<EOF
7012 #line 7013 "configure"
7013 #include "confdefs.h"
7014 /* System header to define __stub macros and hopefully few prototypes,
7015     which can conflict with char $ac_func(); below.  */
7016 #include <assert.h>
7017 /* Override any gcc2 internal prototype to avoid an error.  */
7018 /* We use char because int might match the return type of a gcc2
7019     builtin and then its argument prototype would still apply.  */
7020 char $ac_func();
7021
7022 int main() {
7023
7024 /* The GNU C library defines this for functions which it implements
7025     to always fail with ENOSYS.  Some functions are actually named
7026     something starting with __ and the normal name is an alias.  */
7027 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7028 choke me
7029 #else
7030 $ac_func();
7031 #endif
7032
7033 ; return 0; }
7034 EOF
7035 if { (eval echo configure:7036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7036   rm -rf conftest*
7037   eval "ac_cv_func_$ac_func=yes"
7038 else
7039   echo "configure: failed program was:" >&5
7040   cat conftest.$ac_ext >&5
7041   rm -rf conftest*
7042   eval "ac_cv_func_$ac_func=no"
7043 fi
7044 rm -f conftest*
7045 fi
7046
7047 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7048   echo "$ac_t""yes" 1>&6
7049     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7050   cat >> confdefs.h <<EOF
7051 #define $ac_tr_func 1
7052 EOF
7053  
7054 else
7055   echo "$ac_t""no" 1>&6
7056 fi
7057 done
7058
7059   ;;
7060   esac
7061
7062 case "$LIBS" in
7063   *-lsec*) for ac_func in putprpwnam
7064 do
7065 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7066 echo "configure:7067: checking for $ac_func" >&5
7067 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7068   echo $ac_n "(cached) $ac_c" 1>&6
7069 else
7070   cat > conftest.$ac_ext <<EOF
7071 #line 7072 "configure"
7072 #include "confdefs.h"
7073 /* System header to define __stub macros and hopefully few prototypes,
7074     which can conflict with char $ac_func(); below.  */
7075 #include <assert.h>
7076 /* Override any gcc2 internal prototype to avoid an error.  */
7077 /* We use char because int might match the return type of a gcc2
7078     builtin and then its argument prototype would still apply.  */
7079 char $ac_func();
7080
7081 int main() {
7082
7083 /* The GNU C library defines this for functions which it implements
7084     to always fail with ENOSYS.  Some functions are actually named
7085     something starting with __ and the normal name is an alias.  */
7086 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7087 choke me
7088 #else
7089 $ac_func();
7090 #endif
7091
7092 ; return 0; }
7093 EOF
7094 if { (eval echo configure:7095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7095   rm -rf conftest*
7096   eval "ac_cv_func_$ac_func=yes"
7097 else
7098   echo "configure: failed program was:" >&5
7099   cat conftest.$ac_ext >&5
7100   rm -rf conftest*
7101   eval "ac_cv_func_$ac_func=no"
7102 fi
7103 rm -f conftest*
7104 fi
7105
7106 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7107   echo "$ac_t""yes" 1>&6
7108     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7109   cat >> confdefs.h <<EOF
7110 #define $ac_tr_func 1
7111 EOF
7112  
7113 else
7114   echo "$ac_t""no" 1>&6
7115 fi
7116 done
7117  ;;
7118   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
7119 echo "configure:7120: checking for putprpwnam in -lsec" >&5
7120 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
7121 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7122   echo $ac_n "(cached) $ac_c" 1>&6
7123 else
7124   ac_save_LIBS="$LIBS"
7125 LIBS="-lsec  $LIBS"
7126 cat > conftest.$ac_ext <<EOF
7127 #line 7128 "configure"
7128 #include "confdefs.h"
7129 /* Override any gcc2 internal prototype to avoid an error.  */
7130 /* We use char because int might match the return type of a gcc2
7131     builtin and then its argument prototype would still apply.  */
7132 char putprpwnam();
7133
7134 int main() {
7135 putprpwnam()
7136 ; return 0; }
7137 EOF
7138 if { (eval echo configure:7139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7139   rm -rf conftest*
7140   eval "ac_cv_lib_$ac_lib_var=yes"
7141 else
7142   echo "configure: failed program was:" >&5
7143   cat conftest.$ac_ext >&5
7144   rm -rf conftest*
7145   eval "ac_cv_lib_$ac_lib_var=no"
7146 fi
7147 rm -f conftest*
7148 LIBS="$ac_save_LIBS"
7149
7150 fi
7151 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7152   echo "$ac_t""yes" 1>&6
7153     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7154     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7155   cat >> confdefs.h <<EOF
7156 #define $ac_tr_lib 1
7157 EOF
7158
7159   LIBS="-lsec $LIBS"
7160
7161 else
7162   echo "$ac_t""no" 1>&6
7163 fi
7164  
7165      for ac_func in putprpwnam
7166 do
7167 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7168 echo "configure:7169: checking for $ac_func" >&5
7169 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7170   echo $ac_n "(cached) $ac_c" 1>&6
7171 else
7172   cat > conftest.$ac_ext <<EOF
7173 #line 7174 "configure"
7174 #include "confdefs.h"
7175 /* System header to define __stub macros and hopefully few prototypes,
7176     which can conflict with char $ac_func(); below.  */
7177 #include <assert.h>
7178 /* Override any gcc2 internal prototype to avoid an error.  */
7179 /* We use char because int might match the return type of a gcc2
7180     builtin and then its argument prototype would still apply.  */
7181 char $ac_func();
7182
7183 int main() {
7184
7185 /* The GNU C library defines this for functions which it implements
7186     to always fail with ENOSYS.  Some functions are actually named
7187     something starting with __ and the normal name is an alias.  */
7188 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7189 choke me
7190 #else
7191 $ac_func();
7192 #endif
7193
7194 ; return 0; }
7195 EOF
7196 if { (eval echo configure:7197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7197   rm -rf conftest*
7198   eval "ac_cv_func_$ac_func=yes"
7199 else
7200   echo "configure: failed program was:" >&5
7201   cat conftest.$ac_ext >&5
7202   rm -rf conftest*
7203   eval "ac_cv_func_$ac_func=no"
7204 fi
7205 rm -f conftest*
7206 fi
7207
7208 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7209   echo "$ac_t""yes" 1>&6
7210     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7211   cat >> confdefs.h <<EOF
7212 #define $ac_tr_func 1
7213 EOF
7214  
7215 else
7216   echo "$ac_t""no" 1>&6
7217 fi
7218 done
7219
7220   ;;
7221   esac
7222
7223
7224 case "$LIBS" in
7225   *-lsecurity*) for ac_func in set_auth_parameters
7226 do
7227 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7228 echo "configure:7229: checking for $ac_func" >&5
7229 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7230   echo $ac_n "(cached) $ac_c" 1>&6
7231 else
7232   cat > conftest.$ac_ext <<EOF
7233 #line 7234 "configure"
7234 #include "confdefs.h"
7235 /* System header to define __stub macros and hopefully few prototypes,
7236     which can conflict with char $ac_func(); below.  */
7237 #include <assert.h>
7238 /* Override any gcc2 internal prototype to avoid an error.  */
7239 /* We use char because int might match the return type of a gcc2
7240     builtin and then its argument prototype would still apply.  */
7241 char $ac_func();
7242
7243 int main() {
7244
7245 /* The GNU C library defines this for functions which it implements
7246     to always fail with ENOSYS.  Some functions are actually named
7247     something starting with __ and the normal name is an alias.  */
7248 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7249 choke me
7250 #else
7251 $ac_func();
7252 #endif
7253
7254 ; return 0; }
7255 EOF
7256 if { (eval echo configure:7257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7257   rm -rf conftest*
7258   eval "ac_cv_func_$ac_func=yes"
7259 else
7260   echo "configure: failed program was:" >&5
7261   cat conftest.$ac_ext >&5
7262   rm -rf conftest*
7263   eval "ac_cv_func_$ac_func=no"
7264 fi
7265 rm -f conftest*
7266 fi
7267
7268 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7269   echo "$ac_t""yes" 1>&6
7270     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7271   cat >> confdefs.h <<EOF
7272 #define $ac_tr_func 1
7273 EOF
7274  
7275 else
7276   echo "$ac_t""no" 1>&6
7277 fi
7278 done
7279  ;;
7280   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7281 echo "configure:7282: checking for set_auth_parameters in -lsecurity" >&5
7282 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7283 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7284   echo $ac_n "(cached) $ac_c" 1>&6
7285 else
7286   ac_save_LIBS="$LIBS"
7287 LIBS="-lsecurity  $LIBS"
7288 cat > conftest.$ac_ext <<EOF
7289 #line 7290 "configure"
7290 #include "confdefs.h"
7291 /* Override any gcc2 internal prototype to avoid an error.  */
7292 /* We use char because int might match the return type of a gcc2
7293     builtin and then its argument prototype would still apply.  */
7294 char set_auth_parameters();
7295
7296 int main() {
7297 set_auth_parameters()
7298 ; return 0; }
7299 EOF
7300 if { (eval echo configure:7301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7301   rm -rf conftest*
7302   eval "ac_cv_lib_$ac_lib_var=yes"
7303 else
7304   echo "configure: failed program was:" >&5
7305   cat conftest.$ac_ext >&5
7306   rm -rf conftest*
7307   eval "ac_cv_lib_$ac_lib_var=no"
7308 fi
7309 rm -f conftest*
7310 LIBS="$ac_save_LIBS"
7311
7312 fi
7313 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7314   echo "$ac_t""yes" 1>&6
7315     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7316     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7317   cat >> confdefs.h <<EOF
7318 #define $ac_tr_lib 1
7319 EOF
7320
7321   LIBS="-lsecurity $LIBS"
7322
7323 else
7324   echo "$ac_t""no" 1>&6
7325 fi
7326  
7327      for ac_func in set_auth_parameters
7328 do
7329 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7330 echo "configure:7331: checking for $ac_func" >&5
7331 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7332   echo $ac_n "(cached) $ac_c" 1>&6
7333 else
7334   cat > conftest.$ac_ext <<EOF
7335 #line 7336 "configure"
7336 #include "confdefs.h"
7337 /* System header to define __stub macros and hopefully few prototypes,
7338     which can conflict with char $ac_func(); below.  */
7339 #include <assert.h>
7340 /* Override any gcc2 internal prototype to avoid an error.  */
7341 /* We use char because int might match the return type of a gcc2
7342     builtin and then its argument prototype would still apply.  */
7343 char $ac_func();
7344
7345 int main() {
7346
7347 /* The GNU C library defines this for functions which it implements
7348     to always fail with ENOSYS.  Some functions are actually named
7349     something starting with __ and the normal name is an alias.  */
7350 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7351 choke me
7352 #else
7353 $ac_func();
7354 #endif
7355
7356 ; return 0; }
7357 EOF
7358 if { (eval echo configure:7359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7359   rm -rf conftest*
7360   eval "ac_cv_func_$ac_func=yes"
7361 else
7362   echo "configure: failed program was:" >&5
7363   cat conftest.$ac_ext >&5
7364   rm -rf conftest*
7365   eval "ac_cv_func_$ac_func=no"
7366 fi
7367 rm -f conftest*
7368 fi
7369
7370 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7371   echo "$ac_t""yes" 1>&6
7372     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7373   cat >> confdefs.h <<EOF
7374 #define $ac_tr_func 1
7375 EOF
7376  
7377 else
7378   echo "$ac_t""no" 1>&6
7379 fi
7380 done
7381
7382   ;;
7383   esac
7384
7385 case "$LIBS" in
7386   *-lsec*) for ac_func in set_auth_parameters
7387 do
7388 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7389 echo "configure:7390: checking for $ac_func" >&5
7390 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7391   echo $ac_n "(cached) $ac_c" 1>&6
7392 else
7393   cat > conftest.$ac_ext <<EOF
7394 #line 7395 "configure"
7395 #include "confdefs.h"
7396 /* System header to define __stub macros and hopefully few prototypes,
7397     which can conflict with char $ac_func(); below.  */
7398 #include <assert.h>
7399 /* Override any gcc2 internal prototype to avoid an error.  */
7400 /* We use char because int might match the return type of a gcc2
7401     builtin and then its argument prototype would still apply.  */
7402 char $ac_func();
7403
7404 int main() {
7405
7406 /* The GNU C library defines this for functions which it implements
7407     to always fail with ENOSYS.  Some functions are actually named
7408     something starting with __ and the normal name is an alias.  */
7409 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7410 choke me
7411 #else
7412 $ac_func();
7413 #endif
7414
7415 ; return 0; }
7416 EOF
7417 if { (eval echo configure:7418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7418   rm -rf conftest*
7419   eval "ac_cv_func_$ac_func=yes"
7420 else
7421   echo "configure: failed program was:" >&5
7422   cat conftest.$ac_ext >&5
7423   rm -rf conftest*
7424   eval "ac_cv_func_$ac_func=no"
7425 fi
7426 rm -f conftest*
7427 fi
7428
7429 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7430   echo "$ac_t""yes" 1>&6
7431     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7432   cat >> confdefs.h <<EOF
7433 #define $ac_tr_func 1
7434 EOF
7435  
7436 else
7437   echo "$ac_t""no" 1>&6
7438 fi
7439 done
7440  ;;
7441   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7442 echo "configure:7443: checking for set_auth_parameters in -lsec" >&5
7443 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7444 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7445   echo $ac_n "(cached) $ac_c" 1>&6
7446 else
7447   ac_save_LIBS="$LIBS"
7448 LIBS="-lsec  $LIBS"
7449 cat > conftest.$ac_ext <<EOF
7450 #line 7451 "configure"
7451 #include "confdefs.h"
7452 /* Override any gcc2 internal prototype to avoid an error.  */
7453 /* We use char because int might match the return type of a gcc2
7454     builtin and then its argument prototype would still apply.  */
7455 char set_auth_parameters();
7456
7457 int main() {
7458 set_auth_parameters()
7459 ; return 0; }
7460 EOF
7461 if { (eval echo configure:7462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7462   rm -rf conftest*
7463   eval "ac_cv_lib_$ac_lib_var=yes"
7464 else
7465   echo "configure: failed program was:" >&5
7466   cat conftest.$ac_ext >&5
7467   rm -rf conftest*
7468   eval "ac_cv_lib_$ac_lib_var=no"
7469 fi
7470 rm -f conftest*
7471 LIBS="$ac_save_LIBS"
7472
7473 fi
7474 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7475   echo "$ac_t""yes" 1>&6
7476     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7477     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7478   cat >> confdefs.h <<EOF
7479 #define $ac_tr_lib 1
7480 EOF
7481
7482   LIBS="-lsec $LIBS"
7483
7484 else
7485   echo "$ac_t""no" 1>&6
7486 fi
7487  
7488      for ac_func in set_auth_parameters
7489 do
7490 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7491 echo "configure:7492: checking for $ac_func" >&5
7492 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7493   echo $ac_n "(cached) $ac_c" 1>&6
7494 else
7495   cat > conftest.$ac_ext <<EOF
7496 #line 7497 "configure"
7497 #include "confdefs.h"
7498 /* System header to define __stub macros and hopefully few prototypes,
7499     which can conflict with char $ac_func(); below.  */
7500 #include <assert.h>
7501 /* Override any gcc2 internal prototype to avoid an error.  */
7502 /* We use char because int might match the return type of a gcc2
7503     builtin and then its argument prototype would still apply.  */
7504 char $ac_func();
7505
7506 int main() {
7507
7508 /* The GNU C library defines this for functions which it implements
7509     to always fail with ENOSYS.  Some functions are actually named
7510     something starting with __ and the normal name is an alias.  */
7511 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7512 choke me
7513 #else
7514 $ac_func();
7515 #endif
7516
7517 ; return 0; }
7518 EOF
7519 if { (eval echo configure:7520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7520   rm -rf conftest*
7521   eval "ac_cv_func_$ac_func=yes"
7522 else
7523   echo "configure: failed program was:" >&5
7524   cat conftest.$ac_ext >&5
7525   rm -rf conftest*
7526   eval "ac_cv_func_$ac_func=no"
7527 fi
7528 rm -f conftest*
7529 fi
7530
7531 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7532   echo "$ac_t""yes" 1>&6
7533     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7534   cat >> confdefs.h <<EOF
7535 #define $ac_tr_func 1
7536 EOF
7537  
7538 else
7539   echo "$ac_t""no" 1>&6
7540 fi
7541 done
7542
7543   ;;
7544   esac
7545
7546
7547 # UnixWare 7.x has its getspnam in -lgen
7548 case "$LIBS" in
7549   *-lgen*) for ac_func in getspnam
7550 do
7551 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7552 echo "configure:7553: checking for $ac_func" >&5
7553 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7554   echo $ac_n "(cached) $ac_c" 1>&6
7555 else
7556   cat > conftest.$ac_ext <<EOF
7557 #line 7558 "configure"
7558 #include "confdefs.h"
7559 /* System header to define __stub macros and hopefully few prototypes,
7560     which can conflict with char $ac_func(); below.  */
7561 #include <assert.h>
7562 /* Override any gcc2 internal prototype to avoid an error.  */
7563 /* We use char because int might match the return type of a gcc2
7564     builtin and then its argument prototype would still apply.  */
7565 char $ac_func();
7566
7567 int main() {
7568
7569 /* The GNU C library defines this for functions which it implements
7570     to always fail with ENOSYS.  Some functions are actually named
7571     something starting with __ and the normal name is an alias.  */
7572 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7573 choke me
7574 #else
7575 $ac_func();
7576 #endif
7577
7578 ; return 0; }
7579 EOF
7580 if { (eval echo configure:7581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7581   rm -rf conftest*
7582   eval "ac_cv_func_$ac_func=yes"
7583 else
7584   echo "configure: failed program was:" >&5
7585   cat conftest.$ac_ext >&5
7586   rm -rf conftest*
7587   eval "ac_cv_func_$ac_func=no"
7588 fi
7589 rm -f conftest*
7590 fi
7591
7592 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7593   echo "$ac_t""yes" 1>&6
7594     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7595   cat >> confdefs.h <<EOF
7596 #define $ac_tr_func 1
7597 EOF
7598  
7599 else
7600   echo "$ac_t""no" 1>&6
7601 fi
7602 done
7603  ;;
7604   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7605 echo "configure:7606: checking for getspnam in -lgen" >&5
7606 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7607 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7608   echo $ac_n "(cached) $ac_c" 1>&6
7609 else
7610   ac_save_LIBS="$LIBS"
7611 LIBS="-lgen  $LIBS"
7612 cat > conftest.$ac_ext <<EOF
7613 #line 7614 "configure"
7614 #include "confdefs.h"
7615 /* Override any gcc2 internal prototype to avoid an error.  */
7616 /* We use char because int might match the return type of a gcc2
7617     builtin and then its argument prototype would still apply.  */
7618 char getspnam();
7619
7620 int main() {
7621 getspnam()
7622 ; return 0; }
7623 EOF
7624 if { (eval echo configure:7625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7625   rm -rf conftest*
7626   eval "ac_cv_lib_$ac_lib_var=yes"
7627 else
7628   echo "configure: failed program was:" >&5
7629   cat conftest.$ac_ext >&5
7630   rm -rf conftest*
7631   eval "ac_cv_lib_$ac_lib_var=no"
7632 fi
7633 rm -f conftest*
7634 LIBS="$ac_save_LIBS"
7635
7636 fi
7637 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7638   echo "$ac_t""yes" 1>&6
7639     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7640     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7641   cat >> confdefs.h <<EOF
7642 #define $ac_tr_lib 1
7643 EOF
7644
7645   LIBS="-lgen $LIBS"
7646
7647 else
7648   echo "$ac_t""no" 1>&6
7649 fi
7650  
7651      for ac_func in getspnam
7652 do
7653 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7654 echo "configure:7655: checking for $ac_func" >&5
7655 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7656   echo $ac_n "(cached) $ac_c" 1>&6
7657 else
7658   cat > conftest.$ac_ext <<EOF
7659 #line 7660 "configure"
7660 #include "confdefs.h"
7661 /* System header to define __stub macros and hopefully few prototypes,
7662     which can conflict with char $ac_func(); below.  */
7663 #include <assert.h>
7664 /* Override any gcc2 internal prototype to avoid an error.  */
7665 /* We use char because int might match the return type of a gcc2
7666     builtin and then its argument prototype would still apply.  */
7667 char $ac_func();
7668
7669 int main() {
7670
7671 /* The GNU C library defines this for functions which it implements
7672     to always fail with ENOSYS.  Some functions are actually named
7673     something starting with __ and the normal name is an alias.  */
7674 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7675 choke me
7676 #else
7677 $ac_func();
7678 #endif
7679
7680 ; return 0; }
7681 EOF
7682 if { (eval echo configure:7683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7683   rm -rf conftest*
7684   eval "ac_cv_func_$ac_func=yes"
7685 else
7686   echo "configure: failed program was:" >&5
7687   cat conftest.$ac_ext >&5
7688   rm -rf conftest*
7689   eval "ac_cv_func_$ac_func=no"
7690 fi
7691 rm -f conftest*
7692 fi
7693
7694 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7695   echo "$ac_t""yes" 1>&6
7696     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7697   cat >> confdefs.h <<EOF
7698 #define $ac_tr_func 1
7699 EOF
7700  
7701 else
7702   echo "$ac_t""no" 1>&6
7703 fi
7704 done
7705
7706   ;;
7707   esac
7708
7709
7710 case "$LIBS" in
7711   *-lsecurity*) for ac_func in getspnam
7712 do
7713 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7714 echo "configure:7715: checking for $ac_func" >&5
7715 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7716   echo $ac_n "(cached) $ac_c" 1>&6
7717 else
7718   cat > conftest.$ac_ext <<EOF
7719 #line 7720 "configure"
7720 #include "confdefs.h"
7721 /* System header to define __stub macros and hopefully few prototypes,
7722     which can conflict with char $ac_func(); below.  */
7723 #include <assert.h>
7724 /* Override any gcc2 internal prototype to avoid an error.  */
7725 /* We use char because int might match the return type of a gcc2
7726     builtin and then its argument prototype would still apply.  */
7727 char $ac_func();
7728
7729 int main() {
7730
7731 /* The GNU C library defines this for functions which it implements
7732     to always fail with ENOSYS.  Some functions are actually named
7733     something starting with __ and the normal name is an alias.  */
7734 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7735 choke me
7736 #else
7737 $ac_func();
7738 #endif
7739
7740 ; return 0; }
7741 EOF
7742 if { (eval echo configure:7743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7743   rm -rf conftest*
7744   eval "ac_cv_func_$ac_func=yes"
7745 else
7746   echo "configure: failed program was:" >&5
7747   cat conftest.$ac_ext >&5
7748   rm -rf conftest*
7749   eval "ac_cv_func_$ac_func=no"
7750 fi
7751 rm -f conftest*
7752 fi
7753
7754 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7755   echo "$ac_t""yes" 1>&6
7756     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7757   cat >> confdefs.h <<EOF
7758 #define $ac_tr_func 1
7759 EOF
7760  
7761 else
7762   echo "$ac_t""no" 1>&6
7763 fi
7764 done
7765  ;;
7766   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7767 echo "configure:7768: checking for getspnam in -lsecurity" >&5
7768 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7769 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7770   echo $ac_n "(cached) $ac_c" 1>&6
7771 else
7772   ac_save_LIBS="$LIBS"
7773 LIBS="-lsecurity  $LIBS"
7774 cat > conftest.$ac_ext <<EOF
7775 #line 7776 "configure"
7776 #include "confdefs.h"
7777 /* Override any gcc2 internal prototype to avoid an error.  */
7778 /* We use char because int might match the return type of a gcc2
7779     builtin and then its argument prototype would still apply.  */
7780 char getspnam();
7781
7782 int main() {
7783 getspnam()
7784 ; return 0; }
7785 EOF
7786 if { (eval echo configure:7787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7787   rm -rf conftest*
7788   eval "ac_cv_lib_$ac_lib_var=yes"
7789 else
7790   echo "configure: failed program was:" >&5
7791   cat conftest.$ac_ext >&5
7792   rm -rf conftest*
7793   eval "ac_cv_lib_$ac_lib_var=no"
7794 fi
7795 rm -f conftest*
7796 LIBS="$ac_save_LIBS"
7797
7798 fi
7799 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7800   echo "$ac_t""yes" 1>&6
7801     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7802     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7803   cat >> confdefs.h <<EOF
7804 #define $ac_tr_lib 1
7805 EOF
7806
7807   LIBS="-lsecurity $LIBS"
7808
7809 else
7810   echo "$ac_t""no" 1>&6
7811 fi
7812  
7813      for ac_func in getspnam
7814 do
7815 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7816 echo "configure:7817: checking for $ac_func" >&5
7817 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7818   echo $ac_n "(cached) $ac_c" 1>&6
7819 else
7820   cat > conftest.$ac_ext <<EOF
7821 #line 7822 "configure"
7822 #include "confdefs.h"
7823 /* System header to define __stub macros and hopefully few prototypes,
7824     which can conflict with char $ac_func(); below.  */
7825 #include <assert.h>
7826 /* Override any gcc2 internal prototype to avoid an error.  */
7827 /* We use char because int might match the return type of a gcc2
7828     builtin and then its argument prototype would still apply.  */
7829 char $ac_func();
7830
7831 int main() {
7832
7833 /* The GNU C library defines this for functions which it implements
7834     to always fail with ENOSYS.  Some functions are actually named
7835     something starting with __ and the normal name is an alias.  */
7836 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7837 choke me
7838 #else
7839 $ac_func();
7840 #endif
7841
7842 ; return 0; }
7843 EOF
7844 if { (eval echo configure:7845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7845   rm -rf conftest*
7846   eval "ac_cv_func_$ac_func=yes"
7847 else
7848   echo "configure: failed program was:" >&5
7849   cat conftest.$ac_ext >&5
7850   rm -rf conftest*
7851   eval "ac_cv_func_$ac_func=no"
7852 fi
7853 rm -f conftest*
7854 fi
7855
7856 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7857   echo "$ac_t""yes" 1>&6
7858     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7859   cat >> confdefs.h <<EOF
7860 #define $ac_tr_func 1
7861 EOF
7862  
7863 else
7864   echo "$ac_t""no" 1>&6
7865 fi
7866 done
7867
7868   ;;
7869   esac
7870
7871 case "$LIBS" in
7872   *-lsec*) for ac_func in getspnam
7873 do
7874 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7875 echo "configure:7876: checking for $ac_func" >&5
7876 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7877   echo $ac_n "(cached) $ac_c" 1>&6
7878 else
7879   cat > conftest.$ac_ext <<EOF
7880 #line 7881 "configure"
7881 #include "confdefs.h"
7882 /* System header to define __stub macros and hopefully few prototypes,
7883     which can conflict with char $ac_func(); below.  */
7884 #include <assert.h>
7885 /* Override any gcc2 internal prototype to avoid an error.  */
7886 /* We use char because int might match the return type of a gcc2
7887     builtin and then its argument prototype would still apply.  */
7888 char $ac_func();
7889
7890 int main() {
7891
7892 /* The GNU C library defines this for functions which it implements
7893     to always fail with ENOSYS.  Some functions are actually named
7894     something starting with __ and the normal name is an alias.  */
7895 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7896 choke me
7897 #else
7898 $ac_func();
7899 #endif
7900
7901 ; return 0; }
7902 EOF
7903 if { (eval echo configure:7904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7904   rm -rf conftest*
7905   eval "ac_cv_func_$ac_func=yes"
7906 else
7907   echo "configure: failed program was:" >&5
7908   cat conftest.$ac_ext >&5
7909   rm -rf conftest*
7910   eval "ac_cv_func_$ac_func=no"
7911 fi
7912 rm -f conftest*
7913 fi
7914
7915 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7916   echo "$ac_t""yes" 1>&6
7917     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7918   cat >> confdefs.h <<EOF
7919 #define $ac_tr_func 1
7920 EOF
7921  
7922 else
7923   echo "$ac_t""no" 1>&6
7924 fi
7925 done
7926  ;;
7927   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7928 echo "configure:7929: checking for getspnam in -lsec" >&5
7929 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7930 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7931   echo $ac_n "(cached) $ac_c" 1>&6
7932 else
7933   ac_save_LIBS="$LIBS"
7934 LIBS="-lsec  $LIBS"
7935 cat > conftest.$ac_ext <<EOF
7936 #line 7937 "configure"
7937 #include "confdefs.h"
7938 /* Override any gcc2 internal prototype to avoid an error.  */
7939 /* We use char because int might match the return type of a gcc2
7940     builtin and then its argument prototype would still apply.  */
7941 char getspnam();
7942
7943 int main() {
7944 getspnam()
7945 ; return 0; }
7946 EOF
7947 if { (eval echo configure:7948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7948   rm -rf conftest*
7949   eval "ac_cv_lib_$ac_lib_var=yes"
7950 else
7951   echo "configure: failed program was:" >&5
7952   cat conftest.$ac_ext >&5
7953   rm -rf conftest*
7954   eval "ac_cv_lib_$ac_lib_var=no"
7955 fi
7956 rm -f conftest*
7957 LIBS="$ac_save_LIBS"
7958
7959 fi
7960 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7961   echo "$ac_t""yes" 1>&6
7962     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7963     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7964   cat >> confdefs.h <<EOF
7965 #define $ac_tr_lib 1
7966 EOF
7967
7968   LIBS="-lsec $LIBS"
7969
7970 else
7971   echo "$ac_t""no" 1>&6
7972 fi
7973  
7974      for ac_func in getspnam
7975 do
7976 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7977 echo "configure:7978: checking for $ac_func" >&5
7978 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7979   echo $ac_n "(cached) $ac_c" 1>&6
7980 else
7981   cat > conftest.$ac_ext <<EOF
7982 #line 7983 "configure"
7983 #include "confdefs.h"
7984 /* System header to define __stub macros and hopefully few prototypes,
7985     which can conflict with char $ac_func(); below.  */
7986 #include <assert.h>
7987 /* Override any gcc2 internal prototype to avoid an error.  */
7988 /* We use char because int might match the return type of a gcc2
7989     builtin and then its argument prototype would still apply.  */
7990 char $ac_func();
7991
7992 int main() {
7993
7994 /* The GNU C library defines this for functions which it implements
7995     to always fail with ENOSYS.  Some functions are actually named
7996     something starting with __ and the normal name is an alias.  */
7997 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7998 choke me
7999 #else
8000 $ac_func();
8001 #endif
8002
8003 ; return 0; }
8004 EOF
8005 if { (eval echo configure:8006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8006   rm -rf conftest*
8007   eval "ac_cv_func_$ac_func=yes"
8008 else
8009   echo "configure: failed program was:" >&5
8010   cat conftest.$ac_ext >&5
8011   rm -rf conftest*
8012   eval "ac_cv_func_$ac_func=no"
8013 fi
8014 rm -f conftest*
8015 fi
8016
8017 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8018   echo "$ac_t""yes" 1>&6
8019     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8020   cat >> confdefs.h <<EOF
8021 #define $ac_tr_func 1
8022 EOF
8023  
8024 else
8025   echo "$ac_t""no" 1>&6
8026 fi
8027 done
8028
8029   ;;
8030   esac
8031
8032
8033 case "$LIBS" in
8034   *-lsecurity*) for ac_func in bigcrypt
8035 do
8036 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8037 echo "configure:8038: checking for $ac_func" >&5
8038 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8039   echo $ac_n "(cached) $ac_c" 1>&6
8040 else
8041   cat > conftest.$ac_ext <<EOF
8042 #line 8043 "configure"
8043 #include "confdefs.h"
8044 /* System header to define __stub macros and hopefully few prototypes,
8045     which can conflict with char $ac_func(); below.  */
8046 #include <assert.h>
8047 /* Override any gcc2 internal prototype to avoid an error.  */
8048 /* We use char because int might match the return type of a gcc2
8049     builtin and then its argument prototype would still apply.  */
8050 char $ac_func();
8051
8052 int main() {
8053
8054 /* The GNU C library defines this for functions which it implements
8055     to always fail with ENOSYS.  Some functions are actually named
8056     something starting with __ and the normal name is an alias.  */
8057 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8058 choke me
8059 #else
8060 $ac_func();
8061 #endif
8062
8063 ; return 0; }
8064 EOF
8065 if { (eval echo configure:8066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8066   rm -rf conftest*
8067   eval "ac_cv_func_$ac_func=yes"
8068 else
8069   echo "configure: failed program was:" >&5
8070   cat conftest.$ac_ext >&5
8071   rm -rf conftest*
8072   eval "ac_cv_func_$ac_func=no"
8073 fi
8074 rm -f conftest*
8075 fi
8076
8077 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8078   echo "$ac_t""yes" 1>&6
8079     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8080   cat >> confdefs.h <<EOF
8081 #define $ac_tr_func 1
8082 EOF
8083  
8084 else
8085   echo "$ac_t""no" 1>&6
8086 fi
8087 done
8088  ;;
8089   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
8090 echo "configure:8091: checking for bigcrypt in -lsecurity" >&5
8091 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
8092 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8093   echo $ac_n "(cached) $ac_c" 1>&6
8094 else
8095   ac_save_LIBS="$LIBS"
8096 LIBS="-lsecurity  $LIBS"
8097 cat > conftest.$ac_ext <<EOF
8098 #line 8099 "configure"
8099 #include "confdefs.h"
8100 /* Override any gcc2 internal prototype to avoid an error.  */
8101 /* We use char because int might match the return type of a gcc2
8102     builtin and then its argument prototype would still apply.  */
8103 char bigcrypt();
8104
8105 int main() {
8106 bigcrypt()
8107 ; return 0; }
8108 EOF
8109 if { (eval echo configure:8110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8110   rm -rf conftest*
8111   eval "ac_cv_lib_$ac_lib_var=yes"
8112 else
8113   echo "configure: failed program was:" >&5
8114   cat conftest.$ac_ext >&5
8115   rm -rf conftest*
8116   eval "ac_cv_lib_$ac_lib_var=no"
8117 fi
8118 rm -f conftest*
8119 LIBS="$ac_save_LIBS"
8120
8121 fi
8122 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8123   echo "$ac_t""yes" 1>&6
8124     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8125     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8126   cat >> confdefs.h <<EOF
8127 #define $ac_tr_lib 1
8128 EOF
8129
8130   LIBS="-lsecurity $LIBS"
8131
8132 else
8133   echo "$ac_t""no" 1>&6
8134 fi
8135  
8136      for ac_func in bigcrypt
8137 do
8138 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8139 echo "configure:8140: checking for $ac_func" >&5
8140 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8141   echo $ac_n "(cached) $ac_c" 1>&6
8142 else
8143   cat > conftest.$ac_ext <<EOF
8144 #line 8145 "configure"
8145 #include "confdefs.h"
8146 /* System header to define __stub macros and hopefully few prototypes,
8147     which can conflict with char $ac_func(); below.  */
8148 #include <assert.h>
8149 /* Override any gcc2 internal prototype to avoid an error.  */
8150 /* We use char because int might match the return type of a gcc2
8151     builtin and then its argument prototype would still apply.  */
8152 char $ac_func();
8153
8154 int main() {
8155
8156 /* The GNU C library defines this for functions which it implements
8157     to always fail with ENOSYS.  Some functions are actually named
8158     something starting with __ and the normal name is an alias.  */
8159 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8160 choke me
8161 #else
8162 $ac_func();
8163 #endif
8164
8165 ; return 0; }
8166 EOF
8167 if { (eval echo configure:8168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8168   rm -rf conftest*
8169   eval "ac_cv_func_$ac_func=yes"
8170 else
8171   echo "configure: failed program was:" >&5
8172   cat conftest.$ac_ext >&5
8173   rm -rf conftest*
8174   eval "ac_cv_func_$ac_func=no"
8175 fi
8176 rm -f conftest*
8177 fi
8178
8179 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8180   echo "$ac_t""yes" 1>&6
8181     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8182   cat >> confdefs.h <<EOF
8183 #define $ac_tr_func 1
8184 EOF
8185  
8186 else
8187   echo "$ac_t""no" 1>&6
8188 fi
8189 done
8190
8191   ;;
8192   esac
8193
8194 case "$LIBS" in
8195   *-lsec*) for ac_func in bigcrypt
8196 do
8197 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8198 echo "configure:8199: checking for $ac_func" >&5
8199 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8200   echo $ac_n "(cached) $ac_c" 1>&6
8201 else
8202   cat > conftest.$ac_ext <<EOF
8203 #line 8204 "configure"
8204 #include "confdefs.h"
8205 /* System header to define __stub macros and hopefully few prototypes,
8206     which can conflict with char $ac_func(); below.  */
8207 #include <assert.h>
8208 /* Override any gcc2 internal prototype to avoid an error.  */
8209 /* We use char because int might match the return type of a gcc2
8210     builtin and then its argument prototype would still apply.  */
8211 char $ac_func();
8212
8213 int main() {
8214
8215 /* The GNU C library defines this for functions which it implements
8216     to always fail with ENOSYS.  Some functions are actually named
8217     something starting with __ and the normal name is an alias.  */
8218 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8219 choke me
8220 #else
8221 $ac_func();
8222 #endif
8223
8224 ; return 0; }
8225 EOF
8226 if { (eval echo configure:8227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8227   rm -rf conftest*
8228   eval "ac_cv_func_$ac_func=yes"
8229 else
8230   echo "configure: failed program was:" >&5
8231   cat conftest.$ac_ext >&5
8232   rm -rf conftest*
8233   eval "ac_cv_func_$ac_func=no"
8234 fi
8235 rm -f conftest*
8236 fi
8237
8238 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8239   echo "$ac_t""yes" 1>&6
8240     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8241   cat >> confdefs.h <<EOF
8242 #define $ac_tr_func 1
8243 EOF
8244  
8245 else
8246   echo "$ac_t""no" 1>&6
8247 fi
8248 done
8249  ;;
8250   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8251 echo "configure:8252: checking for bigcrypt in -lsec" >&5
8252 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8253 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8254   echo $ac_n "(cached) $ac_c" 1>&6
8255 else
8256   ac_save_LIBS="$LIBS"
8257 LIBS="-lsec  $LIBS"
8258 cat > conftest.$ac_ext <<EOF
8259 #line 8260 "configure"
8260 #include "confdefs.h"
8261 /* Override any gcc2 internal prototype to avoid an error.  */
8262 /* We use char because int might match the return type of a gcc2
8263     builtin and then its argument prototype would still apply.  */
8264 char bigcrypt();
8265
8266 int main() {
8267 bigcrypt()
8268 ; return 0; }
8269 EOF
8270 if { (eval echo configure:8271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8271   rm -rf conftest*
8272   eval "ac_cv_lib_$ac_lib_var=yes"
8273 else
8274   echo "configure: failed program was:" >&5
8275   cat conftest.$ac_ext >&5
8276   rm -rf conftest*
8277   eval "ac_cv_lib_$ac_lib_var=no"
8278 fi
8279 rm -f conftest*
8280 LIBS="$ac_save_LIBS"
8281
8282 fi
8283 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8284   echo "$ac_t""yes" 1>&6
8285     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8286     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8287   cat >> confdefs.h <<EOF
8288 #define $ac_tr_lib 1
8289 EOF
8290
8291   LIBS="-lsec $LIBS"
8292
8293 else
8294   echo "$ac_t""no" 1>&6
8295 fi
8296  
8297      for ac_func in bigcrypt
8298 do
8299 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8300 echo "configure:8301: checking for $ac_func" >&5
8301 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8302   echo $ac_n "(cached) $ac_c" 1>&6
8303 else
8304   cat > conftest.$ac_ext <<EOF
8305 #line 8306 "configure"
8306 #include "confdefs.h"
8307 /* System header to define __stub macros and hopefully few prototypes,
8308     which can conflict with char $ac_func(); below.  */
8309 #include <assert.h>
8310 /* Override any gcc2 internal prototype to avoid an error.  */
8311 /* We use char because int might match the return type of a gcc2
8312     builtin and then its argument prototype would still apply.  */
8313 char $ac_func();
8314
8315 int main() {
8316
8317 /* The GNU C library defines this for functions which it implements
8318     to always fail with ENOSYS.  Some functions are actually named
8319     something starting with __ and the normal name is an alias.  */
8320 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8321 choke me
8322 #else
8323 $ac_func();
8324 #endif
8325
8326 ; return 0; }
8327 EOF
8328 if { (eval echo configure:8329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8329   rm -rf conftest*
8330   eval "ac_cv_func_$ac_func=yes"
8331 else
8332   echo "configure: failed program was:" >&5
8333   cat conftest.$ac_ext >&5
8334   rm -rf conftest*
8335   eval "ac_cv_func_$ac_func=no"
8336 fi
8337 rm -f conftest*
8338 fi
8339
8340 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8341   echo "$ac_t""yes" 1>&6
8342     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8343   cat >> confdefs.h <<EOF
8344 #define $ac_tr_func 1
8345 EOF
8346  
8347 else
8348   echo "$ac_t""no" 1>&6
8349 fi
8350 done
8351
8352   ;;
8353   esac
8354
8355
8356 case "$LIBS" in
8357   *-lsecurity*) for ac_func in getprpwnam
8358 do
8359 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8360 echo "configure:8361: checking for $ac_func" >&5
8361 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8362   echo $ac_n "(cached) $ac_c" 1>&6
8363 else
8364   cat > conftest.$ac_ext <<EOF
8365 #line 8366 "configure"
8366 #include "confdefs.h"
8367 /* System header to define __stub macros and hopefully few prototypes,
8368     which can conflict with char $ac_func(); below.  */
8369 #include <assert.h>
8370 /* Override any gcc2 internal prototype to avoid an error.  */
8371 /* We use char because int might match the return type of a gcc2
8372     builtin and then its argument prototype would still apply.  */
8373 char $ac_func();
8374
8375 int main() {
8376
8377 /* The GNU C library defines this for functions which it implements
8378     to always fail with ENOSYS.  Some functions are actually named
8379     something starting with __ and the normal name is an alias.  */
8380 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8381 choke me
8382 #else
8383 $ac_func();
8384 #endif
8385
8386 ; return 0; }
8387 EOF
8388 if { (eval echo configure:8389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8389   rm -rf conftest*
8390   eval "ac_cv_func_$ac_func=yes"
8391 else
8392   echo "configure: failed program was:" >&5
8393   cat conftest.$ac_ext >&5
8394   rm -rf conftest*
8395   eval "ac_cv_func_$ac_func=no"
8396 fi
8397 rm -f conftest*
8398 fi
8399
8400 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8401   echo "$ac_t""yes" 1>&6
8402     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8403   cat >> confdefs.h <<EOF
8404 #define $ac_tr_func 1
8405 EOF
8406  
8407 else
8408   echo "$ac_t""no" 1>&6
8409 fi
8410 done
8411  ;;
8412   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8413 echo "configure:8414: checking for getprpwnam in -lsecurity" >&5
8414 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8415 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8416   echo $ac_n "(cached) $ac_c" 1>&6
8417 else
8418   ac_save_LIBS="$LIBS"
8419 LIBS="-lsecurity  $LIBS"
8420 cat > conftest.$ac_ext <<EOF
8421 #line 8422 "configure"
8422 #include "confdefs.h"
8423 /* Override any gcc2 internal prototype to avoid an error.  */
8424 /* We use char because int might match the return type of a gcc2
8425     builtin and then its argument prototype would still apply.  */
8426 char getprpwnam();
8427
8428 int main() {
8429 getprpwnam()
8430 ; return 0; }
8431 EOF
8432 if { (eval echo configure:8433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8433   rm -rf conftest*
8434   eval "ac_cv_lib_$ac_lib_var=yes"
8435 else
8436   echo "configure: failed program was:" >&5
8437   cat conftest.$ac_ext >&5
8438   rm -rf conftest*
8439   eval "ac_cv_lib_$ac_lib_var=no"
8440 fi
8441 rm -f conftest*
8442 LIBS="$ac_save_LIBS"
8443
8444 fi
8445 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8446   echo "$ac_t""yes" 1>&6
8447     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8448     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8449   cat >> confdefs.h <<EOF
8450 #define $ac_tr_lib 1
8451 EOF
8452
8453   LIBS="-lsecurity $LIBS"
8454
8455 else
8456   echo "$ac_t""no" 1>&6
8457 fi
8458  
8459      for ac_func in getprpwnam
8460 do
8461 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8462 echo "configure:8463: checking for $ac_func" >&5
8463 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8464   echo $ac_n "(cached) $ac_c" 1>&6
8465 else
8466   cat > conftest.$ac_ext <<EOF
8467 #line 8468 "configure"
8468 #include "confdefs.h"
8469 /* System header to define __stub macros and hopefully few prototypes,
8470     which can conflict with char $ac_func(); below.  */
8471 #include <assert.h>
8472 /* Override any gcc2 internal prototype to avoid an error.  */
8473 /* We use char because int might match the return type of a gcc2
8474     builtin and then its argument prototype would still apply.  */
8475 char $ac_func();
8476
8477 int main() {
8478
8479 /* The GNU C library defines this for functions which it implements
8480     to always fail with ENOSYS.  Some functions are actually named
8481     something starting with __ and the normal name is an alias.  */
8482 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8483 choke me
8484 #else
8485 $ac_func();
8486 #endif
8487
8488 ; return 0; }
8489 EOF
8490 if { (eval echo configure:8491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8491   rm -rf conftest*
8492   eval "ac_cv_func_$ac_func=yes"
8493 else
8494   echo "configure: failed program was:" >&5
8495   cat conftest.$ac_ext >&5
8496   rm -rf conftest*
8497   eval "ac_cv_func_$ac_func=no"
8498 fi
8499 rm -f conftest*
8500 fi
8501
8502 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8503   echo "$ac_t""yes" 1>&6
8504     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8505   cat >> confdefs.h <<EOF
8506 #define $ac_tr_func 1
8507 EOF
8508  
8509 else
8510   echo "$ac_t""no" 1>&6
8511 fi
8512 done
8513
8514   ;;
8515   esac
8516
8517 case "$LIBS" in
8518   *-lsec*) for ac_func in getprpwnam
8519 do
8520 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8521 echo "configure:8522: checking for $ac_func" >&5
8522 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8523   echo $ac_n "(cached) $ac_c" 1>&6
8524 else
8525   cat > conftest.$ac_ext <<EOF
8526 #line 8527 "configure"
8527 #include "confdefs.h"
8528 /* System header to define __stub macros and hopefully few prototypes,
8529     which can conflict with char $ac_func(); below.  */
8530 #include <assert.h>
8531 /* Override any gcc2 internal prototype to avoid an error.  */
8532 /* We use char because int might match the return type of a gcc2
8533     builtin and then its argument prototype would still apply.  */
8534 char $ac_func();
8535
8536 int main() {
8537
8538 /* The GNU C library defines this for functions which it implements
8539     to always fail with ENOSYS.  Some functions are actually named
8540     something starting with __ and the normal name is an alias.  */
8541 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8542 choke me
8543 #else
8544 $ac_func();
8545 #endif
8546
8547 ; return 0; }
8548 EOF
8549 if { (eval echo configure:8550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8550   rm -rf conftest*
8551   eval "ac_cv_func_$ac_func=yes"
8552 else
8553   echo "configure: failed program was:" >&5
8554   cat conftest.$ac_ext >&5
8555   rm -rf conftest*
8556   eval "ac_cv_func_$ac_func=no"
8557 fi
8558 rm -f conftest*
8559 fi
8560
8561 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8562   echo "$ac_t""yes" 1>&6
8563     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8564   cat >> confdefs.h <<EOF
8565 #define $ac_tr_func 1
8566 EOF
8567  
8568 else
8569   echo "$ac_t""no" 1>&6
8570 fi
8571 done
8572  ;;
8573   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8574 echo "configure:8575: checking for getprpwnam in -lsec" >&5
8575 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8576 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8577   echo $ac_n "(cached) $ac_c" 1>&6
8578 else
8579   ac_save_LIBS="$LIBS"
8580 LIBS="-lsec  $LIBS"
8581 cat > conftest.$ac_ext <<EOF
8582 #line 8583 "configure"
8583 #include "confdefs.h"
8584 /* Override any gcc2 internal prototype to avoid an error.  */
8585 /* We use char because int might match the return type of a gcc2
8586     builtin and then its argument prototype would still apply.  */
8587 char getprpwnam();
8588
8589 int main() {
8590 getprpwnam()
8591 ; return 0; }
8592 EOF
8593 if { (eval echo configure:8594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8594   rm -rf conftest*
8595   eval "ac_cv_lib_$ac_lib_var=yes"
8596 else
8597   echo "configure: failed program was:" >&5
8598   cat conftest.$ac_ext >&5
8599   rm -rf conftest*
8600   eval "ac_cv_lib_$ac_lib_var=no"
8601 fi
8602 rm -f conftest*
8603 LIBS="$ac_save_LIBS"
8604
8605 fi
8606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8607   echo "$ac_t""yes" 1>&6
8608     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8609     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8610   cat >> confdefs.h <<EOF
8611 #define $ac_tr_lib 1
8612 EOF
8613
8614   LIBS="-lsec $LIBS"
8615
8616 else
8617   echo "$ac_t""no" 1>&6
8618 fi
8619  
8620      for ac_func in getprpwnam
8621 do
8622 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8623 echo "configure:8624: checking for $ac_func" >&5
8624 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8625   echo $ac_n "(cached) $ac_c" 1>&6
8626 else
8627   cat > conftest.$ac_ext <<EOF
8628 #line 8629 "configure"
8629 #include "confdefs.h"
8630 /* System header to define __stub macros and hopefully few prototypes,
8631     which can conflict with char $ac_func(); below.  */
8632 #include <assert.h>
8633 /* Override any gcc2 internal prototype to avoid an error.  */
8634 /* We use char because int might match the return type of a gcc2
8635     builtin and then its argument prototype would still apply.  */
8636 char $ac_func();
8637
8638 int main() {
8639
8640 /* The GNU C library defines this for functions which it implements
8641     to always fail with ENOSYS.  Some functions are actually named
8642     something starting with __ and the normal name is an alias.  */
8643 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8644 choke me
8645 #else
8646 $ac_func();
8647 #endif
8648
8649 ; return 0; }
8650 EOF
8651 if { (eval echo configure:8652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8652   rm -rf conftest*
8653   eval "ac_cv_func_$ac_func=yes"
8654 else
8655   echo "configure: failed program was:" >&5
8656   cat conftest.$ac_ext >&5
8657   rm -rf conftest*
8658   eval "ac_cv_func_$ac_func=no"
8659 fi
8660 rm -f conftest*
8661 fi
8662
8663 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8664   echo "$ac_t""yes" 1>&6
8665     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8666   cat >> confdefs.h <<EOF
8667 #define $ac_tr_func 1
8668 EOF
8669  
8670 else
8671   echo "$ac_t""no" 1>&6
8672 fi
8673 done
8674
8675   ;;
8676   esac
8677
8678
8679 # this bit needs to be modified for each OS that is suported by
8680 # smbwrapper. You need to specify how to created a shared library and
8681 # how to compile C code to produce PIC object files
8682
8683 # these are the defaults, good for lots of systems
8684 HOST_OS="$host_os"
8685 LDSHFLAGS="-shared"
8686 PICFLAG=""
8687 SHLIBEXT="so"
8688 BLDSHARED="false"
8689
8690 # and these are for particular systems
8691 case "$host_os" in
8692                 *linux*)   cat >> confdefs.h <<\EOF
8693 #define LINUX 1
8694 EOF
8695
8696                                         BLDSHARED="true"
8697                 ;;
8698                 *solaris*) cat >> confdefs.h <<\EOF
8699 #define SUNOS5 1
8700 EOF
8701
8702                                         LDSHFLAGS="-G"
8703                                         BLDSHARED="true"
8704                 ;;
8705                 *sunos*) cat >> confdefs.h <<\EOF
8706 #define SUNOS4 1
8707 EOF
8708
8709                                         LDSHFLAGS=""
8710                 ;;
8711                 *bsd*) LDSHFLAGS="-shared -Bshareable"
8712                         BLDSHARED="true"
8713                 ;;
8714                 *irix*) cat >> confdefs.h <<\EOF
8715 #define IRIX 1
8716 EOF
8717
8718                         case "$host_os" in
8719                         *irix6*) cat >> confdefs.h <<\EOF
8720 #define IRIX6 1
8721 EOF
8722
8723                         ;;
8724                         esac
8725                         ATTEMPT_WRAP32_BUILD=yes
8726                 ;;
8727                 *aix*) cat >> confdefs.h <<\EOF
8728 #define AIX 1
8729 EOF
8730 ;;
8731                 *hpux*) cat >> confdefs.h <<\EOF
8732 #define HPUX 1
8733 EOF
8734
8735                         SHLIBEXT="sl"
8736                         # Use special PIC flags for the native HP-UX compiler.
8737                         if test $ac_cv_prog_cc_Ae = yes; then
8738                                 LDSHFLAGS="-b"
8739                                 PICFLAG="+z"
8740                         fi
8741                 ;;
8742                 *qnx*) cat >> confdefs.h <<\EOF
8743 #define QNX 1
8744 EOF
8745 ;;
8746                 *osf*) cat >> confdefs.h <<\EOF
8747 #define OSF1 1
8748 EOF
8749 ;;
8750                 *sco*) cat >> confdefs.h <<\EOF
8751 #define SCO 1
8752 EOF
8753 ;;
8754                 *next2*) cat >> confdefs.h <<\EOF
8755 #define NEXT2 1
8756 EOF
8757 ;;
8758                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8759 set dummy groff; ac_word=$2
8760 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8761 echo "configure:8762: checking for $ac_word" >&5
8762 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8763   echo $ac_n "(cached) $ac_c" 1>&6
8764 else
8765   if test -n "$ROFF"; then
8766   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8767 else
8768   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8769   ac_dummy="$PATH"
8770   for ac_dir in $ac_dummy; do
8771     test -z "$ac_dir" && ac_dir=.
8772     if test -f $ac_dir/$ac_word; then
8773       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8774       break
8775     fi
8776   done
8777   IFS="$ac_save_ifs"
8778 fi
8779 fi
8780 ROFF="$ac_cv_prog_ROFF"
8781 if test -n "$ROFF"; then
8782   echo "$ac_t""$ROFF" 1>&6
8783 else
8784   echo "$ac_t""no" 1>&6
8785 fi
8786 ;;
8787                 *sysv4*)
8788                         case "$host" in
8789                                 *-univel-*)     if  test "$GCC" != yes ; then
8790                                                                         cat >> confdefs.h <<\EOF
8791 #define HAVE_MEMSET 1
8792 EOF
8793
8794                                                                 fi
8795                                                                 LDSHFLAGS="-G"
8796                                 ;;
8797                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
8798 #define RELIANTUNIX 1
8799 EOF
8800 ;;
8801                         esac
8802                         ;;
8803                 *sysv5*)
8804                         if  test "$GCC" != yes ; then
8805                                 cat >> confdefs.h <<\EOF
8806 #define HAVE_MEMSET 1
8807 EOF
8808
8809                         fi
8810                         LDSHFLAGS="-G"
8811                         ;;
8812 esac
8813
8814 # try to work out how to produce PIC code with this compiler
8815 echo $ac_n "checking whether ${CC-cc} accepts -fPIC""... $ac_c" 1>&6
8816 echo "configure:8817: checking whether ${CC-cc} accepts -fPIC" >&5
8817 if eval "test \"`echo '$''{'ac_cv_prog_cc_fPIC'+set}'`\" = set"; then
8818   echo $ac_n "(cached) $ac_c" 1>&6
8819 else
8820   echo 'void f(){}' > conftest.c
8821 if test -z "`${CC-cc} -fPIC -c conftest.c 2>&1`"; then
8822   ac_cv_prog_cc_fPIC=yes
8823 else
8824   ac_cv_prog_cc_fPIC=no
8825 fi
8826 rm -f conftest*
8827
8828 fi
8829
8830 echo "$ac_t""$ac_cv_prog_cc_fPIC" 1>&6
8831 if test $ac_cv_prog_cc_fPIC = yes; then
8832     PICFLAG="-fPIC";
8833 fi
8834 if test x$PICFLAG = x; then
8835   echo $ac_n "checking whether ${CC-cc} accepts -KPIC""... $ac_c" 1>&6
8836 echo "configure:8837: checking whether ${CC-cc} accepts -KPIC" >&5
8837 if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then
8838   echo $ac_n "(cached) $ac_c" 1>&6
8839 else
8840   echo 'void f(){}' > conftest.c
8841 if test -z "`${CC-cc} -KPIC -c conftest.c 2>&1`"; then
8842   ac_cv_prog_cc_KPIC=yes
8843 else
8844   ac_cv_prog_cc_KPIC=no
8845 fi
8846 rm -f conftest*
8847
8848 fi
8849
8850 echo "$ac_t""$ac_cv_prog_cc_KPIC" 1>&6
8851   if test $ac_cv_prog_cc_KPIC = yes; then
8852     PICFLAG="-KPIC";
8853   fi
8854 fi
8855 if test x$PICFLAG = x; then
8856   echo $ac_n "checking whether ${CC-cc} accepts -Kpic""... $ac_c" 1>&6
8857 echo "configure:8858: checking whether ${CC-cc} accepts -Kpic" >&5
8858 if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then
8859   echo $ac_n "(cached) $ac_c" 1>&6
8860 else
8861   echo 'void f(){}' > conftest.c
8862 if test -z "`${CC-cc} -Kpic -c conftest.c 2>&1`"; then
8863   ac_cv_prog_cc_Kpic=yes
8864 else
8865   ac_cv_prog_cc_Kpic=no
8866 fi
8867 rm -f conftest*
8868
8869 fi
8870
8871 echo "$ac_t""$ac_cv_prog_cc_Kpic" 1>&6
8872   if test $ac_cv_prog_cc_Kpic = yes; then
8873     PICFLAG="-Kpic";
8874   fi
8875 fi
8876
8877 ################
8878
8879 echo $ac_n "checking for long long""... $ac_c" 1>&6
8880 echo "configure:8881: checking for long long" >&5
8881 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8882   echo $ac_n "(cached) $ac_c" 1>&6
8883 else
8884   
8885 if test "$cross_compiling" = yes; then
8886   samba_cv_have_longlong=cross
8887 else
8888   cat > conftest.$ac_ext <<EOF
8889 #line 8890 "configure"
8890 #include "confdefs.h"
8891 #include <stdio.h>
8892 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8893 EOF
8894 if { (eval echo configure:8895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8895 then
8896   samba_cv_have_longlong=yes
8897 else
8898   echo "configure: failed program was:" >&5
8899   cat conftest.$ac_ext >&5
8900   rm -fr conftest*
8901   samba_cv_have_longlong=no
8902 fi
8903 rm -fr conftest*
8904 fi
8905
8906 fi
8907
8908 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8909 if test x"$samba_cv_have_longlong" = x"yes"; then
8910     cat >> confdefs.h <<\EOF
8911 #define HAVE_LONGLONG 1
8912 EOF
8913
8914 fi
8915
8916 #
8917 # Check if the compiler supports the LL prefix on long long integers.
8918 # AIX needs this.
8919
8920 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8921 echo "configure:8922: checking for LL suffix on long long integers" >&5
8922 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8923   echo $ac_n "(cached) $ac_c" 1>&6
8924 else
8925   
8926     cat > conftest.$ac_ext <<EOF
8927 #line 8928 "configure"
8928 #include "confdefs.h"
8929 #include <stdio.h>
8930 int main() {
8931 long long i = 0x8000000000LL
8932 ; return 0; }
8933 EOF
8934 if { (eval echo configure:8935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8935   rm -rf conftest*
8936   samba_cv_compiler_supports_ll=yes
8937 else
8938   echo "configure: failed program was:" >&5
8939   cat conftest.$ac_ext >&5
8940   rm -rf conftest*
8941   samba_cv_compiler_supports_ll=no
8942 fi
8943 rm -f conftest*
8944 fi
8945
8946 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8947 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8948    cat >> confdefs.h <<\EOF
8949 #define COMPILER_SUPPORTS_LL 1
8950 EOF
8951
8952 fi
8953
8954   
8955 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8956 echo "configure:8957: checking for 64 bit off_t" >&5
8957 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8958   echo $ac_n "(cached) $ac_c" 1>&6
8959 else
8960   
8961 if test "$cross_compiling" = yes; then
8962   samba_cv_SIZEOF_OFF_T=cross
8963 else
8964   cat > conftest.$ac_ext <<EOF
8965 #line 8966 "configure"
8966 #include "confdefs.h"
8967 #include <stdio.h>
8968 #include <sys/stat.h>
8969 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8970 EOF
8971 if { (eval echo configure:8972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8972 then
8973   samba_cv_SIZEOF_OFF_T=yes
8974 else
8975   echo "configure: failed program was:" >&5
8976   cat conftest.$ac_ext >&5
8977   rm -fr conftest*
8978   samba_cv_SIZEOF_OFF_T=no
8979 fi
8980 rm -fr conftest*
8981 fi
8982
8983 fi
8984
8985 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8986 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8987     cat >> confdefs.h <<\EOF
8988 #define SIZEOF_OFF_T 8
8989 EOF
8990
8991 fi
8992
8993 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8994 echo "configure:8995: checking for off64_t" >&5
8995 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8996   echo $ac_n "(cached) $ac_c" 1>&6
8997 else
8998   
8999 if test "$cross_compiling" = yes; then
9000   samba_cv_HAVE_OFF64_T=cross
9001 else
9002   cat > conftest.$ac_ext <<EOF
9003 #line 9004 "configure"
9004 #include "confdefs.h"
9005
9006 #if defined(HAVE_UNISTD_H)
9007 #include <unistd.h>
9008 #endif
9009 #include <stdio.h>
9010 #include <sys/stat.h>
9011 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9012 EOF
9013 if { (eval echo configure:9014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9014 then
9015   samba_cv_HAVE_OFF64_T=yes
9016 else
9017   echo "configure: failed program was:" >&5
9018   cat conftest.$ac_ext >&5
9019   rm -fr conftest*
9020   samba_cv_HAVE_OFF64_T=no
9021 fi
9022 rm -fr conftest*
9023 fi
9024
9025 fi
9026
9027 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
9028 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
9029     cat >> confdefs.h <<\EOF
9030 #define HAVE_OFF64_T 1
9031 EOF
9032
9033 fi
9034
9035 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
9036 echo "configure:9037: checking for 64 bit ino_t" >&5
9037 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
9038   echo $ac_n "(cached) $ac_c" 1>&6
9039 else
9040   
9041 if test "$cross_compiling" = yes; then
9042   samba_cv_SIZEOF_INO_T=cross
9043 else
9044   cat > conftest.$ac_ext <<EOF
9045 #line 9046 "configure"
9046 #include "confdefs.h"
9047 #include <stdio.h>
9048 #include <sys/stat.h>
9049 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
9050 EOF
9051 if { (eval echo configure:9052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9052 then
9053   samba_cv_SIZEOF_INO_T=yes
9054 else
9055   echo "configure: failed program was:" >&5
9056   cat conftest.$ac_ext >&5
9057   rm -fr conftest*
9058   samba_cv_SIZEOF_INO_T=no
9059 fi
9060 rm -fr conftest*
9061 fi
9062
9063 fi
9064
9065 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
9066 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
9067     cat >> confdefs.h <<\EOF
9068 #define SIZEOF_INO_T 8
9069 EOF
9070
9071 fi
9072
9073 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
9074 echo "configure:9075: checking for ino64_t" >&5
9075 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
9076   echo $ac_n "(cached) $ac_c" 1>&6
9077 else
9078   
9079 if test "$cross_compiling" = yes; then
9080   samba_cv_HAVE_INO64_T=cross
9081 else
9082   cat > conftest.$ac_ext <<EOF
9083 #line 9084 "configure"
9084 #include "confdefs.h"
9085
9086 #if defined(HAVE_UNISTD_H)
9087 #include <unistd.h>
9088 #endif
9089 #include <stdio.h>
9090 #include <sys/stat.h>
9091 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9092 EOF
9093 if { (eval echo configure:9094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9094 then
9095   samba_cv_HAVE_INO64_T=yes
9096 else
9097   echo "configure: failed program was:" >&5
9098   cat conftest.$ac_ext >&5
9099   rm -fr conftest*
9100   samba_cv_HAVE_INO64_T=no
9101 fi
9102 rm -fr conftest*
9103 fi
9104
9105 fi
9106
9107 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9108 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9109     cat >> confdefs.h <<\EOF
9110 #define HAVE_INO64_T 1
9111 EOF
9112
9113 fi
9114
9115 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9116 echo "configure:9117: checking for struct dirent64" >&5
9117 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9118   echo $ac_n "(cached) $ac_c" 1>&6
9119 else
9120   
9121 cat > conftest.$ac_ext <<EOF
9122 #line 9123 "configure"
9123 #include "confdefs.h"
9124
9125 #if defined(HAVE_UNISTD_H)
9126 #include <unistd.h>
9127 #endif
9128 #include <sys/types.h>
9129 #include <dirent.h>
9130 int main() {
9131 struct dirent64 de;
9132 ; return 0; }
9133 EOF
9134 if { (eval echo configure:9135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9135   rm -rf conftest*
9136   samba_cv_HAVE_STRUCT_DIRENT64=yes
9137 else
9138   echo "configure: failed program was:" >&5
9139   cat conftest.$ac_ext >&5
9140   rm -rf conftest*
9141   samba_cv_HAVE_STRUCT_DIRENT64=no
9142 fi
9143 rm -f conftest*
9144 fi
9145
9146 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9147 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
9148     cat >> confdefs.h <<\EOF
9149 #define HAVE_STRUCT_DIRENT64 1
9150 EOF
9151
9152 fi
9153
9154 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9155 echo "configure:9156: checking for unsigned char" >&5
9156 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9157   echo $ac_n "(cached) $ac_c" 1>&6
9158 else
9159   
9160 if test "$cross_compiling" = yes; then
9161   samba_cv_HAVE_UNSIGNED_CHAR=cross
9162 else
9163   cat > conftest.$ac_ext <<EOF
9164 #line 9165 "configure"
9165 #include "confdefs.h"
9166 #include <stdio.h>
9167 main() { char c; c=250; exit((c > 0)?0:1); }
9168 EOF
9169 if { (eval echo configure:9170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9170 then
9171   samba_cv_HAVE_UNSIGNED_CHAR=yes
9172 else
9173   echo "configure: failed program was:" >&5
9174   cat conftest.$ac_ext >&5
9175   rm -fr conftest*
9176   samba_cv_HAVE_UNSIGNED_CHAR=no
9177 fi
9178 rm -fr conftest*
9179 fi
9180
9181 fi
9182
9183 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9184 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9185     cat >> confdefs.h <<\EOF
9186 #define HAVE_UNSIGNED_CHAR 1
9187 EOF
9188
9189 fi
9190
9191 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9192 echo "configure:9193: checking for sin_len in sock" >&5
9193 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9194   echo $ac_n "(cached) $ac_c" 1>&6
9195 else
9196   
9197 cat > conftest.$ac_ext <<EOF
9198 #line 9199 "configure"
9199 #include "confdefs.h"
9200 #include <sys/types.h>
9201 #include <sys/socket.h>
9202 #include <netinet/in.h>
9203 int main() {
9204 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9205 ; return 0; }
9206 EOF
9207 if { (eval echo configure:9208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9208   rm -rf conftest*
9209   samba_cv_HAVE_SOCK_SIN_LEN=yes
9210 else
9211   echo "configure: failed program was:" >&5
9212   cat conftest.$ac_ext >&5
9213   rm -rf conftest*
9214   samba_cv_HAVE_SOCK_SIN_LEN=no
9215 fi
9216 rm -f conftest*
9217 fi
9218
9219 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9220 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9221     cat >> confdefs.h <<\EOF
9222 #define HAVE_SOCK_SIN_LEN 1
9223 EOF
9224
9225 fi
9226
9227 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9228 echo "configure:9229: checking whether seekdir returns void" >&5
9229 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9230   echo $ac_n "(cached) $ac_c" 1>&6
9231 else
9232   
9233 cat > conftest.$ac_ext <<EOF
9234 #line 9235 "configure"
9235 #include "confdefs.h"
9236 #include <sys/types.h>
9237 #include <dirent.h>
9238 void seekdir(DIR *d, long loc) { return; }
9239 int main() {
9240 return 0;
9241 ; return 0; }
9242 EOF
9243 if { (eval echo configure:9244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9244   rm -rf conftest*
9245   samba_cv_SEEKDIR_RETURNS_VOID=yes
9246 else
9247   echo "configure: failed program was:" >&5
9248   cat conftest.$ac_ext >&5
9249   rm -rf conftest*
9250   samba_cv_SEEKDIR_RETURNS_VOID=no
9251 fi
9252 rm -f conftest*
9253 fi
9254
9255 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9256 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9257     cat >> confdefs.h <<\EOF
9258 #define SEEKDIR_RETURNS_VOID 1
9259 EOF
9260
9261 fi
9262
9263 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9264 echo "configure:9265: checking for __FILE__ macro" >&5
9265 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9266   echo $ac_n "(cached) $ac_c" 1>&6
9267 else
9268   
9269 cat > conftest.$ac_ext <<EOF
9270 #line 9271 "configure"
9271 #include "confdefs.h"
9272 #include <stdio.h>
9273 int main() {
9274 printf("%s\n", __FILE__);
9275 ; return 0; }
9276 EOF
9277 if { (eval echo configure:9278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9278   rm -rf conftest*
9279   samba_cv_HAVE_FILE_MACRO=yes
9280 else
9281   echo "configure: failed program was:" >&5
9282   cat conftest.$ac_ext >&5
9283   rm -rf conftest*
9284   samba_cv_HAVE_FILE_MACRO=no
9285 fi
9286 rm -f conftest*
9287 fi
9288
9289 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9290 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9291     cat >> confdefs.h <<\EOF
9292 #define HAVE_FILE_MACRO 1
9293 EOF
9294
9295 fi
9296
9297 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9298 echo "configure:9299: checking for __FUNCTION__ macro" >&5
9299 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9300   echo $ac_n "(cached) $ac_c" 1>&6
9301 else
9302   
9303 cat > conftest.$ac_ext <<EOF
9304 #line 9305 "configure"
9305 #include "confdefs.h"
9306 #include <stdio.h>
9307 int main() {
9308 printf("%s\n", __FUNCTION__);
9309 ; return 0; }
9310 EOF
9311 if { (eval echo configure:9312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9312   rm -rf conftest*
9313   samba_cv_HAVE_FUNCTION_MACRO=yes
9314 else
9315   echo "configure: failed program was:" >&5
9316   cat conftest.$ac_ext >&5
9317   rm -rf conftest*
9318   samba_cv_HAVE_FUNCTION_MACRO=no
9319 fi
9320 rm -f conftest*
9321 fi
9322
9323 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9324 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9325     cat >> confdefs.h <<\EOF
9326 #define HAVE_FUNCTION_MACRO 1
9327 EOF
9328
9329 fi
9330
9331 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9332 echo "configure:9333: checking if gettimeofday takes tz argument" >&5
9333 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9334   echo $ac_n "(cached) $ac_c" 1>&6
9335 else
9336   
9337 if test "$cross_compiling" = yes; then
9338   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9339 else
9340   cat > conftest.$ac_ext <<EOF
9341 #line 9342 "configure"
9342 #include "confdefs.h"
9343
9344 #include <sys/time.h>
9345 #include <unistd.h>
9346 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9347 EOF
9348 if { (eval echo configure:9349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9349 then
9350   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9351 else
9352   echo "configure: failed program was:" >&5
9353   cat conftest.$ac_ext >&5
9354   rm -fr conftest*
9355   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9356 fi
9357 rm -fr conftest*
9358 fi
9359
9360 fi
9361
9362 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9363 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9364     cat >> confdefs.h <<\EOF
9365 #define HAVE_GETTIMEOFDAY_TZ 1
9366 EOF
9367
9368 fi
9369
9370 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9371 echo "configure:9372: checking for C99 vsnprintf" >&5
9372 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9373   echo $ac_n "(cached) $ac_c" 1>&6
9374 else
9375   
9376 if test "$cross_compiling" = yes; then
9377   samba_cv_HAVE_C99_VSNPRINTF=cross
9378 else
9379   cat > conftest.$ac_ext <<EOF
9380 #line 9381 "configure"
9381 #include "confdefs.h"
9382
9383 #include <sys/types.h>
9384 #include <stdarg.h>
9385 void foo(const char *format, ...) { 
9386        va_list ap;
9387        int len;
9388        char buf[5];
9389
9390        va_start(ap, format);
9391        len = vsnprintf(0, 0, format, ap);
9392        va_end(ap);
9393        if (len != 5) exit(1);
9394
9395        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9396
9397        exit(0);
9398 }
9399 main() { foo("hello"); }
9400
9401 EOF
9402 if { (eval echo configure:9403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9403 then
9404   samba_cv_HAVE_C99_VSNPRINTF=yes
9405 else
9406   echo "configure: failed program was:" >&5
9407   cat conftest.$ac_ext >&5
9408   rm -fr conftest*
9409   samba_cv_HAVE_C99_VSNPRINTF=no
9410 fi
9411 rm -fr conftest*
9412 fi
9413
9414 fi
9415
9416 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9417 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9418     cat >> confdefs.h <<\EOF
9419 #define HAVE_C99_VSNPRINTF 1
9420 EOF
9421
9422 fi
9423
9424 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9425 echo "configure:9426: checking for broken readdir" >&5
9426 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9427   echo $ac_n "(cached) $ac_c" 1>&6
9428 else
9429   
9430 if test "$cross_compiling" = yes; then
9431   samba_cv_HAVE_BROKEN_READDIR=cross
9432 else
9433   cat > conftest.$ac_ext <<EOF
9434 #line 9435 "configure"
9435 #include "confdefs.h"
9436 #include <sys/types.h>
9437 #include <dirent.h>
9438 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9439 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9440 di->d_name[0] == 0) exit(0); exit(1);} 
9441 EOF
9442 if { (eval echo configure:9443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9443 then
9444   samba_cv_HAVE_BROKEN_READDIR=yes
9445 else
9446   echo "configure: failed program was:" >&5
9447   cat conftest.$ac_ext >&5
9448   rm -fr conftest*
9449   samba_cv_HAVE_BROKEN_READDIR=no
9450 fi
9451 rm -fr conftest*
9452 fi
9453
9454 fi
9455
9456 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9457 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9458     cat >> confdefs.h <<\EOF
9459 #define HAVE_BROKEN_READDIR 1
9460 EOF
9461
9462 fi
9463
9464 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9465 echo "configure:9466: checking for utimbuf" >&5
9466 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9467   echo $ac_n "(cached) $ac_c" 1>&6
9468 else
9469   
9470 cat > conftest.$ac_ext <<EOF
9471 #line 9472 "configure"
9472 #include "confdefs.h"
9473 #include <sys/types.h>
9474 #include <utime.h>
9475 int main() {
9476 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9477 ; return 0; }
9478 EOF
9479 if { (eval echo configure:9480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9480   rm -rf conftest*
9481   samba_cv_HAVE_UTIMBUF=yes
9482 else
9483   echo "configure: failed program was:" >&5
9484   cat conftest.$ac_ext >&5
9485   rm -rf conftest*
9486   samba_cv_HAVE_UTIMBUF=no
9487 fi
9488 rm -f conftest*
9489 fi
9490
9491 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9492 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9493     cat >> confdefs.h <<\EOF
9494 #define HAVE_UTIMBUF 1
9495 EOF
9496
9497 fi
9498
9499
9500 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9501 do
9502 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9503 echo "configure:9504: checking for $ac_func" >&5
9504 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9505   echo $ac_n "(cached) $ac_c" 1>&6
9506 else
9507   cat > conftest.$ac_ext <<EOF
9508 #line 9509 "configure"
9509 #include "confdefs.h"
9510 /* System header to define __stub macros and hopefully few prototypes,
9511     which can conflict with char $ac_func(); below.  */
9512 #include <assert.h>
9513 /* Override any gcc2 internal prototype to avoid an error.  */
9514 /* We use char because int might match the return type of a gcc2
9515     builtin and then its argument prototype would still apply.  */
9516 char $ac_func();
9517
9518 int main() {
9519
9520 /* The GNU C library defines this for functions which it implements
9521     to always fail with ENOSYS.  Some functions are actually named
9522     something starting with __ and the normal name is an alias.  */
9523 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9524 choke me
9525 #else
9526 $ac_func();
9527 #endif
9528
9529 ; return 0; }
9530 EOF
9531 if { (eval echo configure:9532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9532   rm -rf conftest*
9533   eval "ac_cv_func_$ac_func=yes"
9534 else
9535   echo "configure: failed program was:" >&5
9536   cat conftest.$ac_ext >&5
9537   rm -rf conftest*
9538   eval "ac_cv_func_$ac_func=no"
9539 fi
9540 rm -f conftest*
9541 fi
9542
9543 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9544   echo "$ac_t""yes" 1>&6
9545     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9546   cat >> confdefs.h <<EOF
9547 #define $ac_tr_func 1
9548 EOF
9549  
9550 else
9551   echo "$ac_t""no" 1>&6
9552 fi
9553 done
9554
9555
9556 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9557 echo "configure:9558: checking for ut_name in utmp" >&5
9558 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9559   echo $ac_n "(cached) $ac_c" 1>&6
9560 else
9561   
9562 cat > conftest.$ac_ext <<EOF
9563 #line 9564 "configure"
9564 #include "confdefs.h"
9565 #include <sys/types.h>
9566 #include <utmp.h>
9567 int main() {
9568 struct utmp ut;  ut.ut_name[0] = 'a';
9569 ; return 0; }
9570 EOF
9571 if { (eval echo configure:9572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9572   rm -rf conftest*
9573   samba_cv_HAVE_UT_UT_NAME=yes
9574 else
9575   echo "configure: failed program was:" >&5
9576   cat conftest.$ac_ext >&5
9577   rm -rf conftest*
9578   samba_cv_HAVE_UT_UT_NAME=no
9579 fi
9580 rm -f conftest*
9581 fi
9582
9583 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9584 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9585     cat >> confdefs.h <<\EOF
9586 #define HAVE_UT_UT_NAME 1
9587 EOF
9588
9589 fi 
9590
9591 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9592 echo "configure:9593: checking for ut_user in utmp" >&5
9593 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9594   echo $ac_n "(cached) $ac_c" 1>&6
9595 else
9596   
9597 cat > conftest.$ac_ext <<EOF
9598 #line 9599 "configure"
9599 #include "confdefs.h"
9600 #include <sys/types.h>
9601 #include <utmp.h>
9602 int main() {
9603 struct utmp ut;  ut.ut_user[0] = 'a';
9604 ; return 0; }
9605 EOF
9606 if { (eval echo configure:9607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9607   rm -rf conftest*
9608   samba_cv_HAVE_UT_UT_USER=yes
9609 else
9610   echo "configure: failed program was:" >&5
9611   cat conftest.$ac_ext >&5
9612   rm -rf conftest*
9613   samba_cv_HAVE_UT_UT_USER=no
9614 fi
9615 rm -f conftest*
9616 fi
9617
9618 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9619 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9620     cat >> confdefs.h <<\EOF
9621 #define HAVE_UT_UT_USER 1
9622 EOF
9623
9624 fi 
9625
9626 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9627 echo "configure:9628: checking for ut_id in utmp" >&5
9628 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9629   echo $ac_n "(cached) $ac_c" 1>&6
9630 else
9631   
9632 cat > conftest.$ac_ext <<EOF
9633 #line 9634 "configure"
9634 #include "confdefs.h"
9635 #include <sys/types.h>
9636 #include <utmp.h>
9637 int main() {
9638 struct utmp ut;  ut.ut_id[0] = 'a';
9639 ; return 0; }
9640 EOF
9641 if { (eval echo configure:9642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9642   rm -rf conftest*
9643   samba_cv_HAVE_UT_UT_ID=yes
9644 else
9645   echo "configure: failed program was:" >&5
9646   cat conftest.$ac_ext >&5
9647   rm -rf conftest*
9648   samba_cv_HAVE_UT_UT_ID=no
9649 fi
9650 rm -f conftest*
9651 fi
9652
9653 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9654 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9655     cat >> confdefs.h <<\EOF
9656 #define HAVE_UT_UT_ID 1
9657 EOF
9658
9659 fi 
9660
9661 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9662 echo "configure:9663: checking for ut_host in utmp" >&5
9663 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9664   echo $ac_n "(cached) $ac_c" 1>&6
9665 else
9666   
9667 cat > conftest.$ac_ext <<EOF
9668 #line 9669 "configure"
9669 #include "confdefs.h"
9670 #include <sys/types.h>
9671 #include <utmp.h>
9672 int main() {
9673 struct utmp ut;  ut.ut_host[0] = 'a';
9674 ; return 0; }
9675 EOF
9676 if { (eval echo configure:9677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9677   rm -rf conftest*
9678   samba_cv_HAVE_UT_UT_HOST=yes
9679 else
9680   echo "configure: failed program was:" >&5
9681   cat conftest.$ac_ext >&5
9682   rm -rf conftest*
9683   samba_cv_HAVE_UT_UT_HOST=no
9684 fi
9685 rm -f conftest*
9686 fi
9687
9688 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9689 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9690     cat >> confdefs.h <<\EOF
9691 #define HAVE_UT_UT_HOST 1
9692 EOF
9693
9694 fi 
9695
9696 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9697 echo "configure:9698: checking for ut_time in utmp" >&5
9698 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9699   echo $ac_n "(cached) $ac_c" 1>&6
9700 else
9701   
9702 cat > conftest.$ac_ext <<EOF
9703 #line 9704 "configure"
9704 #include "confdefs.h"
9705 #include <sys/types.h>
9706 #include <utmp.h>
9707 int main() {
9708 struct utmp ut;  time_t t; ut.ut_time = t;
9709 ; return 0; }
9710 EOF
9711 if { (eval echo configure:9712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9712   rm -rf conftest*
9713   samba_cv_HAVE_UT_UT_TIME=yes
9714 else
9715   echo "configure: failed program was:" >&5
9716   cat conftest.$ac_ext >&5
9717   rm -rf conftest*
9718   samba_cv_HAVE_UT_UT_TIME=no
9719 fi
9720 rm -f conftest*
9721 fi
9722
9723 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9724 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9725     cat >> confdefs.h <<\EOF
9726 #define HAVE_UT_UT_TIME 1
9727 EOF
9728
9729 fi 
9730
9731 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9732 echo "configure:9733: checking for ut_tv in utmp" >&5
9733 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9734   echo $ac_n "(cached) $ac_c" 1>&6
9735 else
9736   
9737 cat > conftest.$ac_ext <<EOF
9738 #line 9739 "configure"
9739 #include "confdefs.h"
9740 #include <sys/types.h>
9741 #include <utmp.h>
9742 int main() {
9743 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9744 ; return 0; }
9745 EOF
9746 if { (eval echo configure:9747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9747   rm -rf conftest*
9748   samba_cv_HAVE_UT_UT_TV=yes
9749 else
9750   echo "configure: failed program was:" >&5
9751   cat conftest.$ac_ext >&5
9752   rm -rf conftest*
9753   samba_cv_HAVE_UT_UT_TV=no
9754 fi
9755 rm -f conftest*
9756 fi
9757
9758 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9759 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9760     cat >> confdefs.h <<\EOF
9761 #define HAVE_UT_UT_TV 1
9762 EOF
9763
9764 fi 
9765
9766 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9767 echo "configure:9768: checking for ut_type in utmp" >&5
9768 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9769   echo $ac_n "(cached) $ac_c" 1>&6
9770 else
9771   
9772 cat > conftest.$ac_ext <<EOF
9773 #line 9774 "configure"
9774 #include "confdefs.h"
9775 #include <sys/types.h>
9776 #include <utmp.h>
9777 int main() {
9778 struct utmp ut;  ut.ut_type = 0;
9779 ; return 0; }
9780 EOF
9781 if { (eval echo configure:9782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9782   rm -rf conftest*
9783   samba_cv_HAVE_UT_UT_TYPE=yes
9784 else
9785   echo "configure: failed program was:" >&5
9786   cat conftest.$ac_ext >&5
9787   rm -rf conftest*
9788   samba_cv_HAVE_UT_UT_TYPE=no
9789 fi
9790 rm -f conftest*
9791 fi
9792
9793 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9794 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9795     cat >> confdefs.h <<\EOF
9796 #define HAVE_UT_UT_TYPE 1
9797 EOF
9798
9799 fi 
9800
9801 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9802 echo "configure:9803: checking for ut_pid in utmp" >&5
9803 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9804   echo $ac_n "(cached) $ac_c" 1>&6
9805 else
9806   
9807 cat > conftest.$ac_ext <<EOF
9808 #line 9809 "configure"
9809 #include "confdefs.h"
9810 #include <sys/types.h>
9811 #include <utmp.h>
9812 int main() {
9813 struct utmp ut;  ut.ut_pid = 0;
9814 ; return 0; }
9815 EOF
9816 if { (eval echo configure:9817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9817   rm -rf conftest*
9818   samba_cv_HAVE_UT_UT_PID=yes
9819 else
9820   echo "configure: failed program was:" >&5
9821   cat conftest.$ac_ext >&5
9822   rm -rf conftest*
9823   samba_cv_HAVE_UT_UT_PID=no
9824 fi
9825 rm -f conftest*
9826 fi
9827
9828 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9829 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9830     cat >> confdefs.h <<\EOF
9831 #define HAVE_UT_UT_PID 1
9832 EOF
9833
9834 fi 
9835
9836 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9837 echo "configure:9838: checking for ut_exit in utmp" >&5
9838 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9839   echo $ac_n "(cached) $ac_c" 1>&6
9840 else
9841   
9842 cat > conftest.$ac_ext <<EOF
9843 #line 9844 "configure"
9844 #include "confdefs.h"
9845 #include <sys/types.h>
9846 #include <utmp.h>
9847 int main() {
9848 struct utmp ut;  ut.ut_exit.e_exit = 0;
9849 ; return 0; }
9850 EOF
9851 if { (eval echo configure:9852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9852   rm -rf conftest*
9853   samba_cv_HAVE_UT_UT_EXIT=yes
9854 else
9855   echo "configure: failed program was:" >&5
9856   cat conftest.$ac_ext >&5
9857   rm -rf conftest*
9858   samba_cv_HAVE_UT_UT_EXIT=no
9859 fi
9860 rm -f conftest*
9861 fi
9862
9863 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9864 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9865     cat >> confdefs.h <<\EOF
9866 #define HAVE_UT_UT_EXIT 1
9867 EOF
9868
9869 fi 
9870
9871 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9872 echo "configure:9873: checking for ut_addr in utmp" >&5
9873 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9874   echo $ac_n "(cached) $ac_c" 1>&6
9875 else
9876   
9877 cat > conftest.$ac_ext <<EOF
9878 #line 9879 "configure"
9879 #include "confdefs.h"
9880 #include <sys/types.h>
9881 #include <utmp.h>
9882 int main() {
9883 struct utmp ut;  ut.ut_addr = 0;
9884 ; return 0; }
9885 EOF
9886 if { (eval echo configure:9887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9887   rm -rf conftest*
9888   samba_cv_HAVE_UT_UT_ADDR=yes
9889 else
9890   echo "configure: failed program was:" >&5
9891   cat conftest.$ac_ext >&5
9892   rm -rf conftest*
9893   samba_cv_HAVE_UT_UT_ADDR=no
9894 fi
9895 rm -f conftest*
9896 fi
9897
9898 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9899 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9900     cat >> confdefs.h <<\EOF
9901 #define HAVE_UT_UT_ADDR 1
9902 EOF
9903
9904 fi 
9905
9906 if test x$ac_cv_func_pututline = xyes ; then
9907   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9908 echo "configure:9909: checking whether pututline returns pointer" >&5
9909 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9910   echo $ac_n "(cached) $ac_c" 1>&6
9911 else
9912   
9913   cat > conftest.$ac_ext <<EOF
9914 #line 9915 "configure"
9915 #include "confdefs.h"
9916 #include <sys/types.h>
9917 #include <utmp.h>
9918 int main() {
9919 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9920 ; return 0; }
9921 EOF
9922 if { (eval echo configure:9923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9923   rm -rf conftest*
9924   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9925 else
9926   echo "configure: failed program was:" >&5
9927   cat conftest.$ac_ext >&5
9928   rm -rf conftest*
9929   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9930 fi
9931 rm -f conftest*
9932 fi
9933
9934 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9935   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9936       cat >> confdefs.h <<\EOF
9937 #define PUTUTLINE_RETURNS_UTMP 1
9938 EOF
9939
9940   fi
9941 fi
9942
9943 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9944 echo "configure:9945: checking for ut_syslen in utmpx" >&5
9945 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9946   echo $ac_n "(cached) $ac_c" 1>&6
9947 else
9948   
9949 cat > conftest.$ac_ext <<EOF
9950 #line 9951 "configure"
9951 #include "confdefs.h"
9952 #include <sys/types.h>
9953 #include <utmpx.h>
9954 int main() {
9955 struct utmpx ux;  ux.ut_syslen = 0;
9956 ; return 0; }
9957 EOF
9958 if { (eval echo configure:9959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9959   rm -rf conftest*
9960   samba_cv_HAVE_UX_UT_SYSLEN=yes
9961 else
9962   echo "configure: failed program was:" >&5
9963   cat conftest.$ac_ext >&5
9964   rm -rf conftest*
9965   samba_cv_HAVE_UX_UT_SYSLEN=no
9966 fi
9967 rm -f conftest*
9968 fi
9969
9970 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
9971 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
9972     cat >> confdefs.h <<\EOF
9973 #define HAVE_UX_UT_SYSLEN 1
9974 EOF
9975
9976 fi 
9977
9978 ############
9979 # check for iconv in libc, and if not then we build our own
9980 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
9981 echo "configure:9982: checking for working iconv" >&5
9982 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
9983   echo $ac_n "(cached) $ac_c" 1>&6
9984 else
9985   
9986 if test "$cross_compiling" = yes; then
9987   samba_cv_HAVE_NATIVE_ICONV=cross
9988 else
9989   cat > conftest.$ac_ext <<EOF
9990 #line 9991 "configure"
9991 #include "confdefs.h"
9992
9993 #include <iconv.h>
9994 main() {
9995        iconv_t cd = iconv_open("ASCII", "UCS2");
9996        if (cd == 0 || cd == (iconv_t)-1) return -1;
9997        return 0;
9998 }
9999
10000 EOF
10001 if { (eval echo configure:10002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10002 then
10003   samba_cv_HAVE_NATIVE_ICONV=yes
10004 else
10005   echo "configure: failed program was:" >&5
10006   cat conftest.$ac_ext >&5
10007   rm -fr conftest*
10008   samba_cv_HAVE_NATIVE_ICONV=no
10009 fi
10010 rm -fr conftest*
10011 fi
10012
10013 fi
10014
10015 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
10016 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
10017     cat >> confdefs.h <<\EOF
10018 #define HAVE_NATIVE_ICONV 1
10019 EOF
10020
10021     ICONV_OBJS=""
10022 else
10023     ICONV_OBJS="iconv/iconv.o"
10024 fi
10025
10026
10027
10028 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
10029 echo "configure:10030: checking for Linux kernel oplocks" >&5
10030 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
10031   echo $ac_n "(cached) $ac_c" 1>&6
10032 else
10033   
10034 if test "$cross_compiling" = yes; then
10035   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
10036 else
10037   cat > conftest.$ac_ext <<EOF
10038 #line 10039 "configure"
10039 #include "confdefs.h"
10040
10041 #include <sys/types.h>
10042 #include <fcntl.h>
10043 #ifndef F_GETLEASE
10044 #define F_GETLEASE      1025
10045 #endif
10046 main() {
10047        int fd = open("/dev/null", O_RDONLY);
10048        return fcntl(fd, F_GETLEASE, 0) == -1;
10049 }
10050
10051 EOF
10052 if { (eval echo configure:10053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10053 then
10054   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10055 else
10056   echo "configure: failed program was:" >&5
10057   cat conftest.$ac_ext >&5
10058   rm -fr conftest*
10059   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10060 fi
10061 rm -fr conftest*
10062 fi
10063
10064 fi
10065
10066 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10067 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10068     cat >> confdefs.h <<\EOF
10069 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10070 EOF
10071
10072 fi
10073
10074 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10075 echo "configure:10076: checking for kernel change notify support" >&5
10076 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10077   echo $ac_n "(cached) $ac_c" 1>&6
10078 else
10079   
10080 if test "$cross_compiling" = yes; then
10081   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10082 else
10083   cat > conftest.$ac_ext <<EOF
10084 #line 10085 "configure"
10085 #include "confdefs.h"
10086
10087 #include <sys/types.h>
10088 #include <fcntl.h>
10089 #include <signal.h>
10090 #ifndef F_NOTIFY
10091 #define F_NOTIFY 1026
10092 #endif
10093 main() {
10094         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10095 }
10096
10097 EOF
10098 if { (eval echo configure:10099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10099 then
10100   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10101 else
10102   echo "configure: failed program was:" >&5
10103   cat conftest.$ac_ext >&5
10104   rm -fr conftest*
10105   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10106 fi
10107 rm -fr conftest*
10108 fi
10109
10110 fi
10111
10112 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10113 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10114     cat >> confdefs.h <<\EOF
10115 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10116 EOF
10117
10118 fi
10119
10120 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10121 echo "configure:10122: checking for kernel share modes" >&5
10122 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10123   echo $ac_n "(cached) $ac_c" 1>&6
10124 else
10125   
10126 if test "$cross_compiling" = yes; then
10127   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10128 else
10129   cat > conftest.$ac_ext <<EOF
10130 #line 10131 "configure"
10131 #include "confdefs.h"
10132
10133 #include <sys/types.h>
10134 #include <fcntl.h>
10135 #include <signal.h>
10136 #include <sys/file.h>
10137 #ifndef LOCK_MAND
10138 #define LOCK_MAND       32
10139 #define LOCK_READ       64
10140 #endif
10141 main() {
10142         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10143 }
10144
10145 EOF
10146 if { (eval echo configure:10147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10147 then
10148   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10149 else
10150   echo "configure: failed program was:" >&5
10151   cat conftest.$ac_ext >&5
10152   rm -fr conftest*
10153   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10154 fi
10155 rm -fr conftest*
10156 fi
10157
10158 fi
10159
10160 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10161 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10162     cat >> confdefs.h <<\EOF
10163 #define HAVE_KERNEL_SHARE_MODES 1
10164 EOF
10165
10166 fi
10167
10168
10169
10170
10171 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10172 echo "configure:10173: checking for IRIX kernel oplock type definitions" >&5
10173 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10174   echo $ac_n "(cached) $ac_c" 1>&6
10175 else
10176   
10177 cat > conftest.$ac_ext <<EOF
10178 #line 10179 "configure"
10179 #include "confdefs.h"
10180 #include <sys/types.h>
10181 #include <fcntl.h>
10182 int main() {
10183 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10184 ; return 0; }
10185 EOF
10186 if { (eval echo configure:10187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10187   rm -rf conftest*
10188   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10189 else
10190   echo "configure: failed program was:" >&5
10191   cat conftest.$ac_ext >&5
10192   rm -rf conftest*
10193   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10194 fi
10195 rm -f conftest*
10196 fi
10197
10198 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10199 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10200     cat >> confdefs.h <<\EOF
10201 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10202 EOF
10203
10204 fi
10205
10206 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10207 echo "configure:10208: checking for irix specific capabilities" >&5
10208 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10209   echo $ac_n "(cached) $ac_c" 1>&6
10210 else
10211   
10212 if test "$cross_compiling" = yes; then
10213   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10214 else
10215   cat > conftest.$ac_ext <<EOF
10216 #line 10217 "configure"
10217 #include "confdefs.h"
10218 #include <sys/types.h>
10219 #include <sys/capability.h>
10220 main() {
10221  cap_t cap;
10222  if ((cap = cap_get_proc()) == NULL)
10223    exit(1);
10224  cap->cap_effective |= CAP_NETWORK_MGT;
10225  cap->cap_inheritable |= CAP_NETWORK_MGT;
10226  cap_set_proc(cap);
10227  exit(0);
10228 }
10229
10230 EOF
10231 if { (eval echo configure:10232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10232 then
10233   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10234 else
10235   echo "configure: failed program was:" >&5
10236   cat conftest.$ac_ext >&5
10237   rm -fr conftest*
10238   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10239 fi
10240 rm -fr conftest*
10241 fi
10242
10243 fi
10244
10245 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10246 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10247     cat >> confdefs.h <<\EOF
10248 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10249 EOF
10250
10251 fi
10252
10253 #
10254 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10255 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10256 #
10257
10258 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10259 echo "configure:10260: checking for int16 typedef included by rpc/rpc.h" >&5
10260 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10261   echo $ac_n "(cached) $ac_c" 1>&6
10262 else
10263   
10264 cat > conftest.$ac_ext <<EOF
10265 #line 10266 "configure"
10266 #include "confdefs.h"
10267 #include <sys/types.h>
10268 #if defined(HAVE_RPC_RPC_H)
10269 #include <rpc/rpc.h>
10270 #endif
10271 int main() {
10272 int16 testvar;
10273 ; return 0; }
10274 EOF
10275 if { (eval echo configure:10276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10276   rm -rf conftest*
10277   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10278 else
10279   echo "configure: failed program was:" >&5
10280   cat conftest.$ac_ext >&5
10281   rm -rf conftest*
10282   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10283 fi
10284 rm -f conftest*
10285 fi
10286
10287 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10288 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10289     cat >> confdefs.h <<\EOF
10290 #define HAVE_INT16_FROM_RPC_RPC_H 1
10291 EOF
10292
10293 fi
10294
10295 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10296 echo "configure:10297: checking for uint16 typedef included by rpc/rpc.h" >&5
10297 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10298   echo $ac_n "(cached) $ac_c" 1>&6
10299 else
10300   
10301 cat > conftest.$ac_ext <<EOF
10302 #line 10303 "configure"
10303 #include "confdefs.h"
10304 #include <sys/types.h>
10305 #if defined(HAVE_RPC_RPC_H)
10306 #include <rpc/rpc.h>
10307 #endif
10308 int main() {
10309 uint16 testvar;
10310 ; return 0; }
10311 EOF
10312 if { (eval echo configure:10313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10313   rm -rf conftest*
10314   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10315 else
10316   echo "configure: failed program was:" >&5
10317   cat conftest.$ac_ext >&5
10318   rm -rf conftest*
10319   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10320 fi
10321 rm -f conftest*
10322 fi
10323
10324 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10325 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10326     cat >> confdefs.h <<\EOF
10327 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10328 EOF
10329
10330 fi
10331
10332 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10333 echo "configure:10334: checking for int32 typedef included by rpc/rpc.h" >&5
10334 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10335   echo $ac_n "(cached) $ac_c" 1>&6
10336 else
10337   
10338 cat > conftest.$ac_ext <<EOF
10339 #line 10340 "configure"
10340 #include "confdefs.h"
10341 #include <sys/types.h>
10342 #if defined(HAVE_RPC_RPC_H)
10343 #include <rpc/rpc.h>
10344 #endif
10345 int main() {
10346 int32 testvar;
10347 ; return 0; }
10348 EOF
10349 if { (eval echo configure:10350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10350   rm -rf conftest*
10351   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10352 else
10353   echo "configure: failed program was:" >&5
10354   cat conftest.$ac_ext >&5
10355   rm -rf conftest*
10356   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10357 fi
10358 rm -f conftest*
10359 fi
10360
10361 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10362 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10363     cat >> confdefs.h <<\EOF
10364 #define HAVE_INT32_FROM_RPC_RPC_H 1
10365 EOF
10366
10367 fi
10368
10369 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10370 echo "configure:10371: checking for uint32 typedef included by rpc/rpc.h" >&5
10371 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10372   echo $ac_n "(cached) $ac_c" 1>&6
10373 else
10374   
10375 cat > conftest.$ac_ext <<EOF
10376 #line 10377 "configure"
10377 #include "confdefs.h"
10378 #include <sys/types.h>
10379 #if defined(HAVE_RPC_RPC_H)
10380 #include <rpc/rpc.h>
10381 #endif
10382 int main() {
10383 uint32 testvar;
10384 ; return 0; }
10385 EOF
10386 if { (eval echo configure:10387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10387   rm -rf conftest*
10388   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10389 else
10390   echo "configure: failed program was:" >&5
10391   cat conftest.$ac_ext >&5
10392   rm -rf conftest*
10393   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10394 fi
10395 rm -f conftest*
10396 fi
10397
10398 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10399 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10400     cat >> confdefs.h <<\EOF
10401 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10402 EOF
10403
10404 fi
10405
10406
10407 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10408 echo "configure:10409: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10409 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10410   echo $ac_n "(cached) $ac_c" 1>&6
10411 else
10412   
10413 cat > conftest.$ac_ext <<EOF
10414 #line 10415 "configure"
10415 #include "confdefs.h"
10416 #include <sys/types.h>
10417 #ifdef HAVE_SYS_SECURITY_H
10418 #include <sys/security.h>
10419 #include <prot.h>
10420 #endif  /* HAVE_SYS_SECURITY_H */
10421 #if defined(HAVE_RPC_RPC_H)
10422 #include <rpc/rpc.h>
10423 #endif
10424 int main() {
10425 int testvar;
10426 ; return 0; }
10427 EOF
10428 if { (eval echo configure:10429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10429   rm -rf conftest*
10430   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10431 else
10432   echo "configure: failed program was:" >&5
10433   cat conftest.$ac_ext >&5
10434   rm -rf conftest*
10435   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10436 fi
10437 rm -f conftest*
10438 fi
10439
10440 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10441 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10442     cat >> confdefs.h <<\EOF
10443 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10444 EOF
10445
10446 fi
10447
10448 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10449 echo "configure:10450: checking for test routines" >&5
10450 if test "$cross_compiling" = yes; then
10451   echo "configure: warning: cannot run when cross-compiling" 1>&2
10452 else
10453   cat > conftest.$ac_ext <<EOF
10454 #line 10455 "configure"
10455 #include "confdefs.h"
10456 #include "${srcdir-.}/tests/trivial.c"
10457 EOF
10458 if { (eval echo configure:10459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10459 then
10460   echo "$ac_t""yes" 1>&6
10461 else
10462   echo "configure: failed program was:" >&5
10463   cat conftest.$ac_ext >&5
10464   rm -fr conftest*
10465   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10466 fi
10467 rm -fr conftest*
10468 fi
10469
10470
10471 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10472 echo "configure:10473: checking for ftruncate extend" >&5
10473 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10474   echo $ac_n "(cached) $ac_c" 1>&6
10475 else
10476   
10477 if test "$cross_compiling" = yes; then
10478   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10479 else
10480   cat > conftest.$ac_ext <<EOF
10481 #line 10482 "configure"
10482 #include "confdefs.h"
10483 #include "${srcdir-.}/tests/ftruncate.c"
10484 EOF
10485 if { (eval echo configure:10486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10486 then
10487   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10488 else
10489   echo "configure: failed program was:" >&5
10490   cat conftest.$ac_ext >&5
10491   rm -fr conftest*
10492   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10493 fi
10494 rm -fr conftest*
10495 fi
10496
10497 fi
10498
10499 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10500 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10501     cat >> confdefs.h <<\EOF
10502 #define HAVE_FTRUNCATE_EXTEND 1
10503 EOF
10504
10505 fi
10506
10507 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10508 echo "configure:10509: checking for AF_LOCAL socket support" >&5
10509 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10510   echo $ac_n "(cached) $ac_c" 1>&6
10511 else
10512   
10513 if test "$cross_compiling" = yes; then
10514   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10515 else
10516   cat > conftest.$ac_ext <<EOF
10517 #line 10518 "configure"
10518 #include "confdefs.h"
10519 #include "${srcdir-.}/tests/unixsock.c"
10520 EOF
10521 if { (eval echo configure:10522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10522 then
10523   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10524 else
10525   echo "configure: failed program was:" >&5
10526   cat conftest.$ac_ext >&5
10527   rm -fr conftest*
10528   samba_cv_HAVE_WORKING_AF_LOCAL=no
10529 fi
10530 rm -fr conftest*
10531 fi
10532
10533 fi
10534
10535 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10536 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10537 then
10538     cat >> confdefs.h <<\EOF
10539 #define HAVE_WORKING_AF_LOCAL 1
10540 EOF
10541
10542 fi
10543
10544 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10545 echo "configure:10546: checking for broken getgroups" >&5
10546 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10547   echo $ac_n "(cached) $ac_c" 1>&6
10548 else
10549   
10550 if test "$cross_compiling" = yes; then
10551   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10552 else
10553   cat > conftest.$ac_ext <<EOF
10554 #line 10555 "configure"
10555 #include "confdefs.h"
10556 #include "${srcdir-.}/tests/getgroups.c"
10557 EOF
10558 if { (eval echo configure:10559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10559 then
10560   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10561 else
10562   echo "configure: failed program was:" >&5
10563   cat conftest.$ac_ext >&5
10564   rm -fr conftest*
10565   samba_cv_HAVE_BROKEN_GETGROUPS=no
10566 fi
10567 rm -fr conftest*
10568 fi
10569
10570 fi
10571
10572 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10573 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10574     cat >> confdefs.h <<\EOF
10575 #define HAVE_BROKEN_GETGROUPS 1
10576 EOF
10577
10578 fi
10579
10580 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10581 echo "configure:10582: checking whether getpass should be replaced" >&5
10582 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10583   echo $ac_n "(cached) $ac_c" 1>&6
10584 else
10585   
10586 SAVE_CPPFLAGS="$CPPFLAGS"
10587 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10588 cat > conftest.$ac_ext <<EOF
10589 #line 10590 "configure"
10590 #include "confdefs.h"
10591
10592 #define REPLACE_GETPASS 1
10593 #define NO_CONFIG_H 1
10594 #define main dont_declare_main
10595 #include "${srcdir-.}/lib/getsmbpass.c"
10596 #undef main
10597
10598 int main() {
10599
10600 ; return 0; }
10601 EOF
10602 if { (eval echo configure:10603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10603   rm -rf conftest*
10604   samba_cv_REPLACE_GETPASS=yes
10605 else
10606   echo "configure: failed program was:" >&5
10607   cat conftest.$ac_ext >&5
10608   rm -rf conftest*
10609   samba_cv_REPLACE_GETPASS=no
10610 fi
10611 rm -f conftest*
10612 CPPFLAGS="$SAVE_CPPFLAGS"
10613
10614 fi
10615
10616 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10617 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10618         cat >> confdefs.h <<\EOF
10619 #define REPLACE_GETPASS 1
10620 EOF
10621
10622 fi
10623
10624 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10625 echo "configure:10626: checking for broken inet_ntoa" >&5
10626 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10627   echo $ac_n "(cached) $ac_c" 1>&6
10628 else
10629   
10630 if test "$cross_compiling" = yes; then
10631   samba_cv_REPLACE_INET_NTOA=cross
10632 else
10633   cat > conftest.$ac_ext <<EOF
10634 #line 10635 "configure"
10635 #include "confdefs.h"
10636
10637 #include <stdio.h>
10638 #include <sys/types.h>
10639 #include <netinet/in.h>
10640 #ifdef HAVE_ARPA_INET_H
10641 #include <arpa/inet.h>
10642 #endif
10643 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10644 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10645     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10646 exit(1);}
10647 EOF
10648 if { (eval echo configure:10649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10649 then
10650   samba_cv_REPLACE_INET_NTOA=yes
10651 else
10652   echo "configure: failed program was:" >&5
10653   cat conftest.$ac_ext >&5
10654   rm -fr conftest*
10655   samba_cv_REPLACE_INET_NTOA=no
10656 fi
10657 rm -fr conftest*
10658 fi
10659
10660 fi
10661
10662 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10663 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10664     cat >> confdefs.h <<\EOF
10665 #define REPLACE_INET_NTOA 1
10666 EOF
10667
10668 fi
10669
10670 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10671 echo "configure:10672: checking for secure mkstemp" >&5
10672 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10673   echo $ac_n "(cached) $ac_c" 1>&6
10674 else
10675   
10676 if test "$cross_compiling" = yes; then
10677   samba_cv_HAVE_SECURE_MKSTEMP=cross
10678 else
10679   cat > conftest.$ac_ext <<EOF
10680 #line 10681 "configure"
10681 #include "confdefs.h"
10682 #include <stdlib.h>
10683 #include <sys/types.h>
10684 #include <sys/stat.h>
10685 #include <unistd.h>
10686 main() { 
10687   struct stat st;
10688   char tpl[20]="/tmp/test.XXXXXX"; 
10689   int fd = mkstemp(tpl); 
10690   if (fd == -1) exit(1);
10691   unlink(tpl);
10692   if (fstat(fd, &st) != 0) exit(1);
10693   if ((st.st_mode & 0777) != 0600) exit(1);
10694   exit(0);
10695 }
10696 EOF
10697 if { (eval echo configure:10698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10698 then
10699   samba_cv_HAVE_SECURE_MKSTEMP=yes
10700 else
10701   echo "configure: failed program was:" >&5
10702   cat conftest.$ac_ext >&5
10703   rm -fr conftest*
10704   samba_cv_HAVE_SECURE_MKSTEMP=no
10705 fi
10706 rm -fr conftest*
10707 fi
10708
10709 fi
10710
10711 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10712 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10713     cat >> confdefs.h <<\EOF
10714 #define HAVE_SECURE_MKSTEMP 1
10715 EOF
10716
10717 fi
10718
10719 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10720 echo "configure:10721: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10721 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10722   echo $ac_n "(cached) $ac_c" 1>&6
10723 else
10724   
10725 if test "$cross_compiling" = yes; then
10726   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10727 else
10728   cat > conftest.$ac_ext <<EOF
10729 #line 10730 "configure"
10730 #include "confdefs.h"
10731 #include <unistd.h>
10732 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10733 EOF
10734 if { (eval echo configure:10735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10735 then
10736   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10737 else
10738   echo "configure: failed program was:" >&5
10739   cat conftest.$ac_ext >&5
10740   rm -fr conftest*
10741   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10742 fi
10743 rm -fr conftest*
10744 fi
10745
10746 fi
10747
10748 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10749 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10750     cat >> confdefs.h <<\EOF
10751 #define SYSCONF_SC_NGROUPS_MAX 1
10752 EOF
10753
10754 fi
10755
10756 echo $ac_n "checking for root""... $ac_c" 1>&6
10757 echo "configure:10758: checking for root" >&5
10758 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10759   echo $ac_n "(cached) $ac_c" 1>&6
10760 else
10761   
10762 if test "$cross_compiling" = yes; then
10763   samba_cv_HAVE_ROOT=cross
10764 else
10765   cat > conftest.$ac_ext <<EOF
10766 #line 10767 "configure"
10767 #include "confdefs.h"
10768 main() { exit(getuid() != 0); }
10769 EOF
10770 if { (eval echo configure:10771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10771 then
10772   samba_cv_HAVE_ROOT=yes
10773 else
10774   echo "configure: failed program was:" >&5
10775   cat conftest.$ac_ext >&5
10776   rm -fr conftest*
10777   samba_cv_HAVE_ROOT=no
10778 fi
10779 rm -fr conftest*
10780 fi
10781
10782 fi
10783
10784 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10785 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10786     cat >> confdefs.h <<\EOF
10787 #define HAVE_ROOT 1
10788 EOF
10789
10790 else
10791     echo "configure: warning: running as non-root will disable some tests" 1>&2
10792 fi
10793
10794 ##################
10795 # look for a method of finding the list of network interfaces
10796 iface=no;
10797 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10798 echo "configure:10799: checking for iface AIX" >&5
10799 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10800   echo $ac_n "(cached) $ac_c" 1>&6
10801 else
10802   
10803 if test "$cross_compiling" = yes; then
10804   samba_cv_HAVE_IFACE_AIX=cross
10805 else
10806   cat > conftest.$ac_ext <<EOF
10807 #line 10808 "configure"
10808 #include "confdefs.h"
10809
10810 #define HAVE_IFACE_AIX 1
10811 #define AUTOCONF_TEST 1
10812 #include "confdefs.h"
10813 #include "${srcdir-.}/lib/interfaces.c"
10814 EOF
10815 if { (eval echo configure:10816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10816 then
10817   samba_cv_HAVE_IFACE_AIX=yes
10818 else
10819   echo "configure: failed program was:" >&5
10820   cat conftest.$ac_ext >&5
10821   rm -fr conftest*
10822   samba_cv_HAVE_IFACE_AIX=no
10823 fi
10824 rm -fr conftest*
10825 fi
10826
10827 fi
10828
10829 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10830 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10831     iface=yes;cat >> confdefs.h <<\EOF
10832 #define HAVE_IFACE_AIX 1
10833 EOF
10834
10835 fi
10836
10837 if test $iface = no; then
10838 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10839 echo "configure:10840: checking for iface ifconf" >&5
10840 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10841   echo $ac_n "(cached) $ac_c" 1>&6
10842 else
10843   
10844 if test "$cross_compiling" = yes; then
10845   samba_cv_HAVE_IFACE_IFCONF=cross
10846 else
10847   cat > conftest.$ac_ext <<EOF
10848 #line 10849 "configure"
10849 #include "confdefs.h"
10850
10851 #define HAVE_IFACE_IFCONF 1
10852 #define AUTOCONF_TEST 1
10853 #include "confdefs.h"
10854 #include "${srcdir-.}/lib/interfaces.c"
10855 EOF
10856 if { (eval echo configure:10857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10857 then
10858   samba_cv_HAVE_IFACE_IFCONF=yes
10859 else
10860   echo "configure: failed program was:" >&5
10861   cat conftest.$ac_ext >&5
10862   rm -fr conftest*
10863   samba_cv_HAVE_IFACE_IFCONF=no
10864 fi
10865 rm -fr conftest*
10866 fi
10867
10868 fi
10869
10870 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10871 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10872     iface=yes;cat >> confdefs.h <<\EOF
10873 #define HAVE_IFACE_IFCONF 1
10874 EOF
10875
10876 fi
10877 fi
10878
10879 if test $iface = no; then
10880 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
10881 echo "configure:10882: checking for iface ifreq" >&5
10882 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
10883   echo $ac_n "(cached) $ac_c" 1>&6
10884 else
10885   
10886 if test "$cross_compiling" = yes; then
10887   samba_cv_HAVE_IFACE_IFREQ=cross
10888 else
10889   cat > conftest.$ac_ext <<EOF
10890 #line 10891 "configure"
10891 #include "confdefs.h"
10892
10893 #define HAVE_IFACE_IFREQ 1
10894 #define AUTOCONF_TEST 1
10895 #include "confdefs.h"
10896 #include "${srcdir-.}/lib/interfaces.c"
10897 EOF
10898 if { (eval echo configure:10899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10899 then
10900   samba_cv_HAVE_IFACE_IFREQ=yes
10901 else
10902   echo "configure: failed program was:" >&5
10903   cat conftest.$ac_ext >&5
10904   rm -fr conftest*
10905   samba_cv_HAVE_IFACE_IFREQ=no
10906 fi
10907 rm -fr conftest*
10908 fi
10909
10910 fi
10911
10912 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
10913 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
10914     iface=yes;cat >> confdefs.h <<\EOF
10915 #define HAVE_IFACE_IFREQ 1
10916 EOF
10917
10918 fi
10919 fi
10920
10921
10922 ################################################
10923 # look for a method of setting the effective uid
10924 seteuid=no;
10925 if test $seteuid = no; then
10926 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
10927 echo "configure:10928: checking for setresuid" >&5
10928 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
10929   echo $ac_n "(cached) $ac_c" 1>&6
10930 else
10931   
10932 if test "$cross_compiling" = yes; then
10933   samba_cv_USE_SETRESUID=cross
10934 else
10935   cat > conftest.$ac_ext <<EOF
10936 #line 10937 "configure"
10937 #include "confdefs.h"
10938
10939 #define AUTOCONF_TEST 1
10940 #define USE_SETRESUID 1
10941 #include "confdefs.h"
10942 #include "${srcdir-.}/lib/util_sec.c"
10943 EOF
10944 if { (eval echo configure:10945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10945 then
10946   samba_cv_USE_SETRESUID=yes
10947 else
10948   echo "configure: failed program was:" >&5
10949   cat conftest.$ac_ext >&5
10950   rm -fr conftest*
10951   samba_cv_USE_SETRESUID=no
10952 fi
10953 rm -fr conftest*
10954 fi
10955
10956 fi
10957
10958 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
10959 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
10960     seteuid=yes;cat >> confdefs.h <<\EOF
10961 #define USE_SETRESUID 1
10962 EOF
10963
10964 fi
10965 fi
10966
10967
10968 if test $seteuid = no; then
10969 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
10970 echo "configure:10971: checking for setreuid" >&5
10971 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
10972   echo $ac_n "(cached) $ac_c" 1>&6
10973 else
10974   
10975 if test "$cross_compiling" = yes; then
10976   samba_cv_USE_SETREUID=cross
10977 else
10978   cat > conftest.$ac_ext <<EOF
10979 #line 10980 "configure"
10980 #include "confdefs.h"
10981
10982 #define AUTOCONF_TEST 1
10983 #define USE_SETREUID 1
10984 #include "confdefs.h"
10985 #include "${srcdir-.}/lib/util_sec.c"
10986 EOF
10987 if { (eval echo configure:10988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10988 then
10989   samba_cv_USE_SETREUID=yes
10990 else
10991   echo "configure: failed program was:" >&5
10992   cat conftest.$ac_ext >&5
10993   rm -fr conftest*
10994   samba_cv_USE_SETREUID=no
10995 fi
10996 rm -fr conftest*
10997 fi
10998
10999 fi
11000
11001 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
11002 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
11003     seteuid=yes;cat >> confdefs.h <<\EOF
11004 #define USE_SETREUID 1
11005 EOF
11006
11007 fi
11008 fi
11009
11010 if test $seteuid = no; then
11011 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
11012 echo "configure:11013: checking for seteuid" >&5
11013 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
11014   echo $ac_n "(cached) $ac_c" 1>&6
11015 else
11016   
11017 if test "$cross_compiling" = yes; then
11018   samba_cv_USE_SETEUID=cross
11019 else
11020   cat > conftest.$ac_ext <<EOF
11021 #line 11022 "configure"
11022 #include "confdefs.h"
11023
11024 #define AUTOCONF_TEST 1
11025 #define USE_SETEUID 1
11026 #include "confdefs.h"
11027 #include "${srcdir-.}/lib/util_sec.c"
11028 EOF
11029 if { (eval echo configure:11030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11030 then
11031   samba_cv_USE_SETEUID=yes
11032 else
11033   echo "configure: failed program was:" >&5
11034   cat conftest.$ac_ext >&5
11035   rm -fr conftest*
11036   samba_cv_USE_SETEUID=no
11037 fi
11038 rm -fr conftest*
11039 fi
11040
11041 fi
11042
11043 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
11044 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
11045     seteuid=yes;cat >> confdefs.h <<\EOF
11046 #define USE_SETEUID 1
11047 EOF
11048
11049 fi
11050 fi
11051
11052 if test $seteuid = no; then
11053 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11054 echo "configure:11055: checking for setuidx" >&5
11055 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
11056   echo $ac_n "(cached) $ac_c" 1>&6
11057 else
11058   
11059 if test "$cross_compiling" = yes; then
11060   samba_cv_USE_SETUIDX=cross
11061 else
11062   cat > conftest.$ac_ext <<EOF
11063 #line 11064 "configure"
11064 #include "confdefs.h"
11065
11066 #define AUTOCONF_TEST 1
11067 #define USE_SETUIDX 1
11068 #include "confdefs.h"
11069 #include "${srcdir-.}/lib/util_sec.c"
11070 EOF
11071 if { (eval echo configure:11072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11072 then
11073   samba_cv_USE_SETUIDX=yes
11074 else
11075   echo "configure: failed program was:" >&5
11076   cat conftest.$ac_ext >&5
11077   rm -fr conftest*
11078   samba_cv_USE_SETUIDX=no
11079 fi
11080 rm -fr conftest*
11081 fi
11082
11083 fi
11084
11085 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11086 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11087     seteuid=yes;cat >> confdefs.h <<\EOF
11088 #define USE_SETUIDX 1
11089 EOF
11090
11091 fi
11092 fi
11093
11094
11095 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11096 echo "configure:11097: checking for working mmap" >&5
11097 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11098   echo $ac_n "(cached) $ac_c" 1>&6
11099 else
11100   
11101 if test "$cross_compiling" = yes; then
11102   samba_cv_HAVE_MMAP=cross
11103 else
11104   cat > conftest.$ac_ext <<EOF
11105 #line 11106 "configure"
11106 #include "confdefs.h"
11107 #include "${srcdir-.}/tests/shared_mmap.c"
11108 EOF
11109 if { (eval echo configure:11110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11110 then
11111   samba_cv_HAVE_MMAP=yes
11112 else
11113   echo "configure: failed program was:" >&5
11114   cat conftest.$ac_ext >&5
11115   rm -fr conftest*
11116   samba_cv_HAVE_MMAP=no
11117 fi
11118 rm -fr conftest*
11119 fi
11120
11121 fi
11122
11123 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11124 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11125     cat >> confdefs.h <<\EOF
11126 #define HAVE_MMAP 1
11127 EOF
11128
11129 fi
11130
11131 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11132 echo "configure:11133: checking for ftruncate needs root" >&5
11133 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11134   echo $ac_n "(cached) $ac_c" 1>&6
11135 else
11136   
11137 if test "$cross_compiling" = yes; then
11138   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11139 else
11140   cat > conftest.$ac_ext <<EOF
11141 #line 11142 "configure"
11142 #include "confdefs.h"
11143 #include "${srcdir-.}/tests/ftruncroot.c"
11144 EOF
11145 if { (eval echo configure:11146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11146 then
11147   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11148 else
11149   echo "configure: failed program was:" >&5
11150   cat conftest.$ac_ext >&5
11151   rm -fr conftest*
11152   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11153 fi
11154 rm -fr conftest*
11155 fi
11156
11157 fi
11158
11159 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11160 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11161     cat >> confdefs.h <<\EOF
11162 #define FTRUNCATE_NEEDS_ROOT 1
11163 EOF
11164
11165 fi
11166
11167 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11168 echo "configure:11169: checking for fcntl locking" >&5
11169 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11170   echo $ac_n "(cached) $ac_c" 1>&6
11171 else
11172   
11173 if test "$cross_compiling" = yes; then
11174   samba_cv_HAVE_FCNTL_LOCK=cross
11175 else
11176   cat > conftest.$ac_ext <<EOF
11177 #line 11178 "configure"
11178 #include "confdefs.h"
11179 #include "${srcdir-.}/tests/fcntl_lock.c"
11180 EOF
11181 if { (eval echo configure:11182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11182 then
11183   samba_cv_HAVE_FCNTL_LOCK=yes
11184 else
11185   echo "configure: failed program was:" >&5
11186   cat conftest.$ac_ext >&5
11187   rm -fr conftest*
11188   samba_cv_HAVE_FCNTL_LOCK=no
11189 fi
11190 rm -fr conftest*
11191 fi
11192
11193 fi
11194
11195 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11196 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11197     cat >> confdefs.h <<\EOF
11198 #define HAVE_FCNTL_LOCK 1
11199 EOF
11200
11201 fi
11202
11203 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11204 echo "configure:11205: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11205 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11206   echo $ac_n "(cached) $ac_c" 1>&6
11207 else
11208   
11209 if test "$cross_compiling" = yes; then
11210   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11211 else
11212   cat > conftest.$ac_ext <<EOF
11213 #line 11214 "configure"
11214 #include "confdefs.h"
11215 #include "${srcdir-.}/tests/fcntl_lock64.c"
11216 EOF
11217 if { (eval echo configure:11218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11218 then
11219   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11220 else
11221   echo "configure: failed program was:" >&5
11222   cat conftest.$ac_ext >&5
11223   rm -fr conftest*
11224   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11225 fi
11226 rm -fr conftest*
11227 fi
11228
11229 fi
11230
11231 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11232 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11233     cat >> confdefs.h <<\EOF
11234 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11235 EOF
11236
11237
11238 else
11239
11240
11241   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11242 echo "configure:11243: checking for 64 bit fcntl locking" >&5
11243 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11244   echo $ac_n "(cached) $ac_c" 1>&6
11245 else
11246   
11247   if test "$cross_compiling" = yes; then
11248   samba_cv_HAVE_STRUCT_FLOCK64=cross
11249 else
11250   cat > conftest.$ac_ext <<EOF
11251 #line 11252 "configure"
11252 #include "confdefs.h"
11253
11254 #if defined(HAVE_UNISTD_H)
11255 #include <unistd.h>
11256 #endif
11257 #include <stdio.h>
11258 #include <stdlib.h>
11259
11260 #ifdef HAVE_FCNTL_H
11261 #include <fcntl.h>
11262 #endif
11263
11264 #ifdef HAVE_SYS_FCNTL_H
11265 #include <sys/fcntl.h>
11266 #endif
11267 main() { struct flock64 fl64;
11268 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11269 exit(0);
11270 #else
11271 exit(1);
11272 #endif
11273 }
11274 EOF
11275 if { (eval echo configure:11276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11276 then
11277   samba_cv_HAVE_STRUCT_FLOCK64=yes
11278 else
11279   echo "configure: failed program was:" >&5
11280   cat conftest.$ac_ext >&5
11281   rm -fr conftest*
11282   samba_cv_HAVE_STRUCT_FLOCK64=no
11283 fi
11284 rm -fr conftest*
11285 fi
11286
11287 fi
11288
11289 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11290
11291   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11292       cat >> confdefs.h <<\EOF
11293 #define HAVE_STRUCT_FLOCK64 1
11294 EOF
11295
11296   fi
11297 fi
11298
11299 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
11300 echo "configure:11301: checking for a crypt that needs truncated salt" >&5
11301 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
11302   echo $ac_n "(cached) $ac_c" 1>&6
11303 else
11304   
11305 if test "$cross_compiling" = yes; then
11306   samba_cv_HAVE_TRUNCATED_SALT=cross
11307 else
11308   cat > conftest.$ac_ext <<EOF
11309 #line 11310 "configure"
11310 #include "confdefs.h"
11311 #include "${srcdir-.}/tests/crypttest.c"
11312 EOF
11313 if { (eval echo configure:11314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11314 then
11315   samba_cv_HAVE_TRUNCATED_SALT=no
11316 else
11317   echo "configure: failed program was:" >&5
11318   cat conftest.$ac_ext >&5
11319   rm -fr conftest*
11320   samba_cv_HAVE_TRUNCATED_SALT=yes
11321 fi
11322 rm -fr conftest*
11323 fi
11324
11325 fi
11326
11327 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
11328 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
11329     cat >> confdefs.h <<\EOF
11330 #define HAVE_TRUNCATED_SALT 1
11331 EOF
11332
11333 fi
11334
11335 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11336 echo "configure:11337: checking for broken nisplus include files" >&5
11337 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11338   echo $ac_n "(cached) $ac_c" 1>&6
11339 else
11340   
11341 cat > conftest.$ac_ext <<EOF
11342 #line 11343 "configure"
11343 #include "confdefs.h"
11344 #include <sys/acl.h>
11345 #if defined(HAVE_RPCSVC_NIS_H)
11346 #include <rpcsvc/nis.h>
11347 #endif
11348 int main() {
11349 return 0;
11350 ; return 0; }
11351 EOF
11352 if { (eval echo configure:11353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11353   rm -rf conftest*
11354   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11355 else
11356   echo "configure: failed program was:" >&5
11357   cat conftest.$ac_ext >&5
11358   rm -rf conftest*
11359   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11360 fi
11361 rm -f conftest*
11362 fi
11363
11364 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11365 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11366     cat >> confdefs.h <<\EOF
11367 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11368 EOF
11369
11370 fi
11371
11372
11373 #################################################
11374 # check for smbwrapper support
11375 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11376 echo "configure:11377: checking whether to use smbwrapper" >&5
11377 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11378 if test "${with_smbwrapper+set}" = set; then
11379   withval="$with_smbwrapper"
11380    case "$withval" in
11381   yes)
11382     echo "$ac_t""yes" 1>&6
11383     cat >> confdefs.h <<\EOF
11384 #define WITH_SMBWRAPPER 1
11385 EOF
11386
11387         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11388
11389         if test x$ATTEMPT_WRAP32_BUILD = x; then
11390                 WRAP32=""
11391         else
11392                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11393         fi
11394
11395 # Conditions under which smbwrapper should not be built.
11396
11397         if test x$PICFLAG = x; then
11398            echo No support for PIC code - disabling smbwrapper and smbsh
11399            WRAP=""
11400            WRAP32=""
11401         elif test x$ac_cv_func_syscall = xno; then
11402            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11403            WRAP=""
11404            WRAP32=""
11405         fi
11406     ;;
11407   *)
11408     echo "$ac_t""no" 1>&6
11409     ;;
11410   esac 
11411 else
11412   echo "$ac_t""no" 1>&6
11413
11414 fi
11415
11416
11417 #################################################
11418 # check for the AFS filesystem
11419 echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
11420 echo "configure:11421: checking whether to use AFS" >&5
11421 # Check whether --with-afs or --without-afs was given.
11422 if test "${with_afs+set}" = set; then
11423   withval="$with_afs"
11424    case "$withval" in
11425   yes)
11426     echo "$ac_t""yes" 1>&6
11427     cat >> confdefs.h <<\EOF
11428 #define WITH_AFS 1
11429 EOF
11430
11431     ;;
11432   *)
11433     echo "$ac_t""no" 1>&6
11434     ;;
11435   esac 
11436 else
11437   echo "$ac_t""no" 1>&6
11438
11439 fi
11440
11441
11442
11443 #################################################
11444 # check for the DFS auth system
11445 echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
11446 echo "configure:11447: checking whether to use DFS auth" >&5
11447 # Check whether --with-dfs or --without-dfs was given.
11448 if test "${with_dfs+set}" = set; then
11449   withval="$with_dfs"
11450    case "$withval" in
11451   yes)
11452     echo "$ac_t""yes" 1>&6
11453     cat >> confdefs.h <<\EOF
11454 #define WITH_DFS 1
11455 EOF
11456
11457     ;;
11458   *)
11459     echo "$ac_t""no" 1>&6
11460     ;;
11461   esac 
11462 else
11463   echo "$ac_t""no" 1>&6
11464
11465 fi
11466
11467
11468 #################################################
11469 # check for Kerberos IV auth system
11470 echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
11471 echo "configure:11472: checking whether to use Kerberos IV" >&5
11472 # Check whether --with-krb4 or --without-krb4 was given.
11473 if test "${with_krb4+set}" = set; then
11474   withval="$with_krb4"
11475      echo "$ac_t""yes" 1>&6
11476     cat >> confdefs.h <<\EOF
11477 #define KRB4_AUTH 1
11478 EOF
11479
11480     echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
11481 echo "configure:11482: checking for dn_expand in -lresolv" >&5
11482 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
11483 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11484   echo $ac_n "(cached) $ac_c" 1>&6
11485 else
11486   ac_save_LIBS="$LIBS"
11487 LIBS="-lresolv  $LIBS"
11488 cat > conftest.$ac_ext <<EOF
11489 #line 11490 "configure"
11490 #include "confdefs.h"
11491 /* Override any gcc2 internal prototype to avoid an error.  */
11492 /* We use char because int might match the return type of a gcc2
11493     builtin and then its argument prototype would still apply.  */
11494 char dn_expand();
11495
11496 int main() {
11497 dn_expand()
11498 ; return 0; }
11499 EOF
11500 if { (eval echo configure:11501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11501   rm -rf conftest*
11502   eval "ac_cv_lib_$ac_lib_var=yes"
11503 else
11504   echo "configure: failed program was:" >&5
11505   cat conftest.$ac_ext >&5
11506   rm -rf conftest*
11507   eval "ac_cv_lib_$ac_lib_var=no"
11508 fi
11509 rm -f conftest*
11510 LIBS="$ac_save_LIBS"
11511
11512 fi
11513 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11514   echo "$ac_t""yes" 1>&6
11515     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11516     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11517   cat >> confdefs.h <<EOF
11518 #define $ac_tr_lib 1
11519 EOF
11520
11521   LIBS="-lresolv $LIBS"
11522
11523 else
11524   echo "$ac_t""no" 1>&6
11525 fi
11526
11527     LIBS="$LIBS -lkrb -ldes"
11528     CFLAGS="$CFLAGS -I$withval/include"
11529     LDFLAGS="$LDFLAGS -L$withval/lib"
11530 else
11531   echo "$ac_t""no" 1>&6
11532
11533 fi
11534
11535
11536 #################################################
11537 # check for Kerberos 5 auth system
11538 echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6
11539 echo "configure:11540: checking whether to use Kerberos 5" >&5
11540 # Check whether --with-krb5 or --without-krb5 was given.
11541 if test "${with_krb5+set}" = set; then
11542   withval="$with_krb5"
11543      echo "$ac_t""yes" 1>&6
11544     cat >> confdefs.h <<\EOF
11545 #define KRB5_AUTH 1
11546 EOF
11547
11548     LIBS="$LIBS -ldes425 -lkrb5 -lcrypto -lcom_err"
11549     CFLAGS="$CFLAGS -I$withval/include"
11550     LDFLAGS="$LDFLAGS -L$withval/lib"
11551 else
11552   echo "$ac_t""no" 1>&6
11553
11554 fi
11555
11556
11557 #################################################
11558 # check for automount support
11559 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
11560 echo "configure:11561: checking whether to use AUTOMOUNT" >&5
11561 # Check whether --with-automount or --without-automount was given.
11562 if test "${with_automount+set}" = set; then
11563   withval="$with_automount"
11564    case "$withval" in
11565   yes)
11566     echo "$ac_t""yes" 1>&6
11567     cat >> confdefs.h <<\EOF
11568 #define WITH_AUTOMOUNT 1
11569 EOF
11570
11571     ;;
11572   *)
11573     echo "$ac_t""no" 1>&6
11574     ;;
11575   esac 
11576 else
11577   echo "$ac_t""no" 1>&6
11578
11579 fi
11580
11581
11582 #################################################
11583 # check for smbmount support
11584 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
11585 echo "configure:11586: checking whether to use SMBMOUNT" >&5
11586 # Check whether --with-smbmount or --without-smbmount was given.
11587 if test "${with_smbmount+set}" = set; then
11588   withval="$with_smbmount"
11589    case "$withval" in
11590   yes)
11591     echo "$ac_t""yes" 1>&6
11592     cat >> confdefs.h <<\EOF
11593 #define WITH_SMBMOUNT 1
11594 EOF
11595
11596     MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
11597     ;;
11598   *)
11599     echo "$ac_t""no" 1>&6
11600     MPROGS=
11601     ;;
11602   esac 
11603 else
11604   echo "$ac_t""no" 1>&6
11605   MPROGS=
11606
11607 fi
11608
11609
11610
11611 #################################################
11612 # check for a PAM password database
11613
11614 echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6
11615 echo "configure:11616: checking whether to use PAM password database" >&5
11616 # Check whether --with-pam or --without-pam was given.
11617 if test "${with_pam+set}" = set; then
11618   withval="$with_pam"
11619    case "$withval" in
11620   yes)
11621     echo "$ac_t""yes" 1>&6
11622     cat >> confdefs.h <<\EOF
11623 #define WITH_PAM 1
11624 EOF
11625
11626     LIBS="$LIBS -lpam"
11627     ;;
11628   *)
11629     echo "$ac_t""no" 1>&6
11630     ;;
11631   esac 
11632 else
11633   echo "$ac_t""no" 1>&6
11634
11635 fi
11636
11637
11638 # we can't build a pam module if we don't have pam.
11639 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
11640 echo "configure:11641: checking for pam_get_data in -lpam" >&5
11641 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
11642 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11643   echo $ac_n "(cached) $ac_c" 1>&6
11644 else
11645   ac_save_LIBS="$LIBS"
11646 LIBS="-lpam  $LIBS"
11647 cat > conftest.$ac_ext <<EOF
11648 #line 11649 "configure"
11649 #include "confdefs.h"
11650 /* Override any gcc2 internal prototype to avoid an error.  */
11651 /* We use char because int might match the return type of a gcc2
11652     builtin and then its argument prototype would still apply.  */
11653 char pam_get_data();
11654
11655 int main() {
11656 pam_get_data()
11657 ; return 0; }
11658 EOF
11659 if { (eval echo configure:11660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11660   rm -rf conftest*
11661   eval "ac_cv_lib_$ac_lib_var=yes"
11662 else
11663   echo "configure: failed program was:" >&5
11664   cat conftest.$ac_ext >&5
11665   rm -rf conftest*
11666   eval "ac_cv_lib_$ac_lib_var=no"
11667 fi
11668 rm -f conftest*
11669 LIBS="$ac_save_LIBS"
11670
11671 fi
11672 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11673   echo "$ac_t""yes" 1>&6
11674   cat >> confdefs.h <<\EOF
11675 #define HAVE_LIBPAM 1
11676 EOF
11677
11678 else
11679   echo "$ac_t""no" 1>&6
11680 fi
11681
11682
11683 #################################################
11684 # check for pam_smbpass support
11685 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
11686 echo "configure:11687: checking whether to use pam_smbpass" >&5
11687 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
11688 if test "${with_pam_smbpass+set}" = set; then
11689   withval="$with_pam_smbpass"
11690    case "$withval" in
11691   yes)
11692     echo "$ac_t""yes" 1>&6
11693
11694 # Conditions under which pam_smbpass should not be built.
11695
11696        if test x$PICFLAG = x; then
11697           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
11698           PAM_MOD=""
11699        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
11700           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
11701           PAM_MOD=""
11702        else
11703           cat >> confdefs.h <<\EOF
11704 #define WITH_PAM_SMBPASS 1
11705 EOF
11706
11707           PAM_MOD="bin/pam_smbpass.so"
11708        fi
11709     ;;
11710   *)
11711     echo "$ac_t""no" 1>&6
11712     ;;
11713   esac 
11714 else
11715   echo "$ac_t""no" 1>&6
11716
11717 fi
11718
11719
11720
11721 ###############################################
11722 # test for where we get crypt() from, but only
11723 # if not using PAM
11724 if test "$with_pam" != yes; then
11725 for ac_func in crypt
11726 do
11727 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11728 echo "configure:11729: checking for $ac_func" >&5
11729 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11730   echo $ac_n "(cached) $ac_c" 1>&6
11731 else
11732   cat > conftest.$ac_ext <<EOF
11733 #line 11734 "configure"
11734 #include "confdefs.h"
11735 /* System header to define __stub macros and hopefully few prototypes,
11736     which can conflict with char $ac_func(); below.  */
11737 #include <assert.h>
11738 /* Override any gcc2 internal prototype to avoid an error.  */
11739 /* We use char because int might match the return type of a gcc2
11740     builtin and then its argument prototype would still apply.  */
11741 char $ac_func();
11742
11743 int main() {
11744
11745 /* The GNU C library defines this for functions which it implements
11746     to always fail with ENOSYS.  Some functions are actually named
11747     something starting with __ and the normal name is an alias.  */
11748 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11749 choke me
11750 #else
11751 $ac_func();
11752 #endif
11753
11754 ; return 0; }
11755 EOF
11756 if { (eval echo configure:11757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11757   rm -rf conftest*
11758   eval "ac_cv_func_$ac_func=yes"
11759 else
11760   echo "configure: failed program was:" >&5
11761   cat conftest.$ac_ext >&5
11762   rm -rf conftest*
11763   eval "ac_cv_func_$ac_func=no"
11764 fi
11765 rm -f conftest*
11766 fi
11767
11768 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11769   echo "$ac_t""yes" 1>&6
11770     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11771   cat >> confdefs.h <<EOF
11772 #define $ac_tr_func 1
11773 EOF
11774  
11775 else
11776   echo "$ac_t""no" 1>&6
11777 fi
11778 done
11779
11780 if test x"$ac_cv_func_crypt" = x"no"; then
11781     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
11782 echo "configure:11783: checking for crypt in -lcrypt" >&5
11783 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
11784 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11785   echo $ac_n "(cached) $ac_c" 1>&6
11786 else
11787   ac_save_LIBS="$LIBS"
11788 LIBS="-lcrypt  $LIBS"
11789 cat > conftest.$ac_ext <<EOF
11790 #line 11791 "configure"
11791 #include "confdefs.h"
11792 /* Override any gcc2 internal prototype to avoid an error.  */
11793 /* We use char because int might match the return type of a gcc2
11794     builtin and then its argument prototype would still apply.  */
11795 char crypt();
11796
11797 int main() {
11798 crypt()
11799 ; return 0; }
11800 EOF
11801 if { (eval echo configure:11802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11802   rm -rf conftest*
11803   eval "ac_cv_lib_$ac_lib_var=yes"
11804 else
11805   echo "configure: failed program was:" >&5
11806   cat conftest.$ac_ext >&5
11807   rm -rf conftest*
11808   eval "ac_cv_lib_$ac_lib_var=no"
11809 fi
11810 rm -f conftest*
11811 LIBS="$ac_save_LIBS"
11812
11813 fi
11814 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11815   echo "$ac_t""yes" 1>&6
11816   LIBS="$LIBS -lcrypt";
11817         cat >> confdefs.h <<\EOF
11818 #define HAVE_CRYPT 1
11819 EOF
11820
11821 else
11822   echo "$ac_t""no" 1>&6
11823 fi
11824
11825 fi
11826 fi
11827
11828
11829 #################################################
11830 # check for a TDB password database
11831 echo $ac_n "checking whether to use TDB password database""... $ac_c" 1>&6
11832 echo "configure:11833: checking whether to use TDB password database" >&5
11833 # Check whether --with-tdbsam or --without-tdbsam was given.
11834 if test "${with_tdbsam+set}" = set; then
11835   withval="$with_tdbsam"
11836    case "$withval" in
11837   yes)
11838     echo "$ac_t""yes" 1>&6
11839     cat >> confdefs.h <<\EOF
11840 #define WITH_TDBPWD 1
11841 EOF
11842
11843 #    AC_MSG_ERROR([TDB password database not supported in this version.])
11844     ;;
11845   *)
11846     echo "$ac_t""no" 1>&6
11847     ;;
11848   esac 
11849 else
11850   echo "$ac_t""no" 1>&6
11851
11852 fi
11853
11854
11855 #################################################
11856 # check for a LDAP password database
11857 echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6
11858 echo "configure:11859: checking whether to use LDAP password database" >&5
11859 # Check whether --with-ldap or --without-ldap was given.
11860 if test "${with_ldap+set}" = set; then
11861   withval="$with_ldap"
11862    case "$withval" in
11863   yes)
11864     echo "$ac_t""yes" 1>&6
11865     cat >> confdefs.h <<\EOF
11866 #define WITH_LDAP 1
11867 EOF
11868
11869     { echo "configure: error: LDAP password database not supported in this version." 1>&2; exit 1; }
11870     ;;
11871   *)
11872     echo "$ac_t""no" 1>&6
11873     ;;
11874   esac 
11875 else
11876   echo "$ac_t""no" 1>&6
11877
11878 fi
11879
11880
11881 #################################################
11882 # check for a NISPLUS password database
11883 echo $ac_n "checking whether to use NISPLUS password database""... $ac_c" 1>&6
11884 echo "configure:11885: checking whether to use NISPLUS password database" >&5
11885 # Check whether --with-nisplus or --without-nisplus was given.
11886 if test "${with_nisplus+set}" = set; then
11887   withval="$with_nisplus"
11888    case "$withval" in
11889   yes)
11890     echo "$ac_t""yes" 1>&6
11891     cat >> confdefs.h <<\EOF
11892 #define WITH_NISPLUS 1
11893 EOF
11894
11895     ;;
11896   *)
11897     echo "$ac_t""no" 1>&6
11898     ;;
11899   esac 
11900 else
11901   echo "$ac_t""no" 1>&6
11902
11903 fi
11904
11905
11906 #################################################
11907 # check for a NISPLUS_HOME support 
11908 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
11909 echo "configure:11910: checking whether to use NISPLUS_HOME" >&5
11910 # Check whether --with-nisplus-home or --without-nisplus-home was given.
11911 if test "${with_nisplus_home+set}" = set; then
11912   withval="$with_nisplus_home"
11913    case "$withval" in
11914   yes)
11915     echo "$ac_t""yes" 1>&6
11916     cat >> confdefs.h <<\EOF
11917 #define WITH_NISPLUS_HOME 1
11918 EOF
11919
11920     ;;
11921   *)
11922     echo "$ac_t""no" 1>&6
11923     ;;
11924   esac 
11925 else
11926   echo "$ac_t""no" 1>&6
11927
11928 fi
11929
11930
11931 #################################################
11932 # check for the secure socket layer
11933 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
11934 echo "configure:11935: checking whether to use SSL" >&5
11935 # Check whether --with-ssl or --without-ssl was given.
11936 if test "${with_ssl+set}" = set; then
11937   withval="$with_ssl"
11938    case "$withval" in
11939   yes)
11940     echo "$ac_t""yes" 1>&6
11941     cat >> confdefs.h <<\EOF
11942 #define WITH_SSL 1
11943 EOF
11944
11945     withval="/usr/local/ssl"     # default
11946
11947     if test "${with_sslinc+set}" = set; then
11948
11949         withval="$with_sslinc"
11950         case "$withval" in
11951         yes|no)
11952           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
11953           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
11954           LIBS="-lssl -lcrypto $LIBS"
11955           LDFLAGS="=L/usr/local/ssl/lib $LDFLAGS"
11956         ;;
11957         * )
11958           CFLAGS="-I${withval} $CFLAGS"
11959           LIBS="-lssl -lcrypto $LIBS"
11960           LDFLAGS="-L${withval}/lib $LDFLAGS"
11961         ;;
11962         esac
11963
11964     else
11965
11966         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
11967         LIBS="-lssl -lcrypto $LIBS"
11968         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
11969
11970     fi
11971
11972     if test ! -d ${withval}; then
11973       echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
11974       exit 1
11975     fi 
11976
11977     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
11978
11979     ;;
11980   *)
11981     echo "$ac_t""no" 1>&6
11982     ;;
11983   esac 
11984 else
11985   echo "$ac_t""no" 1>&6
11986
11987 fi
11988
11989
11990 #################################################
11991 # check for syslog logging
11992 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
11993 echo "configure:11994: checking whether to use syslog logging" >&5
11994 # Check whether --with-syslog or --without-syslog was given.
11995 if test "${with_syslog+set}" = set; then
11996   withval="$with_syslog"
11997    case "$withval" in
11998   yes)
11999     echo "$ac_t""yes" 1>&6
12000     cat >> confdefs.h <<\EOF
12001 #define WITH_SYSLOG 1
12002 EOF
12003
12004     ;;
12005   *)
12006     echo "$ac_t""no" 1>&6
12007     ;;
12008   esac 
12009 else
12010   echo "$ac_t""no" 1>&6
12011
12012 fi
12013
12014
12015 #################################################
12016 # check for a shared memory profiling support
12017 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12018 echo "configure:12019: checking whether to use profiling" >&5
12019 # Check whether --with-profile or --without-profile was given.
12020 if test "${with_profile+set}" = set; then
12021   withval="$with_profile"
12022    case "$withval" in
12023   yes)
12024     echo "$ac_t""yes" 1>&6
12025     cat >> confdefs.h <<\EOF
12026 #define WITH_PROFILE 1
12027 EOF
12028
12029     ;;
12030   *)
12031     echo "$ac_t""no" 1>&6
12032     ;;
12033   esac 
12034 else
12035   echo "$ac_t""no" 1>&6
12036
12037 fi
12038
12039
12040
12041 #################################################
12042 # check for experimental netatalk resource fork support
12043 echo $ac_n "checking whether to support netatalk""... $ac_c" 1>&6
12044 echo "configure:12045: checking whether to support netatalk" >&5
12045 # Check whether --with-netatalk or --without-netatalk was given.
12046 if test "${with_netatalk+set}" = set; then
12047   withval="$with_netatalk"
12048    case "$withval" in
12049   yes)
12050     echo "$ac_t""yes" 1>&6
12051     cat >> confdefs.h <<\EOF
12052 #define WITH_NETATALK 1
12053 EOF
12054
12055     ;;
12056   *)
12057     echo "$ac_t""no" 1>&6
12058     ;;
12059   esac 
12060 else
12061   echo "$ac_t""no" 1>&6
12062
12063 fi
12064
12065
12066 #################################################
12067 # check for experimental disk-quotas support
12068 QUOTAOBJS=smbd/noquotas.o
12069
12070 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12071 echo "configure:12072: checking whether to support disk-quotas" >&5
12072 # Check whether --with-quotas or --without-quotas was given.
12073 if test "${with_quotas+set}" = set; then
12074   withval="$with_quotas"
12075    case "$withval" in
12076   yes)
12077     echo "$ac_t""yes" 1>&6
12078     QUOTAOBJS=smbd/quotas.o
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 #################################################
12092 # check for experimental utmp accounting
12093
12094 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
12095 echo "configure:12096: checking whether to support utmp accounting" >&5
12096 # Check whether --with-utmp or --without-utmp was given.
12097 if test "${with_utmp+set}" = set; then
12098   withval="$with_utmp"
12099    case "$withval" in
12100   yes)
12101     echo "$ac_t""yes" 1>&6
12102     cat >> confdefs.h <<\EOF
12103 #define WITH_UTMP 1
12104 EOF
12105
12106     ;;
12107   *)
12108     echo "$ac_t""no" 1>&6
12109     ;;
12110   esac 
12111 else
12112   echo "$ac_t""no" 1>&6
12113
12114 fi
12115
12116
12117 #################################################
12118 # check for MS Dfs support
12119
12120 echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6
12121 echo "configure:12122: checking whether to support Microsoft Dfs" >&5
12122 # Check whether --with-msdfs or --without-msdfs was given.
12123 if test "${with_msdfs+set}" = set; then
12124   withval="$with_msdfs"
12125    case "$withval" in
12126   yes)
12127      echo "$ac_t""yes" 1>&6
12128      cat >> confdefs.h <<\EOF
12129 #define WITH_MSDFS 1
12130 EOF
12131
12132      ;;
12133   *)
12134     echo "$ac_t""no" 1>&6
12135     ;;
12136   esac 
12137 else
12138   echo "$ac_t""no" 1>&6
12139
12140 fi
12141
12142
12143 #################################################
12144 # set private directory location
12145 # Check whether --with-privatedir or --without-privatedir was given.
12146 if test "${with_privatedir+set}" = set; then
12147   withval="$with_privatedir"
12148    case "$withval" in
12149   yes|no)
12150   #
12151   # Just in case anybody calls it without argument
12152   #
12153     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
12154     privatedir='${prefix}/private'
12155   ;;
12156   * )
12157     privatedir="$withval"
12158     ;;
12159   esac
12160   
12161 else
12162   privatedir='${prefix}/private'
12163    
12164
12165 fi
12166
12167
12168 #################################################
12169 # set lock directory location
12170 # Check whether --with-lockdir or --without-lockdir was given.
12171 if test "${with_lockdir+set}" = set; then
12172   withval="$with_lockdir"
12173    case "$withval" in
12174   yes|no)
12175   #
12176   # Just in case anybody calls it without argument
12177   #
12178     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
12179     lockdir='$(VARDIR)/locks'
12180   ;;
12181   * )
12182     lockdir="$withval"
12183     ;;
12184   esac
12185   
12186 else
12187   lockdir='$(VARDIR)/locks'
12188    
12189
12190 fi
12191
12192
12193 #################################################
12194 # set SWAT directory location
12195 # Check whether --with-swatdir or --without-swatdir was given.
12196 if test "${with_swatdir+set}" = set; then
12197   withval="$with_swatdir"
12198    case "$withval" in
12199   yes|no)
12200   #
12201   # Just in case anybody does it
12202   #
12203     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
12204     swatdir='${prefix}/swat'
12205   ;;
12206   * )
12207     swatdir="$withval"
12208     ;;
12209   esac
12210   
12211 else
12212   swatdir='${prefix}/swat'
12213    
12214
12215 fi
12216
12217
12218 #################################################
12219 # these tests are taken from the GNU fileutils package
12220 echo "checking how to get filesystem space usage" 1>&6
12221 echo "configure:12222: checking how to get filesystem space usage" >&5
12222 space=no
12223
12224 # Test for statvfs64.
12225 if test $space = no; then
12226   # SVR4
12227   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
12228 echo "configure:12229: checking statvfs64 function (SVR4)" >&5
12229 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
12230   echo $ac_n "(cached) $ac_c" 1>&6
12231 else
12232   if test "$cross_compiling" = yes; then
12233   fu_cv_sys_stat_statvfs64=cross
12234 else
12235   cat > conftest.$ac_ext <<EOF
12236 #line 12237 "configure"
12237 #include "confdefs.h"
12238
12239 #if defined(HAVE_UNISTD_H)
12240 #include <unistd.h>
12241 #endif
12242 #include <sys/types.h>
12243 #include <sys/statvfs.h>
12244   main ()
12245   {
12246     struct statvfs64 fsd;
12247     exit (statvfs64 (".", &fsd));
12248   }
12249 EOF
12250 if { (eval echo configure:12251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12251 then
12252   fu_cv_sys_stat_statvfs64=yes
12253 else
12254   echo "configure: failed program was:" >&5
12255   cat conftest.$ac_ext >&5
12256   rm -fr conftest*
12257   fu_cv_sys_stat_statvfs64=no
12258 fi
12259 rm -fr conftest*
12260 fi
12261
12262 fi
12263
12264 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
12265   if test $fu_cv_sys_stat_statvfs64 = yes; then
12266     space=yes
12267     cat >> confdefs.h <<\EOF
12268 #define STAT_STATVFS64 1
12269 EOF
12270
12271   fi
12272 fi
12273
12274 # Perform only the link test since it seems there are no variants of the
12275 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
12276 # because that got a false positive on SCO OSR5.  Adding the declaration
12277 # of a `struct statvfs' causes this test to fail (as it should) on such
12278 # systems.  That system is reported to work fine with STAT_STATFS4 which
12279 # is what it gets when this test fails.
12280 if test $space = no; then
12281   # SVR4
12282   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
12283 echo "configure:12284: checking statvfs function (SVR4)" >&5
12284 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
12285   echo $ac_n "(cached) $ac_c" 1>&6
12286 else
12287   cat > conftest.$ac_ext <<EOF
12288 #line 12289 "configure"
12289 #include "confdefs.h"
12290 #include <sys/types.h>
12291 #include <sys/statvfs.h>
12292 int main() {
12293 struct statvfs fsd; statvfs (0, &fsd);
12294 ; return 0; }
12295 EOF
12296 if { (eval echo configure:12297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12297   rm -rf conftest*
12298   fu_cv_sys_stat_statvfs=yes
12299 else
12300   echo "configure: failed program was:" >&5
12301   cat conftest.$ac_ext >&5
12302   rm -rf conftest*
12303   fu_cv_sys_stat_statvfs=no
12304 fi
12305 rm -f conftest*
12306 fi
12307
12308 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
12309   if test $fu_cv_sys_stat_statvfs = yes; then
12310     space=yes
12311     cat >> confdefs.h <<\EOF
12312 #define STAT_STATVFS 1
12313 EOF
12314
12315   fi
12316 fi
12317
12318 if test $space = no; then
12319   # DEC Alpha running OSF/1
12320   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
12321 echo "configure:12322: checking for 3-argument statfs function (DEC OSF/1)" >&5
12322   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
12323   echo $ac_n "(cached) $ac_c" 1>&6
12324 else
12325   if test "$cross_compiling" = yes; then
12326   fu_cv_sys_stat_statfs3_osf1=no
12327 else
12328   cat > conftest.$ac_ext <<EOF
12329 #line 12330 "configure"
12330 #include "confdefs.h"
12331
12332 #include <sys/param.h>
12333 #include <sys/types.h>
12334 #include <sys/mount.h>
12335   main ()
12336   {
12337     struct statfs fsd;
12338     fsd.f_fsize = 0;
12339     exit (statfs (".", &fsd, sizeof (struct statfs)));
12340   }
12341 EOF
12342 if { (eval echo configure:12343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12343 then
12344   fu_cv_sys_stat_statfs3_osf1=yes
12345 else
12346   echo "configure: failed program was:" >&5
12347   cat conftest.$ac_ext >&5
12348   rm -fr conftest*
12349   fu_cv_sys_stat_statfs3_osf1=no
12350 fi
12351 rm -fr conftest*
12352 fi
12353
12354 fi
12355
12356   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
12357   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
12358     space=yes
12359     cat >> confdefs.h <<\EOF
12360 #define STAT_STATFS3_OSF1 1
12361 EOF
12362
12363   fi
12364 fi
12365
12366 if test $space = no; then
12367 # AIX
12368   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
12369 echo "configure:12370: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
12370   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
12371   echo $ac_n "(cached) $ac_c" 1>&6
12372 else
12373   if test "$cross_compiling" = yes; then
12374   fu_cv_sys_stat_statfs2_bsize=no
12375 else
12376   cat > conftest.$ac_ext <<EOF
12377 #line 12378 "configure"
12378 #include "confdefs.h"
12379
12380 #ifdef HAVE_SYS_PARAM_H
12381 #include <sys/param.h>
12382 #endif
12383 #ifdef HAVE_SYS_MOUNT_H
12384 #include <sys/mount.h>
12385 #endif
12386 #ifdef HAVE_SYS_VFS_H
12387 #include <sys/vfs.h>
12388 #endif
12389   main ()
12390   {
12391   struct statfs fsd;
12392   fsd.f_bsize = 0;
12393   exit (statfs (".", &fsd));
12394   }
12395 EOF
12396 if { (eval echo configure:12397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12397 then
12398   fu_cv_sys_stat_statfs2_bsize=yes
12399 else
12400   echo "configure: failed program was:" >&5
12401   cat conftest.$ac_ext >&5
12402   rm -fr conftest*
12403   fu_cv_sys_stat_statfs2_bsize=no
12404 fi
12405 rm -fr conftest*
12406 fi
12407
12408 fi
12409
12410   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
12411   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
12412     space=yes
12413     cat >> confdefs.h <<\EOF
12414 #define STAT_STATFS2_BSIZE 1
12415 EOF
12416
12417   fi
12418 fi
12419
12420 if test $space = no; then
12421 # SVR3
12422   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
12423 echo "configure:12424: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
12424   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
12425   echo $ac_n "(cached) $ac_c" 1>&6
12426 else
12427   if test "$cross_compiling" = yes; then
12428   fu_cv_sys_stat_statfs4=no
12429 else
12430   cat > conftest.$ac_ext <<EOF
12431 #line 12432 "configure"
12432 #include "confdefs.h"
12433 #include <sys/types.h>
12434 #include <sys/statfs.h>
12435   main ()
12436   {
12437   struct statfs fsd;
12438   exit (statfs (".", &fsd, sizeof fsd, 0));
12439   }
12440 EOF
12441 if { (eval echo configure:12442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12442 then
12443   fu_cv_sys_stat_statfs4=yes
12444 else
12445   echo "configure: failed program was:" >&5
12446   cat conftest.$ac_ext >&5
12447   rm -fr conftest*
12448   fu_cv_sys_stat_statfs4=no
12449 fi
12450 rm -fr conftest*
12451 fi
12452
12453 fi
12454
12455   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
12456   if test $fu_cv_sys_stat_statfs4 = yes; then
12457     space=yes
12458     cat >> confdefs.h <<\EOF
12459 #define STAT_STATFS4 1
12460 EOF
12461
12462   fi
12463 fi
12464
12465 if test $space = no; then
12466 # 4.4BSD and NetBSD
12467   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
12468 echo "configure:12469: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
12469   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
12470   echo $ac_n "(cached) $ac_c" 1>&6
12471 else
12472   if test "$cross_compiling" = yes; then
12473   fu_cv_sys_stat_statfs2_fsize=no
12474 else
12475   cat > conftest.$ac_ext <<EOF
12476 #line 12477 "configure"
12477 #include "confdefs.h"
12478 #include <sys/types.h>
12479 #ifdef HAVE_SYS_PARAM_H
12480 #include <sys/param.h>
12481 #endif
12482 #ifdef HAVE_SYS_MOUNT_H
12483 #include <sys/mount.h>
12484 #endif
12485   main ()
12486   {
12487   struct statfs fsd;
12488   fsd.f_fsize = 0;
12489   exit (statfs (".", &fsd));
12490   }
12491 EOF
12492 if { (eval echo configure:12493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12493 then
12494   fu_cv_sys_stat_statfs2_fsize=yes
12495 else
12496   echo "configure: failed program was:" >&5
12497   cat conftest.$ac_ext >&5
12498   rm -fr conftest*
12499   fu_cv_sys_stat_statfs2_fsize=no
12500 fi
12501 rm -fr conftest*
12502 fi
12503
12504 fi
12505
12506   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
12507   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
12508     space=yes
12509     cat >> confdefs.h <<\EOF
12510 #define STAT_STATFS2_FSIZE 1
12511 EOF
12512
12513   fi
12514 fi
12515
12516 if test $space = no; then
12517   # Ultrix
12518   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
12519 echo "configure:12520: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
12520   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
12521   echo $ac_n "(cached) $ac_c" 1>&6
12522 else
12523   if test "$cross_compiling" = yes; then
12524   fu_cv_sys_stat_fs_data=no
12525 else
12526   cat > conftest.$ac_ext <<EOF
12527 #line 12528 "configure"
12528 #include "confdefs.h"
12529 #include <sys/types.h>
12530 #ifdef HAVE_SYS_PARAM_H
12531 #include <sys/param.h>
12532 #endif
12533 #ifdef HAVE_SYS_MOUNT_H
12534 #include <sys/mount.h>
12535 #endif
12536 #ifdef HAVE_SYS_FS_TYPES_H
12537 #include <sys/fs_types.h>
12538 #endif
12539   main ()
12540   {
12541   struct fs_data fsd;
12542   /* Ultrix's statfs returns 1 for success,
12543      0 for not mounted, -1 for failure.  */
12544   exit (statfs (".", &fsd) != 1);
12545   }
12546 EOF
12547 if { (eval echo configure:12548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12548 then
12549   fu_cv_sys_stat_fs_data=yes
12550 else
12551   echo "configure: failed program was:" >&5
12552   cat conftest.$ac_ext >&5
12553   rm -fr conftest*
12554   fu_cv_sys_stat_fs_data=no
12555 fi
12556 rm -fr conftest*
12557 fi
12558
12559 fi
12560
12561   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
12562   if test $fu_cv_sys_stat_fs_data = yes; then
12563     space=yes
12564     cat >> confdefs.h <<\EOF
12565 #define STAT_STATFS2_FS_DATA 1
12566 EOF
12567
12568   fi
12569 fi
12570
12571 #
12572 # As a gating factor for large file support, in order to
12573 # use <4GB files we must have the following minimal support
12574 # available.
12575 # long long, and a 64 bit off_t or off64_t.
12576 # If we don't have all of these then disable large
12577 # file support.
12578 #
12579 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
12580 echo "configure:12581: checking if large file support can be enabled" >&5
12581 cat > conftest.$ac_ext <<EOF
12582 #line 12583 "configure"
12583 #include "confdefs.h"
12584
12585 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
12586 #include <sys/types.h>
12587 #else
12588 __COMPILE_ERROR_
12589 #endif
12590
12591 int main() {
12592 int i
12593 ; return 0; }
12594 EOF
12595 if { (eval echo configure:12596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12596   rm -rf conftest*
12597   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
12598 else
12599   echo "configure: failed program was:" >&5
12600   cat conftest.$ac_ext >&5
12601   rm -rf conftest*
12602   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
12603 fi
12604 rm -f conftest*
12605 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
12606     cat >> confdefs.h <<\EOF
12607 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
12608 EOF
12609
12610 fi
12611 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
12612
12613 # Check whether --with-spinlocks or --without-spinlocks was given.
12614 if test "${with_spinlocks+set}" = set; then
12615   withval="$with_spinlocks"
12616   :
12617 fi
12618
12619 if test "x$with_spinlocks" = "xyes"; then
12620     cat >> confdefs.h <<\EOF
12621 #define USE_SPINLOCKS 1
12622 EOF
12623
12624
12625     case "$host_cpu" in
12626         sparc)
12627             cat >> confdefs.h <<\EOF
12628 #define SPARC_SPINLOCKS 1
12629 EOF
12630
12631             ;;
12632
12633         i386|i486|i586|i686)
12634             cat >> confdefs.h <<\EOF
12635 #define INTEL_SPINLOCKS 1
12636 EOF
12637
12638             ;;
12639
12640         mips)
12641             cat >> confdefs.h <<\EOF
12642 #define MIPS_SPINLOCKS 1
12643 EOF
12644
12645             ;;
12646
12647         powerpc)
12648             cat >> confdefs.h <<\EOF
12649 #define POWERPC_SPINLOCKS 1
12650 EOF
12651
12652             ;;
12653     esac
12654 fi
12655
12656 #################################################
12657 # check for ACL support
12658
12659 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
12660 echo "configure:12661: checking whether to support ACLs" >&5
12661 # Check whether --with-acl-support or --without-acl-support was given.
12662 if test "${with_acl_support+set}" = set; then
12663   withval="$with_acl_support"
12664    case "$withval" in
12665   yes)
12666
12667         case "$host_os" in
12668         *sysv5*)
12669             echo "$ac_t""Using UnixWare ACLs" 1>&6
12670             cat >> confdefs.h <<\EOF
12671 #define HAVE_UNIXWARE_ACLS 1
12672 EOF
12673
12674             ;;
12675         *solaris*)
12676             echo "$ac_t""Using solaris ACLs" 1>&6
12677             cat >> confdefs.h <<\EOF
12678 #define HAVE_SOLARIS_ACLS 1
12679 EOF
12680
12681             ;;
12682                 *irix*)
12683                         echo "$ac_t""Using IRIX ACLs" 1>&6
12684                         cat >> confdefs.h <<\EOF
12685 #define HAVE_IRIX_ACLS 1
12686 EOF
12687
12688                         ;;
12689                 *aix*)
12690                         echo "$ac_t""Using AIX ACLs" 1>&6
12691                         cat >> confdefs.h <<\EOF
12692 #define HAVE_AIX_ACLS 1
12693 EOF
12694
12695                         ;;
12696         *)
12697                         echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
12698 echo "configure:12699: checking for acl_get_file in -lacl" >&5
12699 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
12700 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12701   echo $ac_n "(cached) $ac_c" 1>&6
12702 else
12703   ac_save_LIBS="$LIBS"
12704 LIBS="-lacl  $LIBS"
12705 cat > conftest.$ac_ext <<EOF
12706 #line 12707 "configure"
12707 #include "confdefs.h"
12708 /* Override any gcc2 internal prototype to avoid an error.  */
12709 /* We use char because int might match the return type of a gcc2
12710     builtin and then its argument prototype would still apply.  */
12711 char acl_get_file();
12712
12713 int main() {
12714 acl_get_file()
12715 ; return 0; }
12716 EOF
12717 if { (eval echo configure:12718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12718   rm -rf conftest*
12719   eval "ac_cv_lib_$ac_lib_var=yes"
12720 else
12721   echo "configure: failed program was:" >&5
12722   cat conftest.$ac_ext >&5
12723   rm -rf conftest*
12724   eval "ac_cv_lib_$ac_lib_var=no"
12725 fi
12726 rm -f conftest*
12727 LIBS="$ac_save_LIBS"
12728
12729 fi
12730 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12731   echo "$ac_t""yes" 1>&6
12732     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12733     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12734   cat >> confdefs.h <<EOF
12735 #define $ac_tr_lib 1
12736 EOF
12737
12738   LIBS="-lacl $LIBS"
12739
12740 else
12741   echo "$ac_t""no" 1>&6
12742 fi
12743
12744                         echo $ac_n "checking for ACL support""... $ac_c" 1>&6
12745 echo "configure:12746: checking for ACL support" >&5
12746 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
12747   echo $ac_n "(cached) $ac_c" 1>&6
12748 else
12749   
12750                         cat > conftest.$ac_ext <<EOF
12751 #line 12752 "configure"
12752 #include "confdefs.h"
12753 #include <sys/types.h>
12754 #include <sys/acl.h>
12755 int main() {
12756  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
12757 ; return 0; }
12758 EOF
12759 if { (eval echo configure:12760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12760   rm -rf conftest*
12761   samba_cv_HAVE_POSIX_ACLS=yes
12762 else
12763   echo "configure: failed program was:" >&5
12764   cat conftest.$ac_ext >&5
12765   rm -rf conftest*
12766   samba_cv_HAVE_POSIX_ACLS=no
12767 fi
12768 rm -f conftest*
12769 fi
12770
12771 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
12772                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
12773                                 echo "$ac_t""Using posix ACLs" 1>&6
12774                                 cat >> confdefs.h <<\EOF
12775 #define HAVE_POSIX_ACLS 1
12776 EOF
12777
12778                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
12779 echo "configure:12780: checking for acl_get_perm_np" >&5
12780 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
12781   echo $ac_n "(cached) $ac_c" 1>&6
12782 else
12783   
12784                                 cat > conftest.$ac_ext <<EOF
12785 #line 12786 "configure"
12786 #include "confdefs.h"
12787 #include <sys/types.h>
12788 #include <sys/acl.h>
12789 int main() {
12790  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
12791 ; return 0; }
12792 EOF
12793 if { (eval echo configure:12794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12794   rm -rf conftest*
12795   samba_cv_HAVE_ACL_GET_PERM_NP=yes
12796 else
12797   echo "configure: failed program was:" >&5
12798   cat conftest.$ac_ext >&5
12799   rm -rf conftest*
12800   samba_cv_HAVE_ACL_GET_PERM_NP=no
12801 fi
12802 rm -f conftest*
12803 fi
12804
12805 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
12806                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
12807                                         cat >> confdefs.h <<\EOF
12808 #define HAVE_ACL_GET_PERM_NP 1
12809 EOF
12810
12811                                 fi
12812                         fi
12813             ;;
12814         esac
12815         ;;
12816   *)
12817     echo "$ac_t""no" 1>&6
12818     cat >> confdefs.h <<\EOF
12819 #define HAVE_NO_ACLS 1
12820 EOF
12821
12822     ;;
12823   esac 
12824 else
12825   cat >> confdefs.h <<\EOF
12826 #define HAVE_NO_ACLS 1
12827 EOF
12828
12829   echo "$ac_t""no" 1>&6
12830
12831 fi
12832
12833
12834 #################################################
12835 # check whether winbind is supported on this platform
12836
12837 echo $ac_n "checking whether to compile winbind""... $ac_c" 1>&6
12838 echo "configure:12839: checking whether to compile winbind" >&5
12839
12840 case "$host_os" in 
12841         *linux*|*solaris*)
12842                 WINBIND_TARGETS="$WINBIND_TARGETS \$(WINBIND_PROGS)"
12843                 case "$with_pam" in
12844                         yes)
12845                                 WINBIND_TARGETS="$WINBIND_TARGETS \$(WINBIND_PAM_PROGS)"
12846                         ;;
12847                         *)
12848                 esac
12849                 ;;
12850         *)
12851                 winbind_no_reason=", unsupported on $host_os"
12852                 ;;
12853 esac
12854
12855 # Check whether --with-winbind or --without-winbind was given.
12856 if test "${with_winbind+set}" = set; then
12857   withval="$with_winbind"
12858    
12859   case "$withval" in
12860         no)
12861                 WINBIND_TARGETS=""
12862                 winbind_reason=""
12863                 ;;
12864   esac 
12865 fi
12866
12867
12868 if test x"$WINBIND_TARGETS" = x; then
12869         echo "$ac_t""no$winbind_no_reason" 1>&6
12870 else
12871         echo "$ac_t""yes" 1>&6
12872 fi
12873
12874
12875
12876 #################################################
12877 # final configure stuff
12878
12879 echo "checking configure summary"
12880 if test "$cross_compiling" = yes; then
12881   :
12882 else
12883   cat > conftest.$ac_ext <<EOF
12884 #line 12885 "configure"
12885 #include "confdefs.h"
12886 #include "${srcdir-.}/tests/summary.c"
12887 EOF
12888 if { (eval echo configure:12889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12889 then
12890   echo "configure OK";
12891 else
12892   echo "configure: failed program was:" >&5
12893   cat conftest.$ac_ext >&5
12894   rm -fr conftest*
12895   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
12896 fi
12897 rm -fr conftest*
12898 fi
12899
12900
12901 builddir=`pwd`
12902
12903
12904 trap '' 1 2 15
12905 cat > confcache <<\EOF
12906 # This file is a shell script that caches the results of configure
12907 # tests run on this system so they can be shared between configure
12908 # scripts and configure runs.  It is not useful on other systems.
12909 # If it contains results you don't want to keep, you may remove or edit it.
12910 #
12911 # By default, configure uses ./config.cache as the cache file,
12912 # creating it if it does not exist already.  You can give configure
12913 # the --cache-file=FILE option to use a different cache file; that is
12914 # what configure does when it calls configure scripts in
12915 # subdirectories, so they share the cache.
12916 # Giving --cache-file=/dev/null disables caching, for debugging configure.
12917 # config.status only pays attention to the cache file if you give it the
12918 # --recheck option to rerun configure.
12919 #
12920 EOF
12921 # The following way of writing the cache mishandles newlines in values,
12922 # but we know of no workaround that is simple, portable, and efficient.
12923 # So, don't put newlines in cache variables' values.
12924 # Ultrix sh set writes to stderr and can't be redirected directly,
12925 # and sets the high bit in the cache file unless we assign to the vars.
12926 (set) 2>&1 |
12927   case `(ac_space=' '; set | grep ac_space) 2>&1` in
12928   *ac_space=\ *)
12929     # `set' does not quote correctly, so add quotes (double-quote substitution
12930     # turns \\\\ into \\, and sed turns \\ into \).
12931     sed -n \
12932       -e "s/'/'\\\\''/g" \
12933       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
12934     ;;
12935   *)
12936     # `set' quotes correctly as required by POSIX, so do not add quotes.
12937     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
12938     ;;
12939   esac >> confcache
12940 if cmp -s $cache_file confcache; then
12941   :
12942 else
12943   if test -w $cache_file; then
12944     echo "updating cache $cache_file"
12945     cat confcache > $cache_file
12946   else
12947     echo "not updating unwritable cache $cache_file"
12948   fi
12949 fi
12950 rm -f confcache
12951
12952 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12953
12954 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12955 # Let make expand exec_prefix.
12956 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12957
12958 # Any assignment to VPATH causes Sun make to only execute
12959 # the first set of double-colon rules, so remove it if not needed.
12960 # If there is a colon in the path, we need to keep it.
12961 if test "x$srcdir" = x.; then
12962   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12963 fi
12964
12965 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12966
12967 DEFS=-DHAVE_CONFIG_H
12968
12969 # Without the "./", some shells look in PATH for config.status.
12970 : ${CONFIG_STATUS=./config.status}
12971
12972 echo creating $CONFIG_STATUS
12973 rm -f $CONFIG_STATUS
12974 cat > $CONFIG_STATUS <<EOF
12975 #! /bin/sh
12976 # Generated automatically by configure.
12977 # Run this file to recreate the current configuration.
12978 # This directory was configured as follows,
12979 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12980 #
12981 # $0 $ac_configure_args
12982 #
12983 # Compiler output produced by configure, useful for debugging
12984 # configure, is in ./config.log if it exists.
12985
12986 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12987 for ac_option
12988 do
12989   case "\$ac_option" in
12990   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12991     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12992     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12993   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12994     echo "$CONFIG_STATUS generated by autoconf version 2.13"
12995     exit 0 ;;
12996   -help | --help | --hel | --he | --h)
12997     echo "\$ac_cs_usage"; exit 0 ;;
12998   *) echo "\$ac_cs_usage"; exit 1 ;;
12999   esac
13000 done
13001
13002 ac_given_srcdir=$srcdir
13003 ac_given_INSTALL="$INSTALL"
13004
13005 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13006 EOF
13007 cat >> $CONFIG_STATUS <<EOF
13008
13009 # Protect against being on the right side of a sed subst in config.status.
13010 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13011  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13012 $ac_vpsub
13013 $extrasub
13014 s%@SHELL@%$SHELL%g
13015 s%@CFLAGS@%$CFLAGS%g
13016 s%@CPPFLAGS@%$CPPFLAGS%g
13017 s%@CXXFLAGS@%$CXXFLAGS%g
13018 s%@FFLAGS@%$FFLAGS%g
13019 s%@DEFS@%$DEFS%g
13020 s%@LDFLAGS@%$LDFLAGS%g
13021 s%@LIBS@%$LIBS%g
13022 s%@exec_prefix@%$exec_prefix%g
13023 s%@prefix@%$prefix%g
13024 s%@program_transform_name@%$program_transform_name%g
13025 s%@bindir@%$bindir%g
13026 s%@sbindir@%$sbindir%g
13027 s%@libexecdir@%$libexecdir%g
13028 s%@datadir@%$datadir%g
13029 s%@sysconfdir@%$sysconfdir%g
13030 s%@sharedstatedir@%$sharedstatedir%g
13031 s%@localstatedir@%$localstatedir%g
13032 s%@libdir@%$libdir%g
13033 s%@includedir@%$includedir%g
13034 s%@oldincludedir@%$oldincludedir%g
13035 s%@infodir@%$infodir%g
13036 s%@mandir@%$mandir%g
13037 s%@RUNPROG@%$RUNPROG%g
13038 s%@MPROGS@%$MPROGS%g
13039 s%@LDSHFLAGS@%$LDSHFLAGS%g
13040 s%@HOST_OS@%$HOST_OS%g
13041 s%@PAM_MOD@%$PAM_MOD%g
13042 s%@WRAP@%$WRAP%g
13043 s%@WRAP32@%$WRAP32%g
13044 s%@PICFLAG@%$PICFLAG%g
13045 s%@SHLIBEXT@%$SHLIBEXT%g
13046 s%@BLDSHARED@%$BLDSHARED%g
13047 s%@CC@%$CC%g
13048 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13049 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13050 s%@INSTALL_DATA@%$INSTALL_DATA%g
13051 s%@AWK@%$AWK%g
13052 s%@host@%$host%g
13053 s%@host_alias@%$host_alias%g
13054 s%@host_cpu@%$host_cpu%g
13055 s%@host_vendor@%$host_vendor%g
13056 s%@host_os@%$host_os%g
13057 s%@build@%$build%g
13058 s%@build_alias@%$build_alias%g
13059 s%@build_cpu@%$build_cpu%g
13060 s%@build_vendor@%$build_vendor%g
13061 s%@build_os@%$build_os%g
13062 s%@RANLIB@%$RANLIB%g
13063 s%@LN_S@%$LN_S%g
13064 s%@LIBTOOL@%$LIBTOOL%g
13065 s%@LIBTOOL_DEPS@%$LIBTOOL_DEPS%g
13066 s%@BROKEN_CC@%$BROKEN_CC%g
13067 s%@target@%$target%g
13068 s%@target_alias@%$target_alias%g
13069 s%@target_cpu@%$target_cpu%g
13070 s%@target_vendor@%$target_vendor%g
13071 s%@target_os@%$target_os%g
13072 s%@CPP@%$CPP%g
13073 s%@LIBOBJS@%$LIBOBJS%g
13074 s%@TERMLIBS@%$TERMLIBS%g
13075 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
13076 s%@ROFF@%$ROFF%g
13077 s%@ICONV_OBJS@%$ICONV_OBJS%g
13078 s%@QUOTAOBJS@%$QUOTAOBJS%g
13079 s%@privatedir@%$privatedir%g
13080 s%@lockdir@%$lockdir%g
13081 s%@swatdir@%$swatdir%g
13082 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
13083 s%@builddir@%$builddir%g
13084
13085 CEOF
13086 EOF
13087
13088 cat >> $CONFIG_STATUS <<\EOF
13089
13090 # Split the substitutions into bite-sized pieces for seds with
13091 # small command number limits, like on Digital OSF/1 and HP-UX.
13092 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13093 ac_file=1 # Number of current file.
13094 ac_beg=1 # First line for current file.
13095 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13096 ac_more_lines=:
13097 ac_sed_cmds=""
13098 while $ac_more_lines; do
13099   if test $ac_beg -gt 1; then
13100     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13101   else
13102     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13103   fi
13104   if test ! -s conftest.s$ac_file; then
13105     ac_more_lines=false
13106     rm -f conftest.s$ac_file
13107   else
13108     if test -z "$ac_sed_cmds"; then
13109       ac_sed_cmds="sed -f conftest.s$ac_file"
13110     else
13111       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13112     fi
13113     ac_file=`expr $ac_file + 1`
13114     ac_beg=$ac_end
13115     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13116   fi
13117 done
13118 if test -z "$ac_sed_cmds"; then
13119   ac_sed_cmds=cat
13120 fi
13121 EOF
13122
13123 cat >> $CONFIG_STATUS <<EOF
13124
13125 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
13126 EOF
13127 cat >> $CONFIG_STATUS <<\EOF
13128 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13129   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13130   case "$ac_file" in
13131   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13132        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13133   *) ac_file_in="${ac_file}.in" ;;
13134   esac
13135
13136   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13137
13138   # Remove last slash and all that follows it.  Not all systems have dirname.
13139   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13140   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13141     # The file is in a subdirectory.
13142     test ! -d "$ac_dir" && mkdir "$ac_dir"
13143     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13144     # A "../" for each directory in $ac_dir_suffix.
13145     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13146   else
13147     ac_dir_suffix= ac_dots=
13148   fi
13149
13150   case "$ac_given_srcdir" in
13151   .)  srcdir=.
13152       if test -z "$ac_dots"; then top_srcdir=.
13153       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13154   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13155   *) # Relative path.
13156     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13157     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13158   esac
13159
13160   case "$ac_given_INSTALL" in
13161   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13162   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13163   esac
13164
13165   echo creating "$ac_file"
13166   rm -f "$ac_file"
13167   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13168   case "$ac_file" in
13169   *Makefile*) ac_comsub="1i\\
13170 # $configure_input" ;;
13171   *) ac_comsub= ;;
13172   esac
13173
13174   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13175   sed -e "$ac_comsub
13176 s%@configure_input@%$configure_input%g
13177 s%@srcdir@%$srcdir%g
13178 s%@top_srcdir@%$top_srcdir%g
13179 s%@INSTALL@%$INSTALL%g
13180 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13181 fi; done
13182 rm -f conftest.s*
13183
13184 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13185 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13186 #
13187 # ac_d sets the value in "#define NAME VALUE" lines.
13188 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13189 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13190 ac_dC='\3'
13191 ac_dD='%g'
13192 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13193 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13194 ac_uB='\([      ]\)%\1#\2define\3'
13195 ac_uC=' '
13196 ac_uD='\4%g'
13197 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13198 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13199 ac_eB='$%\1#\2define\3'
13200 ac_eC=' '
13201 ac_eD='%g'
13202
13203 if test "${CONFIG_HEADERS+set}" != set; then
13204 EOF
13205 cat >> $CONFIG_STATUS <<EOF
13206   CONFIG_HEADERS="include/config.h"
13207 EOF
13208 cat >> $CONFIG_STATUS <<\EOF
13209 fi
13210 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13211   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13212   case "$ac_file" in
13213   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13214        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13215   *) ac_file_in="${ac_file}.in" ;;
13216   esac
13217
13218   echo creating $ac_file
13219
13220   rm -f conftest.frag conftest.in conftest.out
13221   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13222   cat $ac_file_inputs > conftest.in
13223
13224 EOF
13225
13226 # Transform confdefs.h into a sed script conftest.vals that substitutes
13227 # the proper values into config.h.in to produce config.h.  And first:
13228 # Protect against being on the right side of a sed subst in config.status.
13229 # Protect against being in an unquoted here document in config.status.
13230 rm -f conftest.vals
13231 cat > conftest.hdr <<\EOF
13232 s/[\\&%]/\\&/g
13233 s%[\\$`]%\\&%g
13234 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13235 s%ac_d%ac_u%gp
13236 s%ac_u%ac_e%gp
13237 EOF
13238 sed -n -f conftest.hdr confdefs.h > conftest.vals
13239 rm -f conftest.hdr
13240
13241 # This sed command replaces #undef with comments.  This is necessary, for
13242 # example, in the case of _POSIX_SOURCE, which is predefined and required
13243 # on some systems where configure will not decide to define it.
13244 cat >> conftest.vals <<\EOF
13245 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13246 EOF
13247
13248 # Break up conftest.vals because some shells have a limit on
13249 # the size of here documents, and old seds have small limits too.
13250
13251 rm -f conftest.tail
13252 while :
13253 do
13254   ac_lines=`grep -c . conftest.vals`
13255   # grep -c gives empty output for an empty file on some AIX systems.
13256   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13257   # Write a limited-size here document to conftest.frag.
13258   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13259   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13260   echo 'CEOF
13261   sed -f conftest.frag conftest.in > conftest.out
13262   rm -f conftest.in
13263   mv conftest.out conftest.in
13264 ' >> $CONFIG_STATUS
13265   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13266   rm -f conftest.vals
13267   mv conftest.tail conftest.vals
13268 done
13269 rm -f conftest.vals
13270
13271 cat >> $CONFIG_STATUS <<\EOF
13272   rm -f conftest.frag conftest.h
13273   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13274   cat conftest.in >> conftest.h
13275   rm -f conftest.in
13276   if cmp -s $ac_file conftest.h 2>/dev/null; then
13277     echo "$ac_file is unchanged"
13278     rm -f conftest.h
13279   else
13280     # Remove last slash and all that follows it.  Not all systems have dirname.
13281       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13282       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13283       # The file is in a subdirectory.
13284       test ! -d "$ac_dir" && mkdir "$ac_dir"
13285     fi
13286     rm -f $ac_file
13287     mv conftest.h $ac_file
13288   fi
13289 fi; done
13290
13291 EOF
13292 cat >> $CONFIG_STATUS <<EOF
13293
13294 EOF
13295 cat >> $CONFIG_STATUS <<\EOF
13296
13297 exit 0
13298 EOF
13299 chmod +x $CONFIG_STATUS
13300 rm -fr confdefs* $ac_clean_files
13301 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
13302