Fixed typo spotted by "Jim McDonough" <jmcd@us.ibm.com>....
[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 # compile with optimisation and without debugging by default
633 CFLAGS="-O ${CFLAGS}"
634
635 # Check whether --enable-debug or --disable-debug was given.
636 if test "${enable_debug+set}" = set; then
637   enableval="$enable_debug"
638   if eval "test x$enable_debug = xyes"; then
639         CFLAGS="${CFLAGS} -g"
640     fi
641 fi
642
643
644
645 # Extract the first word of "gcc", so it can be a program name with args.
646 set dummy gcc; ac_word=$2
647 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
648 echo "configure:649: checking for $ac_word" >&5
649 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
650   echo $ac_n "(cached) $ac_c" 1>&6
651 else
652   if test -n "$CC"; then
653   ac_cv_prog_CC="$CC" # Let the user override the test.
654 else
655   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
656   ac_dummy="$PATH"
657   for ac_dir in $ac_dummy; do
658     test -z "$ac_dir" && ac_dir=.
659     if test -f $ac_dir/$ac_word; then
660       ac_cv_prog_CC="gcc"
661       break
662     fi
663   done
664   IFS="$ac_save_ifs"
665 fi
666 fi
667 CC="$ac_cv_prog_CC"
668 if test -n "$CC"; then
669   echo "$ac_t""$CC" 1>&6
670 else
671   echo "$ac_t""no" 1>&6
672 fi
673
674 if test -z "$CC"; then
675   # Extract the first word of "cc", so it can be a program name with args.
676 set dummy cc; ac_word=$2
677 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
678 echo "configure:679: checking for $ac_word" >&5
679 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
680   echo $ac_n "(cached) $ac_c" 1>&6
681 else
682   if test -n "$CC"; then
683   ac_cv_prog_CC="$CC" # Let the user override the test.
684 else
685   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
686   ac_prog_rejected=no
687   ac_dummy="$PATH"
688   for ac_dir in $ac_dummy; do
689     test -z "$ac_dir" && ac_dir=.
690     if test -f $ac_dir/$ac_word; then
691       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
692         ac_prog_rejected=yes
693         continue
694       fi
695       ac_cv_prog_CC="cc"
696       break
697     fi
698   done
699   IFS="$ac_save_ifs"
700 if test $ac_prog_rejected = yes; then
701   # We found a bogon in the path, so make sure we never use it.
702   set dummy $ac_cv_prog_CC
703   shift
704   if test $# -gt 0; then
705     # We chose a different compiler from the bogus one.
706     # However, it has the same basename, so the bogon will be chosen
707     # first if we set CC to just the basename; use the full file name.
708     shift
709     set dummy "$ac_dir/$ac_word" "$@"
710     shift
711     ac_cv_prog_CC="$@"
712   fi
713 fi
714 fi
715 fi
716 CC="$ac_cv_prog_CC"
717 if test -n "$CC"; then
718   echo "$ac_t""$CC" 1>&6
719 else
720   echo "$ac_t""no" 1>&6
721 fi
722
723   if test -z "$CC"; then
724     case "`uname -s`" in
725     *win32* | *WIN32*)
726       # Extract the first word of "cl", so it can be a program name with args.
727 set dummy cl; ac_word=$2
728 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
729 echo "configure:730: checking for $ac_word" >&5
730 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
731   echo $ac_n "(cached) $ac_c" 1>&6
732 else
733   if test -n "$CC"; then
734   ac_cv_prog_CC="$CC" # Let the user override the test.
735 else
736   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
737   ac_dummy="$PATH"
738   for ac_dir in $ac_dummy; do
739     test -z "$ac_dir" && ac_dir=.
740     if test -f $ac_dir/$ac_word; then
741       ac_cv_prog_CC="cl"
742       break
743     fi
744   done
745   IFS="$ac_save_ifs"
746 fi
747 fi
748 CC="$ac_cv_prog_CC"
749 if test -n "$CC"; then
750   echo "$ac_t""$CC" 1>&6
751 else
752   echo "$ac_t""no" 1>&6
753 fi
754  ;;
755     esac
756   fi
757   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
758 fi
759
760 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
761 echo "configure:762: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
762
763 ac_ext=c
764 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
765 ac_cpp='$CPP $CPPFLAGS'
766 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
767 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
768 cross_compiling=$ac_cv_prog_cc_cross
769
770 cat > conftest.$ac_ext << EOF
771
772 #line 773 "configure"
773 #include "confdefs.h"
774
775 main(){return(0);}
776 EOF
777 if { (eval echo configure:778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
778   ac_cv_prog_cc_works=yes
779   # If we can't run a trivial program, we are probably using a cross compiler.
780   if (./conftest; exit) 2>/dev/null; then
781     ac_cv_prog_cc_cross=no
782   else
783     ac_cv_prog_cc_cross=yes
784   fi
785 else
786   echo "configure: failed program was:" >&5
787   cat conftest.$ac_ext >&5
788   ac_cv_prog_cc_works=no
789 fi
790 rm -fr conftest*
791 ac_ext=c
792 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
793 ac_cpp='$CPP $CPPFLAGS'
794 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
795 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
796 cross_compiling=$ac_cv_prog_cc_cross
797
798 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
799 if test $ac_cv_prog_cc_works = no; then
800   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
801 fi
802 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
803 echo "configure:804: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
804 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
805 cross_compiling=$ac_cv_prog_cc_cross
806
807 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
808 echo "configure:809: checking whether we are using GNU C" >&5
809 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
810   echo $ac_n "(cached) $ac_c" 1>&6
811 else
812   cat > conftest.c <<EOF
813 #ifdef __GNUC__
814   yes;
815 #endif
816 EOF
817 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
818   ac_cv_prog_gcc=yes
819 else
820   ac_cv_prog_gcc=no
821 fi
822 fi
823
824 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
825
826 if test $ac_cv_prog_gcc = yes; then
827   GCC=yes
828 else
829   GCC=
830 fi
831
832 ac_test_CFLAGS="${CFLAGS+set}"
833 ac_save_CFLAGS="$CFLAGS"
834 CFLAGS=
835 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
836 echo "configure:837: checking whether ${CC-cc} accepts -g" >&5
837 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
838   echo $ac_n "(cached) $ac_c" 1>&6
839 else
840   echo 'void f(){}' > conftest.c
841 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
842   ac_cv_prog_cc_g=yes
843 else
844   ac_cv_prog_cc_g=no
845 fi
846 rm -f conftest*
847
848 fi
849
850 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
851 if test "$ac_test_CFLAGS" = set; then
852   CFLAGS="$ac_save_CFLAGS"
853 elif test $ac_cv_prog_cc_g = yes; then
854   if test "$GCC" = yes; then
855     CFLAGS="-g -O2"
856   else
857     CFLAGS="-g"
858   fi
859 else
860   if test "$GCC" = yes; then
861     CFLAGS="-O2"
862   else
863     CFLAGS=
864   fi
865 fi
866
867 ac_aux_dir=
868 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
869   if test -f $ac_dir/install-sh; then
870     ac_aux_dir=$ac_dir
871     ac_install_sh="$ac_aux_dir/install-sh -c"
872     break
873   elif test -f $ac_dir/install.sh; then
874     ac_aux_dir=$ac_dir
875     ac_install_sh="$ac_aux_dir/install.sh -c"
876     break
877   fi
878 done
879 if test -z "$ac_aux_dir"; then
880   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
881 fi
882 ac_config_guess=$ac_aux_dir/config.guess
883 ac_config_sub=$ac_aux_dir/config.sub
884 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
885
886 # Find a good install program.  We prefer a C program (faster),
887 # so one script is as good as another.  But avoid the broken or
888 # incompatible versions:
889 # SysV /etc/install, /usr/sbin/install
890 # SunOS /usr/etc/install
891 # IRIX /sbin/install
892 # AIX /bin/install
893 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
894 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
895 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
896 # ./install, which can be erroneously created by make from ./install.sh.
897 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
898 echo "configure:899: checking for a BSD compatible install" >&5
899 if test -z "$INSTALL"; then
900 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
901   echo $ac_n "(cached) $ac_c" 1>&6
902 else
903     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
904   for ac_dir in $PATH; do
905     # Account for people who put trailing slashes in PATH elements.
906     case "$ac_dir/" in
907     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
908     *)
909       # OSF1 and SCO ODT 3.0 have their own names for install.
910       # Don't use installbsd from OSF since it installs stuff as root
911       # by default.
912       for ac_prog in ginstall scoinst install; do
913         if test -f $ac_dir/$ac_prog; then
914           if test $ac_prog = install &&
915             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
916             # AIX install.  It has an incompatible calling convention.
917             :
918           else
919             ac_cv_path_install="$ac_dir/$ac_prog -c"
920             break 2
921           fi
922         fi
923       done
924       ;;
925     esac
926   done
927   IFS="$ac_save_IFS"
928
929 fi
930   if test "${ac_cv_path_install+set}" = set; then
931     INSTALL="$ac_cv_path_install"
932   else
933     # As a last resort, use the slow shell script.  We don't cache a
934     # path for INSTALL within a source directory, because that will
935     # break other packages using the cache if that directory is
936     # removed, or if the path is relative.
937     INSTALL="$ac_install_sh"
938   fi
939 fi
940 echo "$ac_t""$INSTALL" 1>&6
941
942 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
943 # It thinks the first close brace ends the variable substitution.
944 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
945
946 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
947
948 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
949
950 for ac_prog in gawk mawk nawk awk
951 do
952 # Extract the first word of "$ac_prog", so it can be a program name with args.
953 set dummy $ac_prog; ac_word=$2
954 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
955 echo "configure:956: checking for $ac_word" >&5
956 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
957   echo $ac_n "(cached) $ac_c" 1>&6
958 else
959   if test -n "$AWK"; then
960   ac_cv_prog_AWK="$AWK" # Let the user override the test.
961 else
962   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
963   ac_dummy="$PATH"
964   for ac_dir in $ac_dummy; do
965     test -z "$ac_dir" && ac_dir=.
966     if test -f $ac_dir/$ac_word; then
967       ac_cv_prog_AWK="$ac_prog"
968       break
969     fi
970   done
971   IFS="$ac_save_ifs"
972 fi
973 fi
974 AWK="$ac_cv_prog_AWK"
975 if test -n "$AWK"; then
976   echo "$ac_t""$AWK" 1>&6
977 else
978   echo "$ac_t""no" 1>&6
979 fi
980
981 test -n "$AWK" && break
982 done
983
984 # Check whether --enable-shared or --disable-shared was given.
985 if test "${enable_shared+set}" = set; then
986   enableval="$enable_shared"
987   p=${PACKAGE-default}
988 case "$enableval" in
989 yes) enable_shared=yes ;;
990 no) enable_shared=no ;;
991 *)
992   enable_shared=no
993   # Look at the argument we got.  We use all the common list separators.
994   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
995   for pkg in $enableval; do
996     if test "X$pkg" = "X$p"; then
997       enable_shared=yes
998     fi
999   done
1000   IFS="$ac_save_ifs"
1001   ;;
1002 esac
1003 else
1004   enable_shared=yes
1005 fi
1006
1007 # Check whether --enable-static or --disable-static was given.
1008 if test "${enable_static+set}" = set; then
1009   enableval="$enable_static"
1010   p=${PACKAGE-default}
1011 case "$enableval" in
1012 yes) enable_static=yes ;;
1013 no) enable_static=no ;;
1014 *)
1015   enable_static=no
1016   # Look at the argument we got.  We use all the common list separators.
1017   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1018   for pkg in $enableval; do
1019     if test "X$pkg" = "X$p"; then
1020       enable_static=yes
1021     fi
1022   done
1023   IFS="$ac_save_ifs"
1024   ;;
1025 esac
1026 else
1027   enable_static=yes
1028 fi
1029
1030 # Check whether --enable-fast-install or --disable-fast-install was given.
1031 if test "${enable_fast_install+set}" = set; then
1032   enableval="$enable_fast_install"
1033   p=${PACKAGE-default}
1034 case "$enableval" in
1035 yes) enable_fast_install=yes ;;
1036 no) enable_fast_install=no ;;
1037 *)
1038   enable_fast_install=no
1039   # Look at the argument we got.  We use all the common list separators.
1040   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1041   for pkg in $enableval; do
1042     if test "X$pkg" = "X$p"; then
1043       enable_fast_install=yes
1044     fi
1045   done
1046   IFS="$ac_save_ifs"
1047   ;;
1048 esac
1049 else
1050   enable_fast_install=yes
1051 fi
1052
1053
1054 # Make sure we can run config.sub.
1055 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1056 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1057 fi
1058
1059 echo $ac_n "checking host system type""... $ac_c" 1>&6
1060 echo "configure:1061: checking host system type" >&5
1061
1062 host_alias=$host
1063 case "$host_alias" in
1064 NONE)
1065   case $nonopt in
1066   NONE)
1067     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1068     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1069     fi ;;
1070   *) host_alias=$nonopt ;;
1071   esac ;;
1072 esac
1073
1074 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1075 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1076 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1077 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1078 echo "$ac_t""$host" 1>&6
1079
1080 echo $ac_n "checking build system type""... $ac_c" 1>&6
1081 echo "configure:1082: checking build system type" >&5
1082
1083 build_alias=$build
1084 case "$build_alias" in
1085 NONE)
1086   case $nonopt in
1087   NONE) build_alias=$host_alias ;;
1088   *) build_alias=$nonopt ;;
1089   esac ;;
1090 esac
1091
1092 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1093 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1094 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1095 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1096 echo "$ac_t""$build" 1>&6
1097
1098 # Extract the first word of "ranlib", so it can be a program name with args.
1099 set dummy ranlib; ac_word=$2
1100 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1101 echo "configure:1102: checking for $ac_word" >&5
1102 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1103   echo $ac_n "(cached) $ac_c" 1>&6
1104 else
1105   if test -n "$RANLIB"; then
1106   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1107 else
1108   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1109   ac_dummy="$PATH"
1110   for ac_dir in $ac_dummy; do
1111     test -z "$ac_dir" && ac_dir=.
1112     if test -f $ac_dir/$ac_word; then
1113       ac_cv_prog_RANLIB="ranlib"
1114       break
1115     fi
1116   done
1117   IFS="$ac_save_ifs"
1118   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1119 fi
1120 fi
1121 RANLIB="$ac_cv_prog_RANLIB"
1122 if test -n "$RANLIB"; then
1123   echo "$ac_t""$RANLIB" 1>&6
1124 else
1125   echo "$ac_t""no" 1>&6
1126 fi
1127
1128 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1129 if test "${with_gnu_ld+set}" = set; then
1130   withval="$with_gnu_ld"
1131   test "$withval" = no || with_gnu_ld=yes
1132 else
1133   with_gnu_ld=no
1134 fi
1135
1136 ac_prog=ld
1137 if test "$ac_cv_prog_gcc" = yes; then
1138   # Check if gcc -print-prog-name=ld gives a path.
1139   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1140 echo "configure:1141: checking for ld used by GCC" >&5
1141   ac_prog=`($CC -print-prog-name=ld) 2>&5`
1142   case "$ac_prog" in
1143     # Accept absolute paths.
1144     [\\/]* | [A-Za-z]:[\\/]*)
1145       re_direlt='/[^/][^/]*/\.\./'
1146       # Canonicalize the path of ld
1147       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1148       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1149         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1150       done
1151       test -z "$LD" && LD="$ac_prog"
1152       ;;
1153   "")
1154     # If it fails, then pretend we aren't using GCC.
1155     ac_prog=ld
1156     ;;
1157   *)
1158     # If it is relative, then search for the first ld in PATH.
1159     with_gnu_ld=unknown
1160     ;;
1161   esac
1162 elif test "$with_gnu_ld" = yes; then
1163   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1164 echo "configure:1165: checking for GNU ld" >&5
1165 else
1166   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1167 echo "configure:1168: checking for non-GNU ld" >&5
1168 fi
1169 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1170   echo $ac_n "(cached) $ac_c" 1>&6
1171 else
1172   if test -z "$LD"; then
1173   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1174   for ac_dir in $PATH; do
1175     test -z "$ac_dir" && ac_dir=.
1176     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1177       ac_cv_path_LD="$ac_dir/$ac_prog"
1178       # Check to see if the program is GNU ld.  I'd rather use --version,
1179       # but apparently some GNU ld's only accept -v.
1180       # Break only if it was the GNU/non-GNU ld that we prefer.
1181       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1182         test "$with_gnu_ld" != no && break
1183       else
1184         test "$with_gnu_ld" != yes && break
1185       fi
1186     fi
1187   done
1188   IFS="$ac_save_ifs"
1189 else
1190   ac_cv_path_LD="$LD" # Let the user override the test with a path.
1191 fi
1192 fi
1193
1194 LD="$ac_cv_path_LD"
1195 if test -n "$LD"; then
1196   echo "$ac_t""$LD" 1>&6
1197 else
1198   echo "$ac_t""no" 1>&6
1199 fi
1200 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1201 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1202 echo "configure:1203: checking if the linker ($LD) is GNU ld" >&5
1203 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1204   echo $ac_n "(cached) $ac_c" 1>&6
1205 else
1206   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1207 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1208   ac_cv_prog_gnu_ld=yes
1209 else
1210   ac_cv_prog_gnu_ld=no
1211 fi
1212 fi
1213
1214 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1215
1216
1217 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1218 echo "configure:1219: checking for BSD-compatible nm" >&5
1219 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1220   echo $ac_n "(cached) $ac_c" 1>&6
1221 else
1222   if test -n "$NM"; then
1223   # Let the user override the test.
1224   ac_cv_path_NM="$NM"
1225 else
1226   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1227   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1228     test -z "$ac_dir" && ac_dir=.
1229     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
1230       # Check to see if the nm accepts a BSD-compat flag.
1231       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1232       #   nm: unknown option "B" ignored
1233       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1234         ac_cv_path_NM="$ac_dir/nm -B"
1235         break
1236       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1237         ac_cv_path_NM="$ac_dir/nm -p"
1238         break
1239       else
1240         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1241         continue # so that we can try to find one that supports BSD flags
1242       fi
1243     fi
1244   done
1245   IFS="$ac_save_ifs"
1246   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1247 fi
1248 fi
1249
1250 NM="$ac_cv_path_NM"
1251 echo "$ac_t""$NM" 1>&6
1252
1253 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1254 echo "configure:1255: checking whether ln -s works" >&5
1255 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1256   echo $ac_n "(cached) $ac_c" 1>&6
1257 else
1258   rm -f conftestdata
1259 if ln -s X conftestdata 2>/dev/null
1260 then
1261   rm -f conftestdata
1262   ac_cv_prog_LN_S="ln -s"
1263 else
1264   ac_cv_prog_LN_S=ln
1265 fi
1266 fi
1267 LN_S="$ac_cv_prog_LN_S"
1268 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1269   echo "$ac_t""yes" 1>&6
1270 else
1271   echo "$ac_t""no" 1>&6
1272 fi
1273
1274
1275 case "$target" in
1276 NONE) lt_target="$host" ;;
1277 *) lt_target="$target" ;;
1278 esac
1279
1280 # Check for any special flags to pass to ltconfig.
1281 libtool_flags="--cache-file=$cache_file"
1282 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1283 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1284 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1285 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1286 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1287
1288
1289 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1290 if test "${enable_libtool_lock+set}" = set; then
1291   enableval="$enable_libtool_lock"
1292   :
1293 fi
1294
1295 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1296 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1297
1298 # Some flags need to be propagated to the compiler or linker for good
1299 # libtool support.
1300 case "$lt_target" in
1301 *-*-irix6*)
1302   # Find out which ABI we are using.
1303   echo '#line 1304 "configure"' > conftest.$ac_ext
1304   if { (eval echo configure:1305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1305     case "`/usr/bin/file conftest.o`" in
1306     *32-bit*)
1307       LD="${LD-ld} -32"
1308       ;;
1309     *N32*)
1310       LD="${LD-ld} -n32"
1311       ;;
1312     *64-bit*)
1313       LD="${LD-ld} -64"
1314       ;;
1315     esac
1316   fi
1317   rm -rf conftest*
1318   ;;
1319
1320 *-*-sco3.2v5*)
1321   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1322   SAVE_CFLAGS="$CFLAGS"
1323   CFLAGS="$CFLAGS -belf"
1324   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1325 echo "configure:1326: checking whether the C compiler needs -belf" >&5
1326 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1327   echo $ac_n "(cached) $ac_c" 1>&6
1328 else
1329   cat > conftest.$ac_ext <<EOF
1330 #line 1331 "configure"
1331 #include "confdefs.h"
1332
1333 int main() {
1334
1335 ; return 0; }
1336 EOF
1337 if { (eval echo configure:1338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1338   rm -rf conftest*
1339   lt_cv_cc_needs_belf=yes
1340 else
1341   echo "configure: failed program was:" >&5
1342   cat conftest.$ac_ext >&5
1343   rm -rf conftest*
1344   lt_cv_cc_needs_belf=no
1345 fi
1346 rm -f conftest*
1347 fi
1348
1349 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1350   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1351     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1352     CFLAGS="$SAVE_CFLAGS"
1353   fi
1354   ;;
1355
1356
1357 esac
1358
1359
1360 # Save cache, so that ltconfig can load it
1361 cat > confcache <<\EOF
1362 # This file is a shell script that caches the results of configure
1363 # tests run on this system so they can be shared between configure
1364 # scripts and configure runs.  It is not useful on other systems.
1365 # If it contains results you don't want to keep, you may remove or edit it.
1366 #
1367 # By default, configure uses ./config.cache as the cache file,
1368 # creating it if it does not exist already.  You can give configure
1369 # the --cache-file=FILE option to use a different cache file; that is
1370 # what configure does when it calls configure scripts in
1371 # subdirectories, so they share the cache.
1372 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1373 # config.status only pays attention to the cache file if you give it the
1374 # --recheck option to rerun configure.
1375 #
1376 EOF
1377 # The following way of writing the cache mishandles newlines in values,
1378 # but we know of no workaround that is simple, portable, and efficient.
1379 # So, don't put newlines in cache variables' values.
1380 # Ultrix sh set writes to stderr and can't be redirected directly,
1381 # and sets the high bit in the cache file unless we assign to the vars.
1382 (set) 2>&1 |
1383   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1384   *ac_space=\ *)
1385     # `set' does not quote correctly, so add quotes (double-quote substitution
1386     # turns \\\\ into \\, and sed turns \\ into \).
1387     sed -n \
1388       -e "s/'/'\\\\''/g" \
1389       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1390     ;;
1391   *)
1392     # `set' quotes correctly as required by POSIX, so do not add quotes.
1393     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1394     ;;
1395   esac >> confcache
1396 if cmp -s $cache_file confcache; then
1397   :
1398 else
1399   if test -w $cache_file; then
1400     echo "updating cache $cache_file"
1401     cat confcache > $cache_file
1402   else
1403     echo "not updating unwritable cache $cache_file"
1404   fi
1405 fi
1406 rm -f confcache
1407
1408
1409 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
1410 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1411 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1412 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1413 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
1414 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1415 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
1416 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1417
1418 # Reload cache, that may have been modified by ltconfig
1419 if test -r "$cache_file"; then
1420   echo "loading cache $cache_file"
1421   . $cache_file
1422 else
1423   echo "creating cache $cache_file"
1424   > $cache_file
1425 fi
1426
1427
1428 # This can be used to rebuild libtool when needed
1429 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1430
1431 # Always use our own libtool.
1432 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1433
1434 # Redirect the config.log output again, so that the ltconfig log is not
1435 # clobbered by the next message.
1436 exec 5>>./config.log
1437
1438
1439
1440 if test "x$CC" != xcc; then
1441   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1442 echo "configure:1443: checking whether $CC and cc understand -c and -o together" >&5
1443 else
1444   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1445 echo "configure:1446: checking whether cc understands -c and -o together" >&5
1446 fi
1447 set dummy $CC; ac_cc="`echo $2 |
1448                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1449 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1450   echo $ac_n "(cached) $ac_c" 1>&6
1451 else
1452   echo 'foo(){}' > conftest.c
1453 # Make sure it works both with $CC and with simple cc.
1454 # We do the test twice because some compilers refuse to overwrite an
1455 # existing .o file with -o, though they will create one.
1456 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1457 if { (eval echo configure:1458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1458    test -f conftest.o && { (eval echo configure:1459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1459 then
1460   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1461   if test "x$CC" != xcc; then
1462     # Test first that cc exists at all.
1463     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1464: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1464       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1465       if { (eval echo configure:1466: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1466          test -f conftest.o && { (eval echo configure:1467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1467       then
1468         # cc works too.
1469         :
1470       else
1471         # cc exists but doesn't like -o.
1472         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1473       fi
1474     fi
1475   fi
1476 else
1477   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1478 fi
1479 rm -f conftest*
1480
1481 fi
1482 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1483   echo "$ac_t""yes" 1>&6
1484 else
1485   echo "$ac_t""no" 1>&6
1486   cat >> confdefs.h <<\EOF
1487 #define NO_MINUS_C_MINUS_O 1
1488 EOF
1489
1490 fi
1491
1492 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1493       BROKEN_CC=
1494 else
1495       BROKEN_CC=#
1496 fi
1497
1498
1499 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1500 echo "configure:1501: checking that the C compiler understands volatile" >&5
1501 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1502   echo $ac_n "(cached) $ac_c" 1>&6
1503 else
1504   
1505     cat > conftest.$ac_ext <<EOF
1506 #line 1507 "configure"
1507 #include "confdefs.h"
1508 #include <sys/types.h>
1509 int main() {
1510 volatile int i = 0
1511 ; return 0; }
1512 EOF
1513 if { (eval echo configure:1514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1514   rm -rf conftest*
1515   samba_cv_volatile=yes
1516 else
1517   echo "configure: failed program was:" >&5
1518   cat conftest.$ac_ext >&5
1519   rm -rf conftest*
1520   samba_cv_volatile=no
1521 fi
1522 rm -f conftest*
1523 fi
1524
1525 echo "$ac_t""$samba_cv_volatile" 1>&6
1526 if test x"$samba_cv_volatile" = x"yes"; then
1527    cat >> confdefs.h <<\EOF
1528 #define HAVE_VOLATILE 1
1529 EOF
1530
1531 fi
1532
1533
1534 #################################################
1535 # set codepage directory location
1536 # Check whether --with-codepagedir or --without-codepagedir was given.
1537 if test "${with_codepagedir+set}" = set; then
1538   withval="$with_codepagedir"
1539    case "$withval" in
1540   yes|no)
1541   #
1542   # Just in case anybody does it
1543   #
1544     echo "configure: warning: --with-codepagedir called without argument - will use default" 1>&2
1545   ;;
1546   * )
1547     codepagedir="$withval"
1548     ;;
1549   esac
1550 fi
1551
1552
1553
1554
1555 # Do some error checking and defaulting for the host and target type.
1556 # The inputs are:
1557 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1558 #
1559 # The rules are:
1560 # 1. You are not allowed to specify --host, --target, and nonopt at the
1561 #    same time.
1562 # 2. Host defaults to nonopt.
1563 # 3. If nonopt is not specified, then host defaults to the current host,
1564 #    as determined by config.guess.
1565 # 4. Target and build default to nonopt.
1566 # 5. If nonopt is not specified, then target and build default to host.
1567
1568 # The aliases save the names the user supplied, while $host etc.
1569 # will get canonicalized.
1570 case $host---$target---$nonopt in
1571 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1572 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1573 esac
1574
1575
1576 # Make sure we can run config.sub.
1577 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1578 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1579 fi
1580
1581 echo $ac_n "checking host system type""... $ac_c" 1>&6
1582 echo "configure:1583: checking host system type" >&5
1583
1584 host_alias=$host
1585 case "$host_alias" in
1586 NONE)
1587   case $nonopt in
1588   NONE)
1589     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1590     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1591     fi ;;
1592   *) host_alias=$nonopt ;;
1593   esac ;;
1594 esac
1595
1596 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1597 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1598 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1599 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1600 echo "$ac_t""$host" 1>&6
1601
1602 echo $ac_n "checking target system type""... $ac_c" 1>&6
1603 echo "configure:1604: checking target system type" >&5
1604
1605 target_alias=$target
1606 case "$target_alias" in
1607 NONE)
1608   case $nonopt in
1609   NONE) target_alias=$host_alias ;;
1610   *) target_alias=$nonopt ;;
1611   esac ;;
1612 esac
1613
1614 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1615 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1616 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1617 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1618 echo "$ac_t""$target" 1>&6
1619
1620 echo $ac_n "checking build system type""... $ac_c" 1>&6
1621 echo "configure:1622: checking build system type" >&5
1622
1623 build_alias=$build
1624 case "$build_alias" in
1625 NONE)
1626   case $nonopt in
1627   NONE) build_alias=$host_alias ;;
1628   *) build_alias=$nonopt ;;
1629   esac ;;
1630 esac
1631
1632 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1633 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1634 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1635 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1636 echo "$ac_t""$build" 1>&6
1637
1638 test "$host_alias" != "$target_alias" &&
1639   test "$program_prefix$program_suffix$program_transform_name" = \
1640     NONENONEs,x,x, &&
1641   program_prefix=${target_alias}-
1642
1643
1644   case "$host_os" in
1645         *irix6*) cat >> confdefs.h <<\EOF
1646 #include <standards.h>
1647 EOF
1648
1649         ;;
1650 esac
1651
1652
1653     
1654     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1655 echo "configure:1656: checking config.cache system type" >&5
1656     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1657          test x"$ac_cv_host_system_type" != x"$host"; } ||
1658        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1659          test x"$ac_cv_build_system_type" != x"$build"; } ||
1660        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1661          test x"$ac_cv_target_system_type" != x"$target"; }; then
1662         echo "$ac_t""different" 1>&6
1663         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1664     else
1665         echo "$ac_t""same" 1>&6
1666     fi
1667     ac_cv_host_system_type="$host"
1668     ac_cv_build_system_type="$build"
1669     ac_cv_target_system_type="$target"
1670
1671
1672 #
1673 # Config CPPFLAG settings for strange OS's that must be set
1674 # before other tests.
1675 #
1676 case "$host_os" in
1677 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1678     *hpux*)
1679       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1680 echo "configure:1681: checking whether ${CC-cc} accepts -Ae" >&5
1681 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1682   echo $ac_n "(cached) $ac_c" 1>&6
1683 else
1684   echo 'void f(){}' > conftest.c
1685 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1686   ac_cv_prog_cc_Ae=yes
1687 else
1688   ac_cv_prog_cc_Ae=no
1689 fi
1690 rm -f conftest*
1691
1692 fi
1693
1694 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1695       if test $ac_cv_prog_cc_Ae = yes; then
1696         CPPFLAGS="$CPPFLAGS -Ae"
1697       fi
1698 #
1699 # Defines needed for HPUX support.
1700 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1701 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1702 #
1703       case `uname -r` in
1704                         *9*|*10*)
1705                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
1706                                 cat >> confdefs.h <<\EOF
1707 #define USE_BOTH_CRYPT_CALLS 1
1708 EOF
1709
1710                                 ;;
1711                         *11*)
1712                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
1713                                 cat >> confdefs.h <<\EOF
1714 #define USE_BOTH_CRYPT_CALLS 1
1715 EOF
1716
1717                                 ;;
1718       esac
1719       ;;
1720 #
1721 # AIX4.x doesn't even admit to having large
1722 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1723 #
1724     *aix4*)
1725           echo "$ac_t""enabling large file support" 1>&6
1726       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1727       ;;    
1728 #
1729 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1730 # to the existance of large files..
1731 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1732 # recommendations on large file support, however it makes the
1733 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1734 # recommendation makes the compile fail on gcc2.7. JRA.
1735 #
1736         *solaris*)
1737                 case `uname -r` in
1738                         5.6*|5.7*)
1739                         echo "$ac_t""enabling large file support" 1>&6
1740                         if test "$ac_cv_prog_gcc" = yes; then
1741                                 ${CC-cc} -v >conftest.c 2>&1
1742                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1743                                 rm -fr conftest.c
1744                                 case "$ac_cv_gcc_compiler_version_number" in
1745                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1746                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1747                                                 ;;
1748                                         *)
1749                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1750                                                 ;;
1751                                 esac
1752                         else
1753                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1754                         fi
1755                         ;;
1756                 esac
1757                 ;;
1758 #
1759 # Tests needed for SINIX large file support.
1760 #
1761     *sysv4*)
1762       if test $host = mips-sni-sysv4 ; then
1763         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1764 echo "configure:1765: checking for LFS support" >&5
1765         old_CPPFLAGS="$CPPFLAGS"
1766         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1767         if test "$cross_compiling" = yes; then
1768   SINIX_LFS_SUPPORT=cross
1769 else
1770   cat > conftest.$ac_ext <<EOF
1771 #line 1772 "configure"
1772 #include "confdefs.h"
1773
1774 #include <unistd.h>
1775 main () {
1776 #if _LFS64_LARGEFILE == 1
1777 exit(0);
1778 #else
1779 exit(1);
1780 #endif
1781 }
1782 EOF
1783 if { (eval echo configure:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1784 then
1785   SINIX_LFS_SUPPORT=yes
1786 else
1787   echo "configure: failed program was:" >&5
1788   cat conftest.$ac_ext >&5
1789   rm -fr conftest*
1790   SINIX_LFS_SUPPORT=no
1791 fi
1792 rm -fr conftest*
1793 fi
1794
1795         CPPFLAGS="$old_CPPFLAGS"
1796         if test x$SINIX_LFS_SUPPORT = xyes ; then
1797           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1798           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1799           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1800           LIBS="`getconf LFS64_LIBS` $LIBS"
1801         fi
1802       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1803       fi
1804     ;;
1805
1806 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1807 #
1808     *linux*)
1809         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1810 echo "configure:1811: checking for LFS support" >&5
1811         old_CPPFLAGS="$CPPFLAGS"
1812         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1813        if test "$cross_compiling" = yes; then
1814   LINUX_LFS_SUPPORT=cross
1815 else
1816   cat > conftest.$ac_ext <<EOF
1817 #line 1818 "configure"
1818 #include "confdefs.h"
1819
1820 #include <unistd.h>
1821 #include <sys/utsname.h>
1822 main() {
1823 #if _LFS64_LARGEFILE == 1
1824        struct utsname uts;
1825        char *release;
1826        int major, minor;
1827
1828        /* Ensure this is glibc 2.2 or higher */
1829 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1830        int libc_major = __GLIBC__;
1831        int libc_minor = __GLIBC_MINOR__;
1832
1833        if (libc_major < 2)
1834               exit(1);
1835        if (libc_minor < 2)
1836               exit(1);
1837 #endif
1838
1839        /* Ensure this is kernel 2.4 or higher */
1840
1841        uname(&uts);
1842        release = uts.release;
1843        major = atoi(strsep(&release, "."));
1844        minor = atoi(strsep(&release, "."));
1845
1846        if (major > 2 || (major == 2 && minor > 3))
1847                exit(0);
1848        exit(1);
1849 #else
1850        exit(1);
1851 #endif
1852 }
1853
1854 EOF
1855 if { (eval echo configure:1856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1856 then
1857   LINUX_LFS_SUPPORT=yes
1858 else
1859   echo "configure: failed program was:" >&5
1860   cat conftest.$ac_ext >&5
1861   rm -fr conftest*
1862   LINUX_LFS_SUPPORT=no
1863 fi
1864 rm -fr conftest*
1865 fi
1866
1867         CPPFLAGS="$old_CPPFLAGS"
1868         if test x$LINUX_LFS_SUPPORT = xyes ; then
1869           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1870         fi
1871        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1872                 ;;
1873
1874     *hurd*)
1875         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1876 echo "configure:1877: checking for LFS support" >&5
1877         old_CPPFLAGS="$CPPFLAGS"
1878         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1879         if test "$cross_compiling" = yes; then
1880   GLIBC_LFS_SUPPORT=cross
1881 else
1882   cat > conftest.$ac_ext <<EOF
1883 #line 1884 "configure"
1884 #include "confdefs.h"
1885
1886 #include <unistd.h>
1887 main () {
1888 #if _LFS64_LARGEFILE == 1
1889 exit(0);
1890 #else
1891 exit(1);
1892 #endif
1893 }
1894 EOF
1895 if { (eval echo configure:1896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1896 then
1897   GLIBC_LFS_SUPPORT=yes
1898 else
1899   echo "configure: failed program was:" >&5
1900   cat conftest.$ac_ext >&5
1901   rm -fr conftest*
1902   GLIBC_LFS_SUPPORT=no
1903 fi
1904 rm -fr conftest*
1905 fi
1906
1907         CPPFLAGS="$old_CPPFLAGS"
1908         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1909           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1910         fi
1911       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1912     ;;
1913
1914 esac
1915
1916 echo $ac_n "checking for inline""... $ac_c" 1>&6
1917 echo "configure:1918: checking for inline" >&5
1918 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1919   echo $ac_n "(cached) $ac_c" 1>&6
1920 else
1921   ac_cv_c_inline=no
1922 for ac_kw in inline __inline__ __inline; do
1923   cat > conftest.$ac_ext <<EOF
1924 #line 1925 "configure"
1925 #include "confdefs.h"
1926
1927 int main() {
1928 } $ac_kw foo() {
1929 ; return 0; }
1930 EOF
1931 if { (eval echo configure:1932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1932   rm -rf conftest*
1933   ac_cv_c_inline=$ac_kw; break
1934 else
1935   echo "configure: failed program was:" >&5
1936   cat conftest.$ac_ext >&5
1937 fi
1938 rm -f conftest*
1939 done
1940
1941 fi
1942
1943 echo "$ac_t""$ac_cv_c_inline" 1>&6
1944 case "$ac_cv_c_inline" in
1945   inline | yes) ;;
1946   no) cat >> confdefs.h <<\EOF
1947 #define inline 
1948 EOF
1949  ;;
1950   *)  cat >> confdefs.h <<EOF
1951 #define inline $ac_cv_c_inline
1952 EOF
1953  ;;
1954 esac
1955
1956 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1957 echo "configure:1958: checking how to run the C preprocessor" >&5
1958 # On Suns, sometimes $CPP names a directory.
1959 if test -n "$CPP" && test -d "$CPP"; then
1960   CPP=
1961 fi
1962 if test -z "$CPP"; then
1963 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1964   echo $ac_n "(cached) $ac_c" 1>&6
1965 else
1966     # This must be in double quotes, not single quotes, because CPP may get
1967   # substituted into the Makefile and "${CC-cc}" will confuse make.
1968   CPP="${CC-cc} -E"
1969   # On the NeXT, cc -E runs the code through the compiler's parser,
1970   # not just through cpp.
1971   cat > conftest.$ac_ext <<EOF
1972 #line 1973 "configure"
1973 #include "confdefs.h"
1974 #include <assert.h>
1975 Syntax Error
1976 EOF
1977 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1978 { (eval echo configure:1979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1979 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1980 if test -z "$ac_err"; then
1981   :
1982 else
1983   echo "$ac_err" >&5
1984   echo "configure: failed program was:" >&5
1985   cat conftest.$ac_ext >&5
1986   rm -rf conftest*
1987   CPP="${CC-cc} -E -traditional-cpp"
1988   cat > conftest.$ac_ext <<EOF
1989 #line 1990 "configure"
1990 #include "confdefs.h"
1991 #include <assert.h>
1992 Syntax Error
1993 EOF
1994 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1995 { (eval echo configure:1996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1996 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1997 if test -z "$ac_err"; then
1998   :
1999 else
2000   echo "$ac_err" >&5
2001   echo "configure: failed program was:" >&5
2002   cat conftest.$ac_ext >&5
2003   rm -rf conftest*
2004   CPP="${CC-cc} -nologo -E"
2005   cat > conftest.$ac_ext <<EOF
2006 #line 2007 "configure"
2007 #include "confdefs.h"
2008 #include <assert.h>
2009 Syntax Error
2010 EOF
2011 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2012 { (eval echo configure:2013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2013 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2014 if test -z "$ac_err"; then
2015   :
2016 else
2017   echo "$ac_err" >&5
2018   echo "configure: failed program was:" >&5
2019   cat conftest.$ac_ext >&5
2020   rm -rf conftest*
2021   CPP=/lib/cpp
2022 fi
2023 rm -f conftest*
2024 fi
2025 rm -f conftest*
2026 fi
2027 rm -f conftest*
2028   ac_cv_prog_CPP="$CPP"
2029 fi
2030   CPP="$ac_cv_prog_CPP"
2031 else
2032   ac_cv_prog_CPP="$CPP"
2033 fi
2034 echo "$ac_t""$CPP" 1>&6
2035
2036 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2037 echo "configure:2038: checking for ANSI C header files" >&5
2038 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2039   echo $ac_n "(cached) $ac_c" 1>&6
2040 else
2041   cat > conftest.$ac_ext <<EOF
2042 #line 2043 "configure"
2043 #include "confdefs.h"
2044 #include <stdlib.h>
2045 #include <stdarg.h>
2046 #include <string.h>
2047 #include <float.h>
2048 EOF
2049 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2050 { (eval echo configure:2051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2051 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2052 if test -z "$ac_err"; then
2053   rm -rf conftest*
2054   ac_cv_header_stdc=yes
2055 else
2056   echo "$ac_err" >&5
2057   echo "configure: failed program was:" >&5
2058   cat conftest.$ac_ext >&5
2059   rm -rf conftest*
2060   ac_cv_header_stdc=no
2061 fi
2062 rm -f conftest*
2063
2064 if test $ac_cv_header_stdc = yes; then
2065   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2066 cat > conftest.$ac_ext <<EOF
2067 #line 2068 "configure"
2068 #include "confdefs.h"
2069 #include <string.h>
2070 EOF
2071 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2072   egrep "memchr" >/dev/null 2>&1; then
2073   :
2074 else
2075   rm -rf conftest*
2076   ac_cv_header_stdc=no
2077 fi
2078 rm -f conftest*
2079
2080 fi
2081
2082 if test $ac_cv_header_stdc = yes; then
2083   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2084 cat > conftest.$ac_ext <<EOF
2085 #line 2086 "configure"
2086 #include "confdefs.h"
2087 #include <stdlib.h>
2088 EOF
2089 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2090   egrep "free" >/dev/null 2>&1; then
2091   :
2092 else
2093   rm -rf conftest*
2094   ac_cv_header_stdc=no
2095 fi
2096 rm -f conftest*
2097
2098 fi
2099
2100 if test $ac_cv_header_stdc = yes; then
2101   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2102 if test "$cross_compiling" = yes; then
2103   :
2104 else
2105   cat > conftest.$ac_ext <<EOF
2106 #line 2107 "configure"
2107 #include "confdefs.h"
2108 #include <ctype.h>
2109 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2110 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2111 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2112 int main () { int i; for (i = 0; i < 256; i++)
2113 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2114 exit (0); }
2115
2116 EOF
2117 if { (eval echo configure:2118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2118 then
2119   :
2120 else
2121   echo "configure: failed program was:" >&5
2122   cat conftest.$ac_ext >&5
2123   rm -fr conftest*
2124   ac_cv_header_stdc=no
2125 fi
2126 rm -fr conftest*
2127 fi
2128
2129 fi
2130 fi
2131
2132 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2133 if test $ac_cv_header_stdc = yes; then
2134   cat >> confdefs.h <<\EOF
2135 #define STDC_HEADERS 1
2136 EOF
2137
2138 fi
2139
2140 ac_header_dirent=no
2141 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2142 do
2143 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2144 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
2145 echo "configure:2146: checking for $ac_hdr that defines DIR" >&5
2146 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2147   echo $ac_n "(cached) $ac_c" 1>&6
2148 else
2149   cat > conftest.$ac_ext <<EOF
2150 #line 2151 "configure"
2151 #include "confdefs.h"
2152 #include <sys/types.h>
2153 #include <$ac_hdr>
2154 int main() {
2155 DIR *dirp = 0;
2156 ; return 0; }
2157 EOF
2158 if { (eval echo configure:2159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2159   rm -rf conftest*
2160   eval "ac_cv_header_dirent_$ac_safe=yes"
2161 else
2162   echo "configure: failed program was:" >&5
2163   cat conftest.$ac_ext >&5
2164   rm -rf conftest*
2165   eval "ac_cv_header_dirent_$ac_safe=no"
2166 fi
2167 rm -f conftest*
2168 fi
2169 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2170   echo "$ac_t""yes" 1>&6
2171     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2172   cat >> confdefs.h <<EOF
2173 #define $ac_tr_hdr 1
2174 EOF
2175  ac_header_dirent=$ac_hdr; break
2176 else
2177   echo "$ac_t""no" 1>&6
2178 fi
2179 done
2180 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2181 if test $ac_header_dirent = dirent.h; then
2182 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2183 echo "configure:2184: checking for opendir in -ldir" >&5
2184 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2185 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2186   echo $ac_n "(cached) $ac_c" 1>&6
2187 else
2188   ac_save_LIBS="$LIBS"
2189 LIBS="-ldir  $LIBS"
2190 cat > conftest.$ac_ext <<EOF
2191 #line 2192 "configure"
2192 #include "confdefs.h"
2193 /* Override any gcc2 internal prototype to avoid an error.  */
2194 /* We use char because int might match the return type of a gcc2
2195     builtin and then its argument prototype would still apply.  */
2196 char opendir();
2197
2198 int main() {
2199 opendir()
2200 ; return 0; }
2201 EOF
2202 if { (eval echo configure:2203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2203   rm -rf conftest*
2204   eval "ac_cv_lib_$ac_lib_var=yes"
2205 else
2206   echo "configure: failed program was:" >&5
2207   cat conftest.$ac_ext >&5
2208   rm -rf conftest*
2209   eval "ac_cv_lib_$ac_lib_var=no"
2210 fi
2211 rm -f conftest*
2212 LIBS="$ac_save_LIBS"
2213
2214 fi
2215 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2216   echo "$ac_t""yes" 1>&6
2217   LIBS="$LIBS -ldir"
2218 else
2219   echo "$ac_t""no" 1>&6
2220 fi
2221
2222 else
2223 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2224 echo "configure:2225: checking for opendir in -lx" >&5
2225 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2226 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2227   echo $ac_n "(cached) $ac_c" 1>&6
2228 else
2229   ac_save_LIBS="$LIBS"
2230 LIBS="-lx  $LIBS"
2231 cat > conftest.$ac_ext <<EOF
2232 #line 2233 "configure"
2233 #include "confdefs.h"
2234 /* Override any gcc2 internal prototype to avoid an error.  */
2235 /* We use char because int might match the return type of a gcc2
2236     builtin and then its argument prototype would still apply.  */
2237 char opendir();
2238
2239 int main() {
2240 opendir()
2241 ; return 0; }
2242 EOF
2243 if { (eval echo configure:2244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2244   rm -rf conftest*
2245   eval "ac_cv_lib_$ac_lib_var=yes"
2246 else
2247   echo "configure: failed program was:" >&5
2248   cat conftest.$ac_ext >&5
2249   rm -rf conftest*
2250   eval "ac_cv_lib_$ac_lib_var=no"
2251 fi
2252 rm -f conftest*
2253 LIBS="$ac_save_LIBS"
2254
2255 fi
2256 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2257   echo "$ac_t""yes" 1>&6
2258   LIBS="$LIBS -lx"
2259 else
2260   echo "$ac_t""no" 1>&6
2261 fi
2262
2263 fi
2264
2265 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2266 echo "configure:2267: checking whether time.h and sys/time.h may both be included" >&5
2267 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2268   echo $ac_n "(cached) $ac_c" 1>&6
2269 else
2270   cat > conftest.$ac_ext <<EOF
2271 #line 2272 "configure"
2272 #include "confdefs.h"
2273 #include <sys/types.h>
2274 #include <sys/time.h>
2275 #include <time.h>
2276 int main() {
2277 struct tm *tp;
2278 ; return 0; }
2279 EOF
2280 if { (eval echo configure:2281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2281   rm -rf conftest*
2282   ac_cv_header_time=yes
2283 else
2284   echo "configure: failed program was:" >&5
2285   cat conftest.$ac_ext >&5
2286   rm -rf conftest*
2287   ac_cv_header_time=no
2288 fi
2289 rm -f conftest*
2290 fi
2291
2292 echo "$ac_t""$ac_cv_header_time" 1>&6
2293 if test $ac_cv_header_time = yes; then
2294   cat >> confdefs.h <<\EOF
2295 #define TIME_WITH_SYS_TIME 1
2296 EOF
2297
2298 fi
2299
2300 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2301 echo "configure:2302: checking for sys/wait.h that is POSIX.1 compatible" >&5
2302 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2303   echo $ac_n "(cached) $ac_c" 1>&6
2304 else
2305   cat > conftest.$ac_ext <<EOF
2306 #line 2307 "configure"
2307 #include "confdefs.h"
2308 #include <sys/types.h>
2309 #include <sys/wait.h>
2310 #ifndef WEXITSTATUS
2311 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2312 #endif
2313 #ifndef WIFEXITED
2314 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2315 #endif
2316 int main() {
2317 int s;
2318 wait (&s);
2319 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2320 ; return 0; }
2321 EOF
2322 if { (eval echo configure:2323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2323   rm -rf conftest*
2324   ac_cv_header_sys_wait_h=yes
2325 else
2326   echo "configure: failed program was:" >&5
2327   cat conftest.$ac_ext >&5
2328   rm -rf conftest*
2329   ac_cv_header_sys_wait_h=no
2330 fi
2331 rm -f conftest*
2332 fi
2333
2334 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2335 if test $ac_cv_header_sys_wait_h = yes; then
2336   cat >> confdefs.h <<\EOF
2337 #define HAVE_SYS_WAIT_H 1
2338 EOF
2339
2340 fi
2341
2342 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
2343 do
2344 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2345 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2346 echo "configure:2347: checking for $ac_hdr" >&5
2347 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2348   echo $ac_n "(cached) $ac_c" 1>&6
2349 else
2350   cat > conftest.$ac_ext <<EOF
2351 #line 2352 "configure"
2352 #include "confdefs.h"
2353 #include <$ac_hdr>
2354 EOF
2355 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2356 { (eval echo configure:2357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2357 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2358 if test -z "$ac_err"; then
2359   rm -rf conftest*
2360   eval "ac_cv_header_$ac_safe=yes"
2361 else
2362   echo "$ac_err" >&5
2363   echo "configure: failed program was:" >&5
2364   cat conftest.$ac_ext >&5
2365   rm -rf conftest*
2366   eval "ac_cv_header_$ac_safe=no"
2367 fi
2368 rm -f conftest*
2369 fi
2370 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2371   echo "$ac_t""yes" 1>&6
2372     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2373   cat >> confdefs.h <<EOF
2374 #define $ac_tr_hdr 1
2375 EOF
2376  
2377 else
2378   echo "$ac_t""no" 1>&6
2379 fi
2380 done
2381
2382 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
2383 do
2384 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2385 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2386 echo "configure:2387: checking for $ac_hdr" >&5
2387 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2388   echo $ac_n "(cached) $ac_c" 1>&6
2389 else
2390   cat > conftest.$ac_ext <<EOF
2391 #line 2392 "configure"
2392 #include "confdefs.h"
2393 #include <$ac_hdr>
2394 EOF
2395 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2396 { (eval echo configure:2397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2397 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2398 if test -z "$ac_err"; then
2399   rm -rf conftest*
2400   eval "ac_cv_header_$ac_safe=yes"
2401 else
2402   echo "$ac_err" >&5
2403   echo "configure: failed program was:" >&5
2404   cat conftest.$ac_ext >&5
2405   rm -rf conftest*
2406   eval "ac_cv_header_$ac_safe=no"
2407 fi
2408 rm -f conftest*
2409 fi
2410 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2411   echo "$ac_t""yes" 1>&6
2412     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2413   cat >> confdefs.h <<EOF
2414 #define $ac_tr_hdr 1
2415 EOF
2416  
2417 else
2418   echo "$ac_t""no" 1>&6
2419 fi
2420 done
2421
2422 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
2423 do
2424 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2425 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2426 echo "configure:2427: checking for $ac_hdr" >&5
2427 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2428   echo $ac_n "(cached) $ac_c" 1>&6
2429 else
2430   cat > conftest.$ac_ext <<EOF
2431 #line 2432 "configure"
2432 #include "confdefs.h"
2433 #include <$ac_hdr>
2434 EOF
2435 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2436 { (eval echo configure:2437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2437 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2438 if test -z "$ac_err"; then
2439   rm -rf conftest*
2440   eval "ac_cv_header_$ac_safe=yes"
2441 else
2442   echo "$ac_err" >&5
2443   echo "configure: failed program was:" >&5
2444   cat conftest.$ac_ext >&5
2445   rm -rf conftest*
2446   eval "ac_cv_header_$ac_safe=no"
2447 fi
2448 rm -f conftest*
2449 fi
2450 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2451   echo "$ac_t""yes" 1>&6
2452     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2453   cat >> confdefs.h <<EOF
2454 #define $ac_tr_hdr 1
2455 EOF
2456  
2457 else
2458   echo "$ac_t""no" 1>&6
2459 fi
2460 done
2461
2462 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
2463 do
2464 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2465 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2466 echo "configure:2467: checking for $ac_hdr" >&5
2467 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2468   echo $ac_n "(cached) $ac_c" 1>&6
2469 else
2470   cat > conftest.$ac_ext <<EOF
2471 #line 2472 "configure"
2472 #include "confdefs.h"
2473 #include <$ac_hdr>
2474 EOF
2475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2476 { (eval echo configure:2477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2478 if test -z "$ac_err"; then
2479   rm -rf conftest*
2480   eval "ac_cv_header_$ac_safe=yes"
2481 else
2482   echo "$ac_err" >&5
2483   echo "configure: failed program was:" >&5
2484   cat conftest.$ac_ext >&5
2485   rm -rf conftest*
2486   eval "ac_cv_header_$ac_safe=no"
2487 fi
2488 rm -f conftest*
2489 fi
2490 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2491   echo "$ac_t""yes" 1>&6
2492     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2493   cat >> confdefs.h <<EOF
2494 #define $ac_tr_hdr 1
2495 EOF
2496  
2497 else
2498   echo "$ac_t""no" 1>&6
2499 fi
2500 done
2501
2502 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
2503 do
2504 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2505 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2506 echo "configure:2507: checking for $ac_hdr" >&5
2507 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2508   echo $ac_n "(cached) $ac_c" 1>&6
2509 else
2510   cat > conftest.$ac_ext <<EOF
2511 #line 2512 "configure"
2512 #include "confdefs.h"
2513 #include <$ac_hdr>
2514 EOF
2515 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2516 { (eval echo configure:2517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2517 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2518 if test -z "$ac_err"; then
2519   rm -rf conftest*
2520   eval "ac_cv_header_$ac_safe=yes"
2521 else
2522   echo "$ac_err" >&5
2523   echo "configure: failed program was:" >&5
2524   cat conftest.$ac_ext >&5
2525   rm -rf conftest*
2526   eval "ac_cv_header_$ac_safe=no"
2527 fi
2528 rm -f conftest*
2529 fi
2530 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2531   echo "$ac_t""yes" 1>&6
2532     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2533   cat >> confdefs.h <<EOF
2534 #define $ac_tr_hdr 1
2535 EOF
2536  
2537 else
2538   echo "$ac_t""no" 1>&6
2539 fi
2540 done
2541
2542 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2543 do
2544 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2545 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2546 echo "configure:2547: checking for $ac_hdr" >&5
2547 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2548   echo $ac_n "(cached) $ac_c" 1>&6
2549 else
2550   cat > conftest.$ac_ext <<EOF
2551 #line 2552 "configure"
2552 #include "confdefs.h"
2553 #include <$ac_hdr>
2554 EOF
2555 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2556 { (eval echo configure:2557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2557 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2558 if test -z "$ac_err"; then
2559   rm -rf conftest*
2560   eval "ac_cv_header_$ac_safe=yes"
2561 else
2562   echo "$ac_err" >&5
2563   echo "configure: failed program was:" >&5
2564   cat conftest.$ac_ext >&5
2565   rm -rf conftest*
2566   eval "ac_cv_header_$ac_safe=no"
2567 fi
2568 rm -f conftest*
2569 fi
2570 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2571   echo "$ac_t""yes" 1>&6
2572     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2573   cat >> confdefs.h <<EOF
2574 #define $ac_tr_hdr 1
2575 EOF
2576  
2577 else
2578   echo "$ac_t""no" 1>&6
2579 fi
2580 done
2581
2582 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2583 do
2584 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2585 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2586 echo "configure:2587: checking for $ac_hdr" >&5
2587 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2588   echo $ac_n "(cached) $ac_c" 1>&6
2589 else
2590   cat > conftest.$ac_ext <<EOF
2591 #line 2592 "configure"
2592 #include "confdefs.h"
2593 #include <$ac_hdr>
2594 EOF
2595 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2596 { (eval echo configure:2597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2597 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2598 if test -z "$ac_err"; then
2599   rm -rf conftest*
2600   eval "ac_cv_header_$ac_safe=yes"
2601 else
2602   echo "$ac_err" >&5
2603   echo "configure: failed program was:" >&5
2604   cat conftest.$ac_ext >&5
2605   rm -rf conftest*
2606   eval "ac_cv_header_$ac_safe=no"
2607 fi
2608 rm -f conftest*
2609 fi
2610 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2611   echo "$ac_t""yes" 1>&6
2612     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2613   cat >> confdefs.h <<EOF
2614 #define $ac_tr_hdr 1
2615 EOF
2616  
2617 else
2618   echo "$ac_t""no" 1>&6
2619 fi
2620 done
2621
2622 for ac_hdr in security/pam_modules.h security/_pam_macros.h
2623 do
2624 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2625 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2626 echo "configure:2627: checking for $ac_hdr" >&5
2627 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2628   echo $ac_n "(cached) $ac_c" 1>&6
2629 else
2630   cat > conftest.$ac_ext <<EOF
2631 #line 2632 "configure"
2632 #include "confdefs.h"
2633 #include <$ac_hdr>
2634 EOF
2635 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2636 { (eval echo configure:2637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2637 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2638 if test -z "$ac_err"; then
2639   rm -rf conftest*
2640   eval "ac_cv_header_$ac_safe=yes"
2641 else
2642   echo "$ac_err" >&5
2643   echo "configure: failed program was:" >&5
2644   cat conftest.$ac_ext >&5
2645   rm -rf conftest*
2646   eval "ac_cv_header_$ac_safe=no"
2647 fi
2648 rm -f conftest*
2649 fi
2650 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2651   echo "$ac_t""yes" 1>&6
2652     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2653   cat >> confdefs.h <<EOF
2654 #define $ac_tr_hdr 1
2655 EOF
2656  
2657 else
2658   echo "$ac_t""no" 1>&6
2659 fi
2660 done
2661
2662
2663 #
2664 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2665 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2666 #
2667 case "$host_os" in
2668     *hpux*)
2669                 cat > conftest.$ac_ext <<EOF
2670 #line 2671 "configure"
2671 #include "confdefs.h"
2672 #include <shadow.h>
2673 int main() {
2674 struct spwd testme
2675 ; return 0; }
2676 EOF
2677 if { (eval echo configure:2678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2678   rm -rf conftest*
2679   ac_cv_header_shadow_h=yes
2680 else
2681   echo "configure: failed program was:" >&5
2682   cat conftest.$ac_ext >&5
2683   rm -rf conftest*
2684   ac_cv_header_shadow_h=no
2685 fi
2686 rm -f conftest*
2687                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2688                    cat >> confdefs.h <<\EOF
2689 #define HAVE_SHADOW_H 1
2690 EOF
2691
2692                 fi
2693         ;;
2694 esac
2695 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2696 do
2697 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2698 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2699 echo "configure:2700: checking for $ac_hdr" >&5
2700 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2701   echo $ac_n "(cached) $ac_c" 1>&6
2702 else
2703   cat > conftest.$ac_ext <<EOF
2704 #line 2705 "configure"
2705 #include "confdefs.h"
2706 #include <$ac_hdr>
2707 EOF
2708 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2709 { (eval echo configure:2710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2710 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2711 if test -z "$ac_err"; then
2712   rm -rf conftest*
2713   eval "ac_cv_header_$ac_safe=yes"
2714 else
2715   echo "$ac_err" >&5
2716   echo "configure: failed program was:" >&5
2717   cat conftest.$ac_ext >&5
2718   rm -rf conftest*
2719   eval "ac_cv_header_$ac_safe=no"
2720 fi
2721 rm -f conftest*
2722 fi
2723 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2724   echo "$ac_t""yes" 1>&6
2725     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2726   cat >> confdefs.h <<EOF
2727 #define $ac_tr_hdr 1
2728 EOF
2729  
2730 else
2731   echo "$ac_t""no" 1>&6
2732 fi
2733 done
2734
2735 for ac_hdr in nss.h nss_common.h sys/security.h security/pam_appl.h security/pam_modules.h
2736 do
2737 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2738 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2739 echo "configure:2740: checking for $ac_hdr" >&5
2740 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2741   echo $ac_n "(cached) $ac_c" 1>&6
2742 else
2743   cat > conftest.$ac_ext <<EOF
2744 #line 2745 "configure"
2745 #include "confdefs.h"
2746 #include <$ac_hdr>
2747 EOF
2748 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2749 { (eval echo configure:2750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2750 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2751 if test -z "$ac_err"; then
2752   rm -rf conftest*
2753   eval "ac_cv_header_$ac_safe=yes"
2754 else
2755   echo "$ac_err" >&5
2756   echo "configure: failed program was:" >&5
2757   cat conftest.$ac_ext >&5
2758   rm -rf conftest*
2759   eval "ac_cv_header_$ac_safe=no"
2760 fi
2761 rm -f conftest*
2762 fi
2763 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2764   echo "$ac_t""yes" 1>&6
2765     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2766   cat >> confdefs.h <<EOF
2767 #define $ac_tr_hdr 1
2768 EOF
2769  
2770 else
2771   echo "$ac_t""no" 1>&6
2772 fi
2773 done
2774
2775 for ac_hdr in stropts.h poll.h
2776 do
2777 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2778 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2779 echo "configure:2780: checking for $ac_hdr" >&5
2780 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2781   echo $ac_n "(cached) $ac_c" 1>&6
2782 else
2783   cat > conftest.$ac_ext <<EOF
2784 #line 2785 "configure"
2785 #include "confdefs.h"
2786 #include <$ac_hdr>
2787 EOF
2788 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2789 { (eval echo configure:2790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2790 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2791 if test -z "$ac_err"; then
2792   rm -rf conftest*
2793   eval "ac_cv_header_$ac_safe=yes"
2794 else
2795   echo "$ac_err" >&5
2796   echo "configure: failed program was:" >&5
2797   cat conftest.$ac_ext >&5
2798   rm -rf conftest*
2799   eval "ac_cv_header_$ac_safe=no"
2800 fi
2801 rm -f conftest*
2802 fi
2803 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2804   echo "$ac_t""yes" 1>&6
2805     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2806   cat >> confdefs.h <<EOF
2807 #define $ac_tr_hdr 1
2808 EOF
2809  
2810 else
2811   echo "$ac_t""no" 1>&6
2812 fi
2813 done
2814
2815 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2816 do
2817 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2818 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2819 echo "configure:2820: checking for $ac_hdr" >&5
2820 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2821   echo $ac_n "(cached) $ac_c" 1>&6
2822 else
2823   cat > conftest.$ac_ext <<EOF
2824 #line 2825 "configure"
2825 #include "confdefs.h"
2826 #include <$ac_hdr>
2827 EOF
2828 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2829 { (eval echo configure:2830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2830 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2831 if test -z "$ac_err"; then
2832   rm -rf conftest*
2833   eval "ac_cv_header_$ac_safe=yes"
2834 else
2835   echo "$ac_err" >&5
2836   echo "configure: failed program was:" >&5
2837   cat conftest.$ac_ext >&5
2838   rm -rf conftest*
2839   eval "ac_cv_header_$ac_safe=no"
2840 fi
2841 rm -f conftest*
2842 fi
2843 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2844   echo "$ac_t""yes" 1>&6
2845     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2846   cat >> confdefs.h <<EOF
2847 #define $ac_tr_hdr 1
2848 EOF
2849  
2850 else
2851   echo "$ac_t""no" 1>&6
2852 fi
2853 done
2854
2855 for ac_hdr in sys/acl.h sys/cdefs.h glob.h acl/acl.h
2856 do
2857 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2858 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2859 echo "configure:2860: checking for $ac_hdr" >&5
2860 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2861   echo $ac_n "(cached) $ac_c" 1>&6
2862 else
2863   cat > conftest.$ac_ext <<EOF
2864 #line 2865 "configure"
2865 #include "confdefs.h"
2866 #include <$ac_hdr>
2867 EOF
2868 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2869 { (eval echo configure:2870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2870 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2871 if test -z "$ac_err"; then
2872   rm -rf conftest*
2873   eval "ac_cv_header_$ac_safe=yes"
2874 else
2875   echo "$ac_err" >&5
2876   echo "configure: failed program was:" >&5
2877   cat conftest.$ac_ext >&5
2878   rm -rf conftest*
2879   eval "ac_cv_header_$ac_safe=no"
2880 fi
2881 rm -f conftest*
2882 fi
2883 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2884   echo "$ac_t""yes" 1>&6
2885     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2886   cat >> confdefs.h <<EOF
2887 #define $ac_tr_hdr 1
2888 EOF
2889  
2890 else
2891   echo "$ac_t""no" 1>&6
2892 fi
2893 done
2894
2895
2896 # For experimental utmp support (lastlog on some BSD-like systems)
2897 for ac_hdr in utmp.h utmpx.h lastlog.h
2898 do
2899 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2900 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2901 echo "configure:2902: checking for $ac_hdr" >&5
2902 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2903   echo $ac_n "(cached) $ac_c" 1>&6
2904 else
2905   cat > conftest.$ac_ext <<EOF
2906 #line 2907 "configure"
2907 #include "confdefs.h"
2908 #include <$ac_hdr>
2909 EOF
2910 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2911 { (eval echo configure:2912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2912 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2913 if test -z "$ac_err"; then
2914   rm -rf conftest*
2915   eval "ac_cv_header_$ac_safe=yes"
2916 else
2917   echo "$ac_err" >&5
2918   echo "configure: failed program was:" >&5
2919   cat conftest.$ac_ext >&5
2920   rm -rf conftest*
2921   eval "ac_cv_header_$ac_safe=no"
2922 fi
2923 rm -f conftest*
2924 fi
2925 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2926   echo "$ac_t""yes" 1>&6
2927     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2928   cat >> confdefs.h <<EOF
2929 #define $ac_tr_hdr 1
2930 EOF
2931  
2932 else
2933   echo "$ac_t""no" 1>&6
2934 fi
2935 done
2936
2937  
2938 # For quotas on Veritas VxFS filesystems
2939 for ac_hdr in sys/fs/vx_quota.h
2940 do
2941 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2942 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2943 echo "configure:2944: checking for $ac_hdr" >&5
2944 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2945   echo $ac_n "(cached) $ac_c" 1>&6
2946 else
2947   cat > conftest.$ac_ext <<EOF
2948 #line 2949 "configure"
2949 #include "confdefs.h"
2950 #include <$ac_hdr>
2951 EOF
2952 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2953 { (eval echo configure:2954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2954 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2955 if test -z "$ac_err"; then
2956   rm -rf conftest*
2957   eval "ac_cv_header_$ac_safe=yes"
2958 else
2959   echo "$ac_err" >&5
2960   echo "configure: failed program was:" >&5
2961   cat conftest.$ac_ext >&5
2962   rm -rf conftest*
2963   eval "ac_cv_header_$ac_safe=no"
2964 fi
2965 rm -f conftest*
2966 fi
2967 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2968   echo "$ac_t""yes" 1>&6
2969     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2970   cat >> confdefs.h <<EOF
2971 #define $ac_tr_hdr 1
2972 EOF
2973  
2974 else
2975   echo "$ac_t""no" 1>&6
2976 fi
2977 done
2978
2979
2980 echo $ac_n "checking size of int""... $ac_c" 1>&6
2981 echo "configure:2982: checking size of int" >&5
2982 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2983   echo $ac_n "(cached) $ac_c" 1>&6
2984 else
2985   if test "$cross_compiling" = yes; then
2986   ac_cv_sizeof_int=cross
2987 else
2988   cat > conftest.$ac_ext <<EOF
2989 #line 2990 "configure"
2990 #include "confdefs.h"
2991 #include <stdio.h>
2992 main()
2993 {
2994   FILE *f=fopen("conftestval", "w");
2995   if (!f) exit(1);
2996   fprintf(f, "%d\n", sizeof(int));
2997   exit(0);
2998 }
2999 EOF
3000 if { (eval echo configure:3001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3001 then
3002   ac_cv_sizeof_int=`cat conftestval`
3003 else
3004   echo "configure: failed program was:" >&5
3005   cat conftest.$ac_ext >&5
3006   rm -fr conftest*
3007   ac_cv_sizeof_int=0
3008 fi
3009 rm -fr conftest*
3010 fi
3011
3012 fi
3013 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
3014 cat >> confdefs.h <<EOF
3015 #define SIZEOF_INT $ac_cv_sizeof_int
3016 EOF
3017
3018
3019 echo $ac_n "checking size of long""... $ac_c" 1>&6
3020 echo "configure:3021: checking size of long" >&5
3021 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
3022   echo $ac_n "(cached) $ac_c" 1>&6
3023 else
3024   if test "$cross_compiling" = yes; then
3025   ac_cv_sizeof_long=cross
3026 else
3027   cat > conftest.$ac_ext <<EOF
3028 #line 3029 "configure"
3029 #include "confdefs.h"
3030 #include <stdio.h>
3031 main()
3032 {
3033   FILE *f=fopen("conftestval", "w");
3034   if (!f) exit(1);
3035   fprintf(f, "%d\n", sizeof(long));
3036   exit(0);
3037 }
3038 EOF
3039 if { (eval echo configure:3040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3040 then
3041   ac_cv_sizeof_long=`cat conftestval`
3042 else
3043   echo "configure: failed program was:" >&5
3044   cat conftest.$ac_ext >&5
3045   rm -fr conftest*
3046   ac_cv_sizeof_long=0
3047 fi
3048 rm -fr conftest*
3049 fi
3050
3051 fi
3052 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
3053 cat >> confdefs.h <<EOF
3054 #define SIZEOF_LONG $ac_cv_sizeof_long
3055 EOF
3056
3057
3058 echo $ac_n "checking size of short""... $ac_c" 1>&6
3059 echo "configure:3060: checking size of short" >&5
3060 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
3061   echo $ac_n "(cached) $ac_c" 1>&6
3062 else
3063   if test "$cross_compiling" = yes; then
3064   ac_cv_sizeof_short=cross
3065 else
3066   cat > conftest.$ac_ext <<EOF
3067 #line 3068 "configure"
3068 #include "confdefs.h"
3069 #include <stdio.h>
3070 main()
3071 {
3072   FILE *f=fopen("conftestval", "w");
3073   if (!f) exit(1);
3074   fprintf(f, "%d\n", sizeof(short));
3075   exit(0);
3076 }
3077 EOF
3078 if { (eval echo configure:3079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3079 then
3080   ac_cv_sizeof_short=`cat conftestval`
3081 else
3082   echo "configure: failed program was:" >&5
3083   cat conftest.$ac_ext >&5
3084   rm -fr conftest*
3085   ac_cv_sizeof_short=0
3086 fi
3087 rm -fr conftest*
3088 fi
3089
3090 fi
3091 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3092 cat >> confdefs.h <<EOF
3093 #define SIZEOF_SHORT $ac_cv_sizeof_short
3094 EOF
3095
3096
3097
3098 echo $ac_n "checking for working const""... $ac_c" 1>&6
3099 echo "configure:3100: checking for working const" >&5
3100 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3101   echo $ac_n "(cached) $ac_c" 1>&6
3102 else
3103   cat > conftest.$ac_ext <<EOF
3104 #line 3105 "configure"
3105 #include "confdefs.h"
3106
3107 int main() {
3108
3109 /* Ultrix mips cc rejects this.  */
3110 typedef int charset[2]; const charset x;
3111 /* SunOS 4.1.1 cc rejects this.  */
3112 char const *const *ccp;
3113 char **p;
3114 /* NEC SVR4.0.2 mips cc rejects this.  */
3115 struct point {int x, y;};
3116 static struct point const zero = {0,0};
3117 /* AIX XL C 1.02.0.0 rejects this.
3118    It does not let you subtract one const X* pointer from another in an arm
3119    of an if-expression whose if-part is not a constant expression */
3120 const char *g = "string";
3121 ccp = &g + (g ? g-g : 0);
3122 /* HPUX 7.0 cc rejects these. */
3123 ++ccp;
3124 p = (char**) ccp;
3125 ccp = (char const *const *) p;
3126 { /* SCO 3.2v4 cc rejects this.  */
3127   char *t;
3128   char const *s = 0 ? (char *) 0 : (char const *) 0;
3129
3130   *t++ = 0;
3131 }
3132 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3133   int x[] = {25, 17};
3134   const int *foo = &x[0];
3135   ++foo;
3136 }
3137 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3138   typedef const int *iptr;
3139   iptr p = 0;
3140   ++p;
3141 }
3142 { /* AIX XL C 1.02.0.0 rejects this saying
3143      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3144   struct s { int j; const int *ap[3]; };
3145   struct s *b; b->j = 5;
3146 }
3147 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3148   const int foo = 10;
3149 }
3150
3151 ; return 0; }
3152 EOF
3153 if { (eval echo configure:3154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3154   rm -rf conftest*
3155   ac_cv_c_const=yes
3156 else
3157   echo "configure: failed program was:" >&5
3158   cat conftest.$ac_ext >&5
3159   rm -rf conftest*
3160   ac_cv_c_const=no
3161 fi
3162 rm -f conftest*
3163 fi
3164
3165 echo "$ac_t""$ac_cv_c_const" 1>&6
3166 if test $ac_cv_c_const = no; then
3167   cat >> confdefs.h <<\EOF
3168 #define const 
3169 EOF
3170
3171 fi
3172
3173 echo $ac_n "checking for inline""... $ac_c" 1>&6
3174 echo "configure:3175: checking for inline" >&5
3175 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3176   echo $ac_n "(cached) $ac_c" 1>&6
3177 else
3178   ac_cv_c_inline=no
3179 for ac_kw in inline __inline__ __inline; do
3180   cat > conftest.$ac_ext <<EOF
3181 #line 3182 "configure"
3182 #include "confdefs.h"
3183
3184 int main() {
3185 } $ac_kw foo() {
3186 ; return 0; }
3187 EOF
3188 if { (eval echo configure:3189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3189   rm -rf conftest*
3190   ac_cv_c_inline=$ac_kw; break
3191 else
3192   echo "configure: failed program was:" >&5
3193   cat conftest.$ac_ext >&5
3194 fi
3195 rm -f conftest*
3196 done
3197
3198 fi
3199
3200 echo "$ac_t""$ac_cv_c_inline" 1>&6
3201 case "$ac_cv_c_inline" in
3202   inline | yes) ;;
3203   no) cat >> confdefs.h <<\EOF
3204 #define inline 
3205 EOF
3206  ;;
3207   *)  cat >> confdefs.h <<EOF
3208 #define inline $ac_cv_c_inline
3209 EOF
3210  ;;
3211 esac
3212
3213 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3214 echo "configure:3215: checking whether byte ordering is bigendian" >&5
3215 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3216   echo $ac_n "(cached) $ac_c" 1>&6
3217 else
3218   ac_cv_c_bigendian=unknown
3219 # See if sys/param.h defines the BYTE_ORDER macro.
3220 cat > conftest.$ac_ext <<EOF
3221 #line 3222 "configure"
3222 #include "confdefs.h"
3223 #include <sys/types.h>
3224 #include <sys/param.h>
3225 int main() {
3226
3227 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3228  bogus endian macros
3229 #endif
3230 ; return 0; }
3231 EOF
3232 if { (eval echo configure:3233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3233   rm -rf conftest*
3234   # It does; now see whether it defined to BIG_ENDIAN or not.
3235 cat > conftest.$ac_ext <<EOF
3236 #line 3237 "configure"
3237 #include "confdefs.h"
3238 #include <sys/types.h>
3239 #include <sys/param.h>
3240 int main() {
3241
3242 #if BYTE_ORDER != BIG_ENDIAN
3243  not big endian
3244 #endif
3245 ; return 0; }
3246 EOF
3247 if { (eval echo configure:3248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3248   rm -rf conftest*
3249   ac_cv_c_bigendian=yes
3250 else
3251   echo "configure: failed program was:" >&5
3252   cat conftest.$ac_ext >&5
3253   rm -rf conftest*
3254   ac_cv_c_bigendian=no
3255 fi
3256 rm -f conftest*
3257 else
3258   echo "configure: failed program was:" >&5
3259   cat conftest.$ac_ext >&5
3260 fi
3261 rm -f conftest*
3262 if test $ac_cv_c_bigendian = unknown; then
3263 if test "$cross_compiling" = yes; then
3264     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3265 else
3266   cat > conftest.$ac_ext <<EOF
3267 #line 3268 "configure"
3268 #include "confdefs.h"
3269 main () {
3270   /* Are we little or big endian?  From Harbison&Steele.  */
3271   union
3272   {
3273     long l;
3274     char c[sizeof (long)];
3275   } u;
3276   u.l = 1;
3277   exit (u.c[sizeof (long) - 1] == 1);
3278 }
3279 EOF
3280 if { (eval echo configure:3281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3281 then
3282   ac_cv_c_bigendian=no
3283 else
3284   echo "configure: failed program was:" >&5
3285   cat conftest.$ac_ext >&5
3286   rm -fr conftest*
3287   ac_cv_c_bigendian=yes
3288 fi
3289 rm -fr conftest*
3290 fi
3291
3292 fi
3293 fi
3294
3295 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3296 if test $ac_cv_c_bigendian = yes; then
3297   cat >> confdefs.h <<\EOF
3298 #define WORDS_BIGENDIAN 1
3299 EOF
3300
3301 fi
3302
3303 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
3304 echo "configure:3305: checking whether char is unsigned" >&5
3305 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3306   echo $ac_n "(cached) $ac_c" 1>&6
3307 else
3308   if test "$GCC" = yes; then
3309   # GCC predefines this symbol on systems where it applies.
3310 cat > conftest.$ac_ext <<EOF
3311 #line 3312 "configure"
3312 #include "confdefs.h"
3313 #ifdef __CHAR_UNSIGNED__
3314   yes
3315 #endif
3316
3317 EOF
3318 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3319   egrep "yes" >/dev/null 2>&1; then
3320   rm -rf conftest*
3321   ac_cv_c_char_unsigned=yes
3322 else
3323   rm -rf conftest*
3324   ac_cv_c_char_unsigned=no
3325 fi
3326 rm -f conftest*
3327
3328 else
3329 if test "$cross_compiling" = yes; then
3330     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3331 else
3332   cat > conftest.$ac_ext <<EOF
3333 #line 3334 "configure"
3334 #include "confdefs.h"
3335 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
3336 #if !defined(__STDC__) || __STDC__ != 1
3337 #define volatile
3338 #endif
3339 main() {
3340   volatile char c = 255; exit(c < 0);
3341 }
3342 EOF
3343 if { (eval echo configure:3344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3344 then
3345   ac_cv_c_char_unsigned=yes
3346 else
3347   echo "configure: failed program was:" >&5
3348   cat conftest.$ac_ext >&5
3349   rm -fr conftest*
3350   ac_cv_c_char_unsigned=no
3351 fi
3352 rm -fr conftest*
3353 fi
3354
3355 fi
3356 fi
3357
3358 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
3359 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3360   cat >> confdefs.h <<\EOF
3361 #define __CHAR_UNSIGNED__ 1
3362 EOF
3363
3364 fi
3365
3366
3367 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3368 echo "configure:3369: checking return type of signal handlers" >&5
3369 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3370   echo $ac_n "(cached) $ac_c" 1>&6
3371 else
3372   cat > conftest.$ac_ext <<EOF
3373 #line 3374 "configure"
3374 #include "confdefs.h"
3375 #include <sys/types.h>
3376 #include <signal.h>
3377 #ifdef signal
3378 #undef signal
3379 #endif
3380 #ifdef __cplusplus
3381 extern "C" void (*signal (int, void (*)(int)))(int);
3382 #else
3383 void (*signal ()) ();
3384 #endif
3385
3386 int main() {
3387 int i;
3388 ; return 0; }
3389 EOF
3390 if { (eval echo configure:3391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3391   rm -rf conftest*
3392   ac_cv_type_signal=void
3393 else
3394   echo "configure: failed program was:" >&5
3395   cat conftest.$ac_ext >&5
3396   rm -rf conftest*
3397   ac_cv_type_signal=int
3398 fi
3399 rm -f conftest*
3400 fi
3401
3402 echo "$ac_t""$ac_cv_type_signal" 1>&6
3403 cat >> confdefs.h <<EOF
3404 #define RETSIGTYPE $ac_cv_type_signal
3405 EOF
3406
3407
3408 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3409 echo "configure:3410: checking for uid_t in sys/types.h" >&5
3410 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3411   echo $ac_n "(cached) $ac_c" 1>&6
3412 else
3413   cat > conftest.$ac_ext <<EOF
3414 #line 3415 "configure"
3415 #include "confdefs.h"
3416 #include <sys/types.h>
3417 EOF
3418 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3419   egrep "uid_t" >/dev/null 2>&1; then
3420   rm -rf conftest*
3421   ac_cv_type_uid_t=yes
3422 else
3423   rm -rf conftest*
3424   ac_cv_type_uid_t=no
3425 fi
3426 rm -f conftest*
3427
3428 fi
3429
3430 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3431 if test $ac_cv_type_uid_t = no; then
3432   cat >> confdefs.h <<\EOF
3433 #define uid_t int
3434 EOF
3435
3436   cat >> confdefs.h <<\EOF
3437 #define gid_t int
3438 EOF
3439
3440 fi
3441
3442 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3443 echo "configure:3444: checking for mode_t" >&5
3444 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3445   echo $ac_n "(cached) $ac_c" 1>&6
3446 else
3447   cat > conftest.$ac_ext <<EOF
3448 #line 3449 "configure"
3449 #include "confdefs.h"
3450 #include <sys/types.h>
3451 #if STDC_HEADERS
3452 #include <stdlib.h>
3453 #include <stddef.h>
3454 #endif
3455 EOF
3456 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3457   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3458   rm -rf conftest*
3459   ac_cv_type_mode_t=yes
3460 else
3461   rm -rf conftest*
3462   ac_cv_type_mode_t=no
3463 fi
3464 rm -f conftest*
3465
3466 fi
3467 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3468 if test $ac_cv_type_mode_t = no; then
3469   cat >> confdefs.h <<\EOF
3470 #define mode_t int
3471 EOF
3472
3473 fi
3474
3475 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3476 echo "configure:3477: checking for off_t" >&5
3477 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3478   echo $ac_n "(cached) $ac_c" 1>&6
3479 else
3480   cat > conftest.$ac_ext <<EOF
3481 #line 3482 "configure"
3482 #include "confdefs.h"
3483 #include <sys/types.h>
3484 #if STDC_HEADERS
3485 #include <stdlib.h>
3486 #include <stddef.h>
3487 #endif
3488 EOF
3489 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3490   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3491   rm -rf conftest*
3492   ac_cv_type_off_t=yes
3493 else
3494   rm -rf conftest*
3495   ac_cv_type_off_t=no
3496 fi
3497 rm -f conftest*
3498
3499 fi
3500 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3501 if test $ac_cv_type_off_t = no; then
3502   cat >> confdefs.h <<\EOF
3503 #define off_t long
3504 EOF
3505
3506 fi
3507
3508 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3509 echo "configure:3510: checking for size_t" >&5
3510 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3511   echo $ac_n "(cached) $ac_c" 1>&6
3512 else
3513   cat > conftest.$ac_ext <<EOF
3514 #line 3515 "configure"
3515 #include "confdefs.h"
3516 #include <sys/types.h>
3517 #if STDC_HEADERS
3518 #include <stdlib.h>
3519 #include <stddef.h>
3520 #endif
3521 EOF
3522 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3523   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3524   rm -rf conftest*
3525   ac_cv_type_size_t=yes
3526 else
3527   rm -rf conftest*
3528   ac_cv_type_size_t=no
3529 fi
3530 rm -f conftest*
3531
3532 fi
3533 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3534 if test $ac_cv_type_size_t = no; then
3535   cat >> confdefs.h <<\EOF
3536 #define size_t unsigned
3537 EOF
3538
3539 fi
3540
3541 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3542 echo "configure:3543: checking for pid_t" >&5
3543 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3544   echo $ac_n "(cached) $ac_c" 1>&6
3545 else
3546   cat > conftest.$ac_ext <<EOF
3547 #line 3548 "configure"
3548 #include "confdefs.h"
3549 #include <sys/types.h>
3550 #if STDC_HEADERS
3551 #include <stdlib.h>
3552 #include <stddef.h>
3553 #endif
3554 EOF
3555 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3556   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3557   rm -rf conftest*
3558   ac_cv_type_pid_t=yes
3559 else
3560   rm -rf conftest*
3561   ac_cv_type_pid_t=no
3562 fi
3563 rm -f conftest*
3564
3565 fi
3566 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3567 if test $ac_cv_type_pid_t = no; then
3568   cat >> confdefs.h <<\EOF
3569 #define pid_t int
3570 EOF
3571
3572 fi
3573
3574 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3575 echo "configure:3576: checking for st_rdev in struct stat" >&5
3576 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3577   echo $ac_n "(cached) $ac_c" 1>&6
3578 else
3579   cat > conftest.$ac_ext <<EOF
3580 #line 3581 "configure"
3581 #include "confdefs.h"
3582 #include <sys/types.h>
3583 #include <sys/stat.h>
3584 int main() {
3585 struct stat s; s.st_rdev;
3586 ; return 0; }
3587 EOF
3588 if { (eval echo configure:3589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3589   rm -rf conftest*
3590   ac_cv_struct_st_rdev=yes
3591 else
3592   echo "configure: failed program was:" >&5
3593   cat conftest.$ac_ext >&5
3594   rm -rf conftest*
3595   ac_cv_struct_st_rdev=no
3596 fi
3597 rm -f conftest*
3598 fi
3599
3600 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3601 if test $ac_cv_struct_st_rdev = yes; then
3602   cat >> confdefs.h <<\EOF
3603 #define HAVE_ST_RDEV 1
3604 EOF
3605
3606 fi
3607
3608 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3609 echo "configure:3610: checking for d_off in dirent" >&5
3610 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3611   echo $ac_n "(cached) $ac_c" 1>&6
3612 else
3613   cat > conftest.$ac_ext <<EOF
3614 #line 3615 "configure"
3615 #include "confdefs.h"
3616
3617 #include <unistd.h>
3618 #include <sys/types.h>
3619 #include <dirent.h>
3620 int main() {
3621 struct dirent d; d.d_off;
3622 ; return 0; }
3623 EOF
3624 if { (eval echo configure:3625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3625   rm -rf conftest*
3626   ac_cv_dirent_d_off=yes
3627 else
3628   echo "configure: failed program was:" >&5
3629   cat conftest.$ac_ext >&5
3630   rm -rf conftest*
3631   ac_cv_dirent_d_off=no
3632 fi
3633 rm -f conftest*
3634 fi
3635
3636 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3637 if test $ac_cv_dirent_d_off = yes; then
3638   cat >> confdefs.h <<\EOF
3639 #define HAVE_DIRENT_D_OFF 1
3640 EOF
3641
3642 fi
3643
3644 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3645 echo "configure:3646: checking for ino_t" >&5
3646 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3647   echo $ac_n "(cached) $ac_c" 1>&6
3648 else
3649   cat > conftest.$ac_ext <<EOF
3650 #line 3651 "configure"
3651 #include "confdefs.h"
3652 #include <sys/types.h>
3653 #if STDC_HEADERS
3654 #include <stdlib.h>
3655 #include <stddef.h>
3656 #endif
3657 EOF
3658 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3659   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3660   rm -rf conftest*
3661   ac_cv_type_ino_t=yes
3662 else
3663   rm -rf conftest*
3664   ac_cv_type_ino_t=no
3665 fi
3666 rm -f conftest*
3667
3668 fi
3669 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3670 if test $ac_cv_type_ino_t = no; then
3671   cat >> confdefs.h <<\EOF
3672 #define ino_t unsigned
3673 EOF
3674
3675 fi
3676
3677 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3678 echo "configure:3679: checking for loff_t" >&5
3679 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3680   echo $ac_n "(cached) $ac_c" 1>&6
3681 else
3682   cat > conftest.$ac_ext <<EOF
3683 #line 3684 "configure"
3684 #include "confdefs.h"
3685 #include <sys/types.h>
3686 #if STDC_HEADERS
3687 #include <stdlib.h>
3688 #include <stddef.h>
3689 #endif
3690 EOF
3691 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3692   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3693   rm -rf conftest*
3694   ac_cv_type_loff_t=yes
3695 else
3696   rm -rf conftest*
3697   ac_cv_type_loff_t=no
3698 fi
3699 rm -f conftest*
3700
3701 fi
3702 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3703 if test $ac_cv_type_loff_t = no; then
3704   cat >> confdefs.h <<\EOF
3705 #define loff_t off_t
3706 EOF
3707
3708 fi
3709
3710 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3711 echo "configure:3712: checking for offset_t" >&5
3712 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3713   echo $ac_n "(cached) $ac_c" 1>&6
3714 else
3715   cat > conftest.$ac_ext <<EOF
3716 #line 3717 "configure"
3717 #include "confdefs.h"
3718 #include <sys/types.h>
3719 #if STDC_HEADERS
3720 #include <stdlib.h>
3721 #include <stddef.h>
3722 #endif
3723 EOF
3724 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3725   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3726   rm -rf conftest*
3727   ac_cv_type_offset_t=yes
3728 else
3729   rm -rf conftest*
3730   ac_cv_type_offset_t=no
3731 fi
3732 rm -f conftest*
3733
3734 fi
3735 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3736 if test $ac_cv_type_offset_t = no; then
3737   cat >> confdefs.h <<\EOF
3738 #define offset_t loff_t
3739 EOF
3740
3741 fi
3742
3743 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3744 echo "configure:3745: checking for ssize_t" >&5
3745 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3746   echo $ac_n "(cached) $ac_c" 1>&6
3747 else
3748   cat > conftest.$ac_ext <<EOF
3749 #line 3750 "configure"
3750 #include "confdefs.h"
3751 #include <sys/types.h>
3752 #if STDC_HEADERS
3753 #include <stdlib.h>
3754 #include <stddef.h>
3755 #endif
3756 EOF
3757 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3758   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3759   rm -rf conftest*
3760   ac_cv_type_ssize_t=yes
3761 else
3762   rm -rf conftest*
3763   ac_cv_type_ssize_t=no
3764 fi
3765 rm -f conftest*
3766
3767 fi
3768 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3769 if test $ac_cv_type_ssize_t = no; then
3770   cat >> confdefs.h <<\EOF
3771 #define ssize_t int
3772 EOF
3773
3774 fi
3775
3776 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3777 echo "configure:3778: checking for wchar_t" >&5
3778 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3779   echo $ac_n "(cached) $ac_c" 1>&6
3780 else
3781   cat > conftest.$ac_ext <<EOF
3782 #line 3783 "configure"
3783 #include "confdefs.h"
3784 #include <sys/types.h>
3785 #if STDC_HEADERS
3786 #include <stdlib.h>
3787 #include <stddef.h>
3788 #endif
3789 EOF
3790 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3791   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3792   rm -rf conftest*
3793   ac_cv_type_wchar_t=yes
3794 else
3795   rm -rf conftest*
3796   ac_cv_type_wchar_t=no
3797 fi
3798 rm -f conftest*
3799
3800 fi
3801 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3802 if test $ac_cv_type_wchar_t = no; then
3803   cat >> confdefs.h <<\EOF
3804 #define wchar_t unsigned short
3805 EOF
3806
3807 fi
3808
3809
3810 # we need libcups for CUPS support...
3811 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3812 echo "configure:3813: checking for httpConnect in -lcups" >&5
3813 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3814 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3815   echo $ac_n "(cached) $ac_c" 1>&6
3816 else
3817   ac_save_LIBS="$LIBS"
3818 LIBS="-lcups  $LIBS"
3819 cat > conftest.$ac_ext <<EOF
3820 #line 3821 "configure"
3821 #include "confdefs.h"
3822 /* Override any gcc2 internal prototype to avoid an error.  */
3823 /* We use char because int might match the return type of a gcc2
3824     builtin and then its argument prototype would still apply.  */
3825 char httpConnect();
3826
3827 int main() {
3828 httpConnect()
3829 ; return 0; }
3830 EOF
3831 if { (eval echo configure:3832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3832   rm -rf conftest*
3833   eval "ac_cv_lib_$ac_lib_var=yes"
3834 else
3835   echo "configure: failed program was:" >&5
3836   cat conftest.$ac_ext >&5
3837   rm -rf conftest*
3838   eval "ac_cv_lib_$ac_lib_var=no"
3839 fi
3840 rm -f conftest*
3841 LIBS="$ac_save_LIBS"
3842
3843 fi
3844 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3845   echo "$ac_t""yes" 1>&6
3846     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3847     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3848   cat >> confdefs.h <<EOF
3849 #define $ac_tr_lib 1
3850 EOF
3851
3852   LIBS="-lcups $LIBS"
3853
3854 else
3855   echo "$ac_t""no" 1>&6
3856 fi
3857
3858
3859 # we need libdl for PAM and the new VFS code
3860 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3861 echo "configure:3862: checking for dlopen in -ldl" >&5
3862 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3863 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3864   echo $ac_n "(cached) $ac_c" 1>&6
3865 else
3866   ac_save_LIBS="$LIBS"
3867 LIBS="-ldl  $LIBS"
3868 cat > conftest.$ac_ext <<EOF
3869 #line 3870 "configure"
3870 #include "confdefs.h"
3871 /* Override any gcc2 internal prototype to avoid an error.  */
3872 /* We use char because int might match the return type of a gcc2
3873     builtin and then its argument prototype would still apply.  */
3874 char dlopen();
3875
3876 int main() {
3877 dlopen()
3878 ; return 0; }
3879 EOF
3880 if { (eval echo configure:3881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3881   rm -rf conftest*
3882   eval "ac_cv_lib_$ac_lib_var=yes"
3883 else
3884   echo "configure: failed program was:" >&5
3885   cat conftest.$ac_ext >&5
3886   rm -rf conftest*
3887   eval "ac_cv_lib_$ac_lib_var=no"
3888 fi
3889 rm -f conftest*
3890 LIBS="$ac_save_LIBS"
3891
3892 fi
3893 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3894   echo "$ac_t""yes" 1>&6
3895   LIBS="$LIBS -ldl";
3896         cat >> confdefs.h <<\EOF
3897 #define HAVE_LIBDL 1
3898 EOF
3899
3900 else
3901   echo "$ac_t""no" 1>&6
3902 fi
3903
3904
3905 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3906 echo "configure:3907: checking for sig_atomic_t type" >&5
3907 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3908   echo $ac_n "(cached) $ac_c" 1>&6
3909 else
3910   
3911     cat > conftest.$ac_ext <<EOF
3912 #line 3913 "configure"
3913 #include "confdefs.h"
3914
3915 #include <sys/types.h>
3916 #if STDC_HEADERS
3917 #include <stdlib.h>
3918 #include <stddef.h>
3919 #endif
3920 #include <signal.h>
3921 int main() {
3922 sig_atomic_t i = 0
3923 ; return 0; }
3924 EOF
3925 if { (eval echo configure:3926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3926   rm -rf conftest*
3927   samba_cv_sig_atomic_t=yes
3928 else
3929   echo "configure: failed program was:" >&5
3930   cat conftest.$ac_ext >&5
3931   rm -rf conftest*
3932   samba_cv_sig_atomic_t=no
3933 fi
3934 rm -f conftest*
3935 fi
3936
3937 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3938 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3939    cat >> confdefs.h <<\EOF
3940 #define HAVE_SIG_ATOMIC_T_TYPE 1
3941 EOF
3942
3943 fi
3944
3945 # stupid headers have the functions but no declaration. grrrr.
3946
3947  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
3948 echo "configure:3949: checking for errno declaration" >&5
3949 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
3950   echo $ac_n "(cached) $ac_c" 1>&6
3951 else
3952   
3953     cat > conftest.$ac_ext <<EOF
3954 #line 3955 "configure"
3955 #include "confdefs.h"
3956 #include <errno.h>
3957 int main() {
3958 int i = (int)errno
3959 ; return 0; }
3960 EOF
3961 if { (eval echo configure:3962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3962   rm -rf conftest*
3963   ac_cv_have_errno_decl=yes
3964 else
3965   echo "configure: failed program was:" >&5
3966   cat conftest.$ac_ext >&5
3967   rm -rf conftest*
3968   ac_cv_have_errno_decl=no
3969 fi
3970 rm -f conftest*
3971 fi
3972
3973 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
3974  if test x"$ac_cv_have_errno_decl" = x"yes"; then
3975     cat >> confdefs.h <<\EOF
3976 #define HAVE_ERRNO_DECL 1
3977 EOF
3978
3979  fi
3980
3981
3982  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3983 echo "configure:3984: checking for setresuid declaration" >&5
3984 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
3985   echo $ac_n "(cached) $ac_c" 1>&6
3986 else
3987   
3988     cat > conftest.$ac_ext <<EOF
3989 #line 3990 "configure"
3990 #include "confdefs.h"
3991 #include <unistd.h>
3992 int main() {
3993 int i = (int)setresuid
3994 ; return 0; }
3995 EOF
3996 if { (eval echo configure:3997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3997   rm -rf conftest*
3998   ac_cv_have_setresuid_decl=yes
3999 else
4000   echo "configure: failed program was:" >&5
4001   cat conftest.$ac_ext >&5
4002   rm -rf conftest*
4003   ac_cv_have_setresuid_decl=no
4004 fi
4005 rm -f conftest*
4006 fi
4007
4008 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
4009  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
4010     cat >> confdefs.h <<\EOF
4011 #define HAVE_SETRESUID_DECL 1
4012 EOF
4013
4014  fi
4015
4016
4017  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
4018 echo "configure:4019: checking for setresgid declaration" >&5
4019 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
4020   echo $ac_n "(cached) $ac_c" 1>&6
4021 else
4022   
4023     cat > conftest.$ac_ext <<EOF
4024 #line 4025 "configure"
4025 #include "confdefs.h"
4026 #include <unistd.h>
4027 int main() {
4028 int i = (int)setresgid
4029 ; return 0; }
4030 EOF
4031 if { (eval echo configure:4032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4032   rm -rf conftest*
4033   ac_cv_have_setresgid_decl=yes
4034 else
4035   echo "configure: failed program was:" >&5
4036   cat conftest.$ac_ext >&5
4037   rm -rf conftest*
4038   ac_cv_have_setresgid_decl=no
4039 fi
4040 rm -f conftest*
4041 fi
4042
4043 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
4044  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
4045     cat >> confdefs.h <<\EOF
4046 #define HAVE_SETRESGID_DECL 1
4047 EOF
4048
4049  fi
4050
4051
4052  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
4053 echo "configure:4054: checking for asprintf declaration" >&5
4054 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
4055   echo $ac_n "(cached) $ac_c" 1>&6
4056 else
4057   
4058     cat > conftest.$ac_ext <<EOF
4059 #line 4060 "configure"
4060 #include "confdefs.h"
4061 #include <stdio.h>
4062 int main() {
4063 int i = (int)asprintf
4064 ; return 0; }
4065 EOF
4066 if { (eval echo configure:4067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4067   rm -rf conftest*
4068   ac_cv_have_asprintf_decl=yes
4069 else
4070   echo "configure: failed program was:" >&5
4071   cat conftest.$ac_ext >&5
4072   rm -rf conftest*
4073   ac_cv_have_asprintf_decl=no
4074 fi
4075 rm -f conftest*
4076 fi
4077
4078 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
4079  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
4080     cat >> confdefs.h <<\EOF
4081 #define HAVE_ASPRINTF_DECL 1
4082 EOF
4083
4084  fi
4085
4086
4087  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
4088 echo "configure:4089: checking for vasprintf declaration" >&5
4089 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
4090   echo $ac_n "(cached) $ac_c" 1>&6
4091 else
4092   
4093     cat > conftest.$ac_ext <<EOF
4094 #line 4095 "configure"
4095 #include "confdefs.h"
4096 #include <stdio.h>
4097 int main() {
4098 int i = (int)vasprintf
4099 ; return 0; }
4100 EOF
4101 if { (eval echo configure:4102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4102   rm -rf conftest*
4103   ac_cv_have_vasprintf_decl=yes
4104 else
4105   echo "configure: failed program was:" >&5
4106   cat conftest.$ac_ext >&5
4107   rm -rf conftest*
4108   ac_cv_have_vasprintf_decl=no
4109 fi
4110 rm -f conftest*
4111 fi
4112
4113 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
4114  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
4115     cat >> confdefs.h <<\EOF
4116 #define HAVE_VASPRINTF_DECL 1
4117 EOF
4118
4119  fi
4120
4121
4122  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
4123 echo "configure:4124: checking for vsnprintf declaration" >&5
4124 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
4125   echo $ac_n "(cached) $ac_c" 1>&6
4126 else
4127   
4128     cat > conftest.$ac_ext <<EOF
4129 #line 4130 "configure"
4130 #include "confdefs.h"
4131 #include <stdio.h>
4132 int main() {
4133 int i = (int)vsnprintf
4134 ; return 0; }
4135 EOF
4136 if { (eval echo configure:4137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4137   rm -rf conftest*
4138   ac_cv_have_vsnprintf_decl=yes
4139 else
4140   echo "configure: failed program was:" >&5
4141   cat conftest.$ac_ext >&5
4142   rm -rf conftest*
4143   ac_cv_have_vsnprintf_decl=no
4144 fi
4145 rm -f conftest*
4146 fi
4147
4148 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
4149  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
4150     cat >> confdefs.h <<\EOF
4151 #define HAVE_VSNPRINTF_DECL 1
4152 EOF
4153
4154  fi
4155
4156
4157  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
4158 echo "configure:4159: checking for snprintf declaration" >&5
4159 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
4160   echo $ac_n "(cached) $ac_c" 1>&6
4161 else
4162   
4163     cat > conftest.$ac_ext <<EOF
4164 #line 4165 "configure"
4165 #include "confdefs.h"
4166 #include <stdio.h>
4167 int main() {
4168 int i = (int)snprintf
4169 ; return 0; }
4170 EOF
4171 if { (eval echo configure:4172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4172   rm -rf conftest*
4173   ac_cv_have_snprintf_decl=yes
4174 else
4175   echo "configure: failed program was:" >&5
4176   cat conftest.$ac_ext >&5
4177   rm -rf conftest*
4178   ac_cv_have_snprintf_decl=no
4179 fi
4180 rm -f conftest*
4181 fi
4182
4183 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
4184  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
4185     cat >> confdefs.h <<\EOF
4186 #define HAVE_SNPRINTF_DECL 1
4187 EOF
4188
4189  fi
4190
4191
4192 # and glibc has setresuid under linux but the function does
4193 # nothing until kernel 2.1.44! very dumb.
4194 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
4195 echo "configure:4196: checking for real setresuid" >&5
4196 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
4197   echo $ac_n "(cached) $ac_c" 1>&6
4198 else
4199   
4200     if test "$cross_compiling" = yes; then
4201   samba_cv_have_setresuid=cross
4202 else
4203   cat > conftest.$ac_ext <<EOF
4204 #line 4205 "configure"
4205 #include "confdefs.h"
4206 #include <errno.h>
4207 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4208 EOF
4209 if { (eval echo configure:4210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4210 then
4211   samba_cv_have_setresuid=yes
4212 else
4213   echo "configure: failed program was:" >&5
4214   cat conftest.$ac_ext >&5
4215   rm -fr conftest*
4216   samba_cv_have_setresuid=no
4217 fi
4218 rm -fr conftest*
4219 fi
4220
4221 fi
4222
4223 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4224 if test x"$samba_cv_have_setresuid" = x"yes"; then
4225     cat >> confdefs.h <<\EOF
4226 #define HAVE_SETRESUID 1
4227 EOF
4228
4229 fi
4230
4231 # Do the same check for setresguid...
4232 #
4233 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4234 echo "configure:4235: checking for real setresgid" >&5
4235 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4236   echo $ac_n "(cached) $ac_c" 1>&6
4237 else
4238   
4239     if test "$cross_compiling" = yes; then
4240   samba_cv_have_setresgid=cross
4241 else
4242   cat > conftest.$ac_ext <<EOF
4243 #line 4244 "configure"
4244 #include "confdefs.h"
4245 #include <unistd.h>
4246 #include <errno.h>
4247 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4248 EOF
4249 if { (eval echo configure:4250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4250 then
4251   samba_cv_have_setresgid=yes
4252 else
4253   echo "configure: failed program was:" >&5
4254   cat conftest.$ac_ext >&5
4255   rm -fr conftest*
4256   samba_cv_have_setresgid=no
4257 fi
4258 rm -fr conftest*
4259 fi
4260
4261 fi
4262
4263 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4264 if test x"$samba_cv_have_setresgid" = x"yes"; then
4265     cat >> confdefs.h <<\EOF
4266 #define HAVE_SETRESGID 1
4267 EOF
4268
4269 fi
4270
4271 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4272 echo "configure:4273: checking for 8-bit clean memcmp" >&5
4273 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4274   echo $ac_n "(cached) $ac_c" 1>&6
4275 else
4276   if test "$cross_compiling" = yes; then
4277   ac_cv_func_memcmp_clean=no
4278 else
4279   cat > conftest.$ac_ext <<EOF
4280 #line 4281 "configure"
4281 #include "confdefs.h"
4282
4283 main()
4284 {
4285   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4286   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4287 }
4288
4289 EOF
4290 if { (eval echo configure:4291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4291 then
4292   ac_cv_func_memcmp_clean=yes
4293 else
4294   echo "configure: failed program was:" >&5
4295   cat conftest.$ac_ext >&5
4296   rm -fr conftest*
4297   ac_cv_func_memcmp_clean=no
4298 fi
4299 rm -fr conftest*
4300 fi
4301
4302 fi
4303
4304 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4305 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4306
4307
4308 ###############################################
4309 # test for where we get crypt() from
4310 for ac_func in crypt
4311 do
4312 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4313 echo "configure:4314: checking for $ac_func" >&5
4314 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4315   echo $ac_n "(cached) $ac_c" 1>&6
4316 else
4317   cat > conftest.$ac_ext <<EOF
4318 #line 4319 "configure"
4319 #include "confdefs.h"
4320 /* System header to define __stub macros and hopefully few prototypes,
4321     which can conflict with char $ac_func(); below.  */
4322 #include <assert.h>
4323 /* Override any gcc2 internal prototype to avoid an error.  */
4324 /* We use char because int might match the return type of a gcc2
4325     builtin and then its argument prototype would still apply.  */
4326 char $ac_func();
4327
4328 int main() {
4329
4330 /* The GNU C library defines this for functions which it implements
4331     to always fail with ENOSYS.  Some functions are actually named
4332     something starting with __ and the normal name is an alias.  */
4333 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4334 choke me
4335 #else
4336 $ac_func();
4337 #endif
4338
4339 ; return 0; }
4340 EOF
4341 if { (eval echo configure:4342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4342   rm -rf conftest*
4343   eval "ac_cv_func_$ac_func=yes"
4344 else
4345   echo "configure: failed program was:" >&5
4346   cat conftest.$ac_ext >&5
4347   rm -rf conftest*
4348   eval "ac_cv_func_$ac_func=no"
4349 fi
4350 rm -f conftest*
4351 fi
4352
4353 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4354   echo "$ac_t""yes" 1>&6
4355     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4356   cat >> confdefs.h <<EOF
4357 #define $ac_tr_func 1
4358 EOF
4359  
4360 else
4361   echo "$ac_t""no" 1>&6
4362 fi
4363 done
4364
4365 if test x"$ac_cv_func_crypt" = x"no"; then
4366     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4367 echo "configure:4368: checking for crypt in -lcrypt" >&5
4368 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4369 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4370   echo $ac_n "(cached) $ac_c" 1>&6
4371 else
4372   ac_save_LIBS="$LIBS"
4373 LIBS="-lcrypt  $LIBS"
4374 cat > conftest.$ac_ext <<EOF
4375 #line 4376 "configure"
4376 #include "confdefs.h"
4377 /* Override any gcc2 internal prototype to avoid an error.  */
4378 /* We use char because int might match the return type of a gcc2
4379     builtin and then its argument prototype would still apply.  */
4380 char crypt();
4381
4382 int main() {
4383 crypt()
4384 ; return 0; }
4385 EOF
4386 if { (eval echo configure:4387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4387   rm -rf conftest*
4388   eval "ac_cv_lib_$ac_lib_var=yes"
4389 else
4390   echo "configure: failed program was:" >&5
4391   cat conftest.$ac_ext >&5
4392   rm -rf conftest*
4393   eval "ac_cv_lib_$ac_lib_var=no"
4394 fi
4395 rm -f conftest*
4396 LIBS="$ac_save_LIBS"
4397
4398 fi
4399 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4400   echo "$ac_t""yes" 1>&6
4401   LIBS="$LIBS -lcrypt";
4402         cat >> confdefs.h <<\EOF
4403 #define HAVE_CRYPT 1
4404 EOF
4405
4406 else
4407   echo "$ac_t""no" 1>&6
4408 fi
4409
4410 fi
4411
4412
4413 ###############################################
4414 # Readline included by default unless explicitly asked not to
4415 test "${with_readline+set}" != "set" && with_readline=yes
4416
4417 # test for where we get readline() from
4418 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4419 echo "configure:4420: checking whether to use readline" >&5
4420 # Check whether --with-readline or --without-readline was given.
4421 if test "${with_readline+set}" = set; then
4422   withval="$with_readline"
4423     case "$with_readline" in
4424   yes)
4425     echo "$ac_t""yes" 1>&6
4426
4427     for ac_hdr in readline.h history.h readline/readline.h
4428 do
4429 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4430 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4431 echo "configure:4432: checking for $ac_hdr" >&5
4432 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4433   echo $ac_n "(cached) $ac_c" 1>&6
4434 else
4435   cat > conftest.$ac_ext <<EOF
4436 #line 4437 "configure"
4437 #include "confdefs.h"
4438 #include <$ac_hdr>
4439 EOF
4440 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4441 { (eval echo configure:4442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4442 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4443 if test -z "$ac_err"; then
4444   rm -rf conftest*
4445   eval "ac_cv_header_$ac_safe=yes"
4446 else
4447   echo "$ac_err" >&5
4448   echo "configure: failed program was:" >&5
4449   cat conftest.$ac_ext >&5
4450   rm -rf conftest*
4451   eval "ac_cv_header_$ac_safe=no"
4452 fi
4453 rm -f conftest*
4454 fi
4455 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4456   echo "$ac_t""yes" 1>&6
4457     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4458   cat >> confdefs.h <<EOF
4459 #define $ac_tr_hdr 1
4460 EOF
4461  
4462 else
4463   echo "$ac_t""no" 1>&6
4464 fi
4465 done
4466
4467     for ac_hdr in readline/history.h
4468 do
4469 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4470 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4471 echo "configure:4472: checking for $ac_hdr" >&5
4472 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4473   echo $ac_n "(cached) $ac_c" 1>&6
4474 else
4475   cat > conftest.$ac_ext <<EOF
4476 #line 4477 "configure"
4477 #include "confdefs.h"
4478 #include <$ac_hdr>
4479 EOF
4480 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4481 { (eval echo configure:4482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4482 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4483 if test -z "$ac_err"; then
4484   rm -rf conftest*
4485   eval "ac_cv_header_$ac_safe=yes"
4486 else
4487   echo "$ac_err" >&5
4488   echo "configure: failed program was:" >&5
4489   cat conftest.$ac_ext >&5
4490   rm -rf conftest*
4491   eval "ac_cv_header_$ac_safe=no"
4492 fi
4493 rm -f conftest*
4494 fi
4495 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4496   echo "$ac_t""yes" 1>&6
4497     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4498   cat >> confdefs.h <<EOF
4499 #define $ac_tr_hdr 1
4500 EOF
4501  
4502 else
4503   echo "$ac_t""no" 1>&6
4504 fi
4505 done
4506
4507
4508     for ac_hdr in readline.h readline/readline.h
4509 do
4510 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4511 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4512 echo "configure:4513: checking for $ac_hdr" >&5
4513 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4514   echo $ac_n "(cached) $ac_c" 1>&6
4515 else
4516   cat > conftest.$ac_ext <<EOF
4517 #line 4518 "configure"
4518 #include "confdefs.h"
4519 #include <$ac_hdr>
4520 EOF
4521 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4522 { (eval echo configure:4523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4523 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4524 if test -z "$ac_err"; then
4525   rm -rf conftest*
4526   eval "ac_cv_header_$ac_safe=yes"
4527 else
4528   echo "$ac_err" >&5
4529   echo "configure: failed program was:" >&5
4530   cat conftest.$ac_ext >&5
4531   rm -rf conftest*
4532   eval "ac_cv_header_$ac_safe=no"
4533 fi
4534 rm -f conftest*
4535 fi
4536 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4537   echo "$ac_t""yes" 1>&6
4538     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4539   cat >> confdefs.h <<EOF
4540 #define $ac_tr_hdr 1
4541 EOF
4542  
4543       for termlib in ncurses curses termcap terminfo termlib; do
4544        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4545 echo "configure:4546: checking for tgetent in -l${termlib}" >&5
4546 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4547 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4548   echo $ac_n "(cached) $ac_c" 1>&6
4549 else
4550   ac_save_LIBS="$LIBS"
4551 LIBS="-l${termlib}  $LIBS"
4552 cat > conftest.$ac_ext <<EOF
4553 #line 4554 "configure"
4554 #include "confdefs.h"
4555 /* Override any gcc2 internal prototype to avoid an error.  */
4556 /* We use char because int might match the return type of a gcc2
4557     builtin and then its argument prototype would still apply.  */
4558 char tgetent();
4559
4560 int main() {
4561 tgetent()
4562 ; return 0; }
4563 EOF
4564 if { (eval echo configure:4565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4565   rm -rf conftest*
4566   eval "ac_cv_lib_$ac_lib_var=yes"
4567 else
4568   echo "configure: failed program was:" >&5
4569   cat conftest.$ac_ext >&5
4570   rm -rf conftest*
4571   eval "ac_cv_lib_$ac_lib_var=no"
4572 fi
4573 rm -f conftest*
4574 LIBS="$ac_save_LIBS"
4575
4576 fi
4577 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4578   echo "$ac_t""yes" 1>&6
4579   TERMLIBS="-l${termlib}"; break
4580 else
4581   echo "$ac_t""no" 1>&6
4582 fi
4583
4584       done
4585       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4586 echo "configure:4587: checking for rl_callback_handler_install in -lreadline" >&5
4587 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4588 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4589   echo $ac_n "(cached) $ac_c" 1>&6
4590 else
4591   ac_save_LIBS="$LIBS"
4592 LIBS="-lreadline $TERMLIBS $LIBS"
4593 cat > conftest.$ac_ext <<EOF
4594 #line 4595 "configure"
4595 #include "confdefs.h"
4596 /* Override any gcc2 internal prototype to avoid an error.  */
4597 /* We use char because int might match the return type of a gcc2
4598     builtin and then its argument prototype would still apply.  */
4599 char rl_callback_handler_install();
4600
4601 int main() {
4602 rl_callback_handler_install()
4603 ; return 0; }
4604 EOF
4605 if { (eval echo configure:4606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4606   rm -rf conftest*
4607   eval "ac_cv_lib_$ac_lib_var=yes"
4608 else
4609   echo "configure: failed program was:" >&5
4610   cat conftest.$ac_ext >&5
4611   rm -rf conftest*
4612   eval "ac_cv_lib_$ac_lib_var=no"
4613 fi
4614 rm -f conftest*
4615 LIBS="$ac_save_LIBS"
4616
4617 fi
4618 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4619   echo "$ac_t""yes" 1>&6
4620   TERMLIBS="-lreadline $TERMLIBS"
4621        cat >> confdefs.h <<\EOF
4622 #define HAVE_LIBREADLINE 1
4623 EOF
4624
4625        break
4626 else
4627   echo "$ac_t""no" 1>&6
4628 TERMLIBS=
4629 fi
4630
4631 else
4632   echo "$ac_t""no" 1>&6
4633 fi
4634 done
4635
4636     ;;
4637   no)
4638     echo "$ac_t""no" 1>&6
4639     ;;
4640   *)
4641     echo "$ac_t""yes" 1>&6
4642
4643     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4644     # alternate readline path
4645     _ldflags=${LDFLAGS}
4646     _cppflags=${CPPFLAGS}
4647
4648     # Add additional search path
4649     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4650     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4651
4652     for ac_hdr in readline.h history.h readline/readline.h
4653 do
4654 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4655 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4656 echo "configure:4657: checking for $ac_hdr" >&5
4657 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4658   echo $ac_n "(cached) $ac_c" 1>&6
4659 else
4660   cat > conftest.$ac_ext <<EOF
4661 #line 4662 "configure"
4662 #include "confdefs.h"
4663 #include <$ac_hdr>
4664 EOF
4665 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4666 { (eval echo configure:4667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4667 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4668 if test -z "$ac_err"; then
4669   rm -rf conftest*
4670   eval "ac_cv_header_$ac_safe=yes"
4671 else
4672   echo "$ac_err" >&5
4673   echo "configure: failed program was:" >&5
4674   cat conftest.$ac_ext >&5
4675   rm -rf conftest*
4676   eval "ac_cv_header_$ac_safe=no"
4677 fi
4678 rm -f conftest*
4679 fi
4680 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4681   echo "$ac_t""yes" 1>&6
4682     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4683   cat >> confdefs.h <<EOF
4684 #define $ac_tr_hdr 1
4685 EOF
4686  
4687 else
4688   echo "$ac_t""no" 1>&6
4689 fi
4690 done
4691
4692     for ac_hdr in readline/history.h
4693 do
4694 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4695 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4696 echo "configure:4697: checking for $ac_hdr" >&5
4697 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4698   echo $ac_n "(cached) $ac_c" 1>&6
4699 else
4700   cat > conftest.$ac_ext <<EOF
4701 #line 4702 "configure"
4702 #include "confdefs.h"
4703 #include <$ac_hdr>
4704 EOF
4705 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4706 { (eval echo configure:4707: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4707 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4708 if test -z "$ac_err"; then
4709   rm -rf conftest*
4710   eval "ac_cv_header_$ac_safe=yes"
4711 else
4712   echo "$ac_err" >&5
4713   echo "configure: failed program was:" >&5
4714   cat conftest.$ac_ext >&5
4715   rm -rf conftest*
4716   eval "ac_cv_header_$ac_safe=no"
4717 fi
4718 rm -f conftest*
4719 fi
4720 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4721   echo "$ac_t""yes" 1>&6
4722     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4723   cat >> confdefs.h <<EOF
4724 #define $ac_tr_hdr 1
4725 EOF
4726  
4727 else
4728   echo "$ac_t""no" 1>&6
4729 fi
4730 done
4731
4732
4733     for ac_hdr in readline.h readline/readline.h
4734 do
4735 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4736 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4737 echo "configure:4738: checking for $ac_hdr" >&5
4738 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4739   echo $ac_n "(cached) $ac_c" 1>&6
4740 else
4741   cat > conftest.$ac_ext <<EOF
4742 #line 4743 "configure"
4743 #include "confdefs.h"
4744 #include <$ac_hdr>
4745 EOF
4746 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4747 { (eval echo configure:4748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4748 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4749 if test -z "$ac_err"; then
4750   rm -rf conftest*
4751   eval "ac_cv_header_$ac_safe=yes"
4752 else
4753   echo "$ac_err" >&5
4754   echo "configure: failed program was:" >&5
4755   cat conftest.$ac_ext >&5
4756   rm -rf conftest*
4757   eval "ac_cv_header_$ac_safe=no"
4758 fi
4759 rm -f conftest*
4760 fi
4761 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4762   echo "$ac_t""yes" 1>&6
4763     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4764   cat >> confdefs.h <<EOF
4765 #define $ac_tr_hdr 1
4766 EOF
4767  
4768       for termlib in ncurses curses termcap terminfo termlib; do
4769        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4770 echo "configure:4771: checking for tgetent in -l${termlib}" >&5
4771 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4772 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4773   echo $ac_n "(cached) $ac_c" 1>&6
4774 else
4775   ac_save_LIBS="$LIBS"
4776 LIBS="-l${termlib}  $LIBS"
4777 cat > conftest.$ac_ext <<EOF
4778 #line 4779 "configure"
4779 #include "confdefs.h"
4780 /* Override any gcc2 internal prototype to avoid an error.  */
4781 /* We use char because int might match the return type of a gcc2
4782     builtin and then its argument prototype would still apply.  */
4783 char tgetent();
4784
4785 int main() {
4786 tgetent()
4787 ; return 0; }
4788 EOF
4789 if { (eval echo configure:4790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4790   rm -rf conftest*
4791   eval "ac_cv_lib_$ac_lib_var=yes"
4792 else
4793   echo "configure: failed program was:" >&5
4794   cat conftest.$ac_ext >&5
4795   rm -rf conftest*
4796   eval "ac_cv_lib_$ac_lib_var=no"
4797 fi
4798 rm -f conftest*
4799 LIBS="$ac_save_LIBS"
4800
4801 fi
4802 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4803   echo "$ac_t""yes" 1>&6
4804   TERMLIBS="-l${termlib}"; break
4805 else
4806   echo "$ac_t""no" 1>&6
4807 fi
4808
4809       done
4810       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4811 echo "configure:4812: checking for rl_callback_handler_install in -lreadline" >&5
4812 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4813 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4814   echo $ac_n "(cached) $ac_c" 1>&6
4815 else
4816   ac_save_LIBS="$LIBS"
4817 LIBS="-lreadline $TERMLIBS $LIBS"
4818 cat > conftest.$ac_ext <<EOF
4819 #line 4820 "configure"
4820 #include "confdefs.h"
4821 /* Override any gcc2 internal prototype to avoid an error.  */
4822 /* We use char because int might match the return type of a gcc2
4823     builtin and then its argument prototype would still apply.  */
4824 char rl_callback_handler_install();
4825
4826 int main() {
4827 rl_callback_handler_install()
4828 ; return 0; }
4829 EOF
4830 if { (eval echo configure:4831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4831   rm -rf conftest*
4832   eval "ac_cv_lib_$ac_lib_var=yes"
4833 else
4834   echo "configure: failed program was:" >&5
4835   cat conftest.$ac_ext >&5
4836   rm -rf conftest*
4837   eval "ac_cv_lib_$ac_lib_var=no"
4838 fi
4839 rm -f conftest*
4840 LIBS="$ac_save_LIBS"
4841
4842 fi
4843 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4844   echo "$ac_t""yes" 1>&6
4845   TERMLDFLAGS="-L$with_readline/lib"
4846        TERMCPPFLAGS="-I$with_readline/include"
4847        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4848        TERMLIBS="-lreadline $TERMLIBS"
4849        cat >> confdefs.h <<\EOF
4850 #define HAVE_LIBREADLINE 1
4851 EOF
4852
4853        break
4854 else
4855   echo "$ac_t""no" 1>&6
4856 TERMLIBS= CPPFLAGS=$_cppflags
4857 fi
4858
4859 else
4860   echo "$ac_t""no" 1>&6
4861 fi
4862 done
4863
4864
4865     LDFLAGS=$_ldflags
4866     ;;
4867   esac
4868 else
4869   echo "$ac_t""no" 1>&6
4870
4871 fi
4872
4873
4874
4875
4876 # The following test taken from the cvs sources
4877 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4878 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4879 # libsocket.so which has a bad implementation of gethostbyname (it
4880 # only looks in /etc/hosts), so we only look for -lsocket if we need
4881 # it.
4882 for ac_func in connect
4883 do
4884 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4885 echo "configure:4886: checking for $ac_func" >&5
4886 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4887   echo $ac_n "(cached) $ac_c" 1>&6
4888 else
4889   cat > conftest.$ac_ext <<EOF
4890 #line 4891 "configure"
4891 #include "confdefs.h"
4892 /* System header to define __stub macros and hopefully few prototypes,
4893     which can conflict with char $ac_func(); below.  */
4894 #include <assert.h>
4895 /* Override any gcc2 internal prototype to avoid an error.  */
4896 /* We use char because int might match the return type of a gcc2
4897     builtin and then its argument prototype would still apply.  */
4898 char $ac_func();
4899
4900 int main() {
4901
4902 /* The GNU C library defines this for functions which it implements
4903     to always fail with ENOSYS.  Some functions are actually named
4904     something starting with __ and the normal name is an alias.  */
4905 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4906 choke me
4907 #else
4908 $ac_func();
4909 #endif
4910
4911 ; return 0; }
4912 EOF
4913 if { (eval echo configure:4914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4914   rm -rf conftest*
4915   eval "ac_cv_func_$ac_func=yes"
4916 else
4917   echo "configure: failed program was:" >&5
4918   cat conftest.$ac_ext >&5
4919   rm -rf conftest*
4920   eval "ac_cv_func_$ac_func=no"
4921 fi
4922 rm -f conftest*
4923 fi
4924
4925 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4926   echo "$ac_t""yes" 1>&6
4927     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4928   cat >> confdefs.h <<EOF
4929 #define $ac_tr_func 1
4930 EOF
4931  
4932 else
4933   echo "$ac_t""no" 1>&6
4934 fi
4935 done
4936
4937 if test x"$ac_cv_func_connect" = x"no"; then
4938     case "$LIBS" in
4939     *-lnsl*) ;;
4940     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4941 echo "configure:4942: checking for printf in -lnsl_s" >&5
4942 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4943 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4944   echo $ac_n "(cached) $ac_c" 1>&6
4945 else
4946   ac_save_LIBS="$LIBS"
4947 LIBS="-lnsl_s  $LIBS"
4948 cat > conftest.$ac_ext <<EOF
4949 #line 4950 "configure"
4950 #include "confdefs.h"
4951 /* Override any gcc2 internal prototype to avoid an error.  */
4952 /* We use char because int might match the return type of a gcc2
4953     builtin and then its argument prototype would still apply.  */
4954 char printf();
4955
4956 int main() {
4957 printf()
4958 ; return 0; }
4959 EOF
4960 if { (eval echo configure:4961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4961   rm -rf conftest*
4962   eval "ac_cv_lib_$ac_lib_var=yes"
4963 else
4964   echo "configure: failed program was:" >&5
4965   cat conftest.$ac_ext >&5
4966   rm -rf conftest*
4967   eval "ac_cv_lib_$ac_lib_var=no"
4968 fi
4969 rm -f conftest*
4970 LIBS="$ac_save_LIBS"
4971
4972 fi
4973 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4974   echo "$ac_t""yes" 1>&6
4975     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4976     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4977   cat >> confdefs.h <<EOF
4978 #define $ac_tr_lib 1
4979 EOF
4980
4981   LIBS="-lnsl_s $LIBS"
4982
4983 else
4984   echo "$ac_t""no" 1>&6
4985 fi
4986  ;;
4987     esac
4988     case "$LIBS" in
4989     *-lnsl*) ;;
4990     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
4991 echo "configure:4992: checking for printf in -lnsl" >&5
4992 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
4993 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4994   echo $ac_n "(cached) $ac_c" 1>&6
4995 else
4996   ac_save_LIBS="$LIBS"
4997 LIBS="-lnsl  $LIBS"
4998 cat > conftest.$ac_ext <<EOF
4999 #line 5000 "configure"
5000 #include "confdefs.h"
5001 /* Override any gcc2 internal prototype to avoid an error.  */
5002 /* We use char because int might match the return type of a gcc2
5003     builtin and then its argument prototype would still apply.  */
5004 char printf();
5005
5006 int main() {
5007 printf()
5008 ; return 0; }
5009 EOF
5010 if { (eval echo configure:5011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5011   rm -rf conftest*
5012   eval "ac_cv_lib_$ac_lib_var=yes"
5013 else
5014   echo "configure: failed program was:" >&5
5015   cat conftest.$ac_ext >&5
5016   rm -rf conftest*
5017   eval "ac_cv_lib_$ac_lib_var=no"
5018 fi
5019 rm -f conftest*
5020 LIBS="$ac_save_LIBS"
5021
5022 fi
5023 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5024   echo "$ac_t""yes" 1>&6
5025     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5026     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5027   cat >> confdefs.h <<EOF
5028 #define $ac_tr_lib 1
5029 EOF
5030
5031   LIBS="-lnsl $LIBS"
5032
5033 else
5034   echo "$ac_t""no" 1>&6
5035 fi
5036  ;;
5037     esac
5038     case "$LIBS" in
5039     *-lsocket*) ;;
5040     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5041 echo "configure:5042: checking for connect in -lsocket" >&5
5042 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5043 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5044   echo $ac_n "(cached) $ac_c" 1>&6
5045 else
5046   ac_save_LIBS="$LIBS"
5047 LIBS="-lsocket  $LIBS"
5048 cat > conftest.$ac_ext <<EOF
5049 #line 5050 "configure"
5050 #include "confdefs.h"
5051 /* Override any gcc2 internal prototype to avoid an error.  */
5052 /* We use char because int might match the return type of a gcc2
5053     builtin and then its argument prototype would still apply.  */
5054 char connect();
5055
5056 int main() {
5057 connect()
5058 ; return 0; }
5059 EOF
5060 if { (eval echo configure:5061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5061   rm -rf conftest*
5062   eval "ac_cv_lib_$ac_lib_var=yes"
5063 else
5064   echo "configure: failed program was:" >&5
5065   cat conftest.$ac_ext >&5
5066   rm -rf conftest*
5067   eval "ac_cv_lib_$ac_lib_var=no"
5068 fi
5069 rm -f conftest*
5070 LIBS="$ac_save_LIBS"
5071
5072 fi
5073 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5074   echo "$ac_t""yes" 1>&6
5075     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5076     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5077   cat >> confdefs.h <<EOF
5078 #define $ac_tr_lib 1
5079 EOF
5080
5081   LIBS="-lsocket $LIBS"
5082
5083 else
5084   echo "$ac_t""no" 1>&6
5085 fi
5086  ;;
5087     esac
5088     case "$LIBS" in
5089     *-linet*) ;;
5090     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
5091 echo "configure:5092: checking for connect in -linet" >&5
5092 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
5093 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5094   echo $ac_n "(cached) $ac_c" 1>&6
5095 else
5096   ac_save_LIBS="$LIBS"
5097 LIBS="-linet  $LIBS"
5098 cat > conftest.$ac_ext <<EOF
5099 #line 5100 "configure"
5100 #include "confdefs.h"
5101 /* Override any gcc2 internal prototype to avoid an error.  */
5102 /* We use char because int might match the return type of a gcc2
5103     builtin and then its argument prototype would still apply.  */
5104 char connect();
5105
5106 int main() {
5107 connect()
5108 ; return 0; }
5109 EOF
5110 if { (eval echo configure:5111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5111   rm -rf conftest*
5112   eval "ac_cv_lib_$ac_lib_var=yes"
5113 else
5114   echo "configure: failed program was:" >&5
5115   cat conftest.$ac_ext >&5
5116   rm -rf conftest*
5117   eval "ac_cv_lib_$ac_lib_var=no"
5118 fi
5119 rm -f conftest*
5120 LIBS="$ac_save_LIBS"
5121
5122 fi
5123 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5124   echo "$ac_t""yes" 1>&6
5125     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5126     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5127   cat >> confdefs.h <<EOF
5128 #define $ac_tr_lib 1
5129 EOF
5130
5131   LIBS="-linet $LIBS"
5132
5133 else
5134   echo "$ac_t""no" 1>&6
5135 fi
5136  ;;
5137     esac
5138             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
5139        test x"$ac_cv_lib_inet_connect" = x"yes"; then
5140         # ac_cv_func_connect=yes
5141         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
5142         cat >> confdefs.h <<\EOF
5143 #define HAVE_CONNECT 1
5144 EOF
5145
5146     fi
5147 fi
5148
5149 ###############################################
5150 # test for where we get get_yp_default_domain() from
5151 for ac_func in yp_get_default_domain
5152 do
5153 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5154 echo "configure:5155: checking for $ac_func" >&5
5155 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5156   echo $ac_n "(cached) $ac_c" 1>&6
5157 else
5158   cat > conftest.$ac_ext <<EOF
5159 #line 5160 "configure"
5160 #include "confdefs.h"
5161 /* System header to define __stub macros and hopefully few prototypes,
5162     which can conflict with char $ac_func(); below.  */
5163 #include <assert.h>
5164 /* Override any gcc2 internal prototype to avoid an error.  */
5165 /* We use char because int might match the return type of a gcc2
5166     builtin and then its argument prototype would still apply.  */
5167 char $ac_func();
5168
5169 int main() {
5170
5171 /* The GNU C library defines this for functions which it implements
5172     to always fail with ENOSYS.  Some functions are actually named
5173     something starting with __ and the normal name is an alias.  */
5174 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5175 choke me
5176 #else
5177 $ac_func();
5178 #endif
5179
5180 ; return 0; }
5181 EOF
5182 if { (eval echo configure:5183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5183   rm -rf conftest*
5184   eval "ac_cv_func_$ac_func=yes"
5185 else
5186   echo "configure: failed program was:" >&5
5187   cat conftest.$ac_ext >&5
5188   rm -rf conftest*
5189   eval "ac_cv_func_$ac_func=no"
5190 fi
5191 rm -f conftest*
5192 fi
5193
5194 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5195   echo "$ac_t""yes" 1>&6
5196     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5197   cat >> confdefs.h <<EOF
5198 #define $ac_tr_func 1
5199 EOF
5200  
5201 else
5202   echo "$ac_t""no" 1>&6
5203 fi
5204 done
5205
5206 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5207         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5208 echo "configure:5209: checking for yp_get_default_domain in -lnsl" >&5
5209 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5210 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5211   echo $ac_n "(cached) $ac_c" 1>&6
5212 else
5213   ac_save_LIBS="$LIBS"
5214 LIBS="-lnsl  $LIBS"
5215 cat > conftest.$ac_ext <<EOF
5216 #line 5217 "configure"
5217 #include "confdefs.h"
5218 /* Override any gcc2 internal prototype to avoid an error.  */
5219 /* We use char because int might match the return type of a gcc2
5220     builtin and then its argument prototype would still apply.  */
5221 char yp_get_default_domain();
5222
5223 int main() {
5224 yp_get_default_domain()
5225 ; return 0; }
5226 EOF
5227 if { (eval echo configure:5228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5228   rm -rf conftest*
5229   eval "ac_cv_lib_$ac_lib_var=yes"
5230 else
5231   echo "configure: failed program was:" >&5
5232   cat conftest.$ac_ext >&5
5233   rm -rf conftest*
5234   eval "ac_cv_lib_$ac_lib_var=no"
5235 fi
5236 rm -f conftest*
5237 LIBS="$ac_save_LIBS"
5238
5239 fi
5240 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5241   echo "$ac_t""yes" 1>&6
5242   LIBS="$LIBS -lnsl";
5243         cat >> confdefs.h <<\EOF
5244 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5245 EOF
5246
5247 else
5248   echo "$ac_t""no" 1>&6
5249 fi
5250  
5251 fi
5252
5253 # Check if we have execl, if not we need to compile smbrun.
5254 for ac_func in execl
5255 do
5256 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5257 echo "configure:5258: checking for $ac_func" >&5
5258 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5259   echo $ac_n "(cached) $ac_c" 1>&6
5260 else
5261   cat > conftest.$ac_ext <<EOF
5262 #line 5263 "configure"
5263 #include "confdefs.h"
5264 /* System header to define __stub macros and hopefully few prototypes,
5265     which can conflict with char $ac_func(); below.  */
5266 #include <assert.h>
5267 /* Override any gcc2 internal prototype to avoid an error.  */
5268 /* We use char because int might match the return type of a gcc2
5269     builtin and then its argument prototype would still apply.  */
5270 char $ac_func();
5271
5272 int main() {
5273
5274 /* The GNU C library defines this for functions which it implements
5275     to always fail with ENOSYS.  Some functions are actually named
5276     something starting with __ and the normal name is an alias.  */
5277 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5278 choke me
5279 #else
5280 $ac_func();
5281 #endif
5282
5283 ; return 0; }
5284 EOF
5285 if { (eval echo configure:5286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5286   rm -rf conftest*
5287   eval "ac_cv_func_$ac_func=yes"
5288 else
5289   echo "configure: failed program was:" >&5
5290   cat conftest.$ac_ext >&5
5291   rm -rf conftest*
5292   eval "ac_cv_func_$ac_func=no"
5293 fi
5294 rm -f conftest*
5295 fi
5296
5297 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5298   echo "$ac_t""yes" 1>&6
5299     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5300   cat >> confdefs.h <<EOF
5301 #define $ac_tr_func 1
5302 EOF
5303  
5304 else
5305   echo "$ac_t""no" 1>&6
5306 fi
5307 done
5308
5309 if test x"$ac_cv_func_execl" = x"no"; then
5310     RUNPROG="bin/smbrun"
5311 else
5312     RUNPROG=""
5313 fi
5314
5315 for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot
5316 do
5317 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5318 echo "configure:5319: checking for $ac_func" >&5
5319 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5320   echo $ac_n "(cached) $ac_c" 1>&6
5321 else
5322   cat > conftest.$ac_ext <<EOF
5323 #line 5324 "configure"
5324 #include "confdefs.h"
5325 /* System header to define __stub macros and hopefully few prototypes,
5326     which can conflict with char $ac_func(); below.  */
5327 #include <assert.h>
5328 /* Override any gcc2 internal prototype to avoid an error.  */
5329 /* We use char because int might match the return type of a gcc2
5330     builtin and then its argument prototype would still apply.  */
5331 char $ac_func();
5332
5333 int main() {
5334
5335 /* The GNU C library defines this for functions which it implements
5336     to always fail with ENOSYS.  Some functions are actually named
5337     something starting with __ and the normal name is an alias.  */
5338 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5339 choke me
5340 #else
5341 $ac_func();
5342 #endif
5343
5344 ; return 0; }
5345 EOF
5346 if { (eval echo configure:5347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5347   rm -rf conftest*
5348   eval "ac_cv_func_$ac_func=yes"
5349 else
5350   echo "configure: failed program was:" >&5
5351   cat conftest.$ac_ext >&5
5352   rm -rf conftest*
5353   eval "ac_cv_func_$ac_func=no"
5354 fi
5355 rm -f conftest*
5356 fi
5357
5358 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5359   echo "$ac_t""yes" 1>&6
5360     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5361   cat >> confdefs.h <<EOF
5362 #define $ac_tr_func 1
5363 EOF
5364  
5365 else
5366   echo "$ac_t""no" 1>&6
5367 fi
5368 done
5369
5370 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset
5371 do
5372 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5373 echo "configure:5374: checking for $ac_func" >&5
5374 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5375   echo $ac_n "(cached) $ac_c" 1>&6
5376 else
5377   cat > conftest.$ac_ext <<EOF
5378 #line 5379 "configure"
5379 #include "confdefs.h"
5380 /* System header to define __stub macros and hopefully few prototypes,
5381     which can conflict with char $ac_func(); below.  */
5382 #include <assert.h>
5383 /* Override any gcc2 internal prototype to avoid an error.  */
5384 /* We use char because int might match the return type of a gcc2
5385     builtin and then its argument prototype would still apply.  */
5386 char $ac_func();
5387
5388 int main() {
5389
5390 /* The GNU C library defines this for functions which it implements
5391     to always fail with ENOSYS.  Some functions are actually named
5392     something starting with __ and the normal name is an alias.  */
5393 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5394 choke me
5395 #else
5396 $ac_func();
5397 #endif
5398
5399 ; return 0; }
5400 EOF
5401 if { (eval echo configure:5402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5402   rm -rf conftest*
5403   eval "ac_cv_func_$ac_func=yes"
5404 else
5405   echo "configure: failed program was:" >&5
5406   cat conftest.$ac_ext >&5
5407   rm -rf conftest*
5408   eval "ac_cv_func_$ac_func=no"
5409 fi
5410 rm -f conftest*
5411 fi
5412
5413 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5414   echo "$ac_t""yes" 1>&6
5415     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5416   cat >> confdefs.h <<EOF
5417 #define $ac_tr_func 1
5418 EOF
5419  
5420 else
5421   echo "$ac_t""no" 1>&6
5422 fi
5423 done
5424
5425 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5426 do
5427 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5428 echo "configure:5429: checking for $ac_func" >&5
5429 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5430   echo $ac_n "(cached) $ac_c" 1>&6
5431 else
5432   cat > conftest.$ac_ext <<EOF
5433 #line 5434 "configure"
5434 #include "confdefs.h"
5435 /* System header to define __stub macros and hopefully few prototypes,
5436     which can conflict with char $ac_func(); below.  */
5437 #include <assert.h>
5438 /* Override any gcc2 internal prototype to avoid an error.  */
5439 /* We use char because int might match the return type of a gcc2
5440     builtin and then its argument prototype would still apply.  */
5441 char $ac_func();
5442
5443 int main() {
5444
5445 /* The GNU C library defines this for functions which it implements
5446     to always fail with ENOSYS.  Some functions are actually named
5447     something starting with __ and the normal name is an alias.  */
5448 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5449 choke me
5450 #else
5451 $ac_func();
5452 #endif
5453
5454 ; return 0; }
5455 EOF
5456 if { (eval echo configure:5457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5457   rm -rf conftest*
5458   eval "ac_cv_func_$ac_func=yes"
5459 else
5460   echo "configure: failed program was:" >&5
5461   cat conftest.$ac_ext >&5
5462   rm -rf conftest*
5463   eval "ac_cv_func_$ac_func=no"
5464 fi
5465 rm -f conftest*
5466 fi
5467
5468 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5469   echo "$ac_t""yes" 1>&6
5470     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5471   cat >> confdefs.h <<EOF
5472 #define $ac_tr_func 1
5473 EOF
5474  
5475 else
5476   echo "$ac_t""no" 1>&6
5477 fi
5478 done
5479
5480 for ac_func in strftime sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent
5481 do
5482 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5483 echo "configure:5484: checking for $ac_func" >&5
5484 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5485   echo $ac_n "(cached) $ac_c" 1>&6
5486 else
5487   cat > conftest.$ac_ext <<EOF
5488 #line 5489 "configure"
5489 #include "confdefs.h"
5490 /* System header to define __stub macros and hopefully few prototypes,
5491     which can conflict with char $ac_func(); below.  */
5492 #include <assert.h>
5493 /* Override any gcc2 internal prototype to avoid an error.  */
5494 /* We use char because int might match the return type of a gcc2
5495     builtin and then its argument prototype would still apply.  */
5496 char $ac_func();
5497
5498 int main() {
5499
5500 /* The GNU C library defines this for functions which it implements
5501     to always fail with ENOSYS.  Some functions are actually named
5502     something starting with __ and the normal name is an alias.  */
5503 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5504 choke me
5505 #else
5506 $ac_func();
5507 #endif
5508
5509 ; return 0; }
5510 EOF
5511 if { (eval echo configure:5512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5512   rm -rf conftest*
5513   eval "ac_cv_func_$ac_func=yes"
5514 else
5515   echo "configure: failed program was:" >&5
5516   cat conftest.$ac_ext >&5
5517   rm -rf conftest*
5518   eval "ac_cv_func_$ac_func=no"
5519 fi
5520 rm -f conftest*
5521 fi
5522
5523 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5524   echo "$ac_t""yes" 1>&6
5525     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5526   cat >> confdefs.h <<EOF
5527 #define $ac_tr_func 1
5528 EOF
5529  
5530 else
5531   echo "$ac_t""no" 1>&6
5532 fi
5533 done
5534
5535 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
5536 do
5537 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5538 echo "configure:5539: checking for $ac_func" >&5
5539 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5540   echo $ac_n "(cached) $ac_c" 1>&6
5541 else
5542   cat > conftest.$ac_ext <<EOF
5543 #line 5544 "configure"
5544 #include "confdefs.h"
5545 /* System header to define __stub macros and hopefully few prototypes,
5546     which can conflict with char $ac_func(); below.  */
5547 #include <assert.h>
5548 /* Override any gcc2 internal prototype to avoid an error.  */
5549 /* We use char because int might match the return type of a gcc2
5550     builtin and then its argument prototype would still apply.  */
5551 char $ac_func();
5552
5553 int main() {
5554
5555 /* The GNU C library defines this for functions which it implements
5556     to always fail with ENOSYS.  Some functions are actually named
5557     something starting with __ and the normal name is an alias.  */
5558 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5559 choke me
5560 #else
5561 $ac_func();
5562 #endif
5563
5564 ; return 0; }
5565 EOF
5566 if { (eval echo configure:5567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5567   rm -rf conftest*
5568   eval "ac_cv_func_$ac_func=yes"
5569 else
5570   echo "configure: failed program was:" >&5
5571   cat conftest.$ac_ext >&5
5572   rm -rf conftest*
5573   eval "ac_cv_func_$ac_func=no"
5574 fi
5575 rm -f conftest*
5576 fi
5577
5578 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5579   echo "$ac_t""yes" 1>&6
5580     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5581   cat >> confdefs.h <<EOF
5582 #define $ac_tr_func 1
5583 EOF
5584  
5585 else
5586   echo "$ac_t""no" 1>&6
5587 fi
5588 done
5589
5590 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5591 do
5592 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5593 echo "configure:5594: checking for $ac_func" >&5
5594 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5595   echo $ac_n "(cached) $ac_c" 1>&6
5596 else
5597   cat > conftest.$ac_ext <<EOF
5598 #line 5599 "configure"
5599 #include "confdefs.h"
5600 /* System header to define __stub macros and hopefully few prototypes,
5601     which can conflict with char $ac_func(); below.  */
5602 #include <assert.h>
5603 /* Override any gcc2 internal prototype to avoid an error.  */
5604 /* We use char because int might match the return type of a gcc2
5605     builtin and then its argument prototype would still apply.  */
5606 char $ac_func();
5607
5608 int main() {
5609
5610 /* The GNU C library defines this for functions which it implements
5611     to always fail with ENOSYS.  Some functions are actually named
5612     something starting with __ and the normal name is an alias.  */
5613 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5614 choke me
5615 #else
5616 $ac_func();
5617 #endif
5618
5619 ; return 0; }
5620 EOF
5621 if { (eval echo configure:5622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5622   rm -rf conftest*
5623   eval "ac_cv_func_$ac_func=yes"
5624 else
5625   echo "configure: failed program was:" >&5
5626   cat conftest.$ac_ext >&5
5627   rm -rf conftest*
5628   eval "ac_cv_func_$ac_func=no"
5629 fi
5630 rm -f conftest*
5631 fi
5632
5633 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5634   echo "$ac_t""yes" 1>&6
5635     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5636   cat >> confdefs.h <<EOF
5637 #define $ac_tr_func 1
5638 EOF
5639  
5640 else
5641   echo "$ac_t""no" 1>&6
5642 fi
5643 done
5644
5645 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5646 do
5647 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5648 echo "configure:5649: checking for $ac_func" >&5
5649 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5650   echo $ac_n "(cached) $ac_c" 1>&6
5651 else
5652   cat > conftest.$ac_ext <<EOF
5653 #line 5654 "configure"
5654 #include "confdefs.h"
5655 /* System header to define __stub macros and hopefully few prototypes,
5656     which can conflict with char $ac_func(); below.  */
5657 #include <assert.h>
5658 /* Override any gcc2 internal prototype to avoid an error.  */
5659 /* We use char because int might match the return type of a gcc2
5660     builtin and then its argument prototype would still apply.  */
5661 char $ac_func();
5662
5663 int main() {
5664
5665 /* The GNU C library defines this for functions which it implements
5666     to always fail with ENOSYS.  Some functions are actually named
5667     something starting with __ and the normal name is an alias.  */
5668 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5669 choke me
5670 #else
5671 $ac_func();
5672 #endif
5673
5674 ; return 0; }
5675 EOF
5676 if { (eval echo configure:5677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5677   rm -rf conftest*
5678   eval "ac_cv_func_$ac_func=yes"
5679 else
5680   echo "configure: failed program was:" >&5
5681   cat conftest.$ac_ext >&5
5682   rm -rf conftest*
5683   eval "ac_cv_func_$ac_func=no"
5684 fi
5685 rm -f conftest*
5686 fi
5687
5688 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5689   echo "$ac_t""yes" 1>&6
5690     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5691   cat >> confdefs.h <<EOF
5692 #define $ac_tr_func 1
5693 EOF
5694  
5695 else
5696   echo "$ac_t""no" 1>&6
5697 fi
5698 done
5699
5700 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5701 do
5702 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5703 echo "configure:5704: checking for $ac_func" >&5
5704 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5705   echo $ac_n "(cached) $ac_c" 1>&6
5706 else
5707   cat > conftest.$ac_ext <<EOF
5708 #line 5709 "configure"
5709 #include "confdefs.h"
5710 /* System header to define __stub macros and hopefully few prototypes,
5711     which can conflict with char $ac_func(); below.  */
5712 #include <assert.h>
5713 /* Override any gcc2 internal prototype to avoid an error.  */
5714 /* We use char because int might match the return type of a gcc2
5715     builtin and then its argument prototype would still apply.  */
5716 char $ac_func();
5717
5718 int main() {
5719
5720 /* The GNU C library defines this for functions which it implements
5721     to always fail with ENOSYS.  Some functions are actually named
5722     something starting with __ and the normal name is an alias.  */
5723 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5724 choke me
5725 #else
5726 $ac_func();
5727 #endif
5728
5729 ; return 0; }
5730 EOF
5731 if { (eval echo configure:5732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5732   rm -rf conftest*
5733   eval "ac_cv_func_$ac_func=yes"
5734 else
5735   echo "configure: failed program was:" >&5
5736   cat conftest.$ac_ext >&5
5737   rm -rf conftest*
5738   eval "ac_cv_func_$ac_func=no"
5739 fi
5740 rm -f conftest*
5741 fi
5742
5743 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5744   echo "$ac_t""yes" 1>&6
5745     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5746   cat >> confdefs.h <<EOF
5747 #define $ac_tr_func 1
5748 EOF
5749  
5750 else
5751   echo "$ac_t""no" 1>&6
5752 fi
5753 done
5754
5755 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl
5756 do
5757 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5758 echo "configure:5759: checking for $ac_func" >&5
5759 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5760   echo $ac_n "(cached) $ac_c" 1>&6
5761 else
5762   cat > conftest.$ac_ext <<EOF
5763 #line 5764 "configure"
5764 #include "confdefs.h"
5765 /* System header to define __stub macros and hopefully few prototypes,
5766     which can conflict with char $ac_func(); below.  */
5767 #include <assert.h>
5768 /* Override any gcc2 internal prototype to avoid an error.  */
5769 /* We use char because int might match the return type of a gcc2
5770     builtin and then its argument prototype would still apply.  */
5771 char $ac_func();
5772
5773 int main() {
5774
5775 /* The GNU C library defines this for functions which it implements
5776     to always fail with ENOSYS.  Some functions are actually named
5777     something starting with __ and the normal name is an alias.  */
5778 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5779 choke me
5780 #else
5781 $ac_func();
5782 #endif
5783
5784 ; return 0; }
5785 EOF
5786 if { (eval echo configure:5787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5787   rm -rf conftest*
5788   eval "ac_cv_func_$ac_func=yes"
5789 else
5790   echo "configure: failed program was:" >&5
5791   cat conftest.$ac_ext >&5
5792   rm -rf conftest*
5793   eval "ac_cv_func_$ac_func=no"
5794 fi
5795 rm -f conftest*
5796 fi
5797
5798 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5799   echo "$ac_t""yes" 1>&6
5800     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5801   cat >> confdefs.h <<EOF
5802 #define $ac_tr_func 1
5803 EOF
5804  
5805 else
5806   echo "$ac_t""no" 1>&6
5807 fi
5808 done
5809
5810
5811 # syscall() is needed for smbwrapper.
5812 for ac_func in syscall
5813 do
5814 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5815 echo "configure:5816: checking for $ac_func" >&5
5816 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5817   echo $ac_n "(cached) $ac_c" 1>&6
5818 else
5819   cat > conftest.$ac_ext <<EOF
5820 #line 5821 "configure"
5821 #include "confdefs.h"
5822 /* System header to define __stub macros and hopefully few prototypes,
5823     which can conflict with char $ac_func(); below.  */
5824 #include <assert.h>
5825 /* Override any gcc2 internal prototype to avoid an error.  */
5826 /* We use char because int might match the return type of a gcc2
5827     builtin and then its argument prototype would still apply.  */
5828 char $ac_func();
5829
5830 int main() {
5831
5832 /* The GNU C library defines this for functions which it implements
5833     to always fail with ENOSYS.  Some functions are actually named
5834     something starting with __ and the normal name is an alias.  */
5835 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5836 choke me
5837 #else
5838 $ac_func();
5839 #endif
5840
5841 ; return 0; }
5842 EOF
5843 if { (eval echo configure:5844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5844   rm -rf conftest*
5845   eval "ac_cv_func_$ac_func=yes"
5846 else
5847   echo "configure: failed program was:" >&5
5848   cat conftest.$ac_ext >&5
5849   rm -rf conftest*
5850   eval "ac_cv_func_$ac_func=no"
5851 fi
5852 rm -f conftest*
5853 fi
5854
5855 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5856   echo "$ac_t""yes" 1>&6
5857     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5858   cat >> confdefs.h <<EOF
5859 #define $ac_tr_func 1
5860 EOF
5861  
5862 else
5863   echo "$ac_t""no" 1>&6
5864 fi
5865 done
5866
5867
5868 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5869 do
5870 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5871 echo "configure:5872: checking for $ac_func" >&5
5872 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5873   echo $ac_n "(cached) $ac_c" 1>&6
5874 else
5875   cat > conftest.$ac_ext <<EOF
5876 #line 5877 "configure"
5877 #include "confdefs.h"
5878 /* System header to define __stub macros and hopefully few prototypes,
5879     which can conflict with char $ac_func(); below.  */
5880 #include <assert.h>
5881 /* Override any gcc2 internal prototype to avoid an error.  */
5882 /* We use char because int might match the return type of a gcc2
5883     builtin and then its argument prototype would still apply.  */
5884 char $ac_func();
5885
5886 int main() {
5887
5888 /* The GNU C library defines this for functions which it implements
5889     to always fail with ENOSYS.  Some functions are actually named
5890     something starting with __ and the normal name is an alias.  */
5891 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5892 choke me
5893 #else
5894 $ac_func();
5895 #endif
5896
5897 ; return 0; }
5898 EOF
5899 if { (eval echo configure:5900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5900   rm -rf conftest*
5901   eval "ac_cv_func_$ac_func=yes"
5902 else
5903   echo "configure: failed program was:" >&5
5904   cat conftest.$ac_ext >&5
5905   rm -rf conftest*
5906   eval "ac_cv_func_$ac_func=no"
5907 fi
5908 rm -f conftest*
5909 fi
5910
5911 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5912   echo "$ac_t""yes" 1>&6
5913     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5914   cat >> confdefs.h <<EOF
5915 #define $ac_tr_func 1
5916 EOF
5917  
5918 else
5919   echo "$ac_t""no" 1>&6
5920 fi
5921 done
5922
5923 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
5924 do
5925 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5926 echo "configure:5927: checking for $ac_func" >&5
5927 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5928   echo $ac_n "(cached) $ac_c" 1>&6
5929 else
5930   cat > conftest.$ac_ext <<EOF
5931 #line 5932 "configure"
5932 #include "confdefs.h"
5933 /* System header to define __stub macros and hopefully few prototypes,
5934     which can conflict with char $ac_func(); below.  */
5935 #include <assert.h>
5936 /* Override any gcc2 internal prototype to avoid an error.  */
5937 /* We use char because int might match the return type of a gcc2
5938     builtin and then its argument prototype would still apply.  */
5939 char $ac_func();
5940
5941 int main() {
5942
5943 /* The GNU C library defines this for functions which it implements
5944     to always fail with ENOSYS.  Some functions are actually named
5945     something starting with __ and the normal name is an alias.  */
5946 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5947 choke me
5948 #else
5949 $ac_func();
5950 #endif
5951
5952 ; return 0; }
5953 EOF
5954 if { (eval echo configure:5955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5955   rm -rf conftest*
5956   eval "ac_cv_func_$ac_func=yes"
5957 else
5958   echo "configure: failed program was:" >&5
5959   cat conftest.$ac_ext >&5
5960   rm -rf conftest*
5961   eval "ac_cv_func_$ac_func=no"
5962 fi
5963 rm -f conftest*
5964 fi
5965
5966 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5967   echo "$ac_t""yes" 1>&6
5968     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5969   cat >> confdefs.h <<EOF
5970 #define $ac_tr_func 1
5971 EOF
5972  
5973 else
5974   echo "$ac_t""no" 1>&6
5975 fi
5976 done
5977
5978 for ac_func in __getcwd _getcwd
5979 do
5980 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5981 echo "configure:5982: checking for $ac_func" >&5
5982 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5983   echo $ac_n "(cached) $ac_c" 1>&6
5984 else
5985   cat > conftest.$ac_ext <<EOF
5986 #line 5987 "configure"
5987 #include "confdefs.h"
5988 /* System header to define __stub macros and hopefully few prototypes,
5989     which can conflict with char $ac_func(); below.  */
5990 #include <assert.h>
5991 /* Override any gcc2 internal prototype to avoid an error.  */
5992 /* We use char because int might match the return type of a gcc2
5993     builtin and then its argument prototype would still apply.  */
5994 char $ac_func();
5995
5996 int main() {
5997
5998 /* The GNU C library defines this for functions which it implements
5999     to always fail with ENOSYS.  Some functions are actually named
6000     something starting with __ and the normal name is an alias.  */
6001 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6002 choke me
6003 #else
6004 $ac_func();
6005 #endif
6006
6007 ; return 0; }
6008 EOF
6009 if { (eval echo configure:6010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6010   rm -rf conftest*
6011   eval "ac_cv_func_$ac_func=yes"
6012 else
6013   echo "configure: failed program was:" >&5
6014   cat conftest.$ac_ext >&5
6015   rm -rf conftest*
6016   eval "ac_cv_func_$ac_func=no"
6017 fi
6018 rm -f conftest*
6019 fi
6020
6021 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6022   echo "$ac_t""yes" 1>&6
6023     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6024   cat >> confdefs.h <<EOF
6025 #define $ac_tr_func 1
6026 EOF
6027  
6028 else
6029   echo "$ac_t""no" 1>&6
6030 fi
6031 done
6032
6033 for ac_func in __xstat __fxstat __lxstat
6034 do
6035 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6036 echo "configure:6037: checking for $ac_func" >&5
6037 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6038   echo $ac_n "(cached) $ac_c" 1>&6
6039 else
6040   cat > conftest.$ac_ext <<EOF
6041 #line 6042 "configure"
6042 #include "confdefs.h"
6043 /* System header to define __stub macros and hopefully few prototypes,
6044     which can conflict with char $ac_func(); below.  */
6045 #include <assert.h>
6046 /* Override any gcc2 internal prototype to avoid an error.  */
6047 /* We use char because int might match the return type of a gcc2
6048     builtin and then its argument prototype would still apply.  */
6049 char $ac_func();
6050
6051 int main() {
6052
6053 /* The GNU C library defines this for functions which it implements
6054     to always fail with ENOSYS.  Some functions are actually named
6055     something starting with __ and the normal name is an alias.  */
6056 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6057 choke me
6058 #else
6059 $ac_func();
6060 #endif
6061
6062 ; return 0; }
6063 EOF
6064 if { (eval echo configure:6065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6065   rm -rf conftest*
6066   eval "ac_cv_func_$ac_func=yes"
6067 else
6068   echo "configure: failed program was:" >&5
6069   cat conftest.$ac_ext >&5
6070   rm -rf conftest*
6071   eval "ac_cv_func_$ac_func=no"
6072 fi
6073 rm -f conftest*
6074 fi
6075
6076 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6077   echo "$ac_t""yes" 1>&6
6078     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6079   cat >> confdefs.h <<EOF
6080 #define $ac_tr_func 1
6081 EOF
6082  
6083 else
6084   echo "$ac_t""no" 1>&6
6085 fi
6086 done
6087
6088 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6089 do
6090 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6091 echo "configure:6092: checking for $ac_func" >&5
6092 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6093   echo $ac_n "(cached) $ac_c" 1>&6
6094 else
6095   cat > conftest.$ac_ext <<EOF
6096 #line 6097 "configure"
6097 #include "confdefs.h"
6098 /* System header to define __stub macros and hopefully few prototypes,
6099     which can conflict with char $ac_func(); below.  */
6100 #include <assert.h>
6101 /* Override any gcc2 internal prototype to avoid an error.  */
6102 /* We use char because int might match the return type of a gcc2
6103     builtin and then its argument prototype would still apply.  */
6104 char $ac_func();
6105
6106 int main() {
6107
6108 /* The GNU C library defines this for functions which it implements
6109     to always fail with ENOSYS.  Some functions are actually named
6110     something starting with __ and the normal name is an alias.  */
6111 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6112 choke me
6113 #else
6114 $ac_func();
6115 #endif
6116
6117 ; return 0; }
6118 EOF
6119 if { (eval echo configure:6120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6120   rm -rf conftest*
6121   eval "ac_cv_func_$ac_func=yes"
6122 else
6123   echo "configure: failed program was:" >&5
6124   cat conftest.$ac_ext >&5
6125   rm -rf conftest*
6126   eval "ac_cv_func_$ac_func=no"
6127 fi
6128 rm -f conftest*
6129 fi
6130
6131 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6132   echo "$ac_t""yes" 1>&6
6133     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6134   cat >> confdefs.h <<EOF
6135 #define $ac_tr_func 1
6136 EOF
6137  
6138 else
6139   echo "$ac_t""no" 1>&6
6140 fi
6141 done
6142
6143 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6144 do
6145 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6146 echo "configure:6147: checking for $ac_func" >&5
6147 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6148   echo $ac_n "(cached) $ac_c" 1>&6
6149 else
6150   cat > conftest.$ac_ext <<EOF
6151 #line 6152 "configure"
6152 #include "confdefs.h"
6153 /* System header to define __stub macros and hopefully few prototypes,
6154     which can conflict with char $ac_func(); below.  */
6155 #include <assert.h>
6156 /* Override any gcc2 internal prototype to avoid an error.  */
6157 /* We use char because int might match the return type of a gcc2
6158     builtin and then its argument prototype would still apply.  */
6159 char $ac_func();
6160
6161 int main() {
6162
6163 /* The GNU C library defines this for functions which it implements
6164     to always fail with ENOSYS.  Some functions are actually named
6165     something starting with __ and the normal name is an alias.  */
6166 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6167 choke me
6168 #else
6169 $ac_func();
6170 #endif
6171
6172 ; return 0; }
6173 EOF
6174 if { (eval echo configure:6175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6175   rm -rf conftest*
6176   eval "ac_cv_func_$ac_func=yes"
6177 else
6178   echo "configure: failed program was:" >&5
6179   cat conftest.$ac_ext >&5
6180   rm -rf conftest*
6181   eval "ac_cv_func_$ac_func=no"
6182 fi
6183 rm -f conftest*
6184 fi
6185
6186 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6187   echo "$ac_t""yes" 1>&6
6188     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6189   cat >> confdefs.h <<EOF
6190 #define $ac_tr_func 1
6191 EOF
6192  
6193 else
6194   echo "$ac_t""no" 1>&6
6195 fi
6196 done
6197
6198 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6199 do
6200 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6201 echo "configure:6202: checking for $ac_func" >&5
6202 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6203   echo $ac_n "(cached) $ac_c" 1>&6
6204 else
6205   cat > conftest.$ac_ext <<EOF
6206 #line 6207 "configure"
6207 #include "confdefs.h"
6208 /* System header to define __stub macros and hopefully few prototypes,
6209     which can conflict with char $ac_func(); below.  */
6210 #include <assert.h>
6211 /* Override any gcc2 internal prototype to avoid an error.  */
6212 /* We use char because int might match the return type of a gcc2
6213     builtin and then its argument prototype would still apply.  */
6214 char $ac_func();
6215
6216 int main() {
6217
6218 /* The GNU C library defines this for functions which it implements
6219     to always fail with ENOSYS.  Some functions are actually named
6220     something starting with __ and the normal name is an alias.  */
6221 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6222 choke me
6223 #else
6224 $ac_func();
6225 #endif
6226
6227 ; return 0; }
6228 EOF
6229 if { (eval echo configure:6230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6230   rm -rf conftest*
6231   eval "ac_cv_func_$ac_func=yes"
6232 else
6233   echo "configure: failed program was:" >&5
6234   cat conftest.$ac_ext >&5
6235   rm -rf conftest*
6236   eval "ac_cv_func_$ac_func=no"
6237 fi
6238 rm -f conftest*
6239 fi
6240
6241 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6242   echo "$ac_t""yes" 1>&6
6243     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6244   cat >> confdefs.h <<EOF
6245 #define $ac_tr_func 1
6246 EOF
6247  
6248 else
6249   echo "$ac_t""no" 1>&6
6250 fi
6251 done
6252
6253 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6254 do
6255 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6256 echo "configure:6257: checking for $ac_func" >&5
6257 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6258   echo $ac_n "(cached) $ac_c" 1>&6
6259 else
6260   cat > conftest.$ac_ext <<EOF
6261 #line 6262 "configure"
6262 #include "confdefs.h"
6263 /* System header to define __stub macros and hopefully few prototypes,
6264     which can conflict with char $ac_func(); below.  */
6265 #include <assert.h>
6266 /* Override any gcc2 internal prototype to avoid an error.  */
6267 /* We use char because int might match the return type of a gcc2
6268     builtin and then its argument prototype would still apply.  */
6269 char $ac_func();
6270
6271 int main() {
6272
6273 /* The GNU C library defines this for functions which it implements
6274     to always fail with ENOSYS.  Some functions are actually named
6275     something starting with __ and the normal name is an alias.  */
6276 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6277 choke me
6278 #else
6279 $ac_func();
6280 #endif
6281
6282 ; return 0; }
6283 EOF
6284 if { (eval echo configure:6285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6285   rm -rf conftest*
6286   eval "ac_cv_func_$ac_func=yes"
6287 else
6288   echo "configure: failed program was:" >&5
6289   cat conftest.$ac_ext >&5
6290   rm -rf conftest*
6291   eval "ac_cv_func_$ac_func=no"
6292 fi
6293 rm -f conftest*
6294 fi
6295
6296 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6297   echo "$ac_t""yes" 1>&6
6298     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6299   cat >> confdefs.h <<EOF
6300 #define $ac_tr_func 1
6301 EOF
6302  
6303 else
6304   echo "$ac_t""no" 1>&6
6305 fi
6306 done
6307
6308 for ac_func in _write __write _fork __fork
6309 do
6310 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6311 echo "configure:6312: checking for $ac_func" >&5
6312 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6313   echo $ac_n "(cached) $ac_c" 1>&6
6314 else
6315   cat > conftest.$ac_ext <<EOF
6316 #line 6317 "configure"
6317 #include "confdefs.h"
6318 /* System header to define __stub macros and hopefully few prototypes,
6319     which can conflict with char $ac_func(); below.  */
6320 #include <assert.h>
6321 /* Override any gcc2 internal prototype to avoid an error.  */
6322 /* We use char because int might match the return type of a gcc2
6323     builtin and then its argument prototype would still apply.  */
6324 char $ac_func();
6325
6326 int main() {
6327
6328 /* The GNU C library defines this for functions which it implements
6329     to always fail with ENOSYS.  Some functions are actually named
6330     something starting with __ and the normal name is an alias.  */
6331 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6332 choke me
6333 #else
6334 $ac_func();
6335 #endif
6336
6337 ; return 0; }
6338 EOF
6339 if { (eval echo configure:6340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6340   rm -rf conftest*
6341   eval "ac_cv_func_$ac_func=yes"
6342 else
6343   echo "configure: failed program was:" >&5
6344   cat conftest.$ac_ext >&5
6345   rm -rf conftest*
6346   eval "ac_cv_func_$ac_func=no"
6347 fi
6348 rm -f conftest*
6349 fi
6350
6351 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6352   echo "$ac_t""yes" 1>&6
6353     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6354   cat >> confdefs.h <<EOF
6355 #define $ac_tr_func 1
6356 EOF
6357  
6358 else
6359   echo "$ac_t""no" 1>&6
6360 fi
6361 done
6362
6363 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6364 do
6365 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6366 echo "configure:6367: checking for $ac_func" >&5
6367 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6368   echo $ac_n "(cached) $ac_c" 1>&6
6369 else
6370   cat > conftest.$ac_ext <<EOF
6371 #line 6372 "configure"
6372 #include "confdefs.h"
6373 /* System header to define __stub macros and hopefully few prototypes,
6374     which can conflict with char $ac_func(); below.  */
6375 #include <assert.h>
6376 /* Override any gcc2 internal prototype to avoid an error.  */
6377 /* We use char because int might match the return type of a gcc2
6378     builtin and then its argument prototype would still apply.  */
6379 char $ac_func();
6380
6381 int main() {
6382
6383 /* The GNU C library defines this for functions which it implements
6384     to always fail with ENOSYS.  Some functions are actually named
6385     something starting with __ and the normal name is an alias.  */
6386 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6387 choke me
6388 #else
6389 $ac_func();
6390 #endif
6391
6392 ; return 0; }
6393 EOF
6394 if { (eval echo configure:6395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6395   rm -rf conftest*
6396   eval "ac_cv_func_$ac_func=yes"
6397 else
6398   echo "configure: failed program was:" >&5
6399   cat conftest.$ac_ext >&5
6400   rm -rf conftest*
6401   eval "ac_cv_func_$ac_func=no"
6402 fi
6403 rm -f conftest*
6404 fi
6405
6406 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6407   echo "$ac_t""yes" 1>&6
6408     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6409   cat >> confdefs.h <<EOF
6410 #define $ac_tr_func 1
6411 EOF
6412  
6413 else
6414   echo "$ac_t""no" 1>&6
6415 fi
6416 done
6417
6418 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6419 do
6420 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6421 echo "configure:6422: checking for $ac_func" >&5
6422 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6423   echo $ac_n "(cached) $ac_c" 1>&6
6424 else
6425   cat > conftest.$ac_ext <<EOF
6426 #line 6427 "configure"
6427 #include "confdefs.h"
6428 /* System header to define __stub macros and hopefully few prototypes,
6429     which can conflict with char $ac_func(); below.  */
6430 #include <assert.h>
6431 /* Override any gcc2 internal prototype to avoid an error.  */
6432 /* We use char because int might match the return type of a gcc2
6433     builtin and then its argument prototype would still apply.  */
6434 char $ac_func();
6435
6436 int main() {
6437
6438 /* The GNU C library defines this for functions which it implements
6439     to always fail with ENOSYS.  Some functions are actually named
6440     something starting with __ and the normal name is an alias.  */
6441 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6442 choke me
6443 #else
6444 $ac_func();
6445 #endif
6446
6447 ; return 0; }
6448 EOF
6449 if { (eval echo configure:6450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6450   rm -rf conftest*
6451   eval "ac_cv_func_$ac_func=yes"
6452 else
6453   echo "configure: failed program was:" >&5
6454   cat conftest.$ac_ext >&5
6455   rm -rf conftest*
6456   eval "ac_cv_func_$ac_func=no"
6457 fi
6458 rm -f conftest*
6459 fi
6460
6461 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6462   echo "$ac_t""yes" 1>&6
6463     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6464   cat >> confdefs.h <<EOF
6465 #define $ac_tr_func 1
6466 EOF
6467  
6468 else
6469   echo "$ac_t""no" 1>&6
6470 fi
6471 done
6472
6473 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6474 do
6475 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6476 echo "configure:6477: checking for $ac_func" >&5
6477 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6478   echo $ac_n "(cached) $ac_c" 1>&6
6479 else
6480   cat > conftest.$ac_ext <<EOF
6481 #line 6482 "configure"
6482 #include "confdefs.h"
6483 /* System header to define __stub macros and hopefully few prototypes,
6484     which can conflict with char $ac_func(); below.  */
6485 #include <assert.h>
6486 /* Override any gcc2 internal prototype to avoid an error.  */
6487 /* We use char because int might match the return type of a gcc2
6488     builtin and then its argument prototype would still apply.  */
6489 char $ac_func();
6490
6491 int main() {
6492
6493 /* The GNU C library defines this for functions which it implements
6494     to always fail with ENOSYS.  Some functions are actually named
6495     something starting with __ and the normal name is an alias.  */
6496 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6497 choke me
6498 #else
6499 $ac_func();
6500 #endif
6501
6502 ; return 0; }
6503 EOF
6504 if { (eval echo configure:6505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6505   rm -rf conftest*
6506   eval "ac_cv_func_$ac_func=yes"
6507 else
6508   echo "configure: failed program was:" >&5
6509   cat conftest.$ac_ext >&5
6510   rm -rf conftest*
6511   eval "ac_cv_func_$ac_func=no"
6512 fi
6513 rm -f conftest*
6514 fi
6515
6516 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6517   echo "$ac_t""yes" 1>&6
6518     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6519   cat >> confdefs.h <<EOF
6520 #define $ac_tr_func 1
6521 EOF
6522  
6523 else
6524   echo "$ac_t""no" 1>&6
6525 fi
6526 done
6527
6528 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6529 do
6530 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6531 echo "configure:6532: checking for $ac_func" >&5
6532 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6533   echo $ac_n "(cached) $ac_c" 1>&6
6534 else
6535   cat > conftest.$ac_ext <<EOF
6536 #line 6537 "configure"
6537 #include "confdefs.h"
6538 /* System header to define __stub macros and hopefully few prototypes,
6539     which can conflict with char $ac_func(); below.  */
6540 #include <assert.h>
6541 /* Override any gcc2 internal prototype to avoid an error.  */
6542 /* We use char because int might match the return type of a gcc2
6543     builtin and then its argument prototype would still apply.  */
6544 char $ac_func();
6545
6546 int main() {
6547
6548 /* The GNU C library defines this for functions which it implements
6549     to always fail with ENOSYS.  Some functions are actually named
6550     something starting with __ and the normal name is an alias.  */
6551 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6552 choke me
6553 #else
6554 $ac_func();
6555 #endif
6556
6557 ; return 0; }
6558 EOF
6559 if { (eval echo configure:6560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6560   rm -rf conftest*
6561   eval "ac_cv_func_$ac_func=yes"
6562 else
6563   echo "configure: failed program was:" >&5
6564   cat conftest.$ac_ext >&5
6565   rm -rf conftest*
6566   eval "ac_cv_func_$ac_func=no"
6567 fi
6568 rm -f conftest*
6569 fi
6570
6571 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6572   echo "$ac_t""yes" 1>&6
6573     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6574   cat >> confdefs.h <<EOF
6575 #define $ac_tr_func 1
6576 EOF
6577  
6578 else
6579   echo "$ac_t""no" 1>&6
6580 fi
6581 done
6582
6583 for ac_func in open64 _open64 __open64 creat64
6584 do
6585 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6586 echo "configure:6587: checking for $ac_func" >&5
6587 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6588   echo $ac_n "(cached) $ac_c" 1>&6
6589 else
6590   cat > conftest.$ac_ext <<EOF
6591 #line 6592 "configure"
6592 #include "confdefs.h"
6593 /* System header to define __stub macros and hopefully few prototypes,
6594     which can conflict with char $ac_func(); below.  */
6595 #include <assert.h>
6596 /* Override any gcc2 internal prototype to avoid an error.  */
6597 /* We use char because int might match the return type of a gcc2
6598     builtin and then its argument prototype would still apply.  */
6599 char $ac_func();
6600
6601 int main() {
6602
6603 /* The GNU C library defines this for functions which it implements
6604     to always fail with ENOSYS.  Some functions are actually named
6605     something starting with __ and the normal name is an alias.  */
6606 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6607 choke me
6608 #else
6609 $ac_func();
6610 #endif
6611
6612 ; return 0; }
6613 EOF
6614 if { (eval echo configure:6615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6615   rm -rf conftest*
6616   eval "ac_cv_func_$ac_func=yes"
6617 else
6618   echo "configure: failed program was:" >&5
6619   cat conftest.$ac_ext >&5
6620   rm -rf conftest*
6621   eval "ac_cv_func_$ac_func=no"
6622 fi
6623 rm -f conftest*
6624 fi
6625
6626 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6627   echo "$ac_t""yes" 1>&6
6628     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6629   cat >> confdefs.h <<EOF
6630 #define $ac_tr_func 1
6631 EOF
6632  
6633 else
6634   echo "$ac_t""no" 1>&6
6635 fi
6636 done
6637
6638
6639 #
6640 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6641 #
6642
6643 if test x$ac_cv_func_stat64 = xno ; then
6644   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6645 echo "configure:6646: checking for stat64 in <sys/stat.h>" >&5
6646   cat > conftest.$ac_ext <<EOF
6647 #line 6648 "configure"
6648 #include "confdefs.h"
6649
6650 #if defined(HAVE_UNISTD_H)
6651 #include <unistd.h>
6652 #endif
6653 #include <sys/stat.h>
6654
6655 int main() {
6656 struct stat64 st64; exit(stat64(".",&st64));
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   ac_cv_func_stat64=yes
6662 else
6663   echo "configure: failed program was:" >&5
6664   cat conftest.$ac_ext >&5
6665 fi
6666 rm -f conftest*
6667   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6668   if test x$ac_cv_func_stat64 = xyes ; then
6669     cat >> confdefs.h <<\EOF
6670 #define HAVE_STAT64 1
6671 EOF
6672
6673   fi
6674 fi
6675
6676 if test x$ac_cv_func_lstat64 = xno ; then
6677   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6678 echo "configure:6679: checking for lstat64 in <sys/stat.h>" >&5
6679   cat > conftest.$ac_ext <<EOF
6680 #line 6681 "configure"
6681 #include "confdefs.h"
6682
6683 #if defined(HAVE_UNISTD_H)
6684 #include <unistd.h>
6685 #endif
6686 #include <sys/stat.h>
6687
6688 int main() {
6689 struct stat64 st64; exit(lstat64(".",&st64));
6690 ; return 0; }
6691 EOF
6692 if { (eval echo configure:6693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6693   rm -rf conftest*
6694   ac_cv_func_lstat64=yes
6695 else
6696   echo "configure: failed program was:" >&5
6697   cat conftest.$ac_ext >&5
6698 fi
6699 rm -f conftest*
6700   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6701   if test x$ac_cv_func_lstat64 = xyes ; then
6702     cat >> confdefs.h <<\EOF
6703 #define HAVE_LSTAT64 1
6704 EOF
6705
6706   fi
6707 fi
6708
6709 if test x$ac_cv_func_fstat64 = xno ; then
6710   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6711 echo "configure:6712: checking for fstat64 in <sys/stat.h>" >&5
6712   cat > conftest.$ac_ext <<EOF
6713 #line 6714 "configure"
6714 #include "confdefs.h"
6715
6716 #if defined(HAVE_UNISTD_H)
6717 #include <unistd.h>
6718 #endif
6719 #include <sys/stat.h>
6720
6721 int main() {
6722 struct stat64 st64; exit(fstat64(0,&st64));
6723 ; return 0; }
6724 EOF
6725 if { (eval echo configure:6726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6726   rm -rf conftest*
6727   ac_cv_func_fstat64=yes
6728 else
6729   echo "configure: failed program was:" >&5
6730   cat conftest.$ac_ext >&5
6731 fi
6732 rm -f conftest*
6733   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6734   if test x$ac_cv_func_fstat64 = xyes ; then
6735     cat >> confdefs.h <<\EOF
6736 #define HAVE_FSTAT64 1
6737 EOF
6738
6739   fi
6740 fi
6741
6742 #
6743 # If no strcasecmp, check for it in some known places
6744 # It is in -lresolv on ReliantUNIX and UnixWare
6745 #   -lresolve *must* follow -lnsl for name resolution to work properly
6746 #
6747
6748 if test x$ac_cv_func_strcasecmp = xno ; then
6749         echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6
6750 echo "configure:6751: checking for strcasecmp in -lresolv" >&5
6751 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'`
6752 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6753   echo $ac_n "(cached) $ac_c" 1>&6
6754 else
6755   ac_save_LIBS="$LIBS"
6756 LIBS="-lresolv  $LIBS"
6757 cat > conftest.$ac_ext <<EOF
6758 #line 6759 "configure"
6759 #include "confdefs.h"
6760 /* Override any gcc2 internal prototype to avoid an error.  */
6761 /* We use char because int might match the return type of a gcc2
6762     builtin and then its argument prototype would still apply.  */
6763 char strcasecmp();
6764
6765 int main() {
6766 strcasecmp()
6767 ; return 0; }
6768 EOF
6769 if { (eval echo configure:6770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6770   rm -rf conftest*
6771   eval "ac_cv_lib_$ac_lib_var=yes"
6772 else
6773   echo "configure: failed program was:" >&5
6774   cat conftest.$ac_ext >&5
6775   rm -rf conftest*
6776   eval "ac_cv_lib_$ac_lib_var=no"
6777 fi
6778 rm -f conftest*
6779 LIBS="$ac_save_LIBS"
6780
6781 fi
6782 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6783   echo "$ac_t""yes" 1>&6
6784   LIBS="$LIBS -lresolv"
6785                 cat >> confdefs.h <<\EOF
6786 #define HAVE_STRCASECMP 1
6787 EOF
6788
6789 else
6790   echo "$ac_t""no" 1>&6
6791 fi
6792
6793 fi
6794
6795 #
6796 # Check for the functions putprpwnam, set_auth_parameters,
6797 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6798 # Needed for OSF1 and HPUX.
6799 #
6800
6801 case "$LIBS" in
6802   *-lsecurity*) for ac_func in putprpwnam
6803 do
6804 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6805 echo "configure:6806: checking for $ac_func" >&5
6806 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6807   echo $ac_n "(cached) $ac_c" 1>&6
6808 else
6809   cat > conftest.$ac_ext <<EOF
6810 #line 6811 "configure"
6811 #include "confdefs.h"
6812 /* System header to define __stub macros and hopefully few prototypes,
6813     which can conflict with char $ac_func(); below.  */
6814 #include <assert.h>
6815 /* Override any gcc2 internal prototype to avoid an error.  */
6816 /* We use char because int might match the return type of a gcc2
6817     builtin and then its argument prototype would still apply.  */
6818 char $ac_func();
6819
6820 int main() {
6821
6822 /* The GNU C library defines this for functions which it implements
6823     to always fail with ENOSYS.  Some functions are actually named
6824     something starting with __ and the normal name is an alias.  */
6825 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6826 choke me
6827 #else
6828 $ac_func();
6829 #endif
6830
6831 ; return 0; }
6832 EOF
6833 if { (eval echo configure:6834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6834   rm -rf conftest*
6835   eval "ac_cv_func_$ac_func=yes"
6836 else
6837   echo "configure: failed program was:" >&5
6838   cat conftest.$ac_ext >&5
6839   rm -rf conftest*
6840   eval "ac_cv_func_$ac_func=no"
6841 fi
6842 rm -f conftest*
6843 fi
6844
6845 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6846   echo "$ac_t""yes" 1>&6
6847     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6848   cat >> confdefs.h <<EOF
6849 #define $ac_tr_func 1
6850 EOF
6851  
6852 else
6853   echo "$ac_t""no" 1>&6
6854 fi
6855 done
6856  ;;
6857   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6858 echo "configure:6859: checking for putprpwnam in -lsecurity" >&5
6859 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6860 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6861   echo $ac_n "(cached) $ac_c" 1>&6
6862 else
6863   ac_save_LIBS="$LIBS"
6864 LIBS="-lsecurity  $LIBS"
6865 cat > conftest.$ac_ext <<EOF
6866 #line 6867 "configure"
6867 #include "confdefs.h"
6868 /* Override any gcc2 internal prototype to avoid an error.  */
6869 /* We use char because int might match the return type of a gcc2
6870     builtin and then its argument prototype would still apply.  */
6871 char putprpwnam();
6872
6873 int main() {
6874 putprpwnam()
6875 ; return 0; }
6876 EOF
6877 if { (eval echo configure:6878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6878   rm -rf conftest*
6879   eval "ac_cv_lib_$ac_lib_var=yes"
6880 else
6881   echo "configure: failed program was:" >&5
6882   cat conftest.$ac_ext >&5
6883   rm -rf conftest*
6884   eval "ac_cv_lib_$ac_lib_var=no"
6885 fi
6886 rm -f conftest*
6887 LIBS="$ac_save_LIBS"
6888
6889 fi
6890 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6891   echo "$ac_t""yes" 1>&6
6892     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6893     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6894   cat >> confdefs.h <<EOF
6895 #define $ac_tr_lib 1
6896 EOF
6897
6898   LIBS="-lsecurity $LIBS"
6899
6900 else
6901   echo "$ac_t""no" 1>&6
6902 fi
6903  
6904      for ac_func in putprpwnam
6905 do
6906 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6907 echo "configure:6908: checking for $ac_func" >&5
6908 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6909   echo $ac_n "(cached) $ac_c" 1>&6
6910 else
6911   cat > conftest.$ac_ext <<EOF
6912 #line 6913 "configure"
6913 #include "confdefs.h"
6914 /* System header to define __stub macros and hopefully few prototypes,
6915     which can conflict with char $ac_func(); below.  */
6916 #include <assert.h>
6917 /* Override any gcc2 internal prototype to avoid an error.  */
6918 /* We use char because int might match the return type of a gcc2
6919     builtin and then its argument prototype would still apply.  */
6920 char $ac_func();
6921
6922 int main() {
6923
6924 /* The GNU C library defines this for functions which it implements
6925     to always fail with ENOSYS.  Some functions are actually named
6926     something starting with __ and the normal name is an alias.  */
6927 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6928 choke me
6929 #else
6930 $ac_func();
6931 #endif
6932
6933 ; return 0; }
6934 EOF
6935 if { (eval echo configure:6936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6936   rm -rf conftest*
6937   eval "ac_cv_func_$ac_func=yes"
6938 else
6939   echo "configure: failed program was:" >&5
6940   cat conftest.$ac_ext >&5
6941   rm -rf conftest*
6942   eval "ac_cv_func_$ac_func=no"
6943 fi
6944 rm -f conftest*
6945 fi
6946
6947 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6948   echo "$ac_t""yes" 1>&6
6949     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6950   cat >> confdefs.h <<EOF
6951 #define $ac_tr_func 1
6952 EOF
6953  
6954 else
6955   echo "$ac_t""no" 1>&6
6956 fi
6957 done
6958
6959   ;;
6960   esac
6961
6962 case "$LIBS" in
6963   *-lsec*) for ac_func in putprpwnam
6964 do
6965 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6966 echo "configure:6967: checking for $ac_func" >&5
6967 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6968   echo $ac_n "(cached) $ac_c" 1>&6
6969 else
6970   cat > conftest.$ac_ext <<EOF
6971 #line 6972 "configure"
6972 #include "confdefs.h"
6973 /* System header to define __stub macros and hopefully few prototypes,
6974     which can conflict with char $ac_func(); below.  */
6975 #include <assert.h>
6976 /* Override any gcc2 internal prototype to avoid an error.  */
6977 /* We use char because int might match the return type of a gcc2
6978     builtin and then its argument prototype would still apply.  */
6979 char $ac_func();
6980
6981 int main() {
6982
6983 /* The GNU C library defines this for functions which it implements
6984     to always fail with ENOSYS.  Some functions are actually named
6985     something starting with __ and the normal name is an alias.  */
6986 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6987 choke me
6988 #else
6989 $ac_func();
6990 #endif
6991
6992 ; return 0; }
6993 EOF
6994 if { (eval echo configure:6995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6995   rm -rf conftest*
6996   eval "ac_cv_func_$ac_func=yes"
6997 else
6998   echo "configure: failed program was:" >&5
6999   cat conftest.$ac_ext >&5
7000   rm -rf conftest*
7001   eval "ac_cv_func_$ac_func=no"
7002 fi
7003 rm -f conftest*
7004 fi
7005
7006 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7007   echo "$ac_t""yes" 1>&6
7008     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7009   cat >> confdefs.h <<EOF
7010 #define $ac_tr_func 1
7011 EOF
7012  
7013 else
7014   echo "$ac_t""no" 1>&6
7015 fi
7016 done
7017  ;;
7018   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
7019 echo "configure:7020: checking for putprpwnam in -lsec" >&5
7020 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
7021 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7022   echo $ac_n "(cached) $ac_c" 1>&6
7023 else
7024   ac_save_LIBS="$LIBS"
7025 LIBS="-lsec  $LIBS"
7026 cat > conftest.$ac_ext <<EOF
7027 #line 7028 "configure"
7028 #include "confdefs.h"
7029 /* Override any gcc2 internal prototype to avoid an error.  */
7030 /* We use char because int might match the return type of a gcc2
7031     builtin and then its argument prototype would still apply.  */
7032 char putprpwnam();
7033
7034 int main() {
7035 putprpwnam()
7036 ; return 0; }
7037 EOF
7038 if { (eval echo configure:7039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7039   rm -rf conftest*
7040   eval "ac_cv_lib_$ac_lib_var=yes"
7041 else
7042   echo "configure: failed program was:" >&5
7043   cat conftest.$ac_ext >&5
7044   rm -rf conftest*
7045   eval "ac_cv_lib_$ac_lib_var=no"
7046 fi
7047 rm -f conftest*
7048 LIBS="$ac_save_LIBS"
7049
7050 fi
7051 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7052   echo "$ac_t""yes" 1>&6
7053     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7054     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7055   cat >> confdefs.h <<EOF
7056 #define $ac_tr_lib 1
7057 EOF
7058
7059   LIBS="-lsec $LIBS"
7060
7061 else
7062   echo "$ac_t""no" 1>&6
7063 fi
7064  
7065      for ac_func in putprpwnam
7066 do
7067 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7068 echo "configure:7069: checking for $ac_func" >&5
7069 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7070   echo $ac_n "(cached) $ac_c" 1>&6
7071 else
7072   cat > conftest.$ac_ext <<EOF
7073 #line 7074 "configure"
7074 #include "confdefs.h"
7075 /* System header to define __stub macros and hopefully few prototypes,
7076     which can conflict with char $ac_func(); below.  */
7077 #include <assert.h>
7078 /* Override any gcc2 internal prototype to avoid an error.  */
7079 /* We use char because int might match the return type of a gcc2
7080     builtin and then its argument prototype would still apply.  */
7081 char $ac_func();
7082
7083 int main() {
7084
7085 /* The GNU C library defines this for functions which it implements
7086     to always fail with ENOSYS.  Some functions are actually named
7087     something starting with __ and the normal name is an alias.  */
7088 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7089 choke me
7090 #else
7091 $ac_func();
7092 #endif
7093
7094 ; return 0; }
7095 EOF
7096 if { (eval echo configure:7097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7097   rm -rf conftest*
7098   eval "ac_cv_func_$ac_func=yes"
7099 else
7100   echo "configure: failed program was:" >&5
7101   cat conftest.$ac_ext >&5
7102   rm -rf conftest*
7103   eval "ac_cv_func_$ac_func=no"
7104 fi
7105 rm -f conftest*
7106 fi
7107
7108 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7109   echo "$ac_t""yes" 1>&6
7110     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7111   cat >> confdefs.h <<EOF
7112 #define $ac_tr_func 1
7113 EOF
7114  
7115 else
7116   echo "$ac_t""no" 1>&6
7117 fi
7118 done
7119
7120   ;;
7121   esac
7122
7123
7124 case "$LIBS" in
7125   *-lsecurity*) for ac_func in set_auth_parameters
7126 do
7127 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7128 echo "configure:7129: checking for $ac_func" >&5
7129 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7130   echo $ac_n "(cached) $ac_c" 1>&6
7131 else
7132   cat > conftest.$ac_ext <<EOF
7133 #line 7134 "configure"
7134 #include "confdefs.h"
7135 /* System header to define __stub macros and hopefully few prototypes,
7136     which can conflict with char $ac_func(); below.  */
7137 #include <assert.h>
7138 /* Override any gcc2 internal prototype to avoid an error.  */
7139 /* We use char because int might match the return type of a gcc2
7140     builtin and then its argument prototype would still apply.  */
7141 char $ac_func();
7142
7143 int main() {
7144
7145 /* The GNU C library defines this for functions which it implements
7146     to always fail with ENOSYS.  Some functions are actually named
7147     something starting with __ and the normal name is an alias.  */
7148 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7149 choke me
7150 #else
7151 $ac_func();
7152 #endif
7153
7154 ; return 0; }
7155 EOF
7156 if { (eval echo configure:7157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7157   rm -rf conftest*
7158   eval "ac_cv_func_$ac_func=yes"
7159 else
7160   echo "configure: failed program was:" >&5
7161   cat conftest.$ac_ext >&5
7162   rm -rf conftest*
7163   eval "ac_cv_func_$ac_func=no"
7164 fi
7165 rm -f conftest*
7166 fi
7167
7168 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7169   echo "$ac_t""yes" 1>&6
7170     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7171   cat >> confdefs.h <<EOF
7172 #define $ac_tr_func 1
7173 EOF
7174  
7175 else
7176   echo "$ac_t""no" 1>&6
7177 fi
7178 done
7179  ;;
7180   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7181 echo "configure:7182: checking for set_auth_parameters in -lsecurity" >&5
7182 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7183 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7184   echo $ac_n "(cached) $ac_c" 1>&6
7185 else
7186   ac_save_LIBS="$LIBS"
7187 LIBS="-lsecurity  $LIBS"
7188 cat > conftest.$ac_ext <<EOF
7189 #line 7190 "configure"
7190 #include "confdefs.h"
7191 /* Override any gcc2 internal prototype to avoid an error.  */
7192 /* We use char because int might match the return type of a gcc2
7193     builtin and then its argument prototype would still apply.  */
7194 char set_auth_parameters();
7195
7196 int main() {
7197 set_auth_parameters()
7198 ; return 0; }
7199 EOF
7200 if { (eval echo configure:7201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7201   rm -rf conftest*
7202   eval "ac_cv_lib_$ac_lib_var=yes"
7203 else
7204   echo "configure: failed program was:" >&5
7205   cat conftest.$ac_ext >&5
7206   rm -rf conftest*
7207   eval "ac_cv_lib_$ac_lib_var=no"
7208 fi
7209 rm -f conftest*
7210 LIBS="$ac_save_LIBS"
7211
7212 fi
7213 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7214   echo "$ac_t""yes" 1>&6
7215     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7216     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7217   cat >> confdefs.h <<EOF
7218 #define $ac_tr_lib 1
7219 EOF
7220
7221   LIBS="-lsecurity $LIBS"
7222
7223 else
7224   echo "$ac_t""no" 1>&6
7225 fi
7226  
7227      for ac_func in set_auth_parameters
7228 do
7229 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7230 echo "configure:7231: checking for $ac_func" >&5
7231 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7232   echo $ac_n "(cached) $ac_c" 1>&6
7233 else
7234   cat > conftest.$ac_ext <<EOF
7235 #line 7236 "configure"
7236 #include "confdefs.h"
7237 /* System header to define __stub macros and hopefully few prototypes,
7238     which can conflict with char $ac_func(); below.  */
7239 #include <assert.h>
7240 /* Override any gcc2 internal prototype to avoid an error.  */
7241 /* We use char because int might match the return type of a gcc2
7242     builtin and then its argument prototype would still apply.  */
7243 char $ac_func();
7244
7245 int main() {
7246
7247 /* The GNU C library defines this for functions which it implements
7248     to always fail with ENOSYS.  Some functions are actually named
7249     something starting with __ and the normal name is an alias.  */
7250 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7251 choke me
7252 #else
7253 $ac_func();
7254 #endif
7255
7256 ; return 0; }
7257 EOF
7258 if { (eval echo configure:7259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7259   rm -rf conftest*
7260   eval "ac_cv_func_$ac_func=yes"
7261 else
7262   echo "configure: failed program was:" >&5
7263   cat conftest.$ac_ext >&5
7264   rm -rf conftest*
7265   eval "ac_cv_func_$ac_func=no"
7266 fi
7267 rm -f conftest*
7268 fi
7269
7270 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7271   echo "$ac_t""yes" 1>&6
7272     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7273   cat >> confdefs.h <<EOF
7274 #define $ac_tr_func 1
7275 EOF
7276  
7277 else
7278   echo "$ac_t""no" 1>&6
7279 fi
7280 done
7281
7282   ;;
7283   esac
7284
7285 case "$LIBS" in
7286   *-lsec*) for ac_func in set_auth_parameters
7287 do
7288 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7289 echo "configure:7290: checking for $ac_func" >&5
7290 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7291   echo $ac_n "(cached) $ac_c" 1>&6
7292 else
7293   cat > conftest.$ac_ext <<EOF
7294 #line 7295 "configure"
7295 #include "confdefs.h"
7296 /* System header to define __stub macros and hopefully few prototypes,
7297     which can conflict with char $ac_func(); below.  */
7298 #include <assert.h>
7299 /* Override any gcc2 internal prototype to avoid an error.  */
7300 /* We use char because int might match the return type of a gcc2
7301     builtin and then its argument prototype would still apply.  */
7302 char $ac_func();
7303
7304 int main() {
7305
7306 /* The GNU C library defines this for functions which it implements
7307     to always fail with ENOSYS.  Some functions are actually named
7308     something starting with __ and the normal name is an alias.  */
7309 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7310 choke me
7311 #else
7312 $ac_func();
7313 #endif
7314
7315 ; return 0; }
7316 EOF
7317 if { (eval echo configure:7318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7318   rm -rf conftest*
7319   eval "ac_cv_func_$ac_func=yes"
7320 else
7321   echo "configure: failed program was:" >&5
7322   cat conftest.$ac_ext >&5
7323   rm -rf conftest*
7324   eval "ac_cv_func_$ac_func=no"
7325 fi
7326 rm -f conftest*
7327 fi
7328
7329 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7330   echo "$ac_t""yes" 1>&6
7331     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7332   cat >> confdefs.h <<EOF
7333 #define $ac_tr_func 1
7334 EOF
7335  
7336 else
7337   echo "$ac_t""no" 1>&6
7338 fi
7339 done
7340  ;;
7341   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7342 echo "configure:7343: checking for set_auth_parameters in -lsec" >&5
7343 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7344 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7345   echo $ac_n "(cached) $ac_c" 1>&6
7346 else
7347   ac_save_LIBS="$LIBS"
7348 LIBS="-lsec  $LIBS"
7349 cat > conftest.$ac_ext <<EOF
7350 #line 7351 "configure"
7351 #include "confdefs.h"
7352 /* Override any gcc2 internal prototype to avoid an error.  */
7353 /* We use char because int might match the return type of a gcc2
7354     builtin and then its argument prototype would still apply.  */
7355 char set_auth_parameters();
7356
7357 int main() {
7358 set_auth_parameters()
7359 ; return 0; }
7360 EOF
7361 if { (eval echo configure:7362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7362   rm -rf conftest*
7363   eval "ac_cv_lib_$ac_lib_var=yes"
7364 else
7365   echo "configure: failed program was:" >&5
7366   cat conftest.$ac_ext >&5
7367   rm -rf conftest*
7368   eval "ac_cv_lib_$ac_lib_var=no"
7369 fi
7370 rm -f conftest*
7371 LIBS="$ac_save_LIBS"
7372
7373 fi
7374 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7375   echo "$ac_t""yes" 1>&6
7376     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7377     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7378   cat >> confdefs.h <<EOF
7379 #define $ac_tr_lib 1
7380 EOF
7381
7382   LIBS="-lsec $LIBS"
7383
7384 else
7385   echo "$ac_t""no" 1>&6
7386 fi
7387  
7388      for ac_func in set_auth_parameters
7389 do
7390 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7391 echo "configure:7392: checking for $ac_func" >&5
7392 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7393   echo $ac_n "(cached) $ac_c" 1>&6
7394 else
7395   cat > conftest.$ac_ext <<EOF
7396 #line 7397 "configure"
7397 #include "confdefs.h"
7398 /* System header to define __stub macros and hopefully few prototypes,
7399     which can conflict with char $ac_func(); below.  */
7400 #include <assert.h>
7401 /* Override any gcc2 internal prototype to avoid an error.  */
7402 /* We use char because int might match the return type of a gcc2
7403     builtin and then its argument prototype would still apply.  */
7404 char $ac_func();
7405
7406 int main() {
7407
7408 /* The GNU C library defines this for functions which it implements
7409     to always fail with ENOSYS.  Some functions are actually named
7410     something starting with __ and the normal name is an alias.  */
7411 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7412 choke me
7413 #else
7414 $ac_func();
7415 #endif
7416
7417 ; return 0; }
7418 EOF
7419 if { (eval echo configure:7420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7420   rm -rf conftest*
7421   eval "ac_cv_func_$ac_func=yes"
7422 else
7423   echo "configure: failed program was:" >&5
7424   cat conftest.$ac_ext >&5
7425   rm -rf conftest*
7426   eval "ac_cv_func_$ac_func=no"
7427 fi
7428 rm -f conftest*
7429 fi
7430
7431 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7432   echo "$ac_t""yes" 1>&6
7433     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7434   cat >> confdefs.h <<EOF
7435 #define $ac_tr_func 1
7436 EOF
7437  
7438 else
7439   echo "$ac_t""no" 1>&6
7440 fi
7441 done
7442
7443   ;;
7444   esac
7445
7446
7447 # UnixWare 7.x has its getspnam in -lgen
7448 case "$LIBS" in
7449   *-lgen*) for ac_func in getspnam
7450 do
7451 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7452 echo "configure:7453: checking for $ac_func" >&5
7453 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7454   echo $ac_n "(cached) $ac_c" 1>&6
7455 else
7456   cat > conftest.$ac_ext <<EOF
7457 #line 7458 "configure"
7458 #include "confdefs.h"
7459 /* System header to define __stub macros and hopefully few prototypes,
7460     which can conflict with char $ac_func(); below.  */
7461 #include <assert.h>
7462 /* Override any gcc2 internal prototype to avoid an error.  */
7463 /* We use char because int might match the return type of a gcc2
7464     builtin and then its argument prototype would still apply.  */
7465 char $ac_func();
7466
7467 int main() {
7468
7469 /* The GNU C library defines this for functions which it implements
7470     to always fail with ENOSYS.  Some functions are actually named
7471     something starting with __ and the normal name is an alias.  */
7472 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7473 choke me
7474 #else
7475 $ac_func();
7476 #endif
7477
7478 ; return 0; }
7479 EOF
7480 if { (eval echo configure:7481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7481   rm -rf conftest*
7482   eval "ac_cv_func_$ac_func=yes"
7483 else
7484   echo "configure: failed program was:" >&5
7485   cat conftest.$ac_ext >&5
7486   rm -rf conftest*
7487   eval "ac_cv_func_$ac_func=no"
7488 fi
7489 rm -f conftest*
7490 fi
7491
7492 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7493   echo "$ac_t""yes" 1>&6
7494     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7495   cat >> confdefs.h <<EOF
7496 #define $ac_tr_func 1
7497 EOF
7498  
7499 else
7500   echo "$ac_t""no" 1>&6
7501 fi
7502 done
7503  ;;
7504   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7505 echo "configure:7506: checking for getspnam in -lgen" >&5
7506 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7507 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7508   echo $ac_n "(cached) $ac_c" 1>&6
7509 else
7510   ac_save_LIBS="$LIBS"
7511 LIBS="-lgen  $LIBS"
7512 cat > conftest.$ac_ext <<EOF
7513 #line 7514 "configure"
7514 #include "confdefs.h"
7515 /* Override any gcc2 internal prototype to avoid an error.  */
7516 /* We use char because int might match the return type of a gcc2
7517     builtin and then its argument prototype would still apply.  */
7518 char getspnam();
7519
7520 int main() {
7521 getspnam()
7522 ; return 0; }
7523 EOF
7524 if { (eval echo configure:7525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7525   rm -rf conftest*
7526   eval "ac_cv_lib_$ac_lib_var=yes"
7527 else
7528   echo "configure: failed program was:" >&5
7529   cat conftest.$ac_ext >&5
7530   rm -rf conftest*
7531   eval "ac_cv_lib_$ac_lib_var=no"
7532 fi
7533 rm -f conftest*
7534 LIBS="$ac_save_LIBS"
7535
7536 fi
7537 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7538   echo "$ac_t""yes" 1>&6
7539     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7540     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7541   cat >> confdefs.h <<EOF
7542 #define $ac_tr_lib 1
7543 EOF
7544
7545   LIBS="-lgen $LIBS"
7546
7547 else
7548   echo "$ac_t""no" 1>&6
7549 fi
7550  
7551      for ac_func in getspnam
7552 do
7553 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7554 echo "configure:7555: checking for $ac_func" >&5
7555 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7556   echo $ac_n "(cached) $ac_c" 1>&6
7557 else
7558   cat > conftest.$ac_ext <<EOF
7559 #line 7560 "configure"
7560 #include "confdefs.h"
7561 /* System header to define __stub macros and hopefully few prototypes,
7562     which can conflict with char $ac_func(); below.  */
7563 #include <assert.h>
7564 /* Override any gcc2 internal prototype to avoid an error.  */
7565 /* We use char because int might match the return type of a gcc2
7566     builtin and then its argument prototype would still apply.  */
7567 char $ac_func();
7568
7569 int main() {
7570
7571 /* The GNU C library defines this for functions which it implements
7572     to always fail with ENOSYS.  Some functions are actually named
7573     something starting with __ and the normal name is an alias.  */
7574 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7575 choke me
7576 #else
7577 $ac_func();
7578 #endif
7579
7580 ; return 0; }
7581 EOF
7582 if { (eval echo configure:7583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7583   rm -rf conftest*
7584   eval "ac_cv_func_$ac_func=yes"
7585 else
7586   echo "configure: failed program was:" >&5
7587   cat conftest.$ac_ext >&5
7588   rm -rf conftest*
7589   eval "ac_cv_func_$ac_func=no"
7590 fi
7591 rm -f conftest*
7592 fi
7593
7594 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7595   echo "$ac_t""yes" 1>&6
7596     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7597   cat >> confdefs.h <<EOF
7598 #define $ac_tr_func 1
7599 EOF
7600  
7601 else
7602   echo "$ac_t""no" 1>&6
7603 fi
7604 done
7605
7606   ;;
7607   esac
7608
7609
7610 case "$LIBS" in
7611   *-lsecurity*) for ac_func in getspnam
7612 do
7613 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7614 echo "configure:7615: checking for $ac_func" >&5
7615 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7616   echo $ac_n "(cached) $ac_c" 1>&6
7617 else
7618   cat > conftest.$ac_ext <<EOF
7619 #line 7620 "configure"
7620 #include "confdefs.h"
7621 /* System header to define __stub macros and hopefully few prototypes,
7622     which can conflict with char $ac_func(); below.  */
7623 #include <assert.h>
7624 /* Override any gcc2 internal prototype to avoid an error.  */
7625 /* We use char because int might match the return type of a gcc2
7626     builtin and then its argument prototype would still apply.  */
7627 char $ac_func();
7628
7629 int main() {
7630
7631 /* The GNU C library defines this for functions which it implements
7632     to always fail with ENOSYS.  Some functions are actually named
7633     something starting with __ and the normal name is an alias.  */
7634 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7635 choke me
7636 #else
7637 $ac_func();
7638 #endif
7639
7640 ; return 0; }
7641 EOF
7642 if { (eval echo configure:7643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7643   rm -rf conftest*
7644   eval "ac_cv_func_$ac_func=yes"
7645 else
7646   echo "configure: failed program was:" >&5
7647   cat conftest.$ac_ext >&5
7648   rm -rf conftest*
7649   eval "ac_cv_func_$ac_func=no"
7650 fi
7651 rm -f conftest*
7652 fi
7653
7654 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7655   echo "$ac_t""yes" 1>&6
7656     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7657   cat >> confdefs.h <<EOF
7658 #define $ac_tr_func 1
7659 EOF
7660  
7661 else
7662   echo "$ac_t""no" 1>&6
7663 fi
7664 done
7665  ;;
7666   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7667 echo "configure:7668: checking for getspnam in -lsecurity" >&5
7668 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7669 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7670   echo $ac_n "(cached) $ac_c" 1>&6
7671 else
7672   ac_save_LIBS="$LIBS"
7673 LIBS="-lsecurity  $LIBS"
7674 cat > conftest.$ac_ext <<EOF
7675 #line 7676 "configure"
7676 #include "confdefs.h"
7677 /* Override any gcc2 internal prototype to avoid an error.  */
7678 /* We use char because int might match the return type of a gcc2
7679     builtin and then its argument prototype would still apply.  */
7680 char getspnam();
7681
7682 int main() {
7683 getspnam()
7684 ; return 0; }
7685 EOF
7686 if { (eval echo configure:7687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7687   rm -rf conftest*
7688   eval "ac_cv_lib_$ac_lib_var=yes"
7689 else
7690   echo "configure: failed program was:" >&5
7691   cat conftest.$ac_ext >&5
7692   rm -rf conftest*
7693   eval "ac_cv_lib_$ac_lib_var=no"
7694 fi
7695 rm -f conftest*
7696 LIBS="$ac_save_LIBS"
7697
7698 fi
7699 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7700   echo "$ac_t""yes" 1>&6
7701     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7702     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7703   cat >> confdefs.h <<EOF
7704 #define $ac_tr_lib 1
7705 EOF
7706
7707   LIBS="-lsecurity $LIBS"
7708
7709 else
7710   echo "$ac_t""no" 1>&6
7711 fi
7712  
7713      for ac_func in getspnam
7714 do
7715 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7716 echo "configure:7717: checking for $ac_func" >&5
7717 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7718   echo $ac_n "(cached) $ac_c" 1>&6
7719 else
7720   cat > conftest.$ac_ext <<EOF
7721 #line 7722 "configure"
7722 #include "confdefs.h"
7723 /* System header to define __stub macros and hopefully few prototypes,
7724     which can conflict with char $ac_func(); below.  */
7725 #include <assert.h>
7726 /* Override any gcc2 internal prototype to avoid an error.  */
7727 /* We use char because int might match the return type of a gcc2
7728     builtin and then its argument prototype would still apply.  */
7729 char $ac_func();
7730
7731 int main() {
7732
7733 /* The GNU C library defines this for functions which it implements
7734     to always fail with ENOSYS.  Some functions are actually named
7735     something starting with __ and the normal name is an alias.  */
7736 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7737 choke me
7738 #else
7739 $ac_func();
7740 #endif
7741
7742 ; return 0; }
7743 EOF
7744 if { (eval echo configure:7745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7745   rm -rf conftest*
7746   eval "ac_cv_func_$ac_func=yes"
7747 else
7748   echo "configure: failed program was:" >&5
7749   cat conftest.$ac_ext >&5
7750   rm -rf conftest*
7751   eval "ac_cv_func_$ac_func=no"
7752 fi
7753 rm -f conftest*
7754 fi
7755
7756 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7757   echo "$ac_t""yes" 1>&6
7758     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7759   cat >> confdefs.h <<EOF
7760 #define $ac_tr_func 1
7761 EOF
7762  
7763 else
7764   echo "$ac_t""no" 1>&6
7765 fi
7766 done
7767
7768   ;;
7769   esac
7770
7771 case "$LIBS" in
7772   *-lsec*) for ac_func in getspnam
7773 do
7774 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7775 echo "configure:7776: checking for $ac_func" >&5
7776 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7777   echo $ac_n "(cached) $ac_c" 1>&6
7778 else
7779   cat > conftest.$ac_ext <<EOF
7780 #line 7781 "configure"
7781 #include "confdefs.h"
7782 /* System header to define __stub macros and hopefully few prototypes,
7783     which can conflict with char $ac_func(); below.  */
7784 #include <assert.h>
7785 /* Override any gcc2 internal prototype to avoid an error.  */
7786 /* We use char because int might match the return type of a gcc2
7787     builtin and then its argument prototype would still apply.  */
7788 char $ac_func();
7789
7790 int main() {
7791
7792 /* The GNU C library defines this for functions which it implements
7793     to always fail with ENOSYS.  Some functions are actually named
7794     something starting with __ and the normal name is an alias.  */
7795 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7796 choke me
7797 #else
7798 $ac_func();
7799 #endif
7800
7801 ; return 0; }
7802 EOF
7803 if { (eval echo configure:7804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7804   rm -rf conftest*
7805   eval "ac_cv_func_$ac_func=yes"
7806 else
7807   echo "configure: failed program was:" >&5
7808   cat conftest.$ac_ext >&5
7809   rm -rf conftest*
7810   eval "ac_cv_func_$ac_func=no"
7811 fi
7812 rm -f conftest*
7813 fi
7814
7815 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7816   echo "$ac_t""yes" 1>&6
7817     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7818   cat >> confdefs.h <<EOF
7819 #define $ac_tr_func 1
7820 EOF
7821  
7822 else
7823   echo "$ac_t""no" 1>&6
7824 fi
7825 done
7826  ;;
7827   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7828 echo "configure:7829: checking for getspnam in -lsec" >&5
7829 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7830 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7831   echo $ac_n "(cached) $ac_c" 1>&6
7832 else
7833   ac_save_LIBS="$LIBS"
7834 LIBS="-lsec  $LIBS"
7835 cat > conftest.$ac_ext <<EOF
7836 #line 7837 "configure"
7837 #include "confdefs.h"
7838 /* Override any gcc2 internal prototype to avoid an error.  */
7839 /* We use char because int might match the return type of a gcc2
7840     builtin and then its argument prototype would still apply.  */
7841 char getspnam();
7842
7843 int main() {
7844 getspnam()
7845 ; return 0; }
7846 EOF
7847 if { (eval echo configure:7848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7848   rm -rf conftest*
7849   eval "ac_cv_lib_$ac_lib_var=yes"
7850 else
7851   echo "configure: failed program was:" >&5
7852   cat conftest.$ac_ext >&5
7853   rm -rf conftest*
7854   eval "ac_cv_lib_$ac_lib_var=no"
7855 fi
7856 rm -f conftest*
7857 LIBS="$ac_save_LIBS"
7858
7859 fi
7860 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7861   echo "$ac_t""yes" 1>&6
7862     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7863     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7864   cat >> confdefs.h <<EOF
7865 #define $ac_tr_lib 1
7866 EOF
7867
7868   LIBS="-lsec $LIBS"
7869
7870 else
7871   echo "$ac_t""no" 1>&6
7872 fi
7873  
7874      for ac_func in getspnam
7875 do
7876 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7877 echo "configure:7878: checking for $ac_func" >&5
7878 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7879   echo $ac_n "(cached) $ac_c" 1>&6
7880 else
7881   cat > conftest.$ac_ext <<EOF
7882 #line 7883 "configure"
7883 #include "confdefs.h"
7884 /* System header to define __stub macros and hopefully few prototypes,
7885     which can conflict with char $ac_func(); below.  */
7886 #include <assert.h>
7887 /* Override any gcc2 internal prototype to avoid an error.  */
7888 /* We use char because int might match the return type of a gcc2
7889     builtin and then its argument prototype would still apply.  */
7890 char $ac_func();
7891
7892 int main() {
7893
7894 /* The GNU C library defines this for functions which it implements
7895     to always fail with ENOSYS.  Some functions are actually named
7896     something starting with __ and the normal name is an alias.  */
7897 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7898 choke me
7899 #else
7900 $ac_func();
7901 #endif
7902
7903 ; return 0; }
7904 EOF
7905 if { (eval echo configure:7906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7906   rm -rf conftest*
7907   eval "ac_cv_func_$ac_func=yes"
7908 else
7909   echo "configure: failed program was:" >&5
7910   cat conftest.$ac_ext >&5
7911   rm -rf conftest*
7912   eval "ac_cv_func_$ac_func=no"
7913 fi
7914 rm -f conftest*
7915 fi
7916
7917 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7918   echo "$ac_t""yes" 1>&6
7919     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7920   cat >> confdefs.h <<EOF
7921 #define $ac_tr_func 1
7922 EOF
7923  
7924 else
7925   echo "$ac_t""no" 1>&6
7926 fi
7927 done
7928
7929   ;;
7930   esac
7931
7932
7933 case "$LIBS" in
7934   *-lsecurity*) for ac_func in bigcrypt
7935 do
7936 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7937 echo "configure:7938: checking for $ac_func" >&5
7938 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7939   echo $ac_n "(cached) $ac_c" 1>&6
7940 else
7941   cat > conftest.$ac_ext <<EOF
7942 #line 7943 "configure"
7943 #include "confdefs.h"
7944 /* System header to define __stub macros and hopefully few prototypes,
7945     which can conflict with char $ac_func(); below.  */
7946 #include <assert.h>
7947 /* Override any gcc2 internal prototype to avoid an error.  */
7948 /* We use char because int might match the return type of a gcc2
7949     builtin and then its argument prototype would still apply.  */
7950 char $ac_func();
7951
7952 int main() {
7953
7954 /* The GNU C library defines this for functions which it implements
7955     to always fail with ENOSYS.  Some functions are actually named
7956     something starting with __ and the normal name is an alias.  */
7957 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7958 choke me
7959 #else
7960 $ac_func();
7961 #endif
7962
7963 ; return 0; }
7964 EOF
7965 if { (eval echo configure:7966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7966   rm -rf conftest*
7967   eval "ac_cv_func_$ac_func=yes"
7968 else
7969   echo "configure: failed program was:" >&5
7970   cat conftest.$ac_ext >&5
7971   rm -rf conftest*
7972   eval "ac_cv_func_$ac_func=no"
7973 fi
7974 rm -f conftest*
7975 fi
7976
7977 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7978   echo "$ac_t""yes" 1>&6
7979     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7980   cat >> confdefs.h <<EOF
7981 #define $ac_tr_func 1
7982 EOF
7983  
7984 else
7985   echo "$ac_t""no" 1>&6
7986 fi
7987 done
7988  ;;
7989   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
7990 echo "configure:7991: checking for bigcrypt in -lsecurity" >&5
7991 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
7992 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7993   echo $ac_n "(cached) $ac_c" 1>&6
7994 else
7995   ac_save_LIBS="$LIBS"
7996 LIBS="-lsecurity  $LIBS"
7997 cat > conftest.$ac_ext <<EOF
7998 #line 7999 "configure"
7999 #include "confdefs.h"
8000 /* Override any gcc2 internal prototype to avoid an error.  */
8001 /* We use char because int might match the return type of a gcc2
8002     builtin and then its argument prototype would still apply.  */
8003 char bigcrypt();
8004
8005 int main() {
8006 bigcrypt()
8007 ; return 0; }
8008 EOF
8009 if { (eval echo configure:8010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8010   rm -rf conftest*
8011   eval "ac_cv_lib_$ac_lib_var=yes"
8012 else
8013   echo "configure: failed program was:" >&5
8014   cat conftest.$ac_ext >&5
8015   rm -rf conftest*
8016   eval "ac_cv_lib_$ac_lib_var=no"
8017 fi
8018 rm -f conftest*
8019 LIBS="$ac_save_LIBS"
8020
8021 fi
8022 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8023   echo "$ac_t""yes" 1>&6
8024     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8025     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8026   cat >> confdefs.h <<EOF
8027 #define $ac_tr_lib 1
8028 EOF
8029
8030   LIBS="-lsecurity $LIBS"
8031
8032 else
8033   echo "$ac_t""no" 1>&6
8034 fi
8035  
8036      for ac_func in bigcrypt
8037 do
8038 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8039 echo "configure:8040: checking for $ac_func" >&5
8040 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8041   echo $ac_n "(cached) $ac_c" 1>&6
8042 else
8043   cat > conftest.$ac_ext <<EOF
8044 #line 8045 "configure"
8045 #include "confdefs.h"
8046 /* System header to define __stub macros and hopefully few prototypes,
8047     which can conflict with char $ac_func(); below.  */
8048 #include <assert.h>
8049 /* Override any gcc2 internal prototype to avoid an error.  */
8050 /* We use char because int might match the return type of a gcc2
8051     builtin and then its argument prototype would still apply.  */
8052 char $ac_func();
8053
8054 int main() {
8055
8056 /* The GNU C library defines this for functions which it implements
8057     to always fail with ENOSYS.  Some functions are actually named
8058     something starting with __ and the normal name is an alias.  */
8059 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8060 choke me
8061 #else
8062 $ac_func();
8063 #endif
8064
8065 ; return 0; }
8066 EOF
8067 if { (eval echo configure:8068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8068   rm -rf conftest*
8069   eval "ac_cv_func_$ac_func=yes"
8070 else
8071   echo "configure: failed program was:" >&5
8072   cat conftest.$ac_ext >&5
8073   rm -rf conftest*
8074   eval "ac_cv_func_$ac_func=no"
8075 fi
8076 rm -f conftest*
8077 fi
8078
8079 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8080   echo "$ac_t""yes" 1>&6
8081     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8082   cat >> confdefs.h <<EOF
8083 #define $ac_tr_func 1
8084 EOF
8085  
8086 else
8087   echo "$ac_t""no" 1>&6
8088 fi
8089 done
8090
8091   ;;
8092   esac
8093
8094 case "$LIBS" in
8095   *-lsec*) for ac_func in bigcrypt
8096 do
8097 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8098 echo "configure:8099: checking for $ac_func" >&5
8099 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8100   echo $ac_n "(cached) $ac_c" 1>&6
8101 else
8102   cat > conftest.$ac_ext <<EOF
8103 #line 8104 "configure"
8104 #include "confdefs.h"
8105 /* System header to define __stub macros and hopefully few prototypes,
8106     which can conflict with char $ac_func(); below.  */
8107 #include <assert.h>
8108 /* Override any gcc2 internal prototype to avoid an error.  */
8109 /* We use char because int might match the return type of a gcc2
8110     builtin and then its argument prototype would still apply.  */
8111 char $ac_func();
8112
8113 int main() {
8114
8115 /* The GNU C library defines this for functions which it implements
8116     to always fail with ENOSYS.  Some functions are actually named
8117     something starting with __ and the normal name is an alias.  */
8118 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8119 choke me
8120 #else
8121 $ac_func();
8122 #endif
8123
8124 ; return 0; }
8125 EOF
8126 if { (eval echo configure:8127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8127   rm -rf conftest*
8128   eval "ac_cv_func_$ac_func=yes"
8129 else
8130   echo "configure: failed program was:" >&5
8131   cat conftest.$ac_ext >&5
8132   rm -rf conftest*
8133   eval "ac_cv_func_$ac_func=no"
8134 fi
8135 rm -f conftest*
8136 fi
8137
8138 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8139   echo "$ac_t""yes" 1>&6
8140     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8141   cat >> confdefs.h <<EOF
8142 #define $ac_tr_func 1
8143 EOF
8144  
8145 else
8146   echo "$ac_t""no" 1>&6
8147 fi
8148 done
8149  ;;
8150   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8151 echo "configure:8152: checking for bigcrypt in -lsec" >&5
8152 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8153 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8154   echo $ac_n "(cached) $ac_c" 1>&6
8155 else
8156   ac_save_LIBS="$LIBS"
8157 LIBS="-lsec  $LIBS"
8158 cat > conftest.$ac_ext <<EOF
8159 #line 8160 "configure"
8160 #include "confdefs.h"
8161 /* Override any gcc2 internal prototype to avoid an error.  */
8162 /* We use char because int might match the return type of a gcc2
8163     builtin and then its argument prototype would still apply.  */
8164 char bigcrypt();
8165
8166 int main() {
8167 bigcrypt()
8168 ; return 0; }
8169 EOF
8170 if { (eval echo configure:8171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8171   rm -rf conftest*
8172   eval "ac_cv_lib_$ac_lib_var=yes"
8173 else
8174   echo "configure: failed program was:" >&5
8175   cat conftest.$ac_ext >&5
8176   rm -rf conftest*
8177   eval "ac_cv_lib_$ac_lib_var=no"
8178 fi
8179 rm -f conftest*
8180 LIBS="$ac_save_LIBS"
8181
8182 fi
8183 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8184   echo "$ac_t""yes" 1>&6
8185     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8186     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8187   cat >> confdefs.h <<EOF
8188 #define $ac_tr_lib 1
8189 EOF
8190
8191   LIBS="-lsec $LIBS"
8192
8193 else
8194   echo "$ac_t""no" 1>&6
8195 fi
8196  
8197      for ac_func in bigcrypt
8198 do
8199 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8200 echo "configure:8201: checking for $ac_func" >&5
8201 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8202   echo $ac_n "(cached) $ac_c" 1>&6
8203 else
8204   cat > conftest.$ac_ext <<EOF
8205 #line 8206 "configure"
8206 #include "confdefs.h"
8207 /* System header to define __stub macros and hopefully few prototypes,
8208     which can conflict with char $ac_func(); below.  */
8209 #include <assert.h>
8210 /* Override any gcc2 internal prototype to avoid an error.  */
8211 /* We use char because int might match the return type of a gcc2
8212     builtin and then its argument prototype would still apply.  */
8213 char $ac_func();
8214
8215 int main() {
8216
8217 /* The GNU C library defines this for functions which it implements
8218     to always fail with ENOSYS.  Some functions are actually named
8219     something starting with __ and the normal name is an alias.  */
8220 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8221 choke me
8222 #else
8223 $ac_func();
8224 #endif
8225
8226 ; return 0; }
8227 EOF
8228 if { (eval echo configure:8229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8229   rm -rf conftest*
8230   eval "ac_cv_func_$ac_func=yes"
8231 else
8232   echo "configure: failed program was:" >&5
8233   cat conftest.$ac_ext >&5
8234   rm -rf conftest*
8235   eval "ac_cv_func_$ac_func=no"
8236 fi
8237 rm -f conftest*
8238 fi
8239
8240 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8241   echo "$ac_t""yes" 1>&6
8242     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8243   cat >> confdefs.h <<EOF
8244 #define $ac_tr_func 1
8245 EOF
8246  
8247 else
8248   echo "$ac_t""no" 1>&6
8249 fi
8250 done
8251
8252   ;;
8253   esac
8254
8255
8256 case "$LIBS" in
8257   *-lsecurity*) for ac_func in getprpwnam
8258 do
8259 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8260 echo "configure:8261: checking for $ac_func" >&5
8261 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8262   echo $ac_n "(cached) $ac_c" 1>&6
8263 else
8264   cat > conftest.$ac_ext <<EOF
8265 #line 8266 "configure"
8266 #include "confdefs.h"
8267 /* System header to define __stub macros and hopefully few prototypes,
8268     which can conflict with char $ac_func(); below.  */
8269 #include <assert.h>
8270 /* Override any gcc2 internal prototype to avoid an error.  */
8271 /* We use char because int might match the return type of a gcc2
8272     builtin and then its argument prototype would still apply.  */
8273 char $ac_func();
8274
8275 int main() {
8276
8277 /* The GNU C library defines this for functions which it implements
8278     to always fail with ENOSYS.  Some functions are actually named
8279     something starting with __ and the normal name is an alias.  */
8280 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8281 choke me
8282 #else
8283 $ac_func();
8284 #endif
8285
8286 ; return 0; }
8287 EOF
8288 if { (eval echo configure:8289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8289   rm -rf conftest*
8290   eval "ac_cv_func_$ac_func=yes"
8291 else
8292   echo "configure: failed program was:" >&5
8293   cat conftest.$ac_ext >&5
8294   rm -rf conftest*
8295   eval "ac_cv_func_$ac_func=no"
8296 fi
8297 rm -f conftest*
8298 fi
8299
8300 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8301   echo "$ac_t""yes" 1>&6
8302     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8303   cat >> confdefs.h <<EOF
8304 #define $ac_tr_func 1
8305 EOF
8306  
8307 else
8308   echo "$ac_t""no" 1>&6
8309 fi
8310 done
8311  ;;
8312   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8313 echo "configure:8314: checking for getprpwnam in -lsecurity" >&5
8314 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8315 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8316   echo $ac_n "(cached) $ac_c" 1>&6
8317 else
8318   ac_save_LIBS="$LIBS"
8319 LIBS="-lsecurity  $LIBS"
8320 cat > conftest.$ac_ext <<EOF
8321 #line 8322 "configure"
8322 #include "confdefs.h"
8323 /* Override any gcc2 internal prototype to avoid an error.  */
8324 /* We use char because int might match the return type of a gcc2
8325     builtin and then its argument prototype would still apply.  */
8326 char getprpwnam();
8327
8328 int main() {
8329 getprpwnam()
8330 ; return 0; }
8331 EOF
8332 if { (eval echo configure:8333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8333   rm -rf conftest*
8334   eval "ac_cv_lib_$ac_lib_var=yes"
8335 else
8336   echo "configure: failed program was:" >&5
8337   cat conftest.$ac_ext >&5
8338   rm -rf conftest*
8339   eval "ac_cv_lib_$ac_lib_var=no"
8340 fi
8341 rm -f conftest*
8342 LIBS="$ac_save_LIBS"
8343
8344 fi
8345 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8346   echo "$ac_t""yes" 1>&6
8347     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8348     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8349   cat >> confdefs.h <<EOF
8350 #define $ac_tr_lib 1
8351 EOF
8352
8353   LIBS="-lsecurity $LIBS"
8354
8355 else
8356   echo "$ac_t""no" 1>&6
8357 fi
8358  
8359      for ac_func in getprpwnam
8360 do
8361 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8362 echo "configure:8363: checking for $ac_func" >&5
8363 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8364   echo $ac_n "(cached) $ac_c" 1>&6
8365 else
8366   cat > conftest.$ac_ext <<EOF
8367 #line 8368 "configure"
8368 #include "confdefs.h"
8369 /* System header to define __stub macros and hopefully few prototypes,
8370     which can conflict with char $ac_func(); below.  */
8371 #include <assert.h>
8372 /* Override any gcc2 internal prototype to avoid an error.  */
8373 /* We use char because int might match the return type of a gcc2
8374     builtin and then its argument prototype would still apply.  */
8375 char $ac_func();
8376
8377 int main() {
8378
8379 /* The GNU C library defines this for functions which it implements
8380     to always fail with ENOSYS.  Some functions are actually named
8381     something starting with __ and the normal name is an alias.  */
8382 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8383 choke me
8384 #else
8385 $ac_func();
8386 #endif
8387
8388 ; return 0; }
8389 EOF
8390 if { (eval echo configure:8391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8391   rm -rf conftest*
8392   eval "ac_cv_func_$ac_func=yes"
8393 else
8394   echo "configure: failed program was:" >&5
8395   cat conftest.$ac_ext >&5
8396   rm -rf conftest*
8397   eval "ac_cv_func_$ac_func=no"
8398 fi
8399 rm -f conftest*
8400 fi
8401
8402 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8403   echo "$ac_t""yes" 1>&6
8404     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8405   cat >> confdefs.h <<EOF
8406 #define $ac_tr_func 1
8407 EOF
8408  
8409 else
8410   echo "$ac_t""no" 1>&6
8411 fi
8412 done
8413
8414   ;;
8415   esac
8416
8417 case "$LIBS" in
8418   *-lsec*) for ac_func in getprpwnam
8419 do
8420 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8421 echo "configure:8422: checking for $ac_func" >&5
8422 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8423   echo $ac_n "(cached) $ac_c" 1>&6
8424 else
8425   cat > conftest.$ac_ext <<EOF
8426 #line 8427 "configure"
8427 #include "confdefs.h"
8428 /* System header to define __stub macros and hopefully few prototypes,
8429     which can conflict with char $ac_func(); below.  */
8430 #include <assert.h>
8431 /* Override any gcc2 internal prototype to avoid an error.  */
8432 /* We use char because int might match the return type of a gcc2
8433     builtin and then its argument prototype would still apply.  */
8434 char $ac_func();
8435
8436 int main() {
8437
8438 /* The GNU C library defines this for functions which it implements
8439     to always fail with ENOSYS.  Some functions are actually named
8440     something starting with __ and the normal name is an alias.  */
8441 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8442 choke me
8443 #else
8444 $ac_func();
8445 #endif
8446
8447 ; return 0; }
8448 EOF
8449 if { (eval echo configure:8450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8450   rm -rf conftest*
8451   eval "ac_cv_func_$ac_func=yes"
8452 else
8453   echo "configure: failed program was:" >&5
8454   cat conftest.$ac_ext >&5
8455   rm -rf conftest*
8456   eval "ac_cv_func_$ac_func=no"
8457 fi
8458 rm -f conftest*
8459 fi
8460
8461 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8462   echo "$ac_t""yes" 1>&6
8463     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8464   cat >> confdefs.h <<EOF
8465 #define $ac_tr_func 1
8466 EOF
8467  
8468 else
8469   echo "$ac_t""no" 1>&6
8470 fi
8471 done
8472  ;;
8473   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8474 echo "configure:8475: checking for getprpwnam in -lsec" >&5
8475 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8476 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8477   echo $ac_n "(cached) $ac_c" 1>&6
8478 else
8479   ac_save_LIBS="$LIBS"
8480 LIBS="-lsec  $LIBS"
8481 cat > conftest.$ac_ext <<EOF
8482 #line 8483 "configure"
8483 #include "confdefs.h"
8484 /* Override any gcc2 internal prototype to avoid an error.  */
8485 /* We use char because int might match the return type of a gcc2
8486     builtin and then its argument prototype would still apply.  */
8487 char getprpwnam();
8488
8489 int main() {
8490 getprpwnam()
8491 ; return 0; }
8492 EOF
8493 if { (eval echo configure:8494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8494   rm -rf conftest*
8495   eval "ac_cv_lib_$ac_lib_var=yes"
8496 else
8497   echo "configure: failed program was:" >&5
8498   cat conftest.$ac_ext >&5
8499   rm -rf conftest*
8500   eval "ac_cv_lib_$ac_lib_var=no"
8501 fi
8502 rm -f conftest*
8503 LIBS="$ac_save_LIBS"
8504
8505 fi
8506 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8507   echo "$ac_t""yes" 1>&6
8508     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8509     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8510   cat >> confdefs.h <<EOF
8511 #define $ac_tr_lib 1
8512 EOF
8513
8514   LIBS="-lsec $LIBS"
8515
8516 else
8517   echo "$ac_t""no" 1>&6
8518 fi
8519  
8520      for ac_func in getprpwnam
8521 do
8522 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8523 echo "configure:8524: checking for $ac_func" >&5
8524 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8525   echo $ac_n "(cached) $ac_c" 1>&6
8526 else
8527   cat > conftest.$ac_ext <<EOF
8528 #line 8529 "configure"
8529 #include "confdefs.h"
8530 /* System header to define __stub macros and hopefully few prototypes,
8531     which can conflict with char $ac_func(); below.  */
8532 #include <assert.h>
8533 /* Override any gcc2 internal prototype to avoid an error.  */
8534 /* We use char because int might match the return type of a gcc2
8535     builtin and then its argument prototype would still apply.  */
8536 char $ac_func();
8537
8538 int main() {
8539
8540 /* The GNU C library defines this for functions which it implements
8541     to always fail with ENOSYS.  Some functions are actually named
8542     something starting with __ and the normal name is an alias.  */
8543 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8544 choke me
8545 #else
8546 $ac_func();
8547 #endif
8548
8549 ; return 0; }
8550 EOF
8551 if { (eval echo configure:8552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8552   rm -rf conftest*
8553   eval "ac_cv_func_$ac_func=yes"
8554 else
8555   echo "configure: failed program was:" >&5
8556   cat conftest.$ac_ext >&5
8557   rm -rf conftest*
8558   eval "ac_cv_func_$ac_func=no"
8559 fi
8560 rm -f conftest*
8561 fi
8562
8563 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8564   echo "$ac_t""yes" 1>&6
8565     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8566   cat >> confdefs.h <<EOF
8567 #define $ac_tr_func 1
8568 EOF
8569  
8570 else
8571   echo "$ac_t""no" 1>&6
8572 fi
8573 done
8574
8575   ;;
8576   esac
8577
8578
8579 # this bit needs to be modified for each OS that is suported by
8580 # smbwrapper. You need to specify how to created a shared library and
8581 # how to compile C code to produce PIC object files
8582
8583 # these are the defaults, good for lots of systems
8584 HOST_OS="$host_os"
8585 LDSHFLAGS="-shared"
8586 PICFLAG=""
8587 SHLIBEXT="so"
8588
8589 # and these are for particular systems
8590 case "$host_os" in
8591                 *linux*)   cat >> confdefs.h <<\EOF
8592 #define LINUX 1
8593 EOF
8594 ;;
8595                 *solaris*) cat >> confdefs.h <<\EOF
8596 #define SUNOS5 1
8597 EOF
8598
8599                                         LDSHFLAGS="-G"
8600                 ;;
8601                 *sunos*) cat >> confdefs.h <<\EOF
8602 #define SUNOS4 1
8603 EOF
8604
8605                                         LDSHFLAGS=""
8606                 ;;
8607                 *bsd*) LDSHFLAGS="-shared -Bshareable"
8608                 ;;
8609                 *irix*) cat >> confdefs.h <<\EOF
8610 #define IRIX 1
8611 EOF
8612
8613                         case "$host_os" in
8614                         *irix6*) cat >> confdefs.h <<\EOF
8615 #define IRIX6 1
8616 EOF
8617
8618                         ;;
8619                         esac
8620                         ATTEMPT_WRAP32_BUILD=yes
8621                 ;;
8622                 *aix*) cat >> confdefs.h <<\EOF
8623 #define AIX 1
8624 EOF
8625 ;;
8626                 *hpux*) cat >> confdefs.h <<\EOF
8627 #define HPUX 1
8628 EOF
8629
8630                         SHLIBEXT="sl"
8631                         # Use special PIC flags for the native HP-UX compiler.
8632                         if test $ac_cv_prog_cc_Ae = yes; then
8633                                 LDSHFLAGS="-b"
8634                                 PICFLAG="+z"
8635                         fi
8636                 ;;
8637                 *qnx*) cat >> confdefs.h <<\EOF
8638 #define QNX 1
8639 EOF
8640 ;;
8641                 *osf*) cat >> confdefs.h <<\EOF
8642 #define OSF1 1
8643 EOF
8644 ;;
8645                 *sco*) cat >> confdefs.h <<\EOF
8646 #define SCO 1
8647 EOF
8648 ;;
8649                 *next2*) cat >> confdefs.h <<\EOF
8650 #define NEXT2 1
8651 EOF
8652 ;;
8653                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8654 set dummy groff; ac_word=$2
8655 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8656 echo "configure:8657: checking for $ac_word" >&5
8657 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8658   echo $ac_n "(cached) $ac_c" 1>&6
8659 else
8660   if test -n "$ROFF"; then
8661   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8662 else
8663   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8664   ac_dummy="$PATH"
8665   for ac_dir in $ac_dummy; do
8666     test -z "$ac_dir" && ac_dir=.
8667     if test -f $ac_dir/$ac_word; then
8668       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8669       break
8670     fi
8671   done
8672   IFS="$ac_save_ifs"
8673 fi
8674 fi
8675 ROFF="$ac_cv_prog_ROFF"
8676 if test -n "$ROFF"; then
8677   echo "$ac_t""$ROFF" 1>&6
8678 else
8679   echo "$ac_t""no" 1>&6
8680 fi
8681 ;;
8682                 *sysv4*)
8683                         case "$host" in
8684                                 *-univel-*)     if  test "$GCC" != yes ; then
8685                                                                         cat >> confdefs.h <<\EOF
8686 #define HAVE_MEMSET 1
8687 EOF
8688
8689                                                                 fi
8690                                                                 LDSHFLAGS="-G"
8691                                 ;;
8692                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
8693 #define RELIANTUNIX 1
8694 EOF
8695 ;;
8696                         esac
8697                         ;;
8698                 *sysv5*)
8699                         if  test "$GCC" != yes ; then
8700                                 cat >> confdefs.h <<\EOF
8701 #define HAVE_MEMSET 1
8702 EOF
8703
8704                         fi
8705                         LDSHFLAGS="-G"
8706                         ;;
8707 esac
8708
8709 # try to work out how to produce PIC code with this compiler
8710 echo $ac_n "checking whether ${CC-cc} accepts -fPIC""... $ac_c" 1>&6
8711 echo "configure:8712: checking whether ${CC-cc} accepts -fPIC" >&5
8712 if eval "test \"`echo '$''{'ac_cv_prog_cc_fPIC'+set}'`\" = set"; then
8713   echo $ac_n "(cached) $ac_c" 1>&6
8714 else
8715   echo 'void f(){}' > conftest.c
8716 if test -z "`${CC-cc} -fPIC -c conftest.c 2>&1`"; then
8717   ac_cv_prog_cc_fPIC=yes
8718 else
8719   ac_cv_prog_cc_fPIC=no
8720 fi
8721 rm -f conftest*
8722
8723 fi
8724
8725 echo "$ac_t""$ac_cv_prog_cc_fPIC" 1>&6
8726 if test $ac_cv_prog_cc_fPIC = yes; then
8727     PICFLAG="-fPIC";
8728 fi
8729 if test x$PICFLAG = x; then
8730   echo $ac_n "checking whether ${CC-cc} accepts -KPIC""... $ac_c" 1>&6
8731 echo "configure:8732: checking whether ${CC-cc} accepts -KPIC" >&5
8732 if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then
8733   echo $ac_n "(cached) $ac_c" 1>&6
8734 else
8735   echo 'void f(){}' > conftest.c
8736 if test -z "`${CC-cc} -KPIC -c conftest.c 2>&1`"; then
8737   ac_cv_prog_cc_KPIC=yes
8738 else
8739   ac_cv_prog_cc_KPIC=no
8740 fi
8741 rm -f conftest*
8742
8743 fi
8744
8745 echo "$ac_t""$ac_cv_prog_cc_KPIC" 1>&6
8746   if test $ac_cv_prog_cc_KPIC = yes; then
8747     PICFLAG="-KPIC";
8748   fi
8749 fi
8750 if test x$PICFLAG = x; then
8751   echo $ac_n "checking whether ${CC-cc} accepts -Kpic""... $ac_c" 1>&6
8752 echo "configure:8753: checking whether ${CC-cc} accepts -Kpic" >&5
8753 if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then
8754   echo $ac_n "(cached) $ac_c" 1>&6
8755 else
8756   echo 'void f(){}' > conftest.c
8757 if test -z "`${CC-cc} -Kpic -c conftest.c 2>&1`"; then
8758   ac_cv_prog_cc_Kpic=yes
8759 else
8760   ac_cv_prog_cc_Kpic=no
8761 fi
8762 rm -f conftest*
8763
8764 fi
8765
8766 echo "$ac_t""$ac_cv_prog_cc_Kpic" 1>&6
8767   if test $ac_cv_prog_cc_Kpic = yes; then
8768     PICFLAG="-Kpic";
8769   fi
8770 fi
8771
8772 ################
8773
8774 echo $ac_n "checking for long long""... $ac_c" 1>&6
8775 echo "configure:8776: checking for long long" >&5
8776 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8777   echo $ac_n "(cached) $ac_c" 1>&6
8778 else
8779   
8780 if test "$cross_compiling" = yes; then
8781   samba_cv_have_longlong=cross
8782 else
8783   cat > conftest.$ac_ext <<EOF
8784 #line 8785 "configure"
8785 #include "confdefs.h"
8786 #include <stdio.h>
8787 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8788 EOF
8789 if { (eval echo configure:8790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8790 then
8791   samba_cv_have_longlong=yes
8792 else
8793   echo "configure: failed program was:" >&5
8794   cat conftest.$ac_ext >&5
8795   rm -fr conftest*
8796   samba_cv_have_longlong=no
8797 fi
8798 rm -fr conftest*
8799 fi
8800
8801 fi
8802
8803 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8804 if test x"$samba_cv_have_longlong" = x"yes"; then
8805     cat >> confdefs.h <<\EOF
8806 #define HAVE_LONGLONG 1
8807 EOF
8808
8809 fi
8810
8811 #
8812 # Check if the compiler supports the LL prefix on long long integers.
8813 # AIX needs this.
8814
8815 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8816 echo "configure:8817: checking for LL suffix on long long integers" >&5
8817 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8818   echo $ac_n "(cached) $ac_c" 1>&6
8819 else
8820   
8821     cat > conftest.$ac_ext <<EOF
8822 #line 8823 "configure"
8823 #include "confdefs.h"
8824 #include <stdio.h>
8825 int main() {
8826 long long i = 0x8000000000LL
8827 ; return 0; }
8828 EOF
8829 if { (eval echo configure:8830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8830   rm -rf conftest*
8831   samba_cv_compiler_supports_ll=yes
8832 else
8833   echo "configure: failed program was:" >&5
8834   cat conftest.$ac_ext >&5
8835   rm -rf conftest*
8836   samba_cv_compiler_supports_ll=no
8837 fi
8838 rm -f conftest*
8839 fi
8840
8841 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8842 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8843    cat >> confdefs.h <<\EOF
8844 #define COMPILER_SUPPORTS_LL 1
8845 EOF
8846
8847 fi
8848
8849   
8850 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8851 echo "configure:8852: checking for 64 bit off_t" >&5
8852 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8853   echo $ac_n "(cached) $ac_c" 1>&6
8854 else
8855   
8856 if test "$cross_compiling" = yes; then
8857   samba_cv_SIZEOF_OFF_T=cross
8858 else
8859   cat > conftest.$ac_ext <<EOF
8860 #line 8861 "configure"
8861 #include "confdefs.h"
8862 #include <stdio.h>
8863 #include <sys/stat.h>
8864 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8865 EOF
8866 if { (eval echo configure:8867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8867 then
8868   samba_cv_SIZEOF_OFF_T=yes
8869 else
8870   echo "configure: failed program was:" >&5
8871   cat conftest.$ac_ext >&5
8872   rm -fr conftest*
8873   samba_cv_SIZEOF_OFF_T=no
8874 fi
8875 rm -fr conftest*
8876 fi
8877
8878 fi
8879
8880 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8881 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8882     cat >> confdefs.h <<\EOF
8883 #define SIZEOF_OFF_T 8
8884 EOF
8885
8886 fi
8887
8888 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8889 echo "configure:8890: checking for off64_t" >&5
8890 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8891   echo $ac_n "(cached) $ac_c" 1>&6
8892 else
8893   
8894 if test "$cross_compiling" = yes; then
8895   samba_cv_HAVE_OFF64_T=cross
8896 else
8897   cat > conftest.$ac_ext <<EOF
8898 #line 8899 "configure"
8899 #include "confdefs.h"
8900
8901 #if defined(HAVE_UNISTD_H)
8902 #include <unistd.h>
8903 #endif
8904 #include <stdio.h>
8905 #include <sys/stat.h>
8906 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8907 EOF
8908 if { (eval echo configure:8909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8909 then
8910   samba_cv_HAVE_OFF64_T=yes
8911 else
8912   echo "configure: failed program was:" >&5
8913   cat conftest.$ac_ext >&5
8914   rm -fr conftest*
8915   samba_cv_HAVE_OFF64_T=no
8916 fi
8917 rm -fr conftest*
8918 fi
8919
8920 fi
8921
8922 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8923 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8924     cat >> confdefs.h <<\EOF
8925 #define HAVE_OFF64_T 1
8926 EOF
8927
8928 fi
8929
8930 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8931 echo "configure:8932: checking for 64 bit ino_t" >&5
8932 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8933   echo $ac_n "(cached) $ac_c" 1>&6
8934 else
8935   
8936 if test "$cross_compiling" = yes; then
8937   samba_cv_SIZEOF_INO_T=cross
8938 else
8939   cat > conftest.$ac_ext <<EOF
8940 #line 8941 "configure"
8941 #include "confdefs.h"
8942 #include <stdio.h>
8943 #include <sys/stat.h>
8944 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8945 EOF
8946 if { (eval echo configure:8947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8947 then
8948   samba_cv_SIZEOF_INO_T=yes
8949 else
8950   echo "configure: failed program was:" >&5
8951   cat conftest.$ac_ext >&5
8952   rm -fr conftest*
8953   samba_cv_SIZEOF_INO_T=no
8954 fi
8955 rm -fr conftest*
8956 fi
8957
8958 fi
8959
8960 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8961 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8962     cat >> confdefs.h <<\EOF
8963 #define SIZEOF_INO_T 8
8964 EOF
8965
8966 fi
8967
8968 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
8969 echo "configure:8970: checking for ino64_t" >&5
8970 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
8971   echo $ac_n "(cached) $ac_c" 1>&6
8972 else
8973   
8974 if test "$cross_compiling" = yes; then
8975   samba_cv_HAVE_INO64_T=cross
8976 else
8977   cat > conftest.$ac_ext <<EOF
8978 #line 8979 "configure"
8979 #include "confdefs.h"
8980
8981 #if defined(HAVE_UNISTD_H)
8982 #include <unistd.h>
8983 #endif
8984 #include <stdio.h>
8985 #include <sys/stat.h>
8986 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8987 EOF
8988 if { (eval echo configure:8989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8989 then
8990   samba_cv_HAVE_INO64_T=yes
8991 else
8992   echo "configure: failed program was:" >&5
8993   cat conftest.$ac_ext >&5
8994   rm -fr conftest*
8995   samba_cv_HAVE_INO64_T=no
8996 fi
8997 rm -fr conftest*
8998 fi
8999
9000 fi
9001
9002 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9003 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9004     cat >> confdefs.h <<\EOF
9005 #define HAVE_INO64_T 1
9006 EOF
9007
9008 fi
9009
9010 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9011 echo "configure:9012: checking for struct dirent64" >&5
9012 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9013   echo $ac_n "(cached) $ac_c" 1>&6
9014 else
9015   
9016 cat > conftest.$ac_ext <<EOF
9017 #line 9018 "configure"
9018 #include "confdefs.h"
9019
9020 #if defined(HAVE_UNISTD_H)
9021 #include <unistd.h>
9022 #endif
9023 #include <sys/types.h>
9024 #include <dirent.h>
9025 int main() {
9026 struct dirent64 de;
9027 ; return 0; }
9028 EOF
9029 if { (eval echo configure:9030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9030   rm -rf conftest*
9031   samba_cv_HAVE_STRUCT_DIRENT64=yes
9032 else
9033   echo "configure: failed program was:" >&5
9034   cat conftest.$ac_ext >&5
9035   rm -rf conftest*
9036   samba_cv_HAVE_STRUCT_DIRENT64=no
9037 fi
9038 rm -f conftest*
9039 fi
9040
9041 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9042 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
9043     cat >> confdefs.h <<\EOF
9044 #define HAVE_STRUCT_DIRENT64 1
9045 EOF
9046
9047 fi
9048
9049 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9050 echo "configure:9051: checking for unsigned char" >&5
9051 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9052   echo $ac_n "(cached) $ac_c" 1>&6
9053 else
9054   
9055 if test "$cross_compiling" = yes; then
9056   samba_cv_HAVE_UNSIGNED_CHAR=cross
9057 else
9058   cat > conftest.$ac_ext <<EOF
9059 #line 9060 "configure"
9060 #include "confdefs.h"
9061 #include <stdio.h>
9062 main() { char c; c=250; exit((c > 0)?0:1); }
9063 EOF
9064 if { (eval echo configure:9065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9065 then
9066   samba_cv_HAVE_UNSIGNED_CHAR=yes
9067 else
9068   echo "configure: failed program was:" >&5
9069   cat conftest.$ac_ext >&5
9070   rm -fr conftest*
9071   samba_cv_HAVE_UNSIGNED_CHAR=no
9072 fi
9073 rm -fr conftest*
9074 fi
9075
9076 fi
9077
9078 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9079 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9080     cat >> confdefs.h <<\EOF
9081 #define HAVE_UNSIGNED_CHAR 1
9082 EOF
9083
9084 fi
9085
9086 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9087 echo "configure:9088: checking for sin_len in sock" >&5
9088 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9089   echo $ac_n "(cached) $ac_c" 1>&6
9090 else
9091   
9092 cat > conftest.$ac_ext <<EOF
9093 #line 9094 "configure"
9094 #include "confdefs.h"
9095 #include <sys/types.h>
9096 #include <sys/socket.h>
9097 #include <netinet/in.h>
9098 int main() {
9099 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9100 ; return 0; }
9101 EOF
9102 if { (eval echo configure:9103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9103   rm -rf conftest*
9104   samba_cv_HAVE_SOCK_SIN_LEN=yes
9105 else
9106   echo "configure: failed program was:" >&5
9107   cat conftest.$ac_ext >&5
9108   rm -rf conftest*
9109   samba_cv_HAVE_SOCK_SIN_LEN=no
9110 fi
9111 rm -f conftest*
9112 fi
9113
9114 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9115 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9116     cat >> confdefs.h <<\EOF
9117 #define HAVE_SOCK_SIN_LEN 1
9118 EOF
9119
9120 fi
9121
9122 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9123 echo "configure:9124: checking whether seekdir returns void" >&5
9124 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9125   echo $ac_n "(cached) $ac_c" 1>&6
9126 else
9127   
9128 cat > conftest.$ac_ext <<EOF
9129 #line 9130 "configure"
9130 #include "confdefs.h"
9131 #include <sys/types.h>
9132 #include <dirent.h>
9133 void seekdir(DIR *d, long loc) { return; }
9134 int main() {
9135 return 0;
9136 ; return 0; }
9137 EOF
9138 if { (eval echo configure:9139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9139   rm -rf conftest*
9140   samba_cv_SEEKDIR_RETURNS_VOID=yes
9141 else
9142   echo "configure: failed program was:" >&5
9143   cat conftest.$ac_ext >&5
9144   rm -rf conftest*
9145   samba_cv_SEEKDIR_RETURNS_VOID=no
9146 fi
9147 rm -f conftest*
9148 fi
9149
9150 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9151 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9152     cat >> confdefs.h <<\EOF
9153 #define SEEKDIR_RETURNS_VOID 1
9154 EOF
9155
9156 fi
9157
9158 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9159 echo "configure:9160: checking for __FILE__ macro" >&5
9160 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9161   echo $ac_n "(cached) $ac_c" 1>&6
9162 else
9163   
9164 cat > conftest.$ac_ext <<EOF
9165 #line 9166 "configure"
9166 #include "confdefs.h"
9167 #include <stdio.h>
9168 int main() {
9169 printf("%s\n", __FILE__);
9170 ; return 0; }
9171 EOF
9172 if { (eval echo configure:9173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9173   rm -rf conftest*
9174   samba_cv_HAVE_FILE_MACRO=yes
9175 else
9176   echo "configure: failed program was:" >&5
9177   cat conftest.$ac_ext >&5
9178   rm -rf conftest*
9179   samba_cv_HAVE_FILE_MACRO=no
9180 fi
9181 rm -f conftest*
9182 fi
9183
9184 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9185 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9186     cat >> confdefs.h <<\EOF
9187 #define HAVE_FILE_MACRO 1
9188 EOF
9189
9190 fi
9191
9192 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9193 echo "configure:9194: checking for __FUNCTION__ macro" >&5
9194 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9195   echo $ac_n "(cached) $ac_c" 1>&6
9196 else
9197   
9198 cat > conftest.$ac_ext <<EOF
9199 #line 9200 "configure"
9200 #include "confdefs.h"
9201 #include <stdio.h>
9202 int main() {
9203 printf("%s\n", __FUNCTION__);
9204 ; return 0; }
9205 EOF
9206 if { (eval echo configure:9207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9207   rm -rf conftest*
9208   samba_cv_HAVE_FUNCTION_MACRO=yes
9209 else
9210   echo "configure: failed program was:" >&5
9211   cat conftest.$ac_ext >&5
9212   rm -rf conftest*
9213   samba_cv_HAVE_FUNCTION_MACRO=no
9214 fi
9215 rm -f conftest*
9216 fi
9217
9218 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9219 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9220     cat >> confdefs.h <<\EOF
9221 #define HAVE_FUNCTION_MACRO 1
9222 EOF
9223
9224 fi
9225
9226 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9227 echo "configure:9228: checking if gettimeofday takes tz argument" >&5
9228 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9229   echo $ac_n "(cached) $ac_c" 1>&6
9230 else
9231   
9232 if test "$cross_compiling" = yes; then
9233   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9234 else
9235   cat > conftest.$ac_ext <<EOF
9236 #line 9237 "configure"
9237 #include "confdefs.h"
9238
9239 #include <sys/time.h>
9240 #include <unistd.h>
9241 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9242 EOF
9243 if { (eval echo configure:9244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9244 then
9245   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9246 else
9247   echo "configure: failed program was:" >&5
9248   cat conftest.$ac_ext >&5
9249   rm -fr conftest*
9250   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9251 fi
9252 rm -fr conftest*
9253 fi
9254
9255 fi
9256
9257 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9258 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9259     cat >> confdefs.h <<\EOF
9260 #define HAVE_GETTIMEOFDAY_TZ 1
9261 EOF
9262
9263 fi
9264
9265 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9266 echo "configure:9267: checking for C99 vsnprintf" >&5
9267 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9268   echo $ac_n "(cached) $ac_c" 1>&6
9269 else
9270   
9271 if test "$cross_compiling" = yes; then
9272   samba_cv_HAVE_C99_VSNPRINTF=cross
9273 else
9274   cat > conftest.$ac_ext <<EOF
9275 #line 9276 "configure"
9276 #include "confdefs.h"
9277
9278 #include <sys/types.h>
9279 #include <stdarg.h>
9280 void foo(const char *format, ...) { 
9281        va_list ap;
9282        int len;
9283        char buf[5];
9284
9285        va_start(ap, format);
9286        len = vsnprintf(0, 0, format, ap);
9287        va_end(ap);
9288        if (len != 5) exit(1);
9289
9290        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9291
9292        exit(0);
9293 }
9294 main() { foo("hello"); }
9295
9296 EOF
9297 if { (eval echo configure:9298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9298 then
9299   samba_cv_HAVE_C99_VSNPRINTF=yes
9300 else
9301   echo "configure: failed program was:" >&5
9302   cat conftest.$ac_ext >&5
9303   rm -fr conftest*
9304   samba_cv_HAVE_C99_VSNPRINTF=no
9305 fi
9306 rm -fr conftest*
9307 fi
9308
9309 fi
9310
9311 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9312 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9313     cat >> confdefs.h <<\EOF
9314 #define HAVE_C99_VSNPRINTF 1
9315 EOF
9316
9317 fi
9318
9319 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9320 echo "configure:9321: checking for broken readdir" >&5
9321 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9322   echo $ac_n "(cached) $ac_c" 1>&6
9323 else
9324   
9325 if test "$cross_compiling" = yes; then
9326   samba_cv_HAVE_BROKEN_READDIR=cross
9327 else
9328   cat > conftest.$ac_ext <<EOF
9329 #line 9330 "configure"
9330 #include "confdefs.h"
9331 #include <sys/types.h>
9332 #include <dirent.h>
9333 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9334 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9335 di->d_name[0] == 0) exit(0); exit(1);} 
9336 EOF
9337 if { (eval echo configure:9338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9338 then
9339   samba_cv_HAVE_BROKEN_READDIR=yes
9340 else
9341   echo "configure: failed program was:" >&5
9342   cat conftest.$ac_ext >&5
9343   rm -fr conftest*
9344   samba_cv_HAVE_BROKEN_READDIR=no
9345 fi
9346 rm -fr conftest*
9347 fi
9348
9349 fi
9350
9351 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9352 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9353     cat >> confdefs.h <<\EOF
9354 #define HAVE_BROKEN_READDIR 1
9355 EOF
9356
9357 fi
9358
9359 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9360 echo "configure:9361: checking for utimbuf" >&5
9361 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9362   echo $ac_n "(cached) $ac_c" 1>&6
9363 else
9364   
9365 cat > conftest.$ac_ext <<EOF
9366 #line 9367 "configure"
9367 #include "confdefs.h"
9368 #include <sys/types.h>
9369 #include <utime.h>
9370 int main() {
9371 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9372 ; return 0; }
9373 EOF
9374 if { (eval echo configure:9375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9375   rm -rf conftest*
9376   samba_cv_HAVE_UTIMBUF=yes
9377 else
9378   echo "configure: failed program was:" >&5
9379   cat conftest.$ac_ext >&5
9380   rm -rf conftest*
9381   samba_cv_HAVE_UTIMBUF=no
9382 fi
9383 rm -f conftest*
9384 fi
9385
9386 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9387 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9388     cat >> confdefs.h <<\EOF
9389 #define HAVE_UTIMBUF 1
9390 EOF
9391
9392 fi
9393
9394
9395 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9396 do
9397 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9398 echo "configure:9399: checking for $ac_func" >&5
9399 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9400   echo $ac_n "(cached) $ac_c" 1>&6
9401 else
9402   cat > conftest.$ac_ext <<EOF
9403 #line 9404 "configure"
9404 #include "confdefs.h"
9405 /* System header to define __stub macros and hopefully few prototypes,
9406     which can conflict with char $ac_func(); below.  */
9407 #include <assert.h>
9408 /* Override any gcc2 internal prototype to avoid an error.  */
9409 /* We use char because int might match the return type of a gcc2
9410     builtin and then its argument prototype would still apply.  */
9411 char $ac_func();
9412
9413 int main() {
9414
9415 /* The GNU C library defines this for functions which it implements
9416     to always fail with ENOSYS.  Some functions are actually named
9417     something starting with __ and the normal name is an alias.  */
9418 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9419 choke me
9420 #else
9421 $ac_func();
9422 #endif
9423
9424 ; return 0; }
9425 EOF
9426 if { (eval echo configure:9427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9427   rm -rf conftest*
9428   eval "ac_cv_func_$ac_func=yes"
9429 else
9430   echo "configure: failed program was:" >&5
9431   cat conftest.$ac_ext >&5
9432   rm -rf conftest*
9433   eval "ac_cv_func_$ac_func=no"
9434 fi
9435 rm -f conftest*
9436 fi
9437
9438 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9439   echo "$ac_t""yes" 1>&6
9440     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9441   cat >> confdefs.h <<EOF
9442 #define $ac_tr_func 1
9443 EOF
9444  
9445 else
9446   echo "$ac_t""no" 1>&6
9447 fi
9448 done
9449
9450
9451 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9452 echo "configure:9453: checking for ut_name in utmp" >&5
9453 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9454   echo $ac_n "(cached) $ac_c" 1>&6
9455 else
9456   
9457 cat > conftest.$ac_ext <<EOF
9458 #line 9459 "configure"
9459 #include "confdefs.h"
9460 #include <sys/types.h>
9461 #include <utmp.h>
9462 int main() {
9463 struct utmp ut;  ut.ut_name[0] = 'a';
9464 ; return 0; }
9465 EOF
9466 if { (eval echo configure:9467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9467   rm -rf conftest*
9468   samba_cv_HAVE_UT_UT_NAME=yes
9469 else
9470   echo "configure: failed program was:" >&5
9471   cat conftest.$ac_ext >&5
9472   rm -rf conftest*
9473   samba_cv_HAVE_UT_UT_NAME=no
9474 fi
9475 rm -f conftest*
9476 fi
9477
9478 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9479 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9480     cat >> confdefs.h <<\EOF
9481 #define HAVE_UT_UT_NAME 1
9482 EOF
9483
9484 fi 
9485
9486 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9487 echo "configure:9488: checking for ut_user in utmp" >&5
9488 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9489   echo $ac_n "(cached) $ac_c" 1>&6
9490 else
9491   
9492 cat > conftest.$ac_ext <<EOF
9493 #line 9494 "configure"
9494 #include "confdefs.h"
9495 #include <sys/types.h>
9496 #include <utmp.h>
9497 int main() {
9498 struct utmp ut;  ut.ut_user[0] = 'a';
9499 ; return 0; }
9500 EOF
9501 if { (eval echo configure:9502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9502   rm -rf conftest*
9503   samba_cv_HAVE_UT_UT_USER=yes
9504 else
9505   echo "configure: failed program was:" >&5
9506   cat conftest.$ac_ext >&5
9507   rm -rf conftest*
9508   samba_cv_HAVE_UT_UT_USER=no
9509 fi
9510 rm -f conftest*
9511 fi
9512
9513 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9514 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9515     cat >> confdefs.h <<\EOF
9516 #define HAVE_UT_UT_USER 1
9517 EOF
9518
9519 fi 
9520
9521 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9522 echo "configure:9523: checking for ut_id in utmp" >&5
9523 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9524   echo $ac_n "(cached) $ac_c" 1>&6
9525 else
9526   
9527 cat > conftest.$ac_ext <<EOF
9528 #line 9529 "configure"
9529 #include "confdefs.h"
9530 #include <sys/types.h>
9531 #include <utmp.h>
9532 int main() {
9533 struct utmp ut;  ut.ut_id[0] = 'a';
9534 ; return 0; }
9535 EOF
9536 if { (eval echo configure:9537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9537   rm -rf conftest*
9538   samba_cv_HAVE_UT_UT_ID=yes
9539 else
9540   echo "configure: failed program was:" >&5
9541   cat conftest.$ac_ext >&5
9542   rm -rf conftest*
9543   samba_cv_HAVE_UT_UT_ID=no
9544 fi
9545 rm -f conftest*
9546 fi
9547
9548 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9549 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9550     cat >> confdefs.h <<\EOF
9551 #define HAVE_UT_UT_ID 1
9552 EOF
9553
9554 fi 
9555
9556 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9557 echo "configure:9558: checking for ut_host in utmp" >&5
9558 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+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_host[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_HOST=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_HOST=no
9579 fi
9580 rm -f conftest*
9581 fi
9582
9583 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9584 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9585     cat >> confdefs.h <<\EOF
9586 #define HAVE_UT_UT_HOST 1
9587 EOF
9588
9589 fi 
9590
9591 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9592 echo "configure:9593: checking for ut_time in utmp" >&5
9593 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+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;  time_t t; ut.ut_time = t;
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_TIME=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_TIME=no
9614 fi
9615 rm -f conftest*
9616 fi
9617
9618 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9619 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9620     cat >> confdefs.h <<\EOF
9621 #define HAVE_UT_UT_TIME 1
9622 EOF
9623
9624 fi 
9625
9626 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9627 echo "configure:9628: checking for ut_tv in utmp" >&5
9628 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+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;  struct timeval tv; ut.ut_tv = tv;
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_TV=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_TV=no
9649 fi
9650 rm -f conftest*
9651 fi
9652
9653 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9654 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9655     cat >> confdefs.h <<\EOF
9656 #define HAVE_UT_UT_TV 1
9657 EOF
9658
9659 fi 
9660
9661 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9662 echo "configure:9663: checking for ut_type in utmp" >&5
9663 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+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_type = 0;
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_TYPE=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_TYPE=no
9684 fi
9685 rm -f conftest*
9686 fi
9687
9688 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9689 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9690     cat >> confdefs.h <<\EOF
9691 #define HAVE_UT_UT_TYPE 1
9692 EOF
9693
9694 fi 
9695
9696 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9697 echo "configure:9698: checking for ut_pid in utmp" >&5
9698 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+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;  ut.ut_pid = 0;
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_PID=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_PID=no
9719 fi
9720 rm -f conftest*
9721 fi
9722
9723 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9724 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9725     cat >> confdefs.h <<\EOF
9726 #define HAVE_UT_UT_PID 1
9727 EOF
9728
9729 fi 
9730
9731 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9732 echo "configure:9733: checking for ut_exit in utmp" >&5
9733 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+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;  ut.ut_exit.e_exit = 0;
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_EXIT=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_EXIT=no
9754 fi
9755 rm -f conftest*
9756 fi
9757
9758 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9759 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9760     cat >> confdefs.h <<\EOF
9761 #define HAVE_UT_UT_EXIT 1
9762 EOF
9763
9764 fi 
9765
9766 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9767 echo "configure:9768: checking for ut_addr in utmp" >&5
9768 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+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_addr = 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_ADDR=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_ADDR=no
9789 fi
9790 rm -f conftest*
9791 fi
9792
9793 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9794 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9795     cat >> confdefs.h <<\EOF
9796 #define HAVE_UT_UT_ADDR 1
9797 EOF
9798
9799 fi 
9800
9801 if test x$ac_cv_func_pututline = xyes ; then
9802   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9803 echo "configure:9804: checking whether pututline returns pointer" >&5
9804 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9805   echo $ac_n "(cached) $ac_c" 1>&6
9806 else
9807   
9808   cat > conftest.$ac_ext <<EOF
9809 #line 9810 "configure"
9810 #include "confdefs.h"
9811 #include <sys/types.h>
9812 #include <utmp.h>
9813 int main() {
9814 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9815 ; return 0; }
9816 EOF
9817 if { (eval echo configure:9818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9818   rm -rf conftest*
9819   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9820 else
9821   echo "configure: failed program was:" >&5
9822   cat conftest.$ac_ext >&5
9823   rm -rf conftest*
9824   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9825 fi
9826 rm -f conftest*
9827 fi
9828
9829 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9830   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9831       cat >> confdefs.h <<\EOF
9832 #define PUTUTLINE_RETURNS_UTMP 1
9833 EOF
9834
9835   fi
9836 fi
9837
9838 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9839 echo "configure:9840: checking for ut_syslen in utmpx" >&5
9840 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9841   echo $ac_n "(cached) $ac_c" 1>&6
9842 else
9843   
9844 cat > conftest.$ac_ext <<EOF
9845 #line 9846 "configure"
9846 #include "confdefs.h"
9847 #include <sys/types.h>
9848 #include <utmpx.h>
9849 int main() {
9850 struct utmpx ux;  ux.ut_syslen = 0;
9851 ; return 0; }
9852 EOF
9853 if { (eval echo configure:9854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9854   rm -rf conftest*
9855   samba_cv_HAVE_UX_UT_SYSLEN=yes
9856 else
9857   echo "configure: failed program was:" >&5
9858   cat conftest.$ac_ext >&5
9859   rm -rf conftest*
9860   samba_cv_HAVE_UX_UT_SYSLEN=no
9861 fi
9862 rm -f conftest*
9863 fi
9864
9865 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
9866 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
9867     cat >> confdefs.h <<\EOF
9868 #define HAVE_UX_UT_SYSLEN 1
9869 EOF
9870
9871 fi 
9872
9873 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
9874 echo "configure:9875: checking for Linux kernel oplocks" >&5
9875 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
9876   echo $ac_n "(cached) $ac_c" 1>&6
9877 else
9878   
9879 if test "$cross_compiling" = yes; then
9880   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
9881 else
9882   cat > conftest.$ac_ext <<EOF
9883 #line 9884 "configure"
9884 #include "confdefs.h"
9885
9886 #include <sys/types.h>
9887 #include <fcntl.h>
9888 #ifndef F_GETLEASE
9889 #define F_GETLEASE      1025
9890 #endif
9891 main() {
9892        int fd = open("/dev/null", O_RDONLY);
9893        return fcntl(fd, F_GETLEASE, 0) == -1;
9894 }
9895
9896 EOF
9897 if { (eval echo configure:9898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9898 then
9899   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
9900 else
9901   echo "configure: failed program was:" >&5
9902   cat conftest.$ac_ext >&5
9903   rm -fr conftest*
9904   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
9905 fi
9906 rm -fr conftest*
9907 fi
9908
9909 fi
9910
9911 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
9912 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
9913     cat >> confdefs.h <<\EOF
9914 #define HAVE_KERNEL_OPLOCKS_LINUX 1
9915 EOF
9916
9917 fi
9918
9919 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
9920 echo "configure:9921: checking for kernel change notify support" >&5
9921 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
9922   echo $ac_n "(cached) $ac_c" 1>&6
9923 else
9924   
9925 if test "$cross_compiling" = yes; then
9926   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
9927 else
9928   cat > conftest.$ac_ext <<EOF
9929 #line 9930 "configure"
9930 #include "confdefs.h"
9931
9932 #include <sys/types.h>
9933 #include <fcntl.h>
9934 #include <signal.h>
9935 #ifndef F_NOTIFY
9936 #define F_NOTIFY 1026
9937 #endif
9938 main() {
9939         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
9940 }
9941
9942 EOF
9943 if { (eval echo configure:9944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9944 then
9945   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
9946 else
9947   echo "configure: failed program was:" >&5
9948   cat conftest.$ac_ext >&5
9949   rm -fr conftest*
9950   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
9951 fi
9952 rm -fr conftest*
9953 fi
9954
9955 fi
9956
9957 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
9958 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
9959     cat >> confdefs.h <<\EOF
9960 #define HAVE_KERNEL_CHANGE_NOTIFY 1
9961 EOF
9962
9963 fi
9964
9965 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
9966 echo "configure:9967: checking for kernel share modes" >&5
9967 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
9968   echo $ac_n "(cached) $ac_c" 1>&6
9969 else
9970   
9971 if test "$cross_compiling" = yes; then
9972   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
9973 else
9974   cat > conftest.$ac_ext <<EOF
9975 #line 9976 "configure"
9976 #include "confdefs.h"
9977
9978 #include <sys/types.h>
9979 #include <fcntl.h>
9980 #include <signal.h>
9981 #include <sys/file.h>
9982 #ifndef LOCK_MAND
9983 #define LOCK_MAND       32
9984 #define LOCK_READ       64
9985 #endif
9986 main() {
9987         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
9988 }
9989
9990 EOF
9991 if { (eval echo configure:9992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9992 then
9993   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
9994 else
9995   echo "configure: failed program was:" >&5
9996   cat conftest.$ac_ext >&5
9997   rm -fr conftest*
9998   samba_cv_HAVE_KERNEL_SHARE_MODES=no
9999 fi
10000 rm -fr conftest*
10001 fi
10002
10003 fi
10004
10005 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10006 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10007     cat >> confdefs.h <<\EOF
10008 #define HAVE_KERNEL_SHARE_MODES 1
10009 EOF
10010
10011 fi
10012
10013
10014
10015
10016 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10017 echo "configure:10018: checking for IRIX kernel oplock type definitions" >&5
10018 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10019   echo $ac_n "(cached) $ac_c" 1>&6
10020 else
10021   
10022 cat > conftest.$ac_ext <<EOF
10023 #line 10024 "configure"
10024 #include "confdefs.h"
10025 #include <sys/types.h>
10026 #include <fcntl.h>
10027 int main() {
10028 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10029 ; return 0; }
10030 EOF
10031 if { (eval echo configure:10032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10032   rm -rf conftest*
10033   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10034 else
10035   echo "configure: failed program was:" >&5
10036   cat conftest.$ac_ext >&5
10037   rm -rf conftest*
10038   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10039 fi
10040 rm -f conftest*
10041 fi
10042
10043 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10044 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10045     cat >> confdefs.h <<\EOF
10046 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10047 EOF
10048
10049 fi
10050
10051 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10052 echo "configure:10053: checking for irix specific capabilities" >&5
10053 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10054   echo $ac_n "(cached) $ac_c" 1>&6
10055 else
10056   
10057 if test "$cross_compiling" = yes; then
10058   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10059 else
10060   cat > conftest.$ac_ext <<EOF
10061 #line 10062 "configure"
10062 #include "confdefs.h"
10063 #include <sys/types.h>
10064 #include <sys/capability.h>
10065 main() {
10066  cap_t cap;
10067  if ((cap = cap_get_proc()) == NULL)
10068    exit(1);
10069  cap->cap_effective |= CAP_NETWORK_MGT;
10070  cap->cap_inheritable |= CAP_NETWORK_MGT;
10071  cap_set_proc(cap);
10072  exit(0);
10073 }
10074
10075 EOF
10076 if { (eval echo configure:10077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10077 then
10078   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10079 else
10080   echo "configure: failed program was:" >&5
10081   cat conftest.$ac_ext >&5
10082   rm -fr conftest*
10083   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10084 fi
10085 rm -fr conftest*
10086 fi
10087
10088 fi
10089
10090 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10091 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10092     cat >> confdefs.h <<\EOF
10093 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10094 EOF
10095
10096 fi
10097
10098 #
10099 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10100 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10101 #
10102
10103 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10104 echo "configure:10105: checking for int16 typedef included by rpc/rpc.h" >&5
10105 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10106   echo $ac_n "(cached) $ac_c" 1>&6
10107 else
10108   
10109 cat > conftest.$ac_ext <<EOF
10110 #line 10111 "configure"
10111 #include "confdefs.h"
10112 #include <sys/types.h>
10113 #if defined(HAVE_RPC_RPC_H)
10114 #include <rpc/rpc.h>
10115 #endif
10116 int main() {
10117 int16 testvar;
10118 ; return 0; }
10119 EOF
10120 if { (eval echo configure:10121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10121   rm -rf conftest*
10122   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10123 else
10124   echo "configure: failed program was:" >&5
10125   cat conftest.$ac_ext >&5
10126   rm -rf conftest*
10127   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10128 fi
10129 rm -f conftest*
10130 fi
10131
10132 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10133 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10134     cat >> confdefs.h <<\EOF
10135 #define HAVE_INT16_FROM_RPC_RPC_H 1
10136 EOF
10137
10138 fi
10139
10140 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10141 echo "configure:10142: checking for uint16 typedef included by rpc/rpc.h" >&5
10142 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10143   echo $ac_n "(cached) $ac_c" 1>&6
10144 else
10145   
10146 cat > conftest.$ac_ext <<EOF
10147 #line 10148 "configure"
10148 #include "confdefs.h"
10149 #include <sys/types.h>
10150 #if defined(HAVE_RPC_RPC_H)
10151 #include <rpc/rpc.h>
10152 #endif
10153 int main() {
10154 uint16 testvar;
10155 ; return 0; }
10156 EOF
10157 if { (eval echo configure:10158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10158   rm -rf conftest*
10159   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10160 else
10161   echo "configure: failed program was:" >&5
10162   cat conftest.$ac_ext >&5
10163   rm -rf conftest*
10164   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10165 fi
10166 rm -f conftest*
10167 fi
10168
10169 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10170 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10171     cat >> confdefs.h <<\EOF
10172 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10173 EOF
10174
10175 fi
10176
10177 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10178 echo "configure:10179: checking for int32 typedef included by rpc/rpc.h" >&5
10179 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10180   echo $ac_n "(cached) $ac_c" 1>&6
10181 else
10182   
10183 cat > conftest.$ac_ext <<EOF
10184 #line 10185 "configure"
10185 #include "confdefs.h"
10186 #include <sys/types.h>
10187 #if defined(HAVE_RPC_RPC_H)
10188 #include <rpc/rpc.h>
10189 #endif
10190 int main() {
10191 int32 testvar;
10192 ; return 0; }
10193 EOF
10194 if { (eval echo configure:10195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10195   rm -rf conftest*
10196   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10197 else
10198   echo "configure: failed program was:" >&5
10199   cat conftest.$ac_ext >&5
10200   rm -rf conftest*
10201   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10202 fi
10203 rm -f conftest*
10204 fi
10205
10206 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10207 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10208     cat >> confdefs.h <<\EOF
10209 #define HAVE_INT32_FROM_RPC_RPC_H 1
10210 EOF
10211
10212 fi
10213
10214 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10215 echo "configure:10216: checking for uint32 typedef included by rpc/rpc.h" >&5
10216 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10217   echo $ac_n "(cached) $ac_c" 1>&6
10218 else
10219   
10220 cat > conftest.$ac_ext <<EOF
10221 #line 10222 "configure"
10222 #include "confdefs.h"
10223 #include <sys/types.h>
10224 #if defined(HAVE_RPC_RPC_H)
10225 #include <rpc/rpc.h>
10226 #endif
10227 int main() {
10228 uint32 testvar;
10229 ; return 0; }
10230 EOF
10231 if { (eval echo configure:10232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10232   rm -rf conftest*
10233   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10234 else
10235   echo "configure: failed program was:" >&5
10236   cat conftest.$ac_ext >&5
10237   rm -rf conftest*
10238   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10239 fi
10240 rm -f conftest*
10241 fi
10242
10243 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10244 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10245     cat >> confdefs.h <<\EOF
10246 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10247 EOF
10248
10249 fi
10250
10251
10252 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10253 echo "configure:10254: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10254 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10255   echo $ac_n "(cached) $ac_c" 1>&6
10256 else
10257   
10258 cat > conftest.$ac_ext <<EOF
10259 #line 10260 "configure"
10260 #include "confdefs.h"
10261 #include <sys/types.h>
10262 #ifdef HAVE_SYS_SECURITY_H
10263 #include <sys/security.h>
10264 #include <prot.h>
10265 #endif  /* HAVE_SYS_SECURITY_H */
10266 #if defined(HAVE_RPC_RPC_H)
10267 #include <rpc/rpc.h>
10268 #endif
10269 int main() {
10270 int testvar;
10271 ; return 0; }
10272 EOF
10273 if { (eval echo configure:10274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10274   rm -rf conftest*
10275   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10276 else
10277   echo "configure: failed program was:" >&5
10278   cat conftest.$ac_ext >&5
10279   rm -rf conftest*
10280   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10281 fi
10282 rm -f conftest*
10283 fi
10284
10285 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10286 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10287     cat >> confdefs.h <<\EOF
10288 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10289 EOF
10290
10291 fi
10292
10293 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10294 echo "configure:10295: checking for test routines" >&5
10295 if test "$cross_compiling" = yes; then
10296   echo "configure: warning: cannot run when cross-compiling" 1>&2
10297 else
10298   cat > conftest.$ac_ext <<EOF
10299 #line 10300 "configure"
10300 #include "confdefs.h"
10301 #include "${srcdir-.}/tests/trivial.c"
10302 EOF
10303 if { (eval echo configure:10304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10304 then
10305   echo "$ac_t""yes" 1>&6
10306 else
10307   echo "configure: failed program was:" >&5
10308   cat conftest.$ac_ext >&5
10309   rm -fr conftest*
10310   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10311 fi
10312 rm -fr conftest*
10313 fi
10314
10315
10316 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10317 echo "configure:10318: checking for ftruncate extend" >&5
10318 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10319   echo $ac_n "(cached) $ac_c" 1>&6
10320 else
10321   
10322 if test "$cross_compiling" = yes; then
10323   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10324 else
10325   cat > conftest.$ac_ext <<EOF
10326 #line 10327 "configure"
10327 #include "confdefs.h"
10328 #include "${srcdir-.}/tests/ftruncate.c"
10329 EOF
10330 if { (eval echo configure:10331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10331 then
10332   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10333 else
10334   echo "configure: failed program was:" >&5
10335   cat conftest.$ac_ext >&5
10336   rm -fr conftest*
10337   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10338 fi
10339 rm -fr conftest*
10340 fi
10341
10342 fi
10343
10344 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10345 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10346     cat >> confdefs.h <<\EOF
10347 #define HAVE_FTRUNCATE_EXTEND 1
10348 EOF
10349
10350 fi
10351
10352 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10353 echo "configure:10354: checking for broken getgroups" >&5
10354 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10355   echo $ac_n "(cached) $ac_c" 1>&6
10356 else
10357   
10358 if test "$cross_compiling" = yes; then
10359   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10360 else
10361   cat > conftest.$ac_ext <<EOF
10362 #line 10363 "configure"
10363 #include "confdefs.h"
10364 #include "${srcdir-.}/tests/getgroups.c"
10365 EOF
10366 if { (eval echo configure:10367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10367 then
10368   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10369 else
10370   echo "configure: failed program was:" >&5
10371   cat conftest.$ac_ext >&5
10372   rm -fr conftest*
10373   samba_cv_HAVE_BROKEN_GETGROUPS=no
10374 fi
10375 rm -fr conftest*
10376 fi
10377
10378 fi
10379
10380 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10381 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10382     cat >> confdefs.h <<\EOF
10383 #define HAVE_BROKEN_GETGROUPS 1
10384 EOF
10385
10386 fi
10387
10388 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10389 echo "configure:10390: checking whether getpass should be replaced" >&5
10390 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10391   echo $ac_n "(cached) $ac_c" 1>&6
10392 else
10393   
10394 SAVE_CPPFLAGS="$CPPFLAGS"
10395 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10396 cat > conftest.$ac_ext <<EOF
10397 #line 10398 "configure"
10398 #include "confdefs.h"
10399
10400 #define REPLACE_GETPASS 1
10401 #define NO_CONFIG_H 1
10402 #define main dont_declare_main
10403 #include "${srcdir-.}/lib/getsmbpass.c"
10404 #undef main
10405
10406 int main() {
10407
10408 ; return 0; }
10409 EOF
10410 if { (eval echo configure:10411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10411   rm -rf conftest*
10412   samba_cv_REPLACE_GETPASS=yes
10413 else
10414   echo "configure: failed program was:" >&5
10415   cat conftest.$ac_ext >&5
10416   rm -rf conftest*
10417   samba_cv_REPLACE_GETPASS=no
10418 fi
10419 rm -f conftest*
10420 CPPFLAGS="$SAVE_CPPFLAGS"
10421
10422 fi
10423
10424 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10425 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10426         cat >> confdefs.h <<\EOF
10427 #define REPLACE_GETPASS 1
10428 EOF
10429
10430 fi
10431
10432 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10433 echo "configure:10434: checking for broken inet_ntoa" >&5
10434 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10435   echo $ac_n "(cached) $ac_c" 1>&6
10436 else
10437   
10438 if test "$cross_compiling" = yes; then
10439   samba_cv_REPLACE_INET_NTOA=cross
10440 else
10441   cat > conftest.$ac_ext <<EOF
10442 #line 10443 "configure"
10443 #include "confdefs.h"
10444
10445 #include <stdio.h>
10446 #include <sys/types.h>
10447 #include <netinet/in.h>
10448 #ifdef HAVE_ARPA_INET_H
10449 #include <arpa/inet.h>
10450 #endif
10451 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10452 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10453     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10454 exit(1);}
10455 EOF
10456 if { (eval echo configure:10457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10457 then
10458   samba_cv_REPLACE_INET_NTOA=yes
10459 else
10460   echo "configure: failed program was:" >&5
10461   cat conftest.$ac_ext >&5
10462   rm -fr conftest*
10463   samba_cv_REPLACE_INET_NTOA=no
10464 fi
10465 rm -fr conftest*
10466 fi
10467
10468 fi
10469
10470 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10471 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10472     cat >> confdefs.h <<\EOF
10473 #define REPLACE_INET_NTOA 1
10474 EOF
10475
10476 fi
10477
10478 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10479 echo "configure:10480: checking for secure mkstemp" >&5
10480 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10481   echo $ac_n "(cached) $ac_c" 1>&6
10482 else
10483   
10484 if test "$cross_compiling" = yes; then
10485   samba_cv_HAVE_SECURE_MKSTEMP=cross
10486 else
10487   cat > conftest.$ac_ext <<EOF
10488 #line 10489 "configure"
10489 #include "confdefs.h"
10490 #include <stdlib.h>
10491 #include <sys/types.h>
10492 #include <sys/stat.h>
10493 #include <unistd.h>
10494 main() { 
10495   struct stat st;
10496   char tpl[20]="/tmp/test.XXXXXX"; 
10497   int fd = mkstemp(tpl); 
10498   if (fd == -1) exit(1);
10499   unlink(tpl);
10500   if (fstat(fd, &st) != 0) exit(1);
10501   if ((st.st_mode & 0777) != 0600) exit(1);
10502   exit(0);
10503 }
10504 EOF
10505 if { (eval echo configure:10506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10506 then
10507   samba_cv_HAVE_SECURE_MKSTEMP=yes
10508 else
10509   echo "configure: failed program was:" >&5
10510   cat conftest.$ac_ext >&5
10511   rm -fr conftest*
10512   samba_cv_HAVE_SECURE_MKSTEMP=no
10513 fi
10514 rm -fr conftest*
10515 fi
10516
10517 fi
10518
10519 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10520 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10521     cat >> confdefs.h <<\EOF
10522 #define HAVE_SECURE_MKSTEMP 1
10523 EOF
10524
10525 fi
10526
10527 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10528 echo "configure:10529: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10529 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10530   echo $ac_n "(cached) $ac_c" 1>&6
10531 else
10532   
10533 if test "$cross_compiling" = yes; then
10534   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10535 else
10536   cat > conftest.$ac_ext <<EOF
10537 #line 10538 "configure"
10538 #include "confdefs.h"
10539 #include <unistd.h>
10540 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10541 EOF
10542 if { (eval echo configure:10543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10543 then
10544   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10545 else
10546   echo "configure: failed program was:" >&5
10547   cat conftest.$ac_ext >&5
10548   rm -fr conftest*
10549   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10550 fi
10551 rm -fr conftest*
10552 fi
10553
10554 fi
10555
10556 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10557 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10558     cat >> confdefs.h <<\EOF
10559 #define SYSCONF_SC_NGROUPS_MAX 1
10560 EOF
10561
10562 fi
10563
10564 echo $ac_n "checking for root""... $ac_c" 1>&6
10565 echo "configure:10566: checking for root" >&5
10566 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10567   echo $ac_n "(cached) $ac_c" 1>&6
10568 else
10569   
10570 if test "$cross_compiling" = yes; then
10571   samba_cv_HAVE_ROOT=cross
10572 else
10573   cat > conftest.$ac_ext <<EOF
10574 #line 10575 "configure"
10575 #include "confdefs.h"
10576 main() { exit(getuid() != 0); }
10577 EOF
10578 if { (eval echo configure:10579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10579 then
10580   samba_cv_HAVE_ROOT=yes
10581 else
10582   echo "configure: failed program was:" >&5
10583   cat conftest.$ac_ext >&5
10584   rm -fr conftest*
10585   samba_cv_HAVE_ROOT=no
10586 fi
10587 rm -fr conftest*
10588 fi
10589
10590 fi
10591
10592 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10593 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10594     cat >> confdefs.h <<\EOF
10595 #define HAVE_ROOT 1
10596 EOF
10597
10598 else
10599     echo "configure: warning: running as non-root will disable some tests" 1>&2
10600 fi
10601
10602 ##################
10603 # look for a method of finding the list of network interfaces
10604 iface=no;
10605 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10606 echo "configure:10607: checking for iface AIX" >&5
10607 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10608   echo $ac_n "(cached) $ac_c" 1>&6
10609 else
10610   
10611 if test "$cross_compiling" = yes; then
10612   samba_cv_HAVE_IFACE_AIX=cross
10613 else
10614   cat > conftest.$ac_ext <<EOF
10615 #line 10616 "configure"
10616 #include "confdefs.h"
10617
10618 #define HAVE_IFACE_AIX 1
10619 #define AUTOCONF_TEST 1
10620 #include "confdefs.h"
10621 #include "${srcdir-.}/lib/interfaces.c"
10622 EOF
10623 if { (eval echo configure:10624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10624 then
10625   samba_cv_HAVE_IFACE_AIX=yes
10626 else
10627   echo "configure: failed program was:" >&5
10628   cat conftest.$ac_ext >&5
10629   rm -fr conftest*
10630   samba_cv_HAVE_IFACE_AIX=no
10631 fi
10632 rm -fr conftest*
10633 fi
10634
10635 fi
10636
10637 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10638 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10639     iface=yes;cat >> confdefs.h <<\EOF
10640 #define HAVE_IFACE_AIX 1
10641 EOF
10642
10643 fi
10644
10645 if test $iface = no; then
10646 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10647 echo "configure:10648: checking for iface ifconf" >&5
10648 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10649   echo $ac_n "(cached) $ac_c" 1>&6
10650 else
10651   
10652 if test "$cross_compiling" = yes; then
10653   samba_cv_HAVE_IFACE_IFCONF=cross
10654 else
10655   cat > conftest.$ac_ext <<EOF
10656 #line 10657 "configure"
10657 #include "confdefs.h"
10658
10659 #define HAVE_IFACE_IFCONF 1
10660 #define AUTOCONF_TEST 1
10661 #include "confdefs.h"
10662 #include "${srcdir-.}/lib/interfaces.c"
10663 EOF
10664 if { (eval echo configure:10665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10665 then
10666   samba_cv_HAVE_IFACE_IFCONF=yes
10667 else
10668   echo "configure: failed program was:" >&5
10669   cat conftest.$ac_ext >&5
10670   rm -fr conftest*
10671   samba_cv_HAVE_IFACE_IFCONF=no
10672 fi
10673 rm -fr conftest*
10674 fi
10675
10676 fi
10677
10678 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10679 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10680     iface=yes;cat >> confdefs.h <<\EOF
10681 #define HAVE_IFACE_IFCONF 1
10682 EOF
10683
10684 fi
10685 fi
10686
10687 if test $iface = no; then
10688 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
10689 echo "configure:10690: checking for iface ifreq" >&5
10690 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
10691   echo $ac_n "(cached) $ac_c" 1>&6
10692 else
10693   
10694 if test "$cross_compiling" = yes; then
10695   samba_cv_HAVE_IFACE_IFREQ=cross
10696 else
10697   cat > conftest.$ac_ext <<EOF
10698 #line 10699 "configure"
10699 #include "confdefs.h"
10700
10701 #define HAVE_IFACE_IFREQ 1
10702 #define AUTOCONF_TEST 1
10703 #include "confdefs.h"
10704 #include "${srcdir-.}/lib/interfaces.c"
10705 EOF
10706 if { (eval echo configure:10707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10707 then
10708   samba_cv_HAVE_IFACE_IFREQ=yes
10709 else
10710   echo "configure: failed program was:" >&5
10711   cat conftest.$ac_ext >&5
10712   rm -fr conftest*
10713   samba_cv_HAVE_IFACE_IFREQ=no
10714 fi
10715 rm -fr conftest*
10716 fi
10717
10718 fi
10719
10720 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
10721 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
10722     iface=yes;cat >> confdefs.h <<\EOF
10723 #define HAVE_IFACE_IFREQ 1
10724 EOF
10725
10726 fi
10727 fi
10728
10729
10730 ################################################
10731 # look for a method of setting the effective uid
10732 seteuid=no;
10733 if test $seteuid = no; then
10734 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
10735 echo "configure:10736: checking for setresuid" >&5
10736 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
10737   echo $ac_n "(cached) $ac_c" 1>&6
10738 else
10739   
10740 if test "$cross_compiling" = yes; then
10741   samba_cv_USE_SETRESUID=cross
10742 else
10743   cat > conftest.$ac_ext <<EOF
10744 #line 10745 "configure"
10745 #include "confdefs.h"
10746
10747 #define AUTOCONF_TEST 1
10748 #define USE_SETRESUID 1
10749 #include "confdefs.h"
10750 #include "${srcdir-.}/lib/util_sec.c"
10751 EOF
10752 if { (eval echo configure:10753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10753 then
10754   samba_cv_USE_SETRESUID=yes
10755 else
10756   echo "configure: failed program was:" >&5
10757   cat conftest.$ac_ext >&5
10758   rm -fr conftest*
10759   samba_cv_USE_SETRESUID=no
10760 fi
10761 rm -fr conftest*
10762 fi
10763
10764 fi
10765
10766 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
10767 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
10768     seteuid=yes;cat >> confdefs.h <<\EOF
10769 #define USE_SETRESUID 1
10770 EOF
10771
10772 fi
10773 fi
10774
10775
10776 if test $seteuid = no; then
10777 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
10778 echo "configure:10779: checking for setreuid" >&5
10779 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
10780   echo $ac_n "(cached) $ac_c" 1>&6
10781 else
10782   
10783 if test "$cross_compiling" = yes; then
10784   samba_cv_USE_SETREUID=cross
10785 else
10786   cat > conftest.$ac_ext <<EOF
10787 #line 10788 "configure"
10788 #include "confdefs.h"
10789
10790 #define AUTOCONF_TEST 1
10791 #define USE_SETREUID 1
10792 #include "confdefs.h"
10793 #include "${srcdir-.}/lib/util_sec.c"
10794 EOF
10795 if { (eval echo configure:10796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10796 then
10797   samba_cv_USE_SETREUID=yes
10798 else
10799   echo "configure: failed program was:" >&5
10800   cat conftest.$ac_ext >&5
10801   rm -fr conftest*
10802   samba_cv_USE_SETREUID=no
10803 fi
10804 rm -fr conftest*
10805 fi
10806
10807 fi
10808
10809 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
10810 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
10811     seteuid=yes;cat >> confdefs.h <<\EOF
10812 #define USE_SETREUID 1
10813 EOF
10814
10815 fi
10816 fi
10817
10818 if test $seteuid = no; then
10819 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
10820 echo "configure:10821: checking for seteuid" >&5
10821 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
10822   echo $ac_n "(cached) $ac_c" 1>&6
10823 else
10824   
10825 if test "$cross_compiling" = yes; then
10826   samba_cv_USE_SETEUID=cross
10827 else
10828   cat > conftest.$ac_ext <<EOF
10829 #line 10830 "configure"
10830 #include "confdefs.h"
10831
10832 #define AUTOCONF_TEST 1
10833 #define USE_SETEUID 1
10834 #include "confdefs.h"
10835 #include "${srcdir-.}/lib/util_sec.c"
10836 EOF
10837 if { (eval echo configure:10838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10838 then
10839   samba_cv_USE_SETEUID=yes
10840 else
10841   echo "configure: failed program was:" >&5
10842   cat conftest.$ac_ext >&5
10843   rm -fr conftest*
10844   samba_cv_USE_SETEUID=no
10845 fi
10846 rm -fr conftest*
10847 fi
10848
10849 fi
10850
10851 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
10852 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
10853     seteuid=yes;cat >> confdefs.h <<\EOF
10854 #define USE_SETEUID 1
10855 EOF
10856
10857 fi
10858 fi
10859
10860 if test $seteuid = no; then
10861 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
10862 echo "configure:10863: checking for setuidx" >&5
10863 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
10864   echo $ac_n "(cached) $ac_c" 1>&6
10865 else
10866   
10867 if test "$cross_compiling" = yes; then
10868   samba_cv_USE_SETUIDX=cross
10869 else
10870   cat > conftest.$ac_ext <<EOF
10871 #line 10872 "configure"
10872 #include "confdefs.h"
10873
10874 #define AUTOCONF_TEST 1
10875 #define USE_SETUIDX 1
10876 #include "confdefs.h"
10877 #include "${srcdir-.}/lib/util_sec.c"
10878 EOF
10879 if { (eval echo configure:10880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10880 then
10881   samba_cv_USE_SETUIDX=yes
10882 else
10883   echo "configure: failed program was:" >&5
10884   cat conftest.$ac_ext >&5
10885   rm -fr conftest*
10886   samba_cv_USE_SETUIDX=no
10887 fi
10888 rm -fr conftest*
10889 fi
10890
10891 fi
10892
10893 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
10894 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
10895     seteuid=yes;cat >> confdefs.h <<\EOF
10896 #define USE_SETUIDX 1
10897 EOF
10898
10899 fi
10900 fi
10901
10902
10903 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10904 echo "configure:10905: checking for working mmap" >&5
10905 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
10906   echo $ac_n "(cached) $ac_c" 1>&6
10907 else
10908   
10909 if test "$cross_compiling" = yes; then
10910   samba_cv_HAVE_MMAP=cross
10911 else
10912   cat > conftest.$ac_ext <<EOF
10913 #line 10914 "configure"
10914 #include "confdefs.h"
10915 #include "${srcdir-.}/tests/shared_mmap.c"
10916 EOF
10917 if { (eval echo configure:10918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10918 then
10919   samba_cv_HAVE_MMAP=yes
10920 else
10921   echo "configure: failed program was:" >&5
10922   cat conftest.$ac_ext >&5
10923   rm -fr conftest*
10924   samba_cv_HAVE_MMAP=no
10925 fi
10926 rm -fr conftest*
10927 fi
10928
10929 fi
10930
10931 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
10932 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
10933     cat >> confdefs.h <<\EOF
10934 #define HAVE_MMAP 1
10935 EOF
10936
10937 fi
10938
10939 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
10940 echo "configure:10941: checking for ftruncate needs root" >&5
10941 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
10942   echo $ac_n "(cached) $ac_c" 1>&6
10943 else
10944   
10945 if test "$cross_compiling" = yes; then
10946   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
10947 else
10948   cat > conftest.$ac_ext <<EOF
10949 #line 10950 "configure"
10950 #include "confdefs.h"
10951 #include "${srcdir-.}/tests/ftruncroot.c"
10952 EOF
10953 if { (eval echo configure:10954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10954 then
10955   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
10956 else
10957   echo "configure: failed program was:" >&5
10958   cat conftest.$ac_ext >&5
10959   rm -fr conftest*
10960   samba_cv_FTRUNCATE_NEEDS_ROOT=no
10961 fi
10962 rm -fr conftest*
10963 fi
10964
10965 fi
10966
10967 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
10968 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
10969     cat >> confdefs.h <<\EOF
10970 #define FTRUNCATE_NEEDS_ROOT 1
10971 EOF
10972
10973 fi
10974
10975 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
10976 echo "configure:10977: checking for fcntl locking" >&5
10977 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
10978   echo $ac_n "(cached) $ac_c" 1>&6
10979 else
10980   
10981 if test "$cross_compiling" = yes; then
10982   samba_cv_HAVE_FCNTL_LOCK=cross
10983 else
10984   cat > conftest.$ac_ext <<EOF
10985 #line 10986 "configure"
10986 #include "confdefs.h"
10987 #include "${srcdir-.}/tests/fcntl_lock.c"
10988 EOF
10989 if { (eval echo configure:10990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10990 then
10991   samba_cv_HAVE_FCNTL_LOCK=yes
10992 else
10993   echo "configure: failed program was:" >&5
10994   cat conftest.$ac_ext >&5
10995   rm -fr conftest*
10996   samba_cv_HAVE_FCNTL_LOCK=no
10997 fi
10998 rm -fr conftest*
10999 fi
11000
11001 fi
11002
11003 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11004 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11005     cat >> confdefs.h <<\EOF
11006 #define HAVE_FCNTL_LOCK 1
11007 EOF
11008
11009 fi
11010
11011 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11012 echo "configure:11013: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11013 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+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_HAVE_BROKEN_FCNTL64_LOCKS=cross
11019 else
11020   cat > conftest.$ac_ext <<EOF
11021 #line 11022 "configure"
11022 #include "confdefs.h"
11023 #include "${srcdir-.}/tests/fcntl_lock64.c"
11024 EOF
11025 if { (eval echo configure:11026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11026 then
11027   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11028 else
11029   echo "configure: failed program was:" >&5
11030   cat conftest.$ac_ext >&5
11031   rm -fr conftest*
11032   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11033 fi
11034 rm -fr conftest*
11035 fi
11036
11037 fi
11038
11039 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11040 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11041     cat >> confdefs.h <<\EOF
11042 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11043 EOF
11044
11045
11046 else
11047
11048
11049   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11050 echo "configure:11051: checking for 64 bit fcntl locking" >&5
11051 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11052   echo $ac_n "(cached) $ac_c" 1>&6
11053 else
11054   
11055   if test "$cross_compiling" = yes; then
11056   samba_cv_HAVE_STRUCT_FLOCK64=cross
11057 else
11058   cat > conftest.$ac_ext <<EOF
11059 #line 11060 "configure"
11060 #include "confdefs.h"
11061
11062 #if defined(HAVE_UNISTD_H)
11063 #include <unistd.h>
11064 #endif
11065 #include <stdio.h>
11066 #include <stdlib.h>
11067
11068 #ifdef HAVE_FCNTL_H
11069 #include <fcntl.h>
11070 #endif
11071
11072 #ifdef HAVE_SYS_FCNTL_H
11073 #include <sys/fcntl.h>
11074 #endif
11075 main() { struct flock64 fl64;
11076 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11077 exit(0);
11078 #else
11079 exit(1);
11080 #endif
11081 }
11082 EOF
11083 if { (eval echo configure:11084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11084 then
11085   samba_cv_HAVE_STRUCT_FLOCK64=yes
11086 else
11087   echo "configure: failed program was:" >&5
11088   cat conftest.$ac_ext >&5
11089   rm -fr conftest*
11090   samba_cv_HAVE_STRUCT_FLOCK64=no
11091 fi
11092 rm -fr conftest*
11093 fi
11094
11095 fi
11096
11097 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11098
11099   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11100       cat >> confdefs.h <<\EOF
11101 #define HAVE_STRUCT_FLOCK64 1
11102 EOF
11103
11104   fi
11105 fi
11106
11107 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
11108 echo "configure:11109: checking for a crypt that needs truncated salt" >&5
11109 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
11110   echo $ac_n "(cached) $ac_c" 1>&6
11111 else
11112   
11113 if test "$cross_compiling" = yes; then
11114   samba_cv_HAVE_TRUNCATED_SALT=cross
11115 else
11116   cat > conftest.$ac_ext <<EOF
11117 #line 11118 "configure"
11118 #include "confdefs.h"
11119 #include "${srcdir-.}/tests/crypttest.c"
11120 EOF
11121 if { (eval echo configure:11122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11122 then
11123   samba_cv_HAVE_TRUNCATED_SALT=no
11124 else
11125   echo "configure: failed program was:" >&5
11126   cat conftest.$ac_ext >&5
11127   rm -fr conftest*
11128   samba_cv_HAVE_TRUNCATED_SALT=yes
11129 fi
11130 rm -fr conftest*
11131 fi
11132
11133 fi
11134
11135 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
11136 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
11137     cat >> confdefs.h <<\EOF
11138 #define HAVE_TRUNCATED_SALT 1
11139 EOF
11140
11141 fi
11142
11143 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11144 echo "configure:11145: checking for broken nisplus include files" >&5
11145 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11146   echo $ac_n "(cached) $ac_c" 1>&6
11147 else
11148   
11149 cat > conftest.$ac_ext <<EOF
11150 #line 11151 "configure"
11151 #include "confdefs.h"
11152 #include <sys/acl.h>
11153 #if defined(HAVE_RPCSVC_NIS_H)
11154 #include <rpcsvc/nis.h>
11155 #endif
11156 int main() {
11157 return 0;
11158 ; return 0; }
11159 EOF
11160 if { (eval echo configure:11161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11161   rm -rf conftest*
11162   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11163 else
11164   echo "configure: failed program was:" >&5
11165   cat conftest.$ac_ext >&5
11166   rm -rf conftest*
11167   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11168 fi
11169 rm -f conftest*
11170 fi
11171
11172 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11173 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11174     cat >> confdefs.h <<\EOF
11175 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11176 EOF
11177
11178 fi
11179
11180
11181 #################################################
11182 # check for smbwrapper support
11183 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11184 echo "configure:11185: checking whether to use smbwrapper" >&5
11185 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11186 if test "${with_smbwrapper+set}" = set; then
11187   withval="$with_smbwrapper"
11188    case "$withval" in
11189   yes)
11190     echo "$ac_t""yes" 1>&6
11191     cat >> confdefs.h <<\EOF
11192 #define WITH_SMBWRAPPER 1
11193 EOF
11194
11195         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11196
11197         if test x$ATTEMPT_WRAP32_BUILD = x; then
11198                 WRAP32=""
11199         else
11200                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11201         fi
11202
11203 # Conditions under which smbwrapper should not be built.
11204
11205         if test x$PICFLAG = x; then
11206            echo No support for PIC code - disabling smbwrapper and smbsh
11207            WRAP=""
11208            WRAP32=""
11209         elif test x$ac_cv_func_syscall = xno; then
11210            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11211            WRAP=""
11212            WRAP32=""
11213         fi
11214     ;;
11215   *)
11216     echo "$ac_t""no" 1>&6
11217     ;;
11218   esac 
11219 else
11220   echo "$ac_t""no" 1>&6
11221
11222 fi
11223
11224
11225 #################################################
11226 # check for the AFS filesystem
11227 echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
11228 echo "configure:11229: checking whether to use AFS" >&5
11229 # Check whether --with-afs or --without-afs was given.
11230 if test "${with_afs+set}" = set; then
11231   withval="$with_afs"
11232    case "$withval" in
11233   yes)
11234     echo "$ac_t""yes" 1>&6
11235     cat >> confdefs.h <<\EOF
11236 #define WITH_AFS 1
11237 EOF
11238
11239     ;;
11240   *)
11241     echo "$ac_t""no" 1>&6
11242     ;;
11243   esac 
11244 else
11245   echo "$ac_t""no" 1>&6
11246
11247 fi
11248
11249
11250
11251 #################################################
11252 # check for the DFS auth system
11253 echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
11254 echo "configure:11255: checking whether to use DFS auth" >&5
11255 # Check whether --with-dfs or --without-dfs was given.
11256 if test "${with_dfs+set}" = set; then
11257   withval="$with_dfs"
11258    case "$withval" in
11259   yes)
11260     echo "$ac_t""yes" 1>&6
11261     cat >> confdefs.h <<\EOF
11262 #define WITH_DFS 1
11263 EOF
11264
11265     ;;
11266   *)
11267     echo "$ac_t""no" 1>&6
11268     ;;
11269   esac 
11270 else
11271   echo "$ac_t""no" 1>&6
11272
11273 fi
11274
11275
11276 #################################################
11277 # check for Kerberos IV auth system
11278 echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
11279 echo "configure:11280: checking whether to use Kerberos IV" >&5
11280 # Check whether --with-krb4 or --without-krb4 was given.
11281 if test "${with_krb4+set}" = set; then
11282   withval="$with_krb4"
11283      echo "$ac_t""yes" 1>&6
11284     cat >> confdefs.h <<\EOF
11285 #define KRB4_AUTH 1
11286 EOF
11287
11288     echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
11289 echo "configure:11290: checking for dn_expand in -lresolv" >&5
11290 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
11291 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11292   echo $ac_n "(cached) $ac_c" 1>&6
11293 else
11294   ac_save_LIBS="$LIBS"
11295 LIBS="-lresolv  $LIBS"
11296 cat > conftest.$ac_ext <<EOF
11297 #line 11298 "configure"
11298 #include "confdefs.h"
11299 /* Override any gcc2 internal prototype to avoid an error.  */
11300 /* We use char because int might match the return type of a gcc2
11301     builtin and then its argument prototype would still apply.  */
11302 char dn_expand();
11303
11304 int main() {
11305 dn_expand()
11306 ; return 0; }
11307 EOF
11308 if { (eval echo configure:11309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11309   rm -rf conftest*
11310   eval "ac_cv_lib_$ac_lib_var=yes"
11311 else
11312   echo "configure: failed program was:" >&5
11313   cat conftest.$ac_ext >&5
11314   rm -rf conftest*
11315   eval "ac_cv_lib_$ac_lib_var=no"
11316 fi
11317 rm -f conftest*
11318 LIBS="$ac_save_LIBS"
11319
11320 fi
11321 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11322   echo "$ac_t""yes" 1>&6
11323     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11324     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11325   cat >> confdefs.h <<EOF
11326 #define $ac_tr_lib 1
11327 EOF
11328
11329   LIBS="-lresolv $LIBS"
11330
11331 else
11332   echo "$ac_t""no" 1>&6
11333 fi
11334
11335     LIBS="$LIBS -lkrb -ldes"
11336     CFLAGS="$CFLAGS -I$withval/include"
11337     LDFLAGS="$LDFLAGS -L$withval/lib"
11338 else
11339   echo "$ac_t""no" 1>&6
11340
11341 fi
11342
11343
11344 #################################################
11345 # check for Kerberos 5 auth system
11346 echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6
11347 echo "configure:11348: checking whether to use Kerberos 5" >&5
11348 # Check whether --with-krb5 or --without-krb5 was given.
11349 if test "${with_krb5+set}" = set; then
11350   withval="$with_krb5"
11351      echo "$ac_t""yes" 1>&6
11352     cat >> confdefs.h <<\EOF
11353 #define KRB5_AUTH 1
11354 EOF
11355
11356     LIBS="$LIBS -ldes425 -lkrb5 -lcrypto -lcom_err"
11357     CFLAGS="$CFLAGS -I$withval/include"
11358     LDFLAGS="$LDFLAGS -L$withval/lib"
11359 else
11360   echo "$ac_t""no" 1>&6
11361
11362 fi
11363
11364
11365 #################################################
11366 # check for automount support
11367 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
11368 echo "configure:11369: checking whether to use AUTOMOUNT" >&5
11369 # Check whether --with-automount or --without-automount was given.
11370 if test "${with_automount+set}" = set; then
11371   withval="$with_automount"
11372    case "$withval" in
11373   yes)
11374     echo "$ac_t""yes" 1>&6
11375     cat >> confdefs.h <<\EOF
11376 #define WITH_AUTOMOUNT 1
11377 EOF
11378
11379     ;;
11380   *)
11381     echo "$ac_t""no" 1>&6
11382     ;;
11383   esac 
11384 else
11385   echo "$ac_t""no" 1>&6
11386
11387 fi
11388
11389
11390 #################################################
11391 # check for smbmount support
11392 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
11393 echo "configure:11394: checking whether to use SMBMOUNT" >&5
11394 # Check whether --with-smbmount or --without-smbmount was given.
11395 if test "${with_smbmount+set}" = set; then
11396   withval="$with_smbmount"
11397    case "$withval" in
11398   yes)
11399     echo "$ac_t""yes" 1>&6
11400     cat >> confdefs.h <<\EOF
11401 #define WITH_SMBMOUNT 1
11402 EOF
11403
11404     MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
11405     ;;
11406   *)
11407     echo "$ac_t""no" 1>&6
11408     MPROGS=
11409     ;;
11410   esac 
11411 else
11412   echo "$ac_t""no" 1>&6
11413   MPROGS=
11414
11415 fi
11416
11417
11418
11419 #################################################
11420 # check for a PAM password database
11421 with_pam_for_crypt=no
11422 echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6
11423 echo "configure:11424: checking whether to use PAM password database" >&5
11424 # Check whether --with-pam or --without-pam was given.
11425 if test "${with_pam+set}" = set; then
11426   withval="$with_pam"
11427    case "$withval" in
11428   yes)
11429     echo "$ac_t""yes" 1>&6
11430     cat >> confdefs.h <<\EOF
11431 #define WITH_PAM 1
11432 EOF
11433
11434     LIBS="$LIBS -lpam"
11435     with_pam_for_crypt=yes
11436     ;;
11437   *)
11438     echo "$ac_t""no" 1>&6
11439     ;;
11440   esac 
11441 else
11442   echo "$ac_t""no" 1>&6
11443
11444 fi
11445
11446
11447 # we can't build a pam module if we don't have pam.
11448 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
11449 echo "configure:11450: checking for pam_get_data in -lpam" >&5
11450 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
11451 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11452   echo $ac_n "(cached) $ac_c" 1>&6
11453 else
11454   ac_save_LIBS="$LIBS"
11455 LIBS="-lpam  $LIBS"
11456 cat > conftest.$ac_ext <<EOF
11457 #line 11458 "configure"
11458 #include "confdefs.h"
11459 /* Override any gcc2 internal prototype to avoid an error.  */
11460 /* We use char because int might match the return type of a gcc2
11461     builtin and then its argument prototype would still apply.  */
11462 char pam_get_data();
11463
11464 int main() {
11465 pam_get_data()
11466 ; return 0; }
11467 EOF
11468 if { (eval echo configure:11469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11469   rm -rf conftest*
11470   eval "ac_cv_lib_$ac_lib_var=yes"
11471 else
11472   echo "configure: failed program was:" >&5
11473   cat conftest.$ac_ext >&5
11474   rm -rf conftest*
11475   eval "ac_cv_lib_$ac_lib_var=no"
11476 fi
11477 rm -f conftest*
11478 LIBS="$ac_save_LIBS"
11479
11480 fi
11481 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11482   echo "$ac_t""yes" 1>&6
11483   cat >> confdefs.h <<\EOF
11484 #define HAVE_LIBPAM 1
11485 EOF
11486
11487 else
11488   echo "$ac_t""no" 1>&6
11489 fi
11490
11491
11492 #################################################
11493 # check for pam_smbpass support
11494 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
11495 echo "configure:11496: checking whether to use pam_smbpass" >&5
11496 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
11497 if test "${with_pam_smbpass+set}" = set; then
11498   withval="$with_pam_smbpass"
11499    case "$withval" in
11500   yes)
11501     echo "$ac_t""yes" 1>&6
11502
11503 # Conditions under which pam_smbpass should not be built.
11504
11505        if test x$PICFLAG = x; then
11506           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
11507           PAM_MOD=""
11508        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
11509           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
11510           PAM_MOD=""
11511        else
11512           cat >> confdefs.h <<\EOF
11513 #define WITH_PAM_SMBPASS 1
11514 EOF
11515
11516           PAM_MOD="bin/pam_smbpass.so"
11517        fi
11518     ;;
11519   *)
11520     echo "$ac_t""no" 1>&6
11521     ;;
11522   esac 
11523 else
11524   echo "$ac_t""no" 1>&6
11525
11526 fi
11527
11528
11529
11530 ###############################################
11531 # test for where we get crypt() from, but only
11532 # if not using PAM
11533 if test $with_pam_for_crypt = no; then
11534 for ac_func in crypt
11535 do
11536 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11537 echo "configure:11538: checking for $ac_func" >&5
11538 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11539   echo $ac_n "(cached) $ac_c" 1>&6
11540 else
11541   cat > conftest.$ac_ext <<EOF
11542 #line 11543 "configure"
11543 #include "confdefs.h"
11544 /* System header to define __stub macros and hopefully few prototypes,
11545     which can conflict with char $ac_func(); below.  */
11546 #include <assert.h>
11547 /* Override any gcc2 internal prototype to avoid an error.  */
11548 /* We use char because int might match the return type of a gcc2
11549     builtin and then its argument prototype would still apply.  */
11550 char $ac_func();
11551
11552 int main() {
11553
11554 /* The GNU C library defines this for functions which it implements
11555     to always fail with ENOSYS.  Some functions are actually named
11556     something starting with __ and the normal name is an alias.  */
11557 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11558 choke me
11559 #else
11560 $ac_func();
11561 #endif
11562
11563 ; return 0; }
11564 EOF
11565 if { (eval echo configure:11566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11566   rm -rf conftest*
11567   eval "ac_cv_func_$ac_func=yes"
11568 else
11569   echo "configure: failed program was:" >&5
11570   cat conftest.$ac_ext >&5
11571   rm -rf conftest*
11572   eval "ac_cv_func_$ac_func=no"
11573 fi
11574 rm -f conftest*
11575 fi
11576
11577 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11578   echo "$ac_t""yes" 1>&6
11579     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11580   cat >> confdefs.h <<EOF
11581 #define $ac_tr_func 1
11582 EOF
11583  
11584 else
11585   echo "$ac_t""no" 1>&6
11586 fi
11587 done
11588
11589 if test x"$ac_cv_func_crypt" = x"no"; then
11590     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
11591 echo "configure:11592: checking for crypt in -lcrypt" >&5
11592 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
11593 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11594   echo $ac_n "(cached) $ac_c" 1>&6
11595 else
11596   ac_save_LIBS="$LIBS"
11597 LIBS="-lcrypt  $LIBS"
11598 cat > conftest.$ac_ext <<EOF
11599 #line 11600 "configure"
11600 #include "confdefs.h"
11601 /* Override any gcc2 internal prototype to avoid an error.  */
11602 /* We use char because int might match the return type of a gcc2
11603     builtin and then its argument prototype would still apply.  */
11604 char crypt();
11605
11606 int main() {
11607 crypt()
11608 ; return 0; }
11609 EOF
11610 if { (eval echo configure:11611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11611   rm -rf conftest*
11612   eval "ac_cv_lib_$ac_lib_var=yes"
11613 else
11614   echo "configure: failed program was:" >&5
11615   cat conftest.$ac_ext >&5
11616   rm -rf conftest*
11617   eval "ac_cv_lib_$ac_lib_var=no"
11618 fi
11619 rm -f conftest*
11620 LIBS="$ac_save_LIBS"
11621
11622 fi
11623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11624   echo "$ac_t""yes" 1>&6
11625   LIBS="$LIBS -lcrypt";
11626         cat >> confdefs.h <<\EOF
11627 #define HAVE_CRYPT 1
11628 EOF
11629
11630 else
11631   echo "$ac_t""no" 1>&6
11632 fi
11633
11634 fi
11635 fi
11636
11637
11638 #################################################
11639 # check for a TDB password database
11640 echo $ac_n "checking whether to use TDB password database""... $ac_c" 1>&6
11641 echo "configure:11642: checking whether to use TDB password database" >&5
11642 # Check whether --with-tdbsam or --without-tdbsam was given.
11643 if test "${with_tdbsam+set}" = set; then
11644   withval="$with_tdbsam"
11645    case "$withval" in
11646   yes)
11647     echo "$ac_t""yes" 1>&6
11648     cat >> confdefs.h <<\EOF
11649 #define WITH_TDBPWD 1
11650 EOF
11651
11652 #    AC_MSG_ERROR([TDB password database not supported in this version.])
11653     ;;
11654   *)
11655     echo "$ac_t""no" 1>&6
11656     ;;
11657   esac 
11658 else
11659   echo "$ac_t""no" 1>&6
11660
11661 fi
11662
11663
11664 #################################################
11665 # check for a LDAP password database
11666 echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6
11667 echo "configure:11668: checking whether to use LDAP password database" >&5
11668 # Check whether --with-ldap or --without-ldap was given.
11669 if test "${with_ldap+set}" = set; then
11670   withval="$with_ldap"
11671    case "$withval" in
11672   yes)
11673     echo "$ac_t""yes" 1>&6
11674     cat >> confdefs.h <<\EOF
11675 #define WITH_LDAP 1
11676 EOF
11677
11678     { echo "configure: error: LDAP password database not supported in this version." 1>&2; exit 1; }
11679     ;;
11680   *)
11681     echo "$ac_t""no" 1>&6
11682     ;;
11683   esac 
11684 else
11685   echo "$ac_t""no" 1>&6
11686
11687 fi
11688
11689
11690 #################################################
11691 # check for a NISPLUS password database
11692 echo $ac_n "checking whether to use NISPLUS password database""... $ac_c" 1>&6
11693 echo "configure:11694: checking whether to use NISPLUS password database" >&5
11694 # Check whether --with-nisplus or --without-nisplus was given.
11695 if test "${with_nisplus+set}" = set; then
11696   withval="$with_nisplus"
11697    case "$withval" in
11698   yes)
11699     echo "$ac_t""yes" 1>&6
11700     cat >> confdefs.h <<\EOF
11701 #define WITH_NISPLUS 1
11702 EOF
11703
11704     ;;
11705   *)
11706     echo "$ac_t""no" 1>&6
11707     ;;
11708   esac 
11709 else
11710   echo "$ac_t""no" 1>&6
11711
11712 fi
11713
11714
11715 #################################################
11716 # check for a NISPLUS_HOME support 
11717 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
11718 echo "configure:11719: checking whether to use NISPLUS_HOME" >&5
11719 # Check whether --with-nisplus-home or --without-nisplus-home was given.
11720 if test "${with_nisplus_home+set}" = set; then
11721   withval="$with_nisplus_home"
11722    case "$withval" in
11723   yes)
11724     echo "$ac_t""yes" 1>&6
11725     cat >> confdefs.h <<\EOF
11726 #define WITH_NISPLUS_HOME 1
11727 EOF
11728
11729     ;;
11730   *)
11731     echo "$ac_t""no" 1>&6
11732     ;;
11733   esac 
11734 else
11735   echo "$ac_t""no" 1>&6
11736
11737 fi
11738
11739
11740 #################################################
11741 # check for the secure socket layer
11742 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
11743 echo "configure:11744: checking whether to use SSL" >&5
11744 # Check whether --with-ssl or --without-ssl was given.
11745 if test "${with_ssl+set}" = set; then
11746   withval="$with_ssl"
11747    case "$withval" in
11748   yes)
11749     echo "$ac_t""yes" 1>&6
11750     cat >> confdefs.h <<\EOF
11751 #define WITH_SSL 1
11752 EOF
11753
11754     withval="/usr/local/ssl"     # default
11755
11756     if test "${with_sslinc+set}" = set; then
11757
11758         withval="$with_sslinc"
11759         case "$withval" in
11760         yes|no)
11761           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
11762           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
11763           LIBS="-lssl -lcrypto $LIBS"
11764           LDFLAGS="=L/usr/local/ssl/lib $LDFLAGS"
11765         ;;
11766         * )
11767           CFLAGS="-I${withval}/include $CFLAGS"
11768           LIBS="-lssl -lcrypto $LIBS"
11769           LDFLAGS="-L${withval}/lib $LDFLAGS"
11770         ;;
11771         esac
11772
11773     else
11774
11775         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
11776         LIBS="-lssl -lcrypto $LIBS"
11777         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
11778
11779     fi
11780
11781     if test ! -d ${withval}; then
11782       echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
11783       exit 1
11784     fi 
11785
11786     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
11787
11788     ;;
11789   *)
11790     echo "$ac_t""no" 1>&6
11791     ;;
11792   esac 
11793 else
11794   echo "$ac_t""no" 1>&6
11795
11796 fi
11797
11798
11799 #################################################
11800 # check for syslog logging
11801 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
11802 echo "configure:11803: checking whether to use syslog logging" >&5
11803 # Check whether --with-syslog or --without-syslog was given.
11804 if test "${with_syslog+set}" = set; then
11805   withval="$with_syslog"
11806    case "$withval" in
11807   yes)
11808     echo "$ac_t""yes" 1>&6
11809     cat >> confdefs.h <<\EOF
11810 #define WITH_SYSLOG 1
11811 EOF
11812
11813     ;;
11814   *)
11815     echo "$ac_t""no" 1>&6
11816     ;;
11817   esac 
11818 else
11819   echo "$ac_t""no" 1>&6
11820
11821 fi
11822
11823
11824 #################################################
11825 # check for a shared memory profiling support
11826 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
11827 echo "configure:11828: checking whether to use profiling" >&5
11828 # Check whether --with-profile or --without-profile was given.
11829 if test "${with_profile+set}" = set; then
11830   withval="$with_profile"
11831    case "$withval" in
11832   yes)
11833     echo "$ac_t""yes" 1>&6
11834     cat >> confdefs.h <<\EOF
11835 #define WITH_PROFILE 1
11836 EOF
11837
11838     ;;
11839   *)
11840     echo "$ac_t""no" 1>&6
11841     ;;
11842   esac 
11843 else
11844   echo "$ac_t""no" 1>&6
11845
11846 fi
11847
11848
11849
11850 #################################################
11851 # check for experimental netatalk resource fork support
11852 echo $ac_n "checking whether to support netatalk""... $ac_c" 1>&6
11853 echo "configure:11854: checking whether to support netatalk" >&5
11854 # Check whether --with-netatalk or --without-netatalk was given.
11855 if test "${with_netatalk+set}" = set; then
11856   withval="$with_netatalk"
11857    case "$withval" in
11858   yes)
11859     echo "$ac_t""yes" 1>&6
11860     cat >> confdefs.h <<\EOF
11861 #define WITH_NETATALK 1
11862 EOF
11863
11864     ;;
11865   *)
11866     echo "$ac_t""no" 1>&6
11867     ;;
11868   esac 
11869 else
11870   echo "$ac_t""no" 1>&6
11871
11872 fi
11873
11874
11875 #################################################
11876 # check for experimental disk-quotas support
11877 QUOTAOBJS=smbd/noquotas.o
11878
11879 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
11880 echo "configure:11881: checking whether to support disk-quotas" >&5
11881 # Check whether --with-quotas or --without-quotas was given.
11882 if test "${with_quotas+set}" = set; then
11883   withval="$with_quotas"
11884    case "$withval" in
11885   yes)
11886     echo "$ac_t""yes" 1>&6
11887     QUOTAOBJS=smbd/quotas.o
11888     ;;
11889   *)
11890     echo "$ac_t""no" 1>&6
11891     ;;
11892   esac 
11893 else
11894   echo "$ac_t""no" 1>&6
11895
11896 fi
11897
11898
11899
11900 #################################################
11901 # check for experimental utmp accounting
11902
11903 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
11904 echo "configure:11905: checking whether to support utmp accounting" >&5
11905 # Check whether --with-utmp or --without-utmp was given.
11906 if test "${with_utmp+set}" = set; then
11907   withval="$with_utmp"
11908    case "$withval" in
11909   yes)
11910     echo "$ac_t""yes" 1>&6
11911     cat >> confdefs.h <<\EOF
11912 #define WITH_UTMP 1
11913 EOF
11914
11915     ;;
11916   *)
11917     echo "$ac_t""no" 1>&6
11918     ;;
11919   esac 
11920 else
11921   echo "$ac_t""no" 1>&6
11922
11923 fi
11924
11925
11926 #################################################
11927 # check for MS Dfs support
11928
11929 echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6
11930 echo "configure:11931: checking whether to support Microsoft Dfs" >&5
11931 # Check whether --with-msdfs or --without-msdfs was given.
11932 if test "${with_msdfs+set}" = set; then
11933   withval="$with_msdfs"
11934    case "$withval" in
11935   yes)
11936      echo "$ac_t""yes" 1>&6
11937      cat >> confdefs.h <<\EOF
11938 #define WITH_MSDFS 1
11939 EOF
11940
11941      ;;
11942   *)
11943     echo "$ac_t""no" 1>&6
11944     ;;
11945   esac 
11946 else
11947   echo "$ac_t""no" 1>&6
11948
11949 fi
11950
11951
11952 #################################################
11953 # set private directory location
11954 # Check whether --with-privatedir or --without-privatedir was given.
11955 if test "${with_privatedir+set}" = set; then
11956   withval="$with_privatedir"
11957    case "$withval" in
11958   yes|no)
11959   #
11960   # Just in case anybody calls it without argument
11961   #
11962     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
11963     privatedir='${prefix}/private'
11964   ;;
11965   * )
11966     privatedir="$withval"
11967     ;;
11968   esac
11969   
11970 else
11971   privatedir='${prefix}/private'
11972    
11973
11974 fi
11975
11976
11977 #################################################
11978 # set lock directory location
11979 # Check whether --with-lockdir or --without-lockdir was given.
11980 if test "${with_lockdir+set}" = set; then
11981   withval="$with_lockdir"
11982    case "$withval" in
11983   yes|no)
11984   #
11985   # Just in case anybody calls it without argument
11986   #
11987     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
11988     lockdir='$(VARDIR)/locks'
11989   ;;
11990   * )
11991     lockdir="$withval"
11992     ;;
11993   esac
11994   
11995 else
11996   lockdir='$(VARDIR)/locks'
11997    
11998
11999 fi
12000
12001
12002 #################################################
12003 # set SWAT directory location
12004 # Check whether --with-swatdir or --without-swatdir was given.
12005 if test "${with_swatdir+set}" = set; then
12006   withval="$with_swatdir"
12007    case "$withval" in
12008   yes|no)
12009   #
12010   # Just in case anybody does it
12011   #
12012     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
12013     swatdir='${prefix}/swat'
12014   ;;
12015   * )
12016     swatdir="$withval"
12017     ;;
12018   esac
12019   
12020 else
12021   swatdir='${prefix}/swat'
12022    
12023
12024 fi
12025
12026
12027 #################################################
12028 # these tests are taken from the GNU fileutils package
12029 echo "checking how to get filesystem space usage" 1>&6
12030 echo "configure:12031: checking how to get filesystem space usage" >&5
12031 space=no
12032
12033 # Test for statvfs64.
12034 if test $space = no; then
12035   # SVR4
12036   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
12037 echo "configure:12038: checking statvfs64 function (SVR4)" >&5
12038 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
12039   echo $ac_n "(cached) $ac_c" 1>&6
12040 else
12041   if test "$cross_compiling" = yes; then
12042   fu_cv_sys_stat_statvfs64=cross
12043 else
12044   cat > conftest.$ac_ext <<EOF
12045 #line 12046 "configure"
12046 #include "confdefs.h"
12047
12048 #if defined(HAVE_UNISTD_H)
12049 #include <unistd.h>
12050 #endif
12051 #include <sys/types.h>
12052 #include <sys/statvfs.h>
12053   main ()
12054   {
12055     struct statvfs64 fsd;
12056     exit (statvfs64 (".", &fsd));
12057   }
12058 EOF
12059 if { (eval echo configure:12060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12060 then
12061   fu_cv_sys_stat_statvfs64=yes
12062 else
12063   echo "configure: failed program was:" >&5
12064   cat conftest.$ac_ext >&5
12065   rm -fr conftest*
12066   fu_cv_sys_stat_statvfs64=no
12067 fi
12068 rm -fr conftest*
12069 fi
12070
12071 fi
12072
12073 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
12074   if test $fu_cv_sys_stat_statvfs64 = yes; then
12075     space=yes
12076     cat >> confdefs.h <<\EOF
12077 #define STAT_STATVFS64 1
12078 EOF
12079
12080   fi
12081 fi
12082
12083 # Perform only the link test since it seems there are no variants of the
12084 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
12085 # because that got a false positive on SCO OSR5.  Adding the declaration
12086 # of a `struct statvfs' causes this test to fail (as it should) on such
12087 # systems.  That system is reported to work fine with STAT_STATFS4 which
12088 # is what it gets when this test fails.
12089 if test $space = no; then
12090   # SVR4
12091   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
12092 echo "configure:12093: checking statvfs function (SVR4)" >&5
12093 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
12094   echo $ac_n "(cached) $ac_c" 1>&6
12095 else
12096   cat > conftest.$ac_ext <<EOF
12097 #line 12098 "configure"
12098 #include "confdefs.h"
12099 #include <sys/types.h>
12100 #include <sys/statvfs.h>
12101 int main() {
12102 struct statvfs fsd; statvfs (0, &fsd);
12103 ; return 0; }
12104 EOF
12105 if { (eval echo configure:12106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12106   rm -rf conftest*
12107   fu_cv_sys_stat_statvfs=yes
12108 else
12109   echo "configure: failed program was:" >&5
12110   cat conftest.$ac_ext >&5
12111   rm -rf conftest*
12112   fu_cv_sys_stat_statvfs=no
12113 fi
12114 rm -f conftest*
12115 fi
12116
12117 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
12118   if test $fu_cv_sys_stat_statvfs = yes; then
12119     space=yes
12120     cat >> confdefs.h <<\EOF
12121 #define STAT_STATVFS 1
12122 EOF
12123
12124   fi
12125 fi
12126
12127 if test $space = no; then
12128   # DEC Alpha running OSF/1
12129   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
12130 echo "configure:12131: checking for 3-argument statfs function (DEC OSF/1)" >&5
12131   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
12132   echo $ac_n "(cached) $ac_c" 1>&6
12133 else
12134   if test "$cross_compiling" = yes; then
12135   fu_cv_sys_stat_statfs3_osf1=no
12136 else
12137   cat > conftest.$ac_ext <<EOF
12138 #line 12139 "configure"
12139 #include "confdefs.h"
12140
12141 #include <sys/param.h>
12142 #include <sys/types.h>
12143 #include <sys/mount.h>
12144   main ()
12145   {
12146     struct statfs fsd;
12147     fsd.f_fsize = 0;
12148     exit (statfs (".", &fsd, sizeof (struct statfs)));
12149   }
12150 EOF
12151 if { (eval echo configure:12152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12152 then
12153   fu_cv_sys_stat_statfs3_osf1=yes
12154 else
12155   echo "configure: failed program was:" >&5
12156   cat conftest.$ac_ext >&5
12157   rm -fr conftest*
12158   fu_cv_sys_stat_statfs3_osf1=no
12159 fi
12160 rm -fr conftest*
12161 fi
12162
12163 fi
12164
12165   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
12166   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
12167     space=yes
12168     cat >> confdefs.h <<\EOF
12169 #define STAT_STATFS3_OSF1 1
12170 EOF
12171
12172   fi
12173 fi
12174
12175 if test $space = no; then
12176 # AIX
12177   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
12178 echo "configure:12179: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
12179   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
12180   echo $ac_n "(cached) $ac_c" 1>&6
12181 else
12182   if test "$cross_compiling" = yes; then
12183   fu_cv_sys_stat_statfs2_bsize=no
12184 else
12185   cat > conftest.$ac_ext <<EOF
12186 #line 12187 "configure"
12187 #include "confdefs.h"
12188
12189 #ifdef HAVE_SYS_PARAM_H
12190 #include <sys/param.h>
12191 #endif
12192 #ifdef HAVE_SYS_MOUNT_H
12193 #include <sys/mount.h>
12194 #endif
12195 #ifdef HAVE_SYS_VFS_H
12196 #include <sys/vfs.h>
12197 #endif
12198   main ()
12199   {
12200   struct statfs fsd;
12201   fsd.f_bsize = 0;
12202   exit (statfs (".", &fsd));
12203   }
12204 EOF
12205 if { (eval echo configure:12206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12206 then
12207   fu_cv_sys_stat_statfs2_bsize=yes
12208 else
12209   echo "configure: failed program was:" >&5
12210   cat conftest.$ac_ext >&5
12211   rm -fr conftest*
12212   fu_cv_sys_stat_statfs2_bsize=no
12213 fi
12214 rm -fr conftest*
12215 fi
12216
12217 fi
12218
12219   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
12220   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
12221     space=yes
12222     cat >> confdefs.h <<\EOF
12223 #define STAT_STATFS2_BSIZE 1
12224 EOF
12225
12226   fi
12227 fi
12228
12229 if test $space = no; then
12230 # SVR3
12231   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
12232 echo "configure:12233: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
12233   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
12234   echo $ac_n "(cached) $ac_c" 1>&6
12235 else
12236   if test "$cross_compiling" = yes; then
12237   fu_cv_sys_stat_statfs4=no
12238 else
12239   cat > conftest.$ac_ext <<EOF
12240 #line 12241 "configure"
12241 #include "confdefs.h"
12242 #include <sys/types.h>
12243 #include <sys/statfs.h>
12244   main ()
12245   {
12246   struct statfs fsd;
12247   exit (statfs (".", &fsd, sizeof fsd, 0));
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_statfs4=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_statfs4=no
12258 fi
12259 rm -fr conftest*
12260 fi
12261
12262 fi
12263
12264   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
12265   if test $fu_cv_sys_stat_statfs4 = yes; then
12266     space=yes
12267     cat >> confdefs.h <<\EOF
12268 #define STAT_STATFS4 1
12269 EOF
12270
12271   fi
12272 fi
12273
12274 if test $space = no; then
12275 # 4.4BSD and NetBSD
12276   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
12277 echo "configure:12278: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
12278   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
12279   echo $ac_n "(cached) $ac_c" 1>&6
12280 else
12281   if test "$cross_compiling" = yes; then
12282   fu_cv_sys_stat_statfs2_fsize=no
12283 else
12284   cat > conftest.$ac_ext <<EOF
12285 #line 12286 "configure"
12286 #include "confdefs.h"
12287 #include <sys/types.h>
12288 #ifdef HAVE_SYS_PARAM_H
12289 #include <sys/param.h>
12290 #endif
12291 #ifdef HAVE_SYS_MOUNT_H
12292 #include <sys/mount.h>
12293 #endif
12294   main ()
12295   {
12296   struct statfs fsd;
12297   fsd.f_fsize = 0;
12298   exit (statfs (".", &fsd));
12299   }
12300 EOF
12301 if { (eval echo configure:12302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12302 then
12303   fu_cv_sys_stat_statfs2_fsize=yes
12304 else
12305   echo "configure: failed program was:" >&5
12306   cat conftest.$ac_ext >&5
12307   rm -fr conftest*
12308   fu_cv_sys_stat_statfs2_fsize=no
12309 fi
12310 rm -fr conftest*
12311 fi
12312
12313 fi
12314
12315   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
12316   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
12317     space=yes
12318     cat >> confdefs.h <<\EOF
12319 #define STAT_STATFS2_FSIZE 1
12320 EOF
12321
12322   fi
12323 fi
12324
12325 if test $space = no; then
12326   # Ultrix
12327   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
12328 echo "configure:12329: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
12329   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
12330   echo $ac_n "(cached) $ac_c" 1>&6
12331 else
12332   if test "$cross_compiling" = yes; then
12333   fu_cv_sys_stat_fs_data=no
12334 else
12335   cat > conftest.$ac_ext <<EOF
12336 #line 12337 "configure"
12337 #include "confdefs.h"
12338 #include <sys/types.h>
12339 #ifdef HAVE_SYS_PARAM_H
12340 #include <sys/param.h>
12341 #endif
12342 #ifdef HAVE_SYS_MOUNT_H
12343 #include <sys/mount.h>
12344 #endif
12345 #ifdef HAVE_SYS_FS_TYPES_H
12346 #include <sys/fs_types.h>
12347 #endif
12348   main ()
12349   {
12350   struct fs_data fsd;
12351   /* Ultrix's statfs returns 1 for success,
12352      0 for not mounted, -1 for failure.  */
12353   exit (statfs (".", &fsd) != 1);
12354   }
12355 EOF
12356 if { (eval echo configure:12357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12357 then
12358   fu_cv_sys_stat_fs_data=yes
12359 else
12360   echo "configure: failed program was:" >&5
12361   cat conftest.$ac_ext >&5
12362   rm -fr conftest*
12363   fu_cv_sys_stat_fs_data=no
12364 fi
12365 rm -fr conftest*
12366 fi
12367
12368 fi
12369
12370   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
12371   if test $fu_cv_sys_stat_fs_data = yes; then
12372     space=yes
12373     cat >> confdefs.h <<\EOF
12374 #define STAT_STATFS2_FS_DATA 1
12375 EOF
12376
12377   fi
12378 fi
12379
12380 #
12381 # As a gating factor for large file support, in order to
12382 # use <4GB files we must have the following minimal support
12383 # available.
12384 # long long, and a 64 bit off_t or off64_t.
12385 # If we don't have all of these then disable large
12386 # file support.
12387 #
12388 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
12389 echo "configure:12390: checking if large file support can be enabled" >&5
12390 cat > conftest.$ac_ext <<EOF
12391 #line 12392 "configure"
12392 #include "confdefs.h"
12393
12394 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
12395 #include <sys/types.h>
12396 #else
12397 __COMPILE_ERROR_
12398 #endif
12399
12400 int main() {
12401 int i
12402 ; return 0; }
12403 EOF
12404 if { (eval echo configure:12405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12405   rm -rf conftest*
12406   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
12407 else
12408   echo "configure: failed program was:" >&5
12409   cat conftest.$ac_ext >&5
12410   rm -rf conftest*
12411   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
12412 fi
12413 rm -f conftest*
12414 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
12415     cat >> confdefs.h <<\EOF
12416 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
12417 EOF
12418
12419 fi
12420 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
12421
12422 # Check whether --with-spinlocks or --without-spinlocks was given.
12423 if test "${with_spinlocks+set}" = set; then
12424   withval="$with_spinlocks"
12425   :
12426 fi
12427
12428 if test "x$with_spinlocks" = "xyes"; then
12429     cat >> confdefs.h <<\EOF
12430 #define USE_SPINLOCKS 1
12431 EOF
12432
12433
12434     case "$host_cpu" in
12435         sparc)
12436             cat >> confdefs.h <<\EOF
12437 #define SPARC_SPINLOCKS 1
12438 EOF
12439
12440             ;;
12441
12442         i386|i486|i586|i686)
12443             cat >> confdefs.h <<\EOF
12444 #define INTEL_SPINLOCKS 1
12445 EOF
12446
12447             ;;
12448
12449         mips)
12450             cat >> confdefs.h <<\EOF
12451 #define MIPS_SPINLOCKS 1
12452 EOF
12453
12454             ;;
12455
12456         powerpc)
12457             cat >> confdefs.h <<\EOF
12458 #define POWERPC_SPINLOCKS 1
12459 EOF
12460
12461             ;;
12462     esac
12463 fi
12464
12465 #################################################
12466 # check for ACL support
12467
12468 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
12469 echo "configure:12470: checking whether to support ACLs" >&5
12470 # Check whether --with-acl-support or --without-acl-support was given.
12471 if test "${with_acl_support+set}" = set; then
12472   withval="$with_acl_support"
12473    case "$withval" in
12474   yes)
12475
12476         case "$host_os" in
12477         *sysv5*)
12478             echo "$ac_t""Using UnixWare ACLs" 1>&6
12479             cat >> confdefs.h <<\EOF
12480 #define HAVE_UNIXWARE_ACLS 1
12481 EOF
12482
12483             ;;
12484         *solaris*)
12485             echo "$ac_t""Using solaris ACLs" 1>&6
12486             cat >> confdefs.h <<\EOF
12487 #define HAVE_SOLARIS_ACLS 1
12488 EOF
12489
12490             ;;
12491                 *irix*)
12492                         echo "$ac_t""Using IRIX ACLs" 1>&6
12493                         cat >> confdefs.h <<\EOF
12494 #define HAVE_IRIX_ACLS 1
12495 EOF
12496
12497                         ;;
12498                 *aix*)
12499                         echo "$ac_t""Using AIX ACLs" 1>&6
12500                         cat >> confdefs.h <<\EOF
12501 #define HAVE_AIX_ACLS 1
12502 EOF
12503
12504                         ;;
12505         *)
12506                         echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
12507 echo "configure:12508: checking for acl_get_file in -lacl" >&5
12508 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
12509 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12510   echo $ac_n "(cached) $ac_c" 1>&6
12511 else
12512   ac_save_LIBS="$LIBS"
12513 LIBS="-lacl  $LIBS"
12514 cat > conftest.$ac_ext <<EOF
12515 #line 12516 "configure"
12516 #include "confdefs.h"
12517 /* Override any gcc2 internal prototype to avoid an error.  */
12518 /* We use char because int might match the return type of a gcc2
12519     builtin and then its argument prototype would still apply.  */
12520 char acl_get_file();
12521
12522 int main() {
12523 acl_get_file()
12524 ; return 0; }
12525 EOF
12526 if { (eval echo configure:12527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12527   rm -rf conftest*
12528   eval "ac_cv_lib_$ac_lib_var=yes"
12529 else
12530   echo "configure: failed program was:" >&5
12531   cat conftest.$ac_ext >&5
12532   rm -rf conftest*
12533   eval "ac_cv_lib_$ac_lib_var=no"
12534 fi
12535 rm -f conftest*
12536 LIBS="$ac_save_LIBS"
12537
12538 fi
12539 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12540   echo "$ac_t""yes" 1>&6
12541     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12542     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12543   cat >> confdefs.h <<EOF
12544 #define $ac_tr_lib 1
12545 EOF
12546
12547   LIBS="-lacl $LIBS"
12548
12549 else
12550   echo "$ac_t""no" 1>&6
12551 fi
12552
12553                         echo $ac_n "checking for ACL support""... $ac_c" 1>&6
12554 echo "configure:12555: checking for ACL support" >&5
12555 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
12556   echo $ac_n "(cached) $ac_c" 1>&6
12557 else
12558   
12559                         cat > conftest.$ac_ext <<EOF
12560 #line 12561 "configure"
12561 #include "confdefs.h"
12562 #include <sys/types.h>
12563 #include <sys/acl.h>
12564 int main() {
12565  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
12566 ; return 0; }
12567 EOF
12568 if { (eval echo configure:12569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12569   rm -rf conftest*
12570   samba_cv_HAVE_POSIX_ACLS=yes
12571 else
12572   echo "configure: failed program was:" >&5
12573   cat conftest.$ac_ext >&5
12574   rm -rf conftest*
12575   samba_cv_HAVE_POSIX_ACLS=no
12576 fi
12577 rm -f conftest*
12578 fi
12579
12580 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
12581                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
12582                                 echo "$ac_t""Using posix ACLs" 1>&6
12583                                 cat >> confdefs.h <<\EOF
12584 #define HAVE_POSIX_ACLS 1
12585 EOF
12586
12587                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
12588 echo "configure:12589: checking for acl_get_perm_np" >&5
12589 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
12590   echo $ac_n "(cached) $ac_c" 1>&6
12591 else
12592   
12593                                 cat > conftest.$ac_ext <<EOF
12594 #line 12595 "configure"
12595 #include "confdefs.h"
12596 #include <sys/types.h>
12597 #include <sys/acl.h>
12598 int main() {
12599  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
12600 ; return 0; }
12601 EOF
12602 if { (eval echo configure:12603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12603   rm -rf conftest*
12604   samba_cv_HAVE_ACL_GET_PERM_NP=yes
12605 else
12606   echo "configure: failed program was:" >&5
12607   cat conftest.$ac_ext >&5
12608   rm -rf conftest*
12609   samba_cv_HAVE_ACL_GET_PERM_NP=no
12610 fi
12611 rm -f conftest*
12612 fi
12613
12614 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
12615                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
12616                                         cat >> confdefs.h <<\EOF
12617 #define HAVE_ACL_GET_PERM_NP 1
12618 EOF
12619
12620                                 fi
12621                         fi
12622                         echo $ac_n "checking for XFS ACL support""... $ac_c" 1>&6
12623 echo "configure:12624: checking for XFS ACL support" >&5
12624 if eval "test \"`echo '$''{'samba_cv_HAVE_XFS_ACLS'+set}'`\" = set"; then
12625   echo $ac_n "(cached) $ac_c" 1>&6
12626 else
12627   
12628                         cat > conftest.$ac_ext <<EOF
12629 #line 12630 "configure"
12630 #include "confdefs.h"
12631 #include <sys/types.h>
12632 #include <acl/acl.h>
12633 int main() {
12634  char test_str[13] = SGI_ACL_FILE; 
12635 ; return 0; }
12636 EOF
12637 if { (eval echo configure:12638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12638   rm -rf conftest*
12639   samba_cv_HAVE_XFS_ACLS=yes
12640 else
12641   echo "configure: failed program was:" >&5
12642   cat conftest.$ac_ext >&5
12643   rm -rf conftest*
12644   samba_cv_XFS_POSIX_ACLS=no
12645 fi
12646 rm -f conftest*
12647 fi
12648
12649 echo "$ac_t""$samba_cv_HAVE_XFS_ACLS" 1>&6
12650                         if test x"$samba_cv_HAVE_XFS_ACLS" = x"yes"; then
12651                                 echo "$ac_t""Using XFS ACLs" 1>&6
12652                                 cat >> confdefs.h <<\EOF
12653 #define HAVE_XFS_ACLS 1
12654 EOF
12655
12656                         fi
12657             ;;
12658         esac
12659         ;;
12660   *)
12661     echo "$ac_t""no" 1>&6
12662     cat >> confdefs.h <<\EOF
12663 #define HAVE_NO_ACLS 1
12664 EOF
12665
12666     ;;
12667   esac 
12668 else
12669   cat >> confdefs.h <<\EOF
12670 #define HAVE_NO_ACLS 1
12671 EOF
12672
12673   echo "$ac_t""no" 1>&6
12674
12675 fi
12676
12677
12678 #################################################
12679 # check whether winbind is supported on this platform
12680
12681 echo $ac_n "checking whether to compile winbind""... $ac_c" 1>&6
12682 echo "configure:12683: checking whether to compile winbind" >&5
12683
12684 case "$host_os" in 
12685         *linux*|*solaris*)
12686                 WINBIND_TARGETS="$WINBIND_TARGETS \$(WINBIND_PROGS)"
12687                 ;;
12688         *)
12689                 winbind_no_reason=", unsupported on $host_os"
12690                 ;;
12691 esac
12692
12693 # Check whether --with-winbind or --without-winbind was given.
12694 if test "${with_winbind+set}" = set; then
12695   withval="$with_winbind"
12696    
12697   case "$withval" in
12698         no)
12699                 WINBIND_TARGETS=""
12700                 winbind_reason=""
12701                 ;;
12702   esac 
12703 fi
12704
12705
12706 if test x"$WINBIND_TARGETS" = x; then
12707         echo "$ac_t""no$winbind_no_reason" 1>&6
12708 else
12709         echo "$ac_t""yes" 1>&6
12710 fi
12711
12712
12713
12714 #################################################
12715 # final configure stuff
12716
12717 echo "checking configure summary"
12718 if test "$cross_compiling" = yes; then
12719   :
12720 else
12721   cat > conftest.$ac_ext <<EOF
12722 #line 12723 "configure"
12723 #include "confdefs.h"
12724 #include "${srcdir-.}/tests/summary.c"
12725 EOF
12726 if { (eval echo configure:12727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12727 then
12728   echo "configure OK";
12729 else
12730   echo "configure: failed program was:" >&5
12731   cat conftest.$ac_ext >&5
12732   rm -fr conftest*
12733   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
12734 fi
12735 rm -fr conftest*
12736 fi
12737
12738
12739 builddir=`pwd`
12740
12741
12742 trap '' 1 2 15
12743 cat > confcache <<\EOF
12744 # This file is a shell script that caches the results of configure
12745 # tests run on this system so they can be shared between configure
12746 # scripts and configure runs.  It is not useful on other systems.
12747 # If it contains results you don't want to keep, you may remove or edit it.
12748 #
12749 # By default, configure uses ./config.cache as the cache file,
12750 # creating it if it does not exist already.  You can give configure
12751 # the --cache-file=FILE option to use a different cache file; that is
12752 # what configure does when it calls configure scripts in
12753 # subdirectories, so they share the cache.
12754 # Giving --cache-file=/dev/null disables caching, for debugging configure.
12755 # config.status only pays attention to the cache file if you give it the
12756 # --recheck option to rerun configure.
12757 #
12758 EOF
12759 # The following way of writing the cache mishandles newlines in values,
12760 # but we know of no workaround that is simple, portable, and efficient.
12761 # So, don't put newlines in cache variables' values.
12762 # Ultrix sh set writes to stderr and can't be redirected directly,
12763 # and sets the high bit in the cache file unless we assign to the vars.
12764 (set) 2>&1 |
12765   case `(ac_space=' '; set | grep ac_space) 2>&1` in
12766   *ac_space=\ *)
12767     # `set' does not quote correctly, so add quotes (double-quote substitution
12768     # turns \\\\ into \\, and sed turns \\ into \).
12769     sed -n \
12770       -e "s/'/'\\\\''/g" \
12771       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
12772     ;;
12773   *)
12774     # `set' quotes correctly as required by POSIX, so do not add quotes.
12775     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
12776     ;;
12777   esac >> confcache
12778 if cmp -s $cache_file confcache; then
12779   :
12780 else
12781   if test -w $cache_file; then
12782     echo "updating cache $cache_file"
12783     cat confcache > $cache_file
12784   else
12785     echo "not updating unwritable cache $cache_file"
12786   fi
12787 fi
12788 rm -f confcache
12789
12790 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12791
12792 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12793 # Let make expand exec_prefix.
12794 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12795
12796 # Any assignment to VPATH causes Sun make to only execute
12797 # the first set of double-colon rules, so remove it if not needed.
12798 # If there is a colon in the path, we need to keep it.
12799 if test "x$srcdir" = x.; then
12800   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12801 fi
12802
12803 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12804
12805 DEFS=-DHAVE_CONFIG_H
12806
12807 # Without the "./", some shells look in PATH for config.status.
12808 : ${CONFIG_STATUS=./config.status}
12809
12810 echo creating $CONFIG_STATUS
12811 rm -f $CONFIG_STATUS
12812 cat > $CONFIG_STATUS <<EOF
12813 #! /bin/sh
12814 # Generated automatically by configure.
12815 # Run this file to recreate the current configuration.
12816 # This directory was configured as follows,
12817 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12818 #
12819 # $0 $ac_configure_args
12820 #
12821 # Compiler output produced by configure, useful for debugging
12822 # configure, is in ./config.log if it exists.
12823
12824 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12825 for ac_option
12826 do
12827   case "\$ac_option" in
12828   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12829     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12830     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12831   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12832     echo "$CONFIG_STATUS generated by autoconf version 2.13"
12833     exit 0 ;;
12834   -help | --help | --hel | --he | --h)
12835     echo "\$ac_cs_usage"; exit 0 ;;
12836   *) echo "\$ac_cs_usage"; exit 1 ;;
12837   esac
12838 done
12839
12840 ac_given_srcdir=$srcdir
12841 ac_given_INSTALL="$INSTALL"
12842
12843 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12844 EOF
12845 cat >> $CONFIG_STATUS <<EOF
12846
12847 # Protect against being on the right side of a sed subst in config.status.
12848 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12849  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12850 $ac_vpsub
12851 $extrasub
12852 s%@SHELL@%$SHELL%g
12853 s%@CFLAGS@%$CFLAGS%g
12854 s%@CPPFLAGS@%$CPPFLAGS%g
12855 s%@CXXFLAGS@%$CXXFLAGS%g
12856 s%@FFLAGS@%$FFLAGS%g
12857 s%@DEFS@%$DEFS%g
12858 s%@LDFLAGS@%$LDFLAGS%g
12859 s%@LIBS@%$LIBS%g
12860 s%@exec_prefix@%$exec_prefix%g
12861 s%@prefix@%$prefix%g
12862 s%@program_transform_name@%$program_transform_name%g
12863 s%@bindir@%$bindir%g
12864 s%@sbindir@%$sbindir%g
12865 s%@libexecdir@%$libexecdir%g
12866 s%@datadir@%$datadir%g
12867 s%@sysconfdir@%$sysconfdir%g
12868 s%@sharedstatedir@%$sharedstatedir%g
12869 s%@localstatedir@%$localstatedir%g
12870 s%@libdir@%$libdir%g
12871 s%@includedir@%$includedir%g
12872 s%@oldincludedir@%$oldincludedir%g
12873 s%@infodir@%$infodir%g
12874 s%@mandir@%$mandir%g
12875 s%@RUNPROG@%$RUNPROG%g
12876 s%@MPROGS@%$MPROGS%g
12877 s%@LDSHFLAGS@%$LDSHFLAGS%g
12878 s%@HOST_OS@%$HOST_OS%g
12879 s%@PAM_MOD@%$PAM_MOD%g
12880 s%@WRAP@%$WRAP%g
12881 s%@WRAP32@%$WRAP32%g
12882 s%@PICFLAG@%$PICFLAG%g
12883 s%@SHLIBEXT@%$SHLIBEXT%g
12884 s%@CC@%$CC%g
12885 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12886 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
12887 s%@INSTALL_DATA@%$INSTALL_DATA%g
12888 s%@AWK@%$AWK%g
12889 s%@host@%$host%g
12890 s%@host_alias@%$host_alias%g
12891 s%@host_cpu@%$host_cpu%g
12892 s%@host_vendor@%$host_vendor%g
12893 s%@host_os@%$host_os%g
12894 s%@build@%$build%g
12895 s%@build_alias@%$build_alias%g
12896 s%@build_cpu@%$build_cpu%g
12897 s%@build_vendor@%$build_vendor%g
12898 s%@build_os@%$build_os%g
12899 s%@RANLIB@%$RANLIB%g
12900 s%@LN_S@%$LN_S%g
12901 s%@LIBTOOL@%$LIBTOOL%g
12902 s%@LIBTOOL_DEPS@%$LIBTOOL_DEPS%g
12903 s%@BROKEN_CC@%$BROKEN_CC%g
12904 s%@target@%$target%g
12905 s%@target_alias@%$target_alias%g
12906 s%@target_cpu@%$target_cpu%g
12907 s%@target_vendor@%$target_vendor%g
12908 s%@target_os@%$target_os%g
12909 s%@CPP@%$CPP%g
12910 s%@LIBOBJS@%$LIBOBJS%g
12911 s%@TERMLIBS@%$TERMLIBS%g
12912 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
12913 s%@ROFF@%$ROFF%g
12914 s%@QUOTAOBJS@%$QUOTAOBJS%g
12915 s%@privatedir@%$privatedir%g
12916 s%@lockdir@%$lockdir%g
12917 s%@swatdir@%$swatdir%g
12918 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
12919 s%@builddir@%$builddir%g
12920
12921 CEOF
12922 EOF
12923
12924 cat >> $CONFIG_STATUS <<\EOF
12925
12926 # Split the substitutions into bite-sized pieces for seds with
12927 # small command number limits, like on Digital OSF/1 and HP-UX.
12928 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
12929 ac_file=1 # Number of current file.
12930 ac_beg=1 # First line for current file.
12931 ac_end=$ac_max_sed_cmds # Line after last line for current file.
12932 ac_more_lines=:
12933 ac_sed_cmds=""
12934 while $ac_more_lines; do
12935   if test $ac_beg -gt 1; then
12936     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
12937   else
12938     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
12939   fi
12940   if test ! -s conftest.s$ac_file; then
12941     ac_more_lines=false
12942     rm -f conftest.s$ac_file
12943   else
12944     if test -z "$ac_sed_cmds"; then
12945       ac_sed_cmds="sed -f conftest.s$ac_file"
12946     else
12947       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
12948     fi
12949     ac_file=`expr $ac_file + 1`
12950     ac_beg=$ac_end
12951     ac_end=`expr $ac_end + $ac_max_sed_cmds`
12952   fi
12953 done
12954 if test -z "$ac_sed_cmds"; then
12955   ac_sed_cmds=cat
12956 fi
12957 EOF
12958
12959 cat >> $CONFIG_STATUS <<EOF
12960
12961 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
12962 EOF
12963 cat >> $CONFIG_STATUS <<\EOF
12964 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
12965   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12966   case "$ac_file" in
12967   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12968        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12969   *) ac_file_in="${ac_file}.in" ;;
12970   esac
12971
12972   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
12973
12974   # Remove last slash and all that follows it.  Not all systems have dirname.
12975   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12976   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12977     # The file is in a subdirectory.
12978     test ! -d "$ac_dir" && mkdir "$ac_dir"
12979     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
12980     # A "../" for each directory in $ac_dir_suffix.
12981     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
12982   else
12983     ac_dir_suffix= ac_dots=
12984   fi
12985
12986   case "$ac_given_srcdir" in
12987   .)  srcdir=.
12988       if test -z "$ac_dots"; then top_srcdir=.
12989       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
12990   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
12991   *) # Relative path.
12992     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
12993     top_srcdir="$ac_dots$ac_given_srcdir" ;;
12994   esac
12995
12996   case "$ac_given_INSTALL" in
12997   [/$]*) INSTALL="$ac_given_INSTALL" ;;
12998   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
12999   esac
13000
13001   echo creating "$ac_file"
13002   rm -f "$ac_file"
13003   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13004   case "$ac_file" in
13005   *Makefile*) ac_comsub="1i\\
13006 # $configure_input" ;;
13007   *) ac_comsub= ;;
13008   esac
13009
13010   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13011   sed -e "$ac_comsub
13012 s%@configure_input@%$configure_input%g
13013 s%@srcdir@%$srcdir%g
13014 s%@top_srcdir@%$top_srcdir%g
13015 s%@INSTALL@%$INSTALL%g
13016 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13017 fi; done
13018 rm -f conftest.s*
13019
13020 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13021 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13022 #
13023 # ac_d sets the value in "#define NAME VALUE" lines.
13024 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13025 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13026 ac_dC='\3'
13027 ac_dD='%g'
13028 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13029 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13030 ac_uB='\([      ]\)%\1#\2define\3'
13031 ac_uC=' '
13032 ac_uD='\4%g'
13033 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13034 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13035 ac_eB='$%\1#\2define\3'
13036 ac_eC=' '
13037 ac_eD='%g'
13038
13039 if test "${CONFIG_HEADERS+set}" != set; then
13040 EOF
13041 cat >> $CONFIG_STATUS <<EOF
13042   CONFIG_HEADERS="include/config.h"
13043 EOF
13044 cat >> $CONFIG_STATUS <<\EOF
13045 fi
13046 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13047   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13048   case "$ac_file" in
13049   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13050        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13051   *) ac_file_in="${ac_file}.in" ;;
13052   esac
13053
13054   echo creating $ac_file
13055
13056   rm -f conftest.frag conftest.in conftest.out
13057   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13058   cat $ac_file_inputs > conftest.in
13059
13060 EOF
13061
13062 # Transform confdefs.h into a sed script conftest.vals that substitutes
13063 # the proper values into config.h.in to produce config.h.  And first:
13064 # Protect against being on the right side of a sed subst in config.status.
13065 # Protect against being in an unquoted here document in config.status.
13066 rm -f conftest.vals
13067 cat > conftest.hdr <<\EOF
13068 s/[\\&%]/\\&/g
13069 s%[\\$`]%\\&%g
13070 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13071 s%ac_d%ac_u%gp
13072 s%ac_u%ac_e%gp
13073 EOF
13074 sed -n -f conftest.hdr confdefs.h > conftest.vals
13075 rm -f conftest.hdr
13076
13077 # This sed command replaces #undef with comments.  This is necessary, for
13078 # example, in the case of _POSIX_SOURCE, which is predefined and required
13079 # on some systems where configure will not decide to define it.
13080 cat >> conftest.vals <<\EOF
13081 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13082 EOF
13083
13084 # Break up conftest.vals because some shells have a limit on
13085 # the size of here documents, and old seds have small limits too.
13086
13087 rm -f conftest.tail
13088 while :
13089 do
13090   ac_lines=`grep -c . conftest.vals`
13091   # grep -c gives empty output for an empty file on some AIX systems.
13092   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13093   # Write a limited-size here document to conftest.frag.
13094   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13095   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13096   echo 'CEOF
13097   sed -f conftest.frag conftest.in > conftest.out
13098   rm -f conftest.in
13099   mv conftest.out conftest.in
13100 ' >> $CONFIG_STATUS
13101   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13102   rm -f conftest.vals
13103   mv conftest.tail conftest.vals
13104 done
13105 rm -f conftest.vals
13106
13107 cat >> $CONFIG_STATUS <<\EOF
13108   rm -f conftest.frag conftest.h
13109   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13110   cat conftest.in >> conftest.h
13111   rm -f conftest.in
13112   if cmp -s $ac_file conftest.h 2>/dev/null; then
13113     echo "$ac_file is unchanged"
13114     rm -f conftest.h
13115   else
13116     # Remove last slash and all that follows it.  Not all systems have dirname.
13117       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13118       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13119       # The file is in a subdirectory.
13120       test ! -d "$ac_dir" && mkdir "$ac_dir"
13121     fi
13122     rm -f $ac_file
13123     mv conftest.h $ac_file
13124   fi
13125 fi; done
13126
13127 EOF
13128 cat >> $CONFIG_STATUS <<EOF
13129
13130 EOF
13131 cat >> $CONFIG_STATUS <<\EOF
13132
13133 exit 0
13134 EOF
13135 chmod +x $CONFIG_STATUS
13136 rm -fr confdefs* $ac_clean_files
13137 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
13138