Make sure we have a default st_blocksize.
[gd/samba-autobuild/.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   --with-fhs              Use FHS-compliant paths (default=no)"
17 ac_help="$ac_help
18   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
19 ac_help="$ac_help
20   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
21 ac_help="$ac_help
22   --with-piddir=DIR       Where to put pid files ($ac_default_prefix/var/locks)"
23 ac_help="$ac_help
24   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
25 ac_help="$ac_help
26   --with-configdir=DIR    Where to put configuration files (\$libdir)"
27 ac_help="$ac_help
28   --with-logfilebase=DIR  Where to put log files (\$(VARDIR))"
29 ac_help="$ac_help
30   --enable-debug          Turn on compiler debugging information (default=no)"
31 ac_help="$ac_help
32   --enable-developer      Turn on developer warnings and debugging (default=no)"
33 ac_help="$ac_help
34   --enable-krb5developer  Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no)"
35 ac_help="$ac_help
36   --enable-dmalloc        Enable heap debugging [default=no]"
37 ac_help="$ac_help
38   --enable-cups           Turn on CUPS support (default=auto)"
39 ac_help="$ac_help
40   --with-readline[=DIR]   Look for readline include/libs in DIR (default=auto) "
41 ac_help="$ac_help
42   --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) "
43 ac_help="$ac_help
44   --with-smbwrapper       Include SMB wrapper support (default=no) "
45 ac_help="$ac_help
46   --with-afs              Include AFS clear-text auth support (default=no) "
47 ac_help="$ac_help
48   --with-dce-dfs          Include DCE/DFS clear-text auth support (default=no)"
49 ac_help="$ac_help
50    --with-ads  Active Directory support (default yes)"
51 ac_help="$ac_help
52   --with-krb5=base-dir    Locate Kerberos 5 support (default=/usr)"
53 ac_help="$ac_help
54    --with-ldap  LDAP support (default yes)"
55 ac_help="$ac_help
56   --with-mysql-prefix=PFX   Prefix where MYSQL is installed (optional)"
57 ac_help="$ac_help
58   --with-mysql-exec-prefix=PFX Exec prefix where MYSQL is installed (optional)"
59 ac_help="$ac_help
60   --disable-mysqltest       Do not try to compile and run a test MYSQL program"
61 ac_help="$ac_help
62   --with-xml-prefix=PFX   Prefix where libxml is installed (optional)"
63 ac_help="$ac_help
64   --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)"
65 ac_help="$ac_help
66   --disable-xmltest       Do not try to compile and run a test LIBXML program"
67 ac_help="$ac_help
68   --with-automount        Include automount support (default=no)"
69 ac_help="$ac_help
70   --with-smbmount         Include smbmount (Linux only) support (default=no)"
71 ac_help="$ac_help
72   --with-pam              Include PAM support (default=no)"
73 ac_help="$ac_help
74   --with-pam_smbpass      Build a PAM module to allow other applications to use our smbpasswd file (default=no)"
75 ac_help="$ac_help
76   --with-sam              Build new (experimental) SAM database (default=no)"
77 ac_help="$ac_help
78   --with-ldapsam           Include LDAP SAM 2.2 compatible configuration (default=no)"
79 ac_help="$ac_help
80   --with-tdbsam           Include experimental TDB SAM support (default=no)"
81 ac_help="$ac_help
82   --with-nisplussam       Include NISPLUS SAM support (default=no)"
83 ac_help="$ac_help
84   --with-nisplus-home     Include NISPLUS_HOME support (default=no)"
85 ac_help="$ac_help
86   --with-syslog           Include experimental SYSLOG support (default=no)"
87 ac_help="$ac_help
88   --with-profiling-data   Include gathering source code profile information (default=no)"
89 ac_help="$ac_help
90   --with-quotas           Include experimental disk-quota support (default=no)"
91 ac_help="$ac_help
92   --with-utmp             Include experimental utmp accounting (default=no)"
93 ac_help="$ac_help
94   --with-manpages-langs={en,ja,pl}  Choose man pages' language(s). (en)"
95 ac_help="$ac_help
96   --with-libsmbclient     Build the libsmbclient shared library (default=yes)"
97 ac_help="$ac_help
98   --with-spinlocks        Use spin locks instead of fcntl locks (default=no) "
99 ac_help="$ac_help
100   --with-acl-support      Include ACL support (default=no)"
101 ac_help="$ac_help
102   --with-sendfile-support      Check for sendfile support (default=yes)"
103 ac_help="$ac_help
104   --with-winbind          Build winbind (default, if supported by OS)"
105 ac_help="$ac_help
106   --with-included-popt    use bundled popt library, not from system"
107 ac_help="$ac_help
108   --with-python=PYTHONNAME  build Python libraries"
109
110 # Initialize some variables set by options.
111 # The variables have the same names as the options, with
112 # dashes changed to underlines.
113 build=NONE
114 cache_file=./config.cache
115 exec_prefix=NONE
116 host=NONE
117 no_create=
118 nonopt=NONE
119 no_recursion=
120 prefix=NONE
121 program_prefix=NONE
122 program_suffix=NONE
123 program_transform_name=s,x,x,
124 silent=
125 site=
126 srcdir=
127 target=NONE
128 verbose=
129 x_includes=NONE
130 x_libraries=NONE
131 bindir='${exec_prefix}/bin'
132 sbindir='${exec_prefix}/sbin'
133 libexecdir='${exec_prefix}/libexec'
134 datadir='${prefix}/share'
135 sysconfdir='${prefix}/etc'
136 sharedstatedir='${prefix}/com'
137 localstatedir='${prefix}/var'
138 libdir='${exec_prefix}/lib'
139 includedir='${prefix}/include'
140 oldincludedir='/usr/include'
141 infodir='${prefix}/info'
142 mandir='${prefix}/man'
143
144 # Initialize some other variables.
145 subdirs=
146 MFLAGS= MAKEFLAGS=
147 SHELL=${CONFIG_SHELL-/bin/sh}
148 # Maximum number of lines to put in a shell here document.
149 ac_max_here_lines=12
150
151 ac_prev=
152 for ac_option
153 do
154
155   # If the previous option needs an argument, assign it.
156   if test -n "$ac_prev"; then
157     eval "$ac_prev=\$ac_option"
158     ac_prev=
159     continue
160   fi
161
162   case "$ac_option" in
163   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
164   *) ac_optarg= ;;
165   esac
166
167   # Accept the important Cygnus configure options, so we can diagnose typos.
168
169   case "$ac_option" in
170
171   -bindir | --bindir | --bindi | --bind | --bin | --bi)
172     ac_prev=bindir ;;
173   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
174     bindir="$ac_optarg" ;;
175
176   -build | --build | --buil | --bui | --bu)
177     ac_prev=build ;;
178   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
179     build="$ac_optarg" ;;
180
181   -cache-file | --cache-file | --cache-fil | --cache-fi \
182   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
183     ac_prev=cache_file ;;
184   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
185   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
186     cache_file="$ac_optarg" ;;
187
188   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
189     ac_prev=datadir ;;
190   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
191   | --da=*)
192     datadir="$ac_optarg" ;;
193
194   -disable-* | --disable-*)
195     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
196     # Reject names that are not valid shell variable names.
197     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
198       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
199     fi
200     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
201     eval "enable_${ac_feature}=no" ;;
202
203   -enable-* | --enable-*)
204     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
205     # Reject names that are not valid shell variable names.
206     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
207       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
208     fi
209     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
210     case "$ac_option" in
211       *=*) ;;
212       *) ac_optarg=yes ;;
213     esac
214     eval "enable_${ac_feature}='$ac_optarg'" ;;
215
216   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
217   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
218   | --exec | --exe | --ex)
219     ac_prev=exec_prefix ;;
220   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
221   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
222   | --exec=* | --exe=* | --ex=*)
223     exec_prefix="$ac_optarg" ;;
224
225   -gas | --gas | --ga | --g)
226     # Obsolete; use --with-gas.
227     with_gas=yes ;;
228
229   -help | --help | --hel | --he)
230     # Omit some internal or obsolete options to make the list less imposing.
231     # This message is too long to be a string in the A/UX 3.1 sh.
232     cat << EOF
233 Usage: configure [options] [host]
234 Options: [defaults in brackets after descriptions]
235 Configuration:
236   --cache-file=FILE       cache test results in FILE
237   --help                  print this message
238   --no-create             do not create output files
239   --quiet, --silent       do not print \`checking...' messages
240   --version               print the version of autoconf that created configure
241 Directory and file names:
242   --prefix=PREFIX         install architecture-independent files in PREFIX
243                           [$ac_default_prefix]
244   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
245                           [same as prefix]
246   --bindir=DIR            user executables in DIR [EPREFIX/bin]
247   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
248   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
249   --datadir=DIR           read-only architecture-independent data in DIR
250                           [PREFIX/share]
251   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
252   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
253                           [PREFIX/com]
254   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
255   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
256   --includedir=DIR        C header files in DIR [PREFIX/include]
257   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
258   --infodir=DIR           info documentation in DIR [PREFIX/info]
259   --mandir=DIR            man documentation in DIR [PREFIX/man]
260   --srcdir=DIR            find the sources in DIR [configure dir or ..]
261   --program-prefix=PREFIX prepend PREFIX to installed program names
262   --program-suffix=SUFFIX append SUFFIX to installed program names
263   --program-transform-name=PROGRAM
264                           run sed PROGRAM on installed program names
265 EOF
266     cat << EOF
267 Host type:
268   --build=BUILD           configure for building on BUILD [BUILD=HOST]
269   --host=HOST             configure for HOST [guessed]
270   --target=TARGET         configure for TARGET [TARGET=HOST]
271 Features and packages:
272   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
273   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
274   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
275   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
276   --x-includes=DIR        X include files are in DIR
277   --x-libraries=DIR       X library files are in DIR
278 EOF
279     if test -n "$ac_help"; then
280       echo "--enable and --with options recognized:$ac_help"
281     fi
282     exit 0 ;;
283
284   -host | --host | --hos | --ho)
285     ac_prev=host ;;
286   -host=* | --host=* | --hos=* | --ho=*)
287     host="$ac_optarg" ;;
288
289   -includedir | --includedir | --includedi | --included | --include \
290   | --includ | --inclu | --incl | --inc)
291     ac_prev=includedir ;;
292   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
293   | --includ=* | --inclu=* | --incl=* | --inc=*)
294     includedir="$ac_optarg" ;;
295
296   -infodir | --infodir | --infodi | --infod | --info | --inf)
297     ac_prev=infodir ;;
298   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
299     infodir="$ac_optarg" ;;
300
301   -libdir | --libdir | --libdi | --libd)
302     ac_prev=libdir ;;
303   -libdir=* | --libdir=* | --libdi=* | --libd=*)
304     libdir="$ac_optarg" ;;
305
306   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
307   | --libexe | --libex | --libe)
308     ac_prev=libexecdir ;;
309   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
310   | --libexe=* | --libex=* | --libe=*)
311     libexecdir="$ac_optarg" ;;
312
313   -localstatedir | --localstatedir | --localstatedi | --localstated \
314   | --localstate | --localstat | --localsta | --localst \
315   | --locals | --local | --loca | --loc | --lo)
316     ac_prev=localstatedir ;;
317   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
318   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
319   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
320     localstatedir="$ac_optarg" ;;
321
322   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
323     ac_prev=mandir ;;
324   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
325     mandir="$ac_optarg" ;;
326
327   -nfp | --nfp | --nf)
328     # Obsolete; use --without-fp.
329     with_fp=no ;;
330
331   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
332   | --no-cr | --no-c)
333     no_create=yes ;;
334
335   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
336   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
337     no_recursion=yes ;;
338
339   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
340   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
341   | --oldin | --oldi | --old | --ol | --o)
342     ac_prev=oldincludedir ;;
343   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
344   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
345   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
346     oldincludedir="$ac_optarg" ;;
347
348   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
349     ac_prev=prefix ;;
350   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
351     prefix="$ac_optarg" ;;
352
353   -program-prefix | --program-prefix | --program-prefi | --program-pref \
354   | --program-pre | --program-pr | --program-p)
355     ac_prev=program_prefix ;;
356   -program-prefix=* | --program-prefix=* | --program-prefi=* \
357   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
358     program_prefix="$ac_optarg" ;;
359
360   -program-suffix | --program-suffix | --program-suffi | --program-suff \
361   | --program-suf | --program-su | --program-s)
362     ac_prev=program_suffix ;;
363   -program-suffix=* | --program-suffix=* | --program-suffi=* \
364   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
365     program_suffix="$ac_optarg" ;;
366
367   -program-transform-name | --program-transform-name \
368   | --program-transform-nam | --program-transform-na \
369   | --program-transform-n | --program-transform- \
370   | --program-transform | --program-transfor \
371   | --program-transfo | --program-transf \
372   | --program-trans | --program-tran \
373   | --progr-tra | --program-tr | --program-t)
374     ac_prev=program_transform_name ;;
375   -program-transform-name=* | --program-transform-name=* \
376   | --program-transform-nam=* | --program-transform-na=* \
377   | --program-transform-n=* | --program-transform-=* \
378   | --program-transform=* | --program-transfor=* \
379   | --program-transfo=* | --program-transf=* \
380   | --program-trans=* | --program-tran=* \
381   | --progr-tra=* | --program-tr=* | --program-t=*)
382     program_transform_name="$ac_optarg" ;;
383
384   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
385   | -silent | --silent | --silen | --sile | --sil)
386     silent=yes ;;
387
388   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
389     ac_prev=sbindir ;;
390   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
391   | --sbi=* | --sb=*)
392     sbindir="$ac_optarg" ;;
393
394   -sharedstatedir | --sharedstatedir | --sharedstatedi \
395   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
396   | --sharedst | --shareds | --shared | --share | --shar \
397   | --sha | --sh)
398     ac_prev=sharedstatedir ;;
399   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
400   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
401   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
402   | --sha=* | --sh=*)
403     sharedstatedir="$ac_optarg" ;;
404
405   -site | --site | --sit)
406     ac_prev=site ;;
407   -site=* | --site=* | --sit=*)
408     site="$ac_optarg" ;;
409
410   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
411     ac_prev=srcdir ;;
412   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
413     srcdir="$ac_optarg" ;;
414
415   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
416   | --syscon | --sysco | --sysc | --sys | --sy)
417     ac_prev=sysconfdir ;;
418   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
419   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
420     sysconfdir="$ac_optarg" ;;
421
422   -target | --target | --targe | --targ | --tar | --ta | --t)
423     ac_prev=target ;;
424   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
425     target="$ac_optarg" ;;
426
427   -v | -verbose | --verbose | --verbos | --verbo | --verb)
428     verbose=yes ;;
429
430   -version | --version | --versio | --versi | --vers)
431     echo "configure generated by autoconf version 2.13"
432     exit 0 ;;
433
434   -with-* | --with-*)
435     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
436     # Reject names that are not valid shell variable names.
437     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
438       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
439     fi
440     ac_package=`echo $ac_package| sed 's/-/_/g'`
441     case "$ac_option" in
442       *=*) ;;
443       *) ac_optarg=yes ;;
444     esac
445     eval "with_${ac_package}='$ac_optarg'" ;;
446
447   -without-* | --without-*)
448     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
449     # Reject names that are not valid shell variable names.
450     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
451       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
452     fi
453     ac_package=`echo $ac_package| sed 's/-/_/g'`
454     eval "with_${ac_package}=no" ;;
455
456   --x)
457     # Obsolete; use --with-x.
458     with_x=yes ;;
459
460   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
461   | --x-incl | --x-inc | --x-in | --x-i)
462     ac_prev=x_includes ;;
463   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
464   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
465     x_includes="$ac_optarg" ;;
466
467   -x-libraries | --x-libraries | --x-librarie | --x-librari \
468   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
469     ac_prev=x_libraries ;;
470   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
471   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
472     x_libraries="$ac_optarg" ;;
473
474   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
475     ;;
476
477   *)
478     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
479       echo "configure: warning: $ac_option: invalid host type" 1>&2
480     fi
481     if test "x$nonopt" != xNONE; then
482       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
483     fi
484     nonopt="$ac_option"
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
492 fi
493
494 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
495
496 # File descriptor usage:
497 # 0 standard input
498 # 1 file creation
499 # 2 errors and warnings
500 # 3 some systems may open it to /dev/tty
501 # 4 used on the Kubota Titan
502 # 6 checking for... messages and results
503 # 5 compiler messages saved in config.log
504 if test "$silent" = yes; then
505   exec 6>/dev/null
506 else
507   exec 6>&1
508 fi
509 exec 5>./config.log
510
511 echo "\
512 This file contains any messages produced by compilers while
513 running configure, to aid debugging if configure makes a mistake.
514 " 1>&5
515
516 # Strip out --no-create and --no-recursion so they do not pile up.
517 # Also quote any args containing shell metacharacters.
518 ac_configure_args=
519 for ac_arg
520 do
521   case "$ac_arg" in
522   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
523   | --no-cr | --no-c) ;;
524   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
525   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
526   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
527   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
528   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
529   esac
530 done
531
532 # NLS nuisances.
533 # Only set these to C if already set.  These must not be set unconditionally
534 # because not all systems understand e.g. LANG=C (notably SCO).
535 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
536 # Non-C LC_CTYPE values break the ctype check.
537 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
538 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
539 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
540 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
541
542 # confdefs.h avoids OS command line length limits that DEFS can exceed.
543 rm -rf conftest* confdefs.h
544 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
545 echo > confdefs.h
546
547 # A filename unique to this package, relative to the directory that
548 # configure is in, which we can look for to find out if srcdir is correct.
549 ac_unique_file=include/includes.h
550
551 # Find the source files, if location was not specified.
552 if test -z "$srcdir"; then
553   ac_srcdir_defaulted=yes
554   # Try the directory containing this script, then its parent.
555   ac_prog=$0
556   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
557   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
558   srcdir=$ac_confdir
559   if test ! -r $srcdir/$ac_unique_file; then
560     srcdir=..
561   fi
562 else
563   ac_srcdir_defaulted=no
564 fi
565 if test ! -r $srcdir/$ac_unique_file; then
566   if test "$ac_srcdir_defaulted" = yes; then
567     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
568   else
569     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
570   fi
571 fi
572 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
573
574 # Prefer explicitly selected file to automatically selected ones.
575 if test -z "$CONFIG_SITE"; then
576   if test "x$prefix" != xNONE; then
577     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
578   else
579     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
580   fi
581 fi
582 for ac_site_file in $CONFIG_SITE; do
583   if test -r "$ac_site_file"; then
584     echo "loading site script $ac_site_file"
585     . "$ac_site_file"
586   fi
587 done
588
589 if test -r "$cache_file"; then
590   echo "loading cache $cache_file"
591   . $cache_file
592 else
593   echo "creating cache $cache_file"
594   > $cache_file
595 fi
596
597 ac_ext=c
598 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
599 ac_cpp='$CPP $CPPFLAGS'
600 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
601 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
602 cross_compiling=$ac_cv_prog_cc_cross
603
604 ac_exeext=
605 ac_objext=o
606 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
607   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
608   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
609     ac_n= ac_c='
610 ' ac_t='        '
611   else
612     ac_n=-n ac_c= ac_t=
613   fi
614 else
615   ac_n= ac_c='\c' ac_t=
616 fi
617
618
619
620
621 #################################################
622 # Directory handling stuff to support both the
623 # legacy SAMBA directories and FHS compliant
624 # ones...
625
626
627 # Check whether --with-fhs or --without-fhs was given.
628 if test "${with_fhs+set}" = set; then
629   withval="$with_fhs"
630   configdir="${sysconfdir}/samba"
631     lockdir="\${VARDIR}/cache/samba"
632     piddir="\${VARDIR}/run/samba"
633     logfilebase="\${VARDIR}/log/samba"
634     privatedir="\${CONFIGDIR}/private"
635     libdir="\${prefix}/lib/samba"
636     swatdir="\${DATADIR}/samba/swat"
637 else
638   configdir="\${LIBDIR}"
639     logfilebase="\${VARDIR}"
640     lockdir="\${VARDIR}/locks"
641     piddir="\${VARDIR}/locks"
642     privatedir="\${prefix}/private"
643     swatdir="\${prefix}/swat"
644 fi
645
646
647 #################################################
648 # set private directory location
649 # Check whether --with-privatedir or --without-privatedir was given.
650 if test "${with_privatedir+set}" = set; then
651   withval="$with_privatedir"
652    case "$withval" in
653   yes|no)
654   #
655   # Just in case anybody calls it without argument
656   #
657     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
658   ;;
659   * )
660     privatedir="$withval"
661     ;;
662   esac
663 fi
664
665
666 #################################################
667 # set lock directory location
668 # Check whether --with-lockdir or --without-lockdir was given.
669 if test "${with_lockdir+set}" = set; then
670   withval="$with_lockdir"
671    case "$withval" in
672   yes|no)
673   #
674   # Just in case anybody calls it without argument
675   #
676     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
677   ;;
678   * )
679     lockdir="$withval"
680     ;;
681   esac
682 fi
683
684
685 #################################################
686 # set pid directory location
687 # Check whether --with-piddir or --without-piddir was given.
688 if test "${with_piddir+set}" = set; then
689   withval="$with_piddir"
690    case "$withval" in
691   yes|no)
692   #
693   # Just in case anybody calls it without argument
694   #
695     echo "configure: warning: --with-piddir called without argument - will use default" 1>&2
696   ;;
697   * )
698     piddir="$withval"
699     ;;
700   esac
701 fi
702
703
704 #################################################
705 # set SWAT directory location
706 # Check whether --with-swatdir or --without-swatdir was given.
707 if test "${with_swatdir+set}" = set; then
708   withval="$with_swatdir"
709    case "$withval" in
710   yes|no)
711   #
712   # Just in case anybody does it
713   #
714     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
715   ;;
716   * )
717     swatdir="$withval"
718     ;;
719   esac
720 fi
721
722
723 #################################################
724 # set configuration directory location
725 # Check whether --with-configdir or --without-configdir was given.
726 if test "${with_configdir+set}" = set; then
727   withval="$with_configdir"
728    case "$withval" in
729   yes|no)
730   #
731   # Just in case anybody does it
732   #
733     echo "configure: warning: --with-configdir called without argument - will use default" 1>&2
734   ;;
735   * )
736     configdir="$withval"
737     ;;
738   esac
739 fi
740
741
742 #################################################
743 # set log directory location
744 # Check whether --with-logfilebase or --without-logfilebase was given.
745 if test "${with_logfilebase+set}" = set; then
746   withval="$with_logfilebase"
747    case "$withval" in
748   yes|no)
749   #
750   # Just in case anybody does it
751   #
752     echo "configure: warning: --with-logfilebase called without argument - will use default" 1>&2
753   ;;
754   * )
755     logfilebase="$withval"
756     ;;
757   esac
758 fi
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789 # compile with optimization and without debugging by default
790 CFLAGS="-O ${CFLAGS}"
791
792 # Check whether --enable-debug or --disable-debug was given.
793 if test "${enable_debug+set}" = set; then
794   enableval="$enable_debug"
795   if eval "test x$enable_debug = xyes"; then
796         CFLAGS="${CFLAGS} -g"
797     fi
798 fi
799
800
801 # Check whether --enable-developer or --disable-developer was given.
802 if test "${enable_developer+set}" = set; then
803   enableval="$enable_developer"
804   if eval "test x$enable_developer = xyes"; then
805         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
806     fi
807 fi
808
809
810 # Check whether --enable-krb5developer or --disable-krb5developer was given.
811 if test "${enable_krb5developer+set}" = set; then
812   enableval="$enable_krb5developer"
813   if eval "test x$enable_krb5developer = xyes"; then
814         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
815     fi
816 fi
817
818
819 # Check whether --enable-dmalloc or --disable-dmalloc was given.
820 if test "${enable_dmalloc+set}" = set; then
821   enableval="$enable_dmalloc"
822   :
823 fi
824
825
826 if test "x$enable_dmalloc" = xyes
827 then
828         cat >> confdefs.h <<\EOF
829 #define ENABLE_DMALLOC 1
830 EOF
831
832         cat >> confdefs.h <<\EOF
833 #define DMALLOC_FUNC_CHECK 1
834 EOF
835
836         LIBS="$LIBS -ldmalloc"  
837 fi
838
839 # Extract the first word of "gcc", so it can be a program name with args.
840 set dummy gcc; ac_word=$2
841 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
842 echo "configure:843: checking for $ac_word" >&5
843 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
844   echo $ac_n "(cached) $ac_c" 1>&6
845 else
846   if test -n "$CC"; then
847   ac_cv_prog_CC="$CC" # Let the user override the test.
848 else
849   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
850   ac_dummy="$PATH"
851   for ac_dir in $ac_dummy; do
852     test -z "$ac_dir" && ac_dir=.
853     if test -f $ac_dir/$ac_word; then
854       ac_cv_prog_CC="gcc"
855       break
856     fi
857   done
858   IFS="$ac_save_ifs"
859 fi
860 fi
861 CC="$ac_cv_prog_CC"
862 if test -n "$CC"; then
863   echo "$ac_t""$CC" 1>&6
864 else
865   echo "$ac_t""no" 1>&6
866 fi
867
868 if test -z "$CC"; then
869   # Extract the first word of "cc", so it can be a program name with args.
870 set dummy cc; ac_word=$2
871 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
872 echo "configure:873: checking for $ac_word" >&5
873 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
874   echo $ac_n "(cached) $ac_c" 1>&6
875 else
876   if test -n "$CC"; then
877   ac_cv_prog_CC="$CC" # Let the user override the test.
878 else
879   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
880   ac_prog_rejected=no
881   ac_dummy="$PATH"
882   for ac_dir in $ac_dummy; do
883     test -z "$ac_dir" && ac_dir=.
884     if test -f $ac_dir/$ac_word; then
885       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
886         ac_prog_rejected=yes
887         continue
888       fi
889       ac_cv_prog_CC="cc"
890       break
891     fi
892   done
893   IFS="$ac_save_ifs"
894 if test $ac_prog_rejected = yes; then
895   # We found a bogon in the path, so make sure we never use it.
896   set dummy $ac_cv_prog_CC
897   shift
898   if test $# -gt 0; then
899     # We chose a different compiler from the bogus one.
900     # However, it has the same basename, so the bogon will be chosen
901     # first if we set CC to just the basename; use the full file name.
902     shift
903     set dummy "$ac_dir/$ac_word" "$@"
904     shift
905     ac_cv_prog_CC="$@"
906   fi
907 fi
908 fi
909 fi
910 CC="$ac_cv_prog_CC"
911 if test -n "$CC"; then
912   echo "$ac_t""$CC" 1>&6
913 else
914   echo "$ac_t""no" 1>&6
915 fi
916
917   if test -z "$CC"; then
918     case "`uname -s`" in
919     *win32* | *WIN32*)
920       # Extract the first word of "cl", so it can be a program name with args.
921 set dummy cl; ac_word=$2
922 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
923 echo "configure:924: checking for $ac_word" >&5
924 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
925   echo $ac_n "(cached) $ac_c" 1>&6
926 else
927   if test -n "$CC"; then
928   ac_cv_prog_CC="$CC" # Let the user override the test.
929 else
930   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
931   ac_dummy="$PATH"
932   for ac_dir in $ac_dummy; do
933     test -z "$ac_dir" && ac_dir=.
934     if test -f $ac_dir/$ac_word; then
935       ac_cv_prog_CC="cl"
936       break
937     fi
938   done
939   IFS="$ac_save_ifs"
940 fi
941 fi
942 CC="$ac_cv_prog_CC"
943 if test -n "$CC"; then
944   echo "$ac_t""$CC" 1>&6
945 else
946   echo "$ac_t""no" 1>&6
947 fi
948  ;;
949     esac
950   fi
951   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
952 fi
953
954 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
955 echo "configure:956: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
956
957 ac_ext=c
958 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
959 ac_cpp='$CPP $CPPFLAGS'
960 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
961 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
962 cross_compiling=$ac_cv_prog_cc_cross
963
964 cat > conftest.$ac_ext << EOF
965
966 #line 967 "configure"
967 #include "confdefs.h"
968
969 main(){return(0);}
970 EOF
971 if { (eval echo configure:972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
972   ac_cv_prog_cc_works=yes
973   # If we can't run a trivial program, we are probably using a cross compiler.
974   if (./conftest; exit) 2>/dev/null; then
975     ac_cv_prog_cc_cross=no
976   else
977     ac_cv_prog_cc_cross=yes
978   fi
979 else
980   echo "configure: failed program was:" >&5
981   cat conftest.$ac_ext >&5
982   ac_cv_prog_cc_works=no
983 fi
984 rm -fr conftest*
985 ac_ext=c
986 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
987 ac_cpp='$CPP $CPPFLAGS'
988 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
989 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
990 cross_compiling=$ac_cv_prog_cc_cross
991
992 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
993 if test $ac_cv_prog_cc_works = no; then
994   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
995 fi
996 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
997 echo "configure:998: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
998 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
999 cross_compiling=$ac_cv_prog_cc_cross
1000
1001 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1002 echo "configure:1003: checking whether we are using GNU C" >&5
1003 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1004   echo $ac_n "(cached) $ac_c" 1>&6
1005 else
1006   cat > conftest.c <<EOF
1007 #ifdef __GNUC__
1008   yes;
1009 #endif
1010 EOF
1011 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1012   ac_cv_prog_gcc=yes
1013 else
1014   ac_cv_prog_gcc=no
1015 fi
1016 fi
1017
1018 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1019
1020 if test $ac_cv_prog_gcc = yes; then
1021   GCC=yes
1022 else
1023   GCC=
1024 fi
1025
1026 ac_test_CFLAGS="${CFLAGS+set}"
1027 ac_save_CFLAGS="$CFLAGS"
1028 CFLAGS=
1029 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1030 echo "configure:1031: checking whether ${CC-cc} accepts -g" >&5
1031 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1032   echo $ac_n "(cached) $ac_c" 1>&6
1033 else
1034   echo 'void f(){}' > conftest.c
1035 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1036   ac_cv_prog_cc_g=yes
1037 else
1038   ac_cv_prog_cc_g=no
1039 fi
1040 rm -f conftest*
1041
1042 fi
1043
1044 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1045 if test "$ac_test_CFLAGS" = set; then
1046   CFLAGS="$ac_save_CFLAGS"
1047 elif test $ac_cv_prog_cc_g = yes; then
1048   if test "$GCC" = yes; then
1049     CFLAGS="-g -O2"
1050   else
1051     CFLAGS="-g"
1052   fi
1053 else
1054   if test "$GCC" = yes; then
1055     CFLAGS="-O2"
1056   else
1057     CFLAGS=
1058   fi
1059 fi
1060
1061 ac_aux_dir=
1062 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1063   if test -f $ac_dir/install-sh; then
1064     ac_aux_dir=$ac_dir
1065     ac_install_sh="$ac_aux_dir/install-sh -c"
1066     break
1067   elif test -f $ac_dir/install.sh; then
1068     ac_aux_dir=$ac_dir
1069     ac_install_sh="$ac_aux_dir/install.sh -c"
1070     break
1071   fi
1072 done
1073 if test -z "$ac_aux_dir"; then
1074   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1075 fi
1076 ac_config_guess=$ac_aux_dir/config.guess
1077 ac_config_sub=$ac_aux_dir/config.sub
1078 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1079
1080 # Find a good install program.  We prefer a C program (faster),
1081 # so one script is as good as another.  But avoid the broken or
1082 # incompatible versions:
1083 # SysV /etc/install, /usr/sbin/install
1084 # SunOS /usr/etc/install
1085 # IRIX /sbin/install
1086 # AIX /bin/install
1087 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1088 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1089 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1090 # ./install, which can be erroneously created by make from ./install.sh.
1091 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1092 echo "configure:1093: checking for a BSD compatible install" >&5
1093 if test -z "$INSTALL"; then
1094 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1095   echo $ac_n "(cached) $ac_c" 1>&6
1096 else
1097     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1098   for ac_dir in $PATH; do
1099     # Account for people who put trailing slashes in PATH elements.
1100     case "$ac_dir/" in
1101     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1102     *)
1103       # OSF1 and SCO ODT 3.0 have their own names for install.
1104       # Don't use installbsd from OSF since it installs stuff as root
1105       # by default.
1106       for ac_prog in ginstall scoinst install; do
1107         if test -f $ac_dir/$ac_prog; then
1108           if test $ac_prog = install &&
1109             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1110             # AIX install.  It has an incompatible calling convention.
1111             :
1112           else
1113             ac_cv_path_install="$ac_dir/$ac_prog -c"
1114             break 2
1115           fi
1116         fi
1117       done
1118       ;;
1119     esac
1120   done
1121   IFS="$ac_save_IFS"
1122
1123 fi
1124   if test "${ac_cv_path_install+set}" = set; then
1125     INSTALL="$ac_cv_path_install"
1126   else
1127     # As a last resort, use the slow shell script.  We don't cache a
1128     # path for INSTALL within a source directory, because that will
1129     # break other packages using the cache if that directory is
1130     # removed, or if the path is relative.
1131     INSTALL="$ac_install_sh"
1132   fi
1133 fi
1134 echo "$ac_t""$INSTALL" 1>&6
1135
1136 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1137 # It thinks the first close brace ends the variable substitution.
1138 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1139
1140 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1141
1142 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1143
1144 for ac_prog in gawk mawk nawk awk
1145 do
1146 # Extract the first word of "$ac_prog", so it can be a program name with args.
1147 set dummy $ac_prog; ac_word=$2
1148 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1149 echo "configure:1150: checking for $ac_word" >&5
1150 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1151   echo $ac_n "(cached) $ac_c" 1>&6
1152 else
1153   if test -n "$AWK"; then
1154   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1155 else
1156   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1157   ac_dummy="$PATH"
1158   for ac_dir in $ac_dummy; do
1159     test -z "$ac_dir" && ac_dir=.
1160     if test -f $ac_dir/$ac_word; then
1161       ac_cv_prog_AWK="$ac_prog"
1162       break
1163     fi
1164   done
1165   IFS="$ac_save_ifs"
1166 fi
1167 fi
1168 AWK="$ac_cv_prog_AWK"
1169 if test -n "$AWK"; then
1170   echo "$ac_t""$AWK" 1>&6
1171 else
1172   echo "$ac_t""no" 1>&6
1173 fi
1174
1175 test -n "$AWK" && break
1176 done
1177
1178
1179 LD=ld
1180 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1181 echo "configure:1182: checking if the linker ($LD) is GNU ld" >&5
1182 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1183   echo $ac_n "(cached) $ac_c" 1>&6
1184 else
1185   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1186 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1187   ac_cv_prog_gnu_ld=yes
1188 else
1189   ac_cv_prog_gnu_ld=no
1190 fi
1191 fi
1192
1193 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1194
1195
1196 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1197 echo "configure:1198: checking for POSIXized ISC" >&5
1198 if test -d /etc/conf/kconfig.d &&
1199   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1200 then
1201   echo "$ac_t""yes" 1>&6
1202   ISC=yes # If later tests want to check for ISC.
1203   cat >> confdefs.h <<\EOF
1204 #define _POSIX_SOURCE 1
1205 EOF
1206
1207   if test "$GCC" = yes; then
1208     CC="$CC -posix"
1209   else
1210     CC="$CC -Xp"
1211   fi
1212 else
1213   echo "$ac_t""no" 1>&6
1214   ISC=
1215 fi
1216
1217
1218 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1219 echo "configure:1220: checking for Cygwin environment" >&5
1220 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1221   echo $ac_n "(cached) $ac_c" 1>&6
1222 else
1223   cat > conftest.$ac_ext <<EOF
1224 #line 1225 "configure"
1225 #include "confdefs.h"
1226
1227 int main() {
1228
1229 #ifndef __CYGWIN__
1230 #define __CYGWIN__ __CYGWIN32__
1231 #endif
1232 return __CYGWIN__;
1233 ; return 0; }
1234 EOF
1235 if { (eval echo configure:1236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1236   rm -rf conftest*
1237   ac_cv_cygwin=yes
1238 else
1239   echo "configure: failed program was:" >&5
1240   cat conftest.$ac_ext >&5
1241   rm -rf conftest*
1242   ac_cv_cygwin=no
1243 fi
1244 rm -f conftest*
1245 rm -f conftest*
1246 fi
1247
1248 echo "$ac_t""$ac_cv_cygwin" 1>&6
1249 CYGWIN=
1250 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1251 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1252 echo "configure:1253: checking for mingw32 environment" >&5
1253 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1254   echo $ac_n "(cached) $ac_c" 1>&6
1255 else
1256   cat > conftest.$ac_ext <<EOF
1257 #line 1258 "configure"
1258 #include "confdefs.h"
1259
1260 int main() {
1261 return __MINGW32__;
1262 ; return 0; }
1263 EOF
1264 if { (eval echo configure:1265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1265   rm -rf conftest*
1266   ac_cv_mingw32=yes
1267 else
1268   echo "configure: failed program was:" >&5
1269   cat conftest.$ac_ext >&5
1270   rm -rf conftest*
1271   ac_cv_mingw32=no
1272 fi
1273 rm -f conftest*
1274 rm -f conftest*
1275 fi
1276
1277 echo "$ac_t""$ac_cv_mingw32" 1>&6
1278 MINGW32=
1279 test "$ac_cv_mingw32" = yes && MINGW32=yes
1280
1281
1282 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1283 echo "configure:1284: checking for executable suffix" >&5
1284 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1285   echo $ac_n "(cached) $ac_c" 1>&6
1286 else
1287   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1288   ac_cv_exeext=.exe
1289 else
1290   rm -f conftest*
1291   echo 'int main () { return 0; }' > conftest.$ac_ext
1292   ac_cv_exeext=
1293   if { (eval echo configure:1294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1294     for file in conftest.*; do
1295       case $file in
1296       *.c | *.o | *.obj) ;;
1297       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1298       esac
1299     done
1300   else
1301     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1302   fi
1303   rm -f conftest*
1304   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1305 fi
1306 fi
1307
1308 EXEEXT=""
1309 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1310 echo "$ac_t""${ac_cv_exeext}" 1>&6
1311 ac_exeext=$EXEEXT
1312
1313
1314 if test "x$CC" != xcc; then
1315   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1316 echo "configure:1317: checking whether $CC and cc understand -c and -o together" >&5
1317 else
1318   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1319 echo "configure:1320: checking whether cc understands -c and -o together" >&5
1320 fi
1321 set dummy $CC; ac_cc="`echo $2 |
1322                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1323 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1324   echo $ac_n "(cached) $ac_c" 1>&6
1325 else
1326   echo 'foo(){}' > conftest.c
1327 # Make sure it works both with $CC and with simple cc.
1328 # We do the test twice because some compilers refuse to overwrite an
1329 # existing .o file with -o, though they will create one.
1330 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1331 if { (eval echo configure:1332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1332    test -f conftest.o && { (eval echo configure:1333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1333 then
1334   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1335   if test "x$CC" != xcc; then
1336     # Test first that cc exists at all.
1337     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1338       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1339       if { (eval echo configure:1340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1340          test -f conftest.o && { (eval echo configure:1341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1341       then
1342         # cc works too.
1343         :
1344       else
1345         # cc exists but doesn't like -o.
1346         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1347       fi
1348     fi
1349   fi
1350 else
1351   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1352 fi
1353 rm -f conftest*
1354
1355 fi
1356 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1357   echo "$ac_t""yes" 1>&6
1358 else
1359   echo "$ac_t""no" 1>&6
1360   cat >> confdefs.h <<\EOF
1361 #define NO_MINUS_C_MINUS_O 1
1362 EOF
1363
1364 fi
1365
1366 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1367       BROKEN_CC=
1368 else
1369       BROKEN_CC=#
1370 fi
1371
1372
1373 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1374 echo "configure:1375: checking that the C compiler understands volatile" >&5
1375 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1376   echo $ac_n "(cached) $ac_c" 1>&6
1377 else
1378   
1379     cat > conftest.$ac_ext <<EOF
1380 #line 1381 "configure"
1381 #include "confdefs.h"
1382 #include <sys/types.h>
1383 int main() {
1384 volatile int i = 0
1385 ; return 0; }
1386 EOF
1387 if { (eval echo configure:1388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1388   rm -rf conftest*
1389   samba_cv_volatile=yes
1390 else
1391   echo "configure: failed program was:" >&5
1392   cat conftest.$ac_ext >&5
1393   rm -rf conftest*
1394   samba_cv_volatile=no
1395 fi
1396 rm -f conftest*
1397 fi
1398
1399 echo "$ac_t""$samba_cv_volatile" 1>&6
1400 if test x"$samba_cv_volatile" = x"yes"; then
1401    cat >> confdefs.h <<\EOF
1402 #define HAVE_VOLATILE 1
1403 EOF
1404
1405 fi
1406
1407
1408
1409 # Do some error checking and defaulting for the host and target type.
1410 # The inputs are:
1411 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1412 #
1413 # The rules are:
1414 # 1. You are not allowed to specify --host, --target, and nonopt at the
1415 #    same time.
1416 # 2. Host defaults to nonopt.
1417 # 3. If nonopt is not specified, then host defaults to the current host,
1418 #    as determined by config.guess.
1419 # 4. Target and build default to nonopt.
1420 # 5. If nonopt is not specified, then target and build default to host.
1421
1422 # The aliases save the names the user supplied, while $host etc.
1423 # will get canonicalized.
1424 case $host---$target---$nonopt in
1425 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1426 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1427 esac
1428
1429
1430 # Make sure we can run config.sub.
1431 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1432 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1433 fi
1434
1435 echo $ac_n "checking host system type""... $ac_c" 1>&6
1436 echo "configure:1437: checking host system type" >&5
1437
1438 host_alias=$host
1439 case "$host_alias" in
1440 NONE)
1441   case $nonopt in
1442   NONE)
1443     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1444     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1445     fi ;;
1446   *) host_alias=$nonopt ;;
1447   esac ;;
1448 esac
1449
1450 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1451 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1452 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1453 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1454 echo "$ac_t""$host" 1>&6
1455
1456 echo $ac_n "checking target system type""... $ac_c" 1>&6
1457 echo "configure:1458: checking target system type" >&5
1458
1459 target_alias=$target
1460 case "$target_alias" in
1461 NONE)
1462   case $nonopt in
1463   NONE) target_alias=$host_alias ;;
1464   *) target_alias=$nonopt ;;
1465   esac ;;
1466 esac
1467
1468 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1469 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1470 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1471 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1472 echo "$ac_t""$target" 1>&6
1473
1474 echo $ac_n "checking build system type""... $ac_c" 1>&6
1475 echo "configure:1476: checking build system type" >&5
1476
1477 build_alias=$build
1478 case "$build_alias" in
1479 NONE)
1480   case $nonopt in
1481   NONE) build_alias=$host_alias ;;
1482   *) build_alias=$nonopt ;;
1483   esac ;;
1484 esac
1485
1486 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1487 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1488 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1489 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1490 echo "$ac_t""$build" 1>&6
1491
1492 test "$host_alias" != "$target_alias" &&
1493   test "$program_prefix$program_suffix$program_transform_name" = \
1494     NONENONEs,x,x, &&
1495   program_prefix=${target_alias}-
1496
1497
1498   case "$host_os" in
1499         *irix6*) cat >> confdefs.h <<\EOF
1500 #include <standards.h>
1501 EOF
1502
1503         ;;
1504 esac
1505
1506
1507     
1508     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1509 echo "configure:1510: checking config.cache system type" >&5
1510     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1511          test x"$ac_cv_host_system_type" != x"$host"; } ||
1512        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1513          test x"$ac_cv_build_system_type" != x"$build"; } ||
1514        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1515          test x"$ac_cv_target_system_type" != x"$target"; }; then
1516         echo "$ac_t""different" 1>&6
1517         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1518     else
1519         echo "$ac_t""same" 1>&6
1520     fi
1521     ac_cv_host_system_type="$host"
1522     ac_cv_build_system_type="$build"
1523     ac_cv_target_system_type="$target"
1524
1525
1526 DYNEXP=
1527
1528 #
1529 # Config CPPFLAG settings for strange OS's that must be set
1530 # before other tests.
1531 #
1532 case "$host_os" in
1533 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1534     *hpux*)
1535     
1536       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1537 echo "configure:1538: checking whether ${CC-cc} accepts -Ae" >&5
1538 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1539   echo $ac_n "(cached) $ac_c" 1>&6
1540 else
1541   echo 'void f(){}' > conftest.c
1542 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1543   ac_cv_prog_cc_Ae=yes
1544 else
1545   ac_cv_prog_cc_Ae=no
1546 fi
1547 rm -f conftest*
1548
1549 fi
1550
1551 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1552       # mmap on HPUX is completely broken...
1553       cat >> confdefs.h <<\EOF
1554 #define MMAP_BLACKLIST 1
1555 EOF
1556
1557       if test $ac_cv_prog_cc_Ae = yes; then
1558         CPPFLAGS="$CPPFLAGS -Ae"
1559       fi
1560 #
1561 # Defines needed for HPUX support.
1562 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1563 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1564 #
1565       case `uname -r` in
1566                         *9*|*10*)
1567                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1568                                 cat >> confdefs.h <<\EOF
1569 #define USE_BOTH_CRYPT_CALLS 1
1570 EOF
1571
1572                                 cat >> confdefs.h <<\EOF
1573 #define _HPUX_SOURCE 1
1574 EOF
1575
1576                                 cat >> confdefs.h <<\EOF
1577 #define _POSIX_SOURCE 1
1578 EOF
1579
1580                                 cat >> confdefs.h <<\EOF
1581 #define _ALIGNMENT_REQUIRED 1
1582 EOF
1583
1584                                 cat >> confdefs.h <<\EOF
1585 #define _MAX_ALIGNMENT 4
1586 EOF
1587
1588                                 ;;
1589                         *11*)
1590                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1591                                 cat >> confdefs.h <<\EOF
1592 #define USE_BOTH_CRYPT_CALLS 1
1593 EOF
1594
1595                                 cat >> confdefs.h <<\EOF
1596 #define _HPUX_SOURCE 1
1597 EOF
1598
1599                                 cat >> confdefs.h <<\EOF
1600 #define _POSIX_SOURCE 1
1601 EOF
1602
1603                                 cat >> confdefs.h <<\EOF
1604 #define _LARGEFILE64_SOURCE 1
1605 EOF
1606
1607                                 cat >> confdefs.h <<\EOF
1608 #define _ALIGNMENT_REQUIRED 1
1609 EOF
1610
1611                                 cat >> confdefs.h <<\EOF
1612 #define _MAX_ALIGNMENT 4
1613 EOF
1614
1615                                 ;;
1616       esac
1617       DYNEXP="-Wl,-E"
1618       ;;
1619
1620 #
1621 # CRAY Unicos has broken const handling
1622        *unicos*)
1623           echo "$ac_t""disabling const" 1>&6
1624           CPPFLAGS="$CPPFLAGS -Dconst="
1625           ;;
1626         
1627 #
1628 # AIX4.x doesn't even admit to having large
1629 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1630 #
1631     *aix4*)
1632           echo "$ac_t""enabling large file support" 1>&6
1633       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1634           cat >> confdefs.h <<\EOF
1635 #define _LARGE_FILES 1
1636 EOF
1637
1638       ;;    
1639 #
1640 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1641 # to the existance of large files..
1642 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1643 # recommendations on large file support, however it makes the
1644 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1645 # recommendation makes the compile fail on gcc2.7. JRA.
1646 #
1647         *solaris*)
1648                 case `uname -r` in
1649                         5.0*|5.1*|5.2*|5.3*|5.5*)
1650                                 echo "$ac_t""no large file support" 1>&6
1651                                 ;;
1652                         5.*)
1653                         echo "$ac_t""enabling large file support" 1>&6
1654                         if test "$ac_cv_prog_gcc" = yes; then
1655                                 ${CC-cc} -v >conftest.c 2>&1
1656                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1657                                 rm -fr conftest.c
1658                                 case "$ac_cv_gcc_compiler_version_number" in
1659                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1660                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1661                                                 cat >> confdefs.h <<\EOF
1662 #define _LARGEFILE64_SOURCE 1
1663 EOF
1664
1665                                                 ;;
1666                                         *)
1667                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1668                                                 cat >> confdefs.h <<\EOF
1669 #define _LARGEFILE64_SOURCE 1
1670 EOF
1671
1672                                                 cat >> confdefs.h <<\EOF
1673 #define _FILE_OFFSET_BITS 64
1674 EOF
1675
1676                                                 ;;
1677                                 esac
1678                         else
1679                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1680                                 cat >> confdefs.h <<\EOF
1681 #define _LARGEFILE64_SOURCE 1
1682 EOF
1683
1684                                 cat >> confdefs.h <<\EOF
1685 #define _FILE_OFFSET_BITS 64
1686 EOF
1687
1688                         fi
1689                         ;;
1690                 esac
1691                 ;;
1692 #
1693 # Tests needed for SINIX large file support.
1694 #
1695     *sysv4*)
1696       if test $host = mips-sni-sysv4 ; then
1697         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1698 echo "configure:1699: checking for LFS support" >&5
1699         old_CPPFLAGS="$CPPFLAGS"
1700         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1701         if test "$cross_compiling" = yes; then
1702   SINIX_LFS_SUPPORT=cross
1703 else
1704   cat > conftest.$ac_ext <<EOF
1705 #line 1706 "configure"
1706 #include "confdefs.h"
1707
1708 #include <unistd.h>
1709 main () {
1710 #if _LFS64_LARGEFILE == 1
1711 exit(0);
1712 #else
1713 exit(1);
1714 #endif
1715 }
1716 EOF
1717 if { (eval echo configure:1718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1718 then
1719   SINIX_LFS_SUPPORT=yes
1720 else
1721   echo "configure: failed program was:" >&5
1722   cat conftest.$ac_ext >&5
1723   rm -fr conftest*
1724   SINIX_LFS_SUPPORT=no
1725 fi
1726 rm -fr conftest*
1727 fi
1728
1729         CPPFLAGS="$old_CPPFLAGS"
1730         if test x$SINIX_LFS_SUPPORT = xyes ; then
1731           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1732                   cat >> confdefs.h <<\EOF
1733 #define _LARGEFILE64_SOURCE 1
1734 EOF
1735
1736           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1737           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1738           LIBS="`getconf LFS64_LIBS` $LIBS"
1739         fi
1740       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1741       fi
1742     ;;
1743
1744 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1745 #
1746     *linux*)
1747         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1748 echo "configure:1749: checking for LFS support" >&5
1749         old_CPPFLAGS="$CPPFLAGS"
1750         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1751        if test "$cross_compiling" = yes; then
1752   LINUX_LFS_SUPPORT=cross
1753 else
1754   cat > conftest.$ac_ext <<EOF
1755 #line 1756 "configure"
1756 #include "confdefs.h"
1757
1758 #include <unistd.h>
1759 #include <sys/utsname.h>
1760 main() {
1761 #if _LFS64_LARGEFILE == 1
1762        struct utsname uts;
1763        char *release;
1764        int major, minor;
1765
1766        /* Ensure this is glibc 2.2 or higher */
1767 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1768        int libc_major = __GLIBC__;
1769        int libc_minor = __GLIBC_MINOR__;
1770
1771        if (libc_major < 2)
1772               exit(1);
1773        if (libc_minor < 2)
1774               exit(1);
1775 #endif
1776
1777        /* Ensure this is kernel 2.4 or higher */
1778
1779        uname(&uts);
1780        release = uts.release;
1781        major = atoi(strsep(&release, "."));
1782        minor = atoi(strsep(&release, "."));
1783
1784        if (major > 2 || (major == 2 && minor > 3))
1785                exit(0);
1786        exit(1);
1787 #else
1788        exit(1);
1789 #endif
1790 }
1791
1792 EOF
1793 if { (eval echo configure:1794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1794 then
1795   LINUX_LFS_SUPPORT=yes
1796 else
1797   echo "configure: failed program was:" >&5
1798   cat conftest.$ac_ext >&5
1799   rm -fr conftest*
1800   LINUX_LFS_SUPPORT=no
1801 fi
1802 rm -fr conftest*
1803 fi
1804
1805         CPPFLAGS="$old_CPPFLAGS"
1806         if test x$LINUX_LFS_SUPPORT = xyes ; then
1807           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1808                   cat >> confdefs.h <<\EOF
1809 #define _LARGEFILE64_SOURCE 1
1810 EOF
1811
1812           cat >> confdefs.h <<\EOF
1813 #define _FILE_OFFSET_BITS 64
1814 EOF
1815
1816           cat >> confdefs.h <<\EOF
1817 #define _GNU_SOURCE 1
1818 EOF
1819
1820         fi
1821        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1822                 ;;
1823
1824     *hurd*)
1825         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1826 echo "configure:1827: checking for LFS support" >&5
1827         old_CPPFLAGS="$CPPFLAGS"
1828         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1829         if test "$cross_compiling" = yes; then
1830   GLIBC_LFS_SUPPORT=cross
1831 else
1832   cat > conftest.$ac_ext <<EOF
1833 #line 1834 "configure"
1834 #include "confdefs.h"
1835
1836 #include <unistd.h>
1837 main () {
1838 #if _LFS64_LARGEFILE == 1
1839 exit(0);
1840 #else
1841 exit(1);
1842 #endif
1843 }
1844 EOF
1845 if { (eval echo configure:1846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1846 then
1847   GLIBC_LFS_SUPPORT=yes
1848 else
1849   echo "configure: failed program was:" >&5
1850   cat conftest.$ac_ext >&5
1851   rm -fr conftest*
1852   GLIBC_LFS_SUPPORT=no
1853 fi
1854 rm -fr conftest*
1855 fi
1856
1857         CPPFLAGS="$old_CPPFLAGS"
1858         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1859           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1860                   cat >> confdefs.h <<\EOF
1861 #define _LARGEFILE64_SOURCE 1
1862 EOF
1863
1864           cat >> confdefs.h <<\EOF
1865 #define _GNU_SOURCE 1
1866 EOF
1867
1868         fi
1869       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1870     ;;
1871
1872 esac
1873
1874 echo $ac_n "checking for inline""... $ac_c" 1>&6
1875 echo "configure:1876: checking for inline" >&5
1876 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1877   echo $ac_n "(cached) $ac_c" 1>&6
1878 else
1879   ac_cv_c_inline=no
1880 for ac_kw in inline __inline__ __inline; do
1881   cat > conftest.$ac_ext <<EOF
1882 #line 1883 "configure"
1883 #include "confdefs.h"
1884
1885 int main() {
1886 } $ac_kw foo() {
1887 ; return 0; }
1888 EOF
1889 if { (eval echo configure:1890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1890   rm -rf conftest*
1891   ac_cv_c_inline=$ac_kw; break
1892 else
1893   echo "configure: failed program was:" >&5
1894   cat conftest.$ac_ext >&5
1895 fi
1896 rm -f conftest*
1897 done
1898
1899 fi
1900
1901 echo "$ac_t""$ac_cv_c_inline" 1>&6
1902 case "$ac_cv_c_inline" in
1903   inline | yes) ;;
1904   no) cat >> confdefs.h <<\EOF
1905 #define inline 
1906 EOF
1907  ;;
1908   *)  cat >> confdefs.h <<EOF
1909 #define inline $ac_cv_c_inline
1910 EOF
1911  ;;
1912 esac
1913
1914 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1915 echo "configure:1916: checking how to run the C preprocessor" >&5
1916 # On Suns, sometimes $CPP names a directory.
1917 if test -n "$CPP" && test -d "$CPP"; then
1918   CPP=
1919 fi
1920 if test -z "$CPP"; then
1921 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1922   echo $ac_n "(cached) $ac_c" 1>&6
1923 else
1924     # This must be in double quotes, not single quotes, because CPP may get
1925   # substituted into the Makefile and "${CC-cc}" will confuse make.
1926   CPP="${CC-cc} -E"
1927   # On the NeXT, cc -E runs the code through the compiler's parser,
1928   # not just through cpp.
1929   cat > conftest.$ac_ext <<EOF
1930 #line 1931 "configure"
1931 #include "confdefs.h"
1932 #include <assert.h>
1933 Syntax Error
1934 EOF
1935 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1936 { (eval echo configure:1937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1937 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1938 if test -z "$ac_err"; then
1939   :
1940 else
1941   echo "$ac_err" >&5
1942   echo "configure: failed program was:" >&5
1943   cat conftest.$ac_ext >&5
1944   rm -rf conftest*
1945   CPP="${CC-cc} -E -traditional-cpp"
1946   cat > conftest.$ac_ext <<EOF
1947 #line 1948 "configure"
1948 #include "confdefs.h"
1949 #include <assert.h>
1950 Syntax Error
1951 EOF
1952 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1953 { (eval echo configure:1954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1954 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1955 if test -z "$ac_err"; then
1956   :
1957 else
1958   echo "$ac_err" >&5
1959   echo "configure: failed program was:" >&5
1960   cat conftest.$ac_ext >&5
1961   rm -rf conftest*
1962   CPP="${CC-cc} -nologo -E"
1963   cat > conftest.$ac_ext <<EOF
1964 #line 1965 "configure"
1965 #include "confdefs.h"
1966 #include <assert.h>
1967 Syntax Error
1968 EOF
1969 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1970 { (eval echo configure:1971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1971 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1972 if test -z "$ac_err"; then
1973   :
1974 else
1975   echo "$ac_err" >&5
1976   echo "configure: failed program was:" >&5
1977   cat conftest.$ac_ext >&5
1978   rm -rf conftest*
1979   CPP=/lib/cpp
1980 fi
1981 rm -f conftest*
1982 fi
1983 rm -f conftest*
1984 fi
1985 rm -f conftest*
1986   ac_cv_prog_CPP="$CPP"
1987 fi
1988   CPP="$ac_cv_prog_CPP"
1989 else
1990   ac_cv_prog_CPP="$CPP"
1991 fi
1992 echo "$ac_t""$CPP" 1>&6
1993
1994 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1995 echo "configure:1996: checking for ANSI C header files" >&5
1996 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1997   echo $ac_n "(cached) $ac_c" 1>&6
1998 else
1999   cat > conftest.$ac_ext <<EOF
2000 #line 2001 "configure"
2001 #include "confdefs.h"
2002 #include <stdlib.h>
2003 #include <stdarg.h>
2004 #include <string.h>
2005 #include <float.h>
2006 EOF
2007 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2008 { (eval echo configure:2009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2009 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2010 if test -z "$ac_err"; then
2011   rm -rf conftest*
2012   ac_cv_header_stdc=yes
2013 else
2014   echo "$ac_err" >&5
2015   echo "configure: failed program was:" >&5
2016   cat conftest.$ac_ext >&5
2017   rm -rf conftest*
2018   ac_cv_header_stdc=no
2019 fi
2020 rm -f conftest*
2021
2022 if test $ac_cv_header_stdc = yes; then
2023   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2024 cat > conftest.$ac_ext <<EOF
2025 #line 2026 "configure"
2026 #include "confdefs.h"
2027 #include <string.h>
2028 EOF
2029 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2030   egrep "memchr" >/dev/null 2>&1; then
2031   :
2032 else
2033   rm -rf conftest*
2034   ac_cv_header_stdc=no
2035 fi
2036 rm -f conftest*
2037
2038 fi
2039
2040 if test $ac_cv_header_stdc = yes; then
2041   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2042 cat > conftest.$ac_ext <<EOF
2043 #line 2044 "configure"
2044 #include "confdefs.h"
2045 #include <stdlib.h>
2046 EOF
2047 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2048   egrep "free" >/dev/null 2>&1; then
2049   :
2050 else
2051   rm -rf conftest*
2052   ac_cv_header_stdc=no
2053 fi
2054 rm -f conftest*
2055
2056 fi
2057
2058 if test $ac_cv_header_stdc = yes; then
2059   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2060 if test "$cross_compiling" = yes; then
2061   :
2062 else
2063   cat > conftest.$ac_ext <<EOF
2064 #line 2065 "configure"
2065 #include "confdefs.h"
2066 #include <ctype.h>
2067 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2068 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2069 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2070 int main () { int i; for (i = 0; i < 256; i++)
2071 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2072 exit (0); }
2073
2074 EOF
2075 if { (eval echo configure:2076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2076 then
2077   :
2078 else
2079   echo "configure: failed program was:" >&5
2080   cat conftest.$ac_ext >&5
2081   rm -fr conftest*
2082   ac_cv_header_stdc=no
2083 fi
2084 rm -fr conftest*
2085 fi
2086
2087 fi
2088 fi
2089
2090 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2091 if test $ac_cv_header_stdc = yes; then
2092   cat >> confdefs.h <<\EOF
2093 #define STDC_HEADERS 1
2094 EOF
2095
2096 fi
2097
2098 ac_header_dirent=no
2099 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2100 do
2101 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2102 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
2103 echo "configure:2104: checking for $ac_hdr that defines DIR" >&5
2104 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2105   echo $ac_n "(cached) $ac_c" 1>&6
2106 else
2107   cat > conftest.$ac_ext <<EOF
2108 #line 2109 "configure"
2109 #include "confdefs.h"
2110 #include <sys/types.h>
2111 #include <$ac_hdr>
2112 int main() {
2113 DIR *dirp = 0;
2114 ; return 0; }
2115 EOF
2116 if { (eval echo configure:2117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2117   rm -rf conftest*
2118   eval "ac_cv_header_dirent_$ac_safe=yes"
2119 else
2120   echo "configure: failed program was:" >&5
2121   cat conftest.$ac_ext >&5
2122   rm -rf conftest*
2123   eval "ac_cv_header_dirent_$ac_safe=no"
2124 fi
2125 rm -f conftest*
2126 fi
2127 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2128   echo "$ac_t""yes" 1>&6
2129     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2130   cat >> confdefs.h <<EOF
2131 #define $ac_tr_hdr 1
2132 EOF
2133  ac_header_dirent=$ac_hdr; break
2134 else
2135   echo "$ac_t""no" 1>&6
2136 fi
2137 done
2138 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2139 if test $ac_header_dirent = dirent.h; then
2140 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2141 echo "configure:2142: checking for opendir in -ldir" >&5
2142 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2143 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2144   echo $ac_n "(cached) $ac_c" 1>&6
2145 else
2146   ac_save_LIBS="$LIBS"
2147 LIBS="-ldir  $LIBS"
2148 cat > conftest.$ac_ext <<EOF
2149 #line 2150 "configure"
2150 #include "confdefs.h"
2151 /* Override any gcc2 internal prototype to avoid an error.  */
2152 /* We use char because int might match the return type of a gcc2
2153     builtin and then its argument prototype would still apply.  */
2154 char opendir();
2155
2156 int main() {
2157 opendir()
2158 ; return 0; }
2159 EOF
2160 if { (eval echo configure:2161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2161   rm -rf conftest*
2162   eval "ac_cv_lib_$ac_lib_var=yes"
2163 else
2164   echo "configure: failed program was:" >&5
2165   cat conftest.$ac_ext >&5
2166   rm -rf conftest*
2167   eval "ac_cv_lib_$ac_lib_var=no"
2168 fi
2169 rm -f conftest*
2170 LIBS="$ac_save_LIBS"
2171
2172 fi
2173 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2174   echo "$ac_t""yes" 1>&6
2175   LIBS="$LIBS -ldir"
2176 else
2177   echo "$ac_t""no" 1>&6
2178 fi
2179
2180 else
2181 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2182 echo "configure:2183: checking for opendir in -lx" >&5
2183 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2184 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2185   echo $ac_n "(cached) $ac_c" 1>&6
2186 else
2187   ac_save_LIBS="$LIBS"
2188 LIBS="-lx  $LIBS"
2189 cat > conftest.$ac_ext <<EOF
2190 #line 2191 "configure"
2191 #include "confdefs.h"
2192 /* Override any gcc2 internal prototype to avoid an error.  */
2193 /* We use char because int might match the return type of a gcc2
2194     builtin and then its argument prototype would still apply.  */
2195 char opendir();
2196
2197 int main() {
2198 opendir()
2199 ; return 0; }
2200 EOF
2201 if { (eval echo configure:2202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2202   rm -rf conftest*
2203   eval "ac_cv_lib_$ac_lib_var=yes"
2204 else
2205   echo "configure: failed program was:" >&5
2206   cat conftest.$ac_ext >&5
2207   rm -rf conftest*
2208   eval "ac_cv_lib_$ac_lib_var=no"
2209 fi
2210 rm -f conftest*
2211 LIBS="$ac_save_LIBS"
2212
2213 fi
2214 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2215   echo "$ac_t""yes" 1>&6
2216   LIBS="$LIBS -lx"
2217 else
2218   echo "$ac_t""no" 1>&6
2219 fi
2220
2221 fi
2222
2223 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2224 echo "configure:2225: checking whether time.h and sys/time.h may both be included" >&5
2225 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2226   echo $ac_n "(cached) $ac_c" 1>&6
2227 else
2228   cat > conftest.$ac_ext <<EOF
2229 #line 2230 "configure"
2230 #include "confdefs.h"
2231 #include <sys/types.h>
2232 #include <sys/time.h>
2233 #include <time.h>
2234 int main() {
2235 struct tm *tp;
2236 ; return 0; }
2237 EOF
2238 if { (eval echo configure:2239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2239   rm -rf conftest*
2240   ac_cv_header_time=yes
2241 else
2242   echo "configure: failed program was:" >&5
2243   cat conftest.$ac_ext >&5
2244   rm -rf conftest*
2245   ac_cv_header_time=no
2246 fi
2247 rm -f conftest*
2248 fi
2249
2250 echo "$ac_t""$ac_cv_header_time" 1>&6
2251 if test $ac_cv_header_time = yes; then
2252   cat >> confdefs.h <<\EOF
2253 #define TIME_WITH_SYS_TIME 1
2254 EOF
2255
2256 fi
2257
2258 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2259 echo "configure:2260: checking for sys/wait.h that is POSIX.1 compatible" >&5
2260 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2261   echo $ac_n "(cached) $ac_c" 1>&6
2262 else
2263   cat > conftest.$ac_ext <<EOF
2264 #line 2265 "configure"
2265 #include "confdefs.h"
2266 #include <sys/types.h>
2267 #include <sys/wait.h>
2268 #ifndef WEXITSTATUS
2269 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2270 #endif
2271 #ifndef WIFEXITED
2272 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2273 #endif
2274 int main() {
2275 int s;
2276 wait (&s);
2277 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
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_sys_wait_h=yes
2283 else
2284   echo "configure: failed program was:" >&5
2285   cat conftest.$ac_ext >&5
2286   rm -rf conftest*
2287   ac_cv_header_sys_wait_h=no
2288 fi
2289 rm -f conftest*
2290 fi
2291
2292 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2293 if test $ac_cv_header_sys_wait_h = yes; then
2294   cat >> confdefs.h <<\EOF
2295 #define HAVE_SYS_WAIT_H 1
2296 EOF
2297
2298 fi
2299
2300 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
2301 do
2302 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2303 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2304 echo "configure:2305: checking for $ac_hdr" >&5
2305 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2306   echo $ac_n "(cached) $ac_c" 1>&6
2307 else
2308   cat > conftest.$ac_ext <<EOF
2309 #line 2310 "configure"
2310 #include "confdefs.h"
2311 #include <$ac_hdr>
2312 EOF
2313 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2314 { (eval echo configure:2315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2315 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2316 if test -z "$ac_err"; then
2317   rm -rf conftest*
2318   eval "ac_cv_header_$ac_safe=yes"
2319 else
2320   echo "$ac_err" >&5
2321   echo "configure: failed program was:" >&5
2322   cat conftest.$ac_ext >&5
2323   rm -rf conftest*
2324   eval "ac_cv_header_$ac_safe=no"
2325 fi
2326 rm -f conftest*
2327 fi
2328 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2329   echo "$ac_t""yes" 1>&6
2330     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2331   cat >> confdefs.h <<EOF
2332 #define $ac_tr_hdr 1
2333 EOF
2334  
2335 else
2336   echo "$ac_t""no" 1>&6
2337 fi
2338 done
2339
2340 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
2341 do
2342 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2343 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2344 echo "configure:2345: checking for $ac_hdr" >&5
2345 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2346   echo $ac_n "(cached) $ac_c" 1>&6
2347 else
2348   cat > conftest.$ac_ext <<EOF
2349 #line 2350 "configure"
2350 #include "confdefs.h"
2351 #include <$ac_hdr>
2352 EOF
2353 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2354 { (eval echo configure:2355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2355 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2356 if test -z "$ac_err"; then
2357   rm -rf conftest*
2358   eval "ac_cv_header_$ac_safe=yes"
2359 else
2360   echo "$ac_err" >&5
2361   echo "configure: failed program was:" >&5
2362   cat conftest.$ac_ext >&5
2363   rm -rf conftest*
2364   eval "ac_cv_header_$ac_safe=no"
2365 fi
2366 rm -f conftest*
2367 fi
2368 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2369   echo "$ac_t""yes" 1>&6
2370     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2371   cat >> confdefs.h <<EOF
2372 #define $ac_tr_hdr 1
2373 EOF
2374  
2375 else
2376   echo "$ac_t""no" 1>&6
2377 fi
2378 done
2379
2380 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
2381 do
2382 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2383 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2384 echo "configure:2385: checking for $ac_hdr" >&5
2385 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2386   echo $ac_n "(cached) $ac_c" 1>&6
2387 else
2388   cat > conftest.$ac_ext <<EOF
2389 #line 2390 "configure"
2390 #include "confdefs.h"
2391 #include <$ac_hdr>
2392 EOF
2393 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2394 { (eval echo configure:2395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2395 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2396 if test -z "$ac_err"; then
2397   rm -rf conftest*
2398   eval "ac_cv_header_$ac_safe=yes"
2399 else
2400   echo "$ac_err" >&5
2401   echo "configure: failed program was:" >&5
2402   cat conftest.$ac_ext >&5
2403   rm -rf conftest*
2404   eval "ac_cv_header_$ac_safe=no"
2405 fi
2406 rm -f conftest*
2407 fi
2408 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2409   echo "$ac_t""yes" 1>&6
2410     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2411   cat >> confdefs.h <<EOF
2412 #define $ac_tr_hdr 1
2413 EOF
2414  
2415 else
2416   echo "$ac_t""no" 1>&6
2417 fi
2418 done
2419
2420 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
2421 do
2422 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2423 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2424 echo "configure:2425: checking for $ac_hdr" >&5
2425 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2426   echo $ac_n "(cached) $ac_c" 1>&6
2427 else
2428   cat > conftest.$ac_ext <<EOF
2429 #line 2430 "configure"
2430 #include "confdefs.h"
2431 #include <$ac_hdr>
2432 EOF
2433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2434 { (eval echo configure:2435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2436 if test -z "$ac_err"; then
2437   rm -rf conftest*
2438   eval "ac_cv_header_$ac_safe=yes"
2439 else
2440   echo "$ac_err" >&5
2441   echo "configure: failed program was:" >&5
2442   cat conftest.$ac_ext >&5
2443   rm -rf conftest*
2444   eval "ac_cv_header_$ac_safe=no"
2445 fi
2446 rm -f conftest*
2447 fi
2448 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2449   echo "$ac_t""yes" 1>&6
2450     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2451   cat >> confdefs.h <<EOF
2452 #define $ac_tr_hdr 1
2453 EOF
2454  
2455 else
2456   echo "$ac_t""no" 1>&6
2457 fi
2458 done
2459
2460 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
2461 do
2462 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2463 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2464 echo "configure:2465: checking for $ac_hdr" >&5
2465 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2466   echo $ac_n "(cached) $ac_c" 1>&6
2467 else
2468   cat > conftest.$ac_ext <<EOF
2469 #line 2470 "configure"
2470 #include "confdefs.h"
2471 #include <$ac_hdr>
2472 EOF
2473 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2474 { (eval echo configure:2475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2475 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2476 if test -z "$ac_err"; then
2477   rm -rf conftest*
2478   eval "ac_cv_header_$ac_safe=yes"
2479 else
2480   echo "$ac_err" >&5
2481   echo "configure: failed program was:" >&5
2482   cat conftest.$ac_ext >&5
2483   rm -rf conftest*
2484   eval "ac_cv_header_$ac_safe=no"
2485 fi
2486 rm -f conftest*
2487 fi
2488 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2489   echo "$ac_t""yes" 1>&6
2490     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2491   cat >> confdefs.h <<EOF
2492 #define $ac_tr_hdr 1
2493 EOF
2494  
2495 else
2496   echo "$ac_t""no" 1>&6
2497 fi
2498 done
2499
2500 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2501 do
2502 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2503 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2504 echo "configure:2505: checking for $ac_hdr" >&5
2505 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2506   echo $ac_n "(cached) $ac_c" 1>&6
2507 else
2508   cat > conftest.$ac_ext <<EOF
2509 #line 2510 "configure"
2510 #include "confdefs.h"
2511 #include <$ac_hdr>
2512 EOF
2513 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2514 { (eval echo configure:2515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2515 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2516 if test -z "$ac_err"; then
2517   rm -rf conftest*
2518   eval "ac_cv_header_$ac_safe=yes"
2519 else
2520   echo "$ac_err" >&5
2521   echo "configure: failed program was:" >&5
2522   cat conftest.$ac_ext >&5
2523   rm -rf conftest*
2524   eval "ac_cv_header_$ac_safe=no"
2525 fi
2526 rm -f conftest*
2527 fi
2528 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2529   echo "$ac_t""yes" 1>&6
2530     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2531   cat >> confdefs.h <<EOF
2532 #define $ac_tr_hdr 1
2533 EOF
2534  
2535 else
2536   echo "$ac_t""no" 1>&6
2537 fi
2538 done
2539
2540 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2541 do
2542 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2543 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2544 echo "configure:2545: checking for $ac_hdr" >&5
2545 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2546   echo $ac_n "(cached) $ac_c" 1>&6
2547 else
2548   cat > conftest.$ac_ext <<EOF
2549 #line 2550 "configure"
2550 #include "confdefs.h"
2551 #include <$ac_hdr>
2552 EOF
2553 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2554 { (eval echo configure:2555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2555 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2556 if test -z "$ac_err"; then
2557   rm -rf conftest*
2558   eval "ac_cv_header_$ac_safe=yes"
2559 else
2560   echo "$ac_err" >&5
2561   echo "configure: failed program was:" >&5
2562   cat conftest.$ac_ext >&5
2563   rm -rf conftest*
2564   eval "ac_cv_header_$ac_safe=no"
2565 fi
2566 rm -f conftest*
2567 fi
2568 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2569   echo "$ac_t""yes" 1>&6
2570     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2571   cat >> confdefs.h <<EOF
2572 #define $ac_tr_hdr 1
2573 EOF
2574  
2575 else
2576   echo "$ac_t""no" 1>&6
2577 fi
2578 done
2579
2580 for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h dlfcn.h
2581 do
2582 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2583 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2584 echo "configure:2585: checking for $ac_hdr" >&5
2585 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2586   echo $ac_n "(cached) $ac_c" 1>&6
2587 else
2588   cat > conftest.$ac_ext <<EOF
2589 #line 2590 "configure"
2590 #include "confdefs.h"
2591 #include <$ac_hdr>
2592 EOF
2593 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2594 { (eval echo configure:2595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2595 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2596 if test -z "$ac_err"; then
2597   rm -rf conftest*
2598   eval "ac_cv_header_$ac_safe=yes"
2599 else
2600   echo "$ac_err" >&5
2601   echo "configure: failed program was:" >&5
2602   cat conftest.$ac_ext >&5
2603   rm -rf conftest*
2604   eval "ac_cv_header_$ac_safe=no"
2605 fi
2606 rm -f conftest*
2607 fi
2608 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2609   echo "$ac_t""yes" 1>&6
2610     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2611   cat >> confdefs.h <<EOF
2612 #define $ac_tr_hdr 1
2613 EOF
2614  
2615 else
2616   echo "$ac_t""no" 1>&6
2617 fi
2618 done
2619
2620 for ac_hdr in sys/syslog.h syslog.h
2621 do
2622 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2623 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2624 echo "configure:2625: checking for $ac_hdr" >&5
2625 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2626   echo $ac_n "(cached) $ac_c" 1>&6
2627 else
2628   cat > conftest.$ac_ext <<EOF
2629 #line 2630 "configure"
2630 #include "confdefs.h"
2631 #include <$ac_hdr>
2632 EOF
2633 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2634 { (eval echo configure:2635: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2635 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2636 if test -z "$ac_err"; then
2637   rm -rf conftest*
2638   eval "ac_cv_header_$ac_safe=yes"
2639 else
2640   echo "$ac_err" >&5
2641   echo "configure: failed program was:" >&5
2642   cat conftest.$ac_ext >&5
2643   rm -rf conftest*
2644   eval "ac_cv_header_$ac_safe=no"
2645 fi
2646 rm -f conftest*
2647 fi
2648 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2649   echo "$ac_t""yes" 1>&6
2650     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2651   cat >> confdefs.h <<EOF
2652 #define $ac_tr_hdr 1
2653 EOF
2654  
2655 else
2656   echo "$ac_t""no" 1>&6
2657 fi
2658 done
2659
2660
2661 #
2662 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2663 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2664 #
2665 case "$host_os" in
2666     *hpux*)
2667                 cat > conftest.$ac_ext <<EOF
2668 #line 2669 "configure"
2669 #include "confdefs.h"
2670 #include <shadow.h>
2671 int main() {
2672 struct spwd testme
2673 ; return 0; }
2674 EOF
2675 if { (eval echo configure:2676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2676   rm -rf conftest*
2677   ac_cv_header_shadow_h=yes
2678 else
2679   echo "configure: failed program was:" >&5
2680   cat conftest.$ac_ext >&5
2681   rm -rf conftest*
2682   ac_cv_header_shadow_h=no
2683 fi
2684 rm -f conftest*
2685                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2686                    cat >> confdefs.h <<\EOF
2687 #define HAVE_SHADOW_H 1
2688 EOF
2689
2690                 fi
2691         ;;
2692 esac
2693 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2694 do
2695 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2696 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2697 echo "configure:2698: checking for $ac_hdr" >&5
2698 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2699   echo $ac_n "(cached) $ac_c" 1>&6
2700 else
2701   cat > conftest.$ac_ext <<EOF
2702 #line 2703 "configure"
2703 #include "confdefs.h"
2704 #include <$ac_hdr>
2705 EOF
2706 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2707 { (eval echo configure:2708: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2708 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2709 if test -z "$ac_err"; then
2710   rm -rf conftest*
2711   eval "ac_cv_header_$ac_safe=yes"
2712 else
2713   echo "$ac_err" >&5
2714   echo "configure: failed program was:" >&5
2715   cat conftest.$ac_ext >&5
2716   rm -rf conftest*
2717   eval "ac_cv_header_$ac_safe=no"
2718 fi
2719 rm -f conftest*
2720 fi
2721 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2722   echo "$ac_t""yes" 1>&6
2723     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2724   cat >> confdefs.h <<EOF
2725 #define $ac_tr_hdr 1
2726 EOF
2727  
2728 else
2729   echo "$ac_t""no" 1>&6
2730 fi
2731 done
2732
2733 for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
2734 do
2735 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2736 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2737 echo "configure:2738: checking for $ac_hdr" >&5
2738 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2739   echo $ac_n "(cached) $ac_c" 1>&6
2740 else
2741   cat > conftest.$ac_ext <<EOF
2742 #line 2743 "configure"
2743 #include "confdefs.h"
2744 #include <$ac_hdr>
2745 EOF
2746 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2747 { (eval echo configure:2748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2748 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2749 if test -z "$ac_err"; then
2750   rm -rf conftest*
2751   eval "ac_cv_header_$ac_safe=yes"
2752 else
2753   echo "$ac_err" >&5
2754   echo "configure: failed program was:" >&5
2755   cat conftest.$ac_ext >&5
2756   rm -rf conftest*
2757   eval "ac_cv_header_$ac_safe=no"
2758 fi
2759 rm -f conftest*
2760 fi
2761 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2762   echo "$ac_t""yes" 1>&6
2763     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2764   cat >> confdefs.h <<EOF
2765 #define $ac_tr_hdr 1
2766 EOF
2767  
2768 else
2769   echo "$ac_t""no" 1>&6
2770 fi
2771 done
2772
2773 for ac_hdr in stropts.h poll.h
2774 do
2775 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2776 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2777 echo "configure:2778: checking for $ac_hdr" >&5
2778 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2779   echo $ac_n "(cached) $ac_c" 1>&6
2780 else
2781   cat > conftest.$ac_ext <<EOF
2782 #line 2783 "configure"
2783 #include "confdefs.h"
2784 #include <$ac_hdr>
2785 EOF
2786 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2787 { (eval echo configure:2788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2788 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2789 if test -z "$ac_err"; then
2790   rm -rf conftest*
2791   eval "ac_cv_header_$ac_safe=yes"
2792 else
2793   echo "$ac_err" >&5
2794   echo "configure: failed program was:" >&5
2795   cat conftest.$ac_ext >&5
2796   rm -rf conftest*
2797   eval "ac_cv_header_$ac_safe=no"
2798 fi
2799 rm -f conftest*
2800 fi
2801 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2802   echo "$ac_t""yes" 1>&6
2803     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2804   cat >> confdefs.h <<EOF
2805 #define $ac_tr_hdr 1
2806 EOF
2807  
2808 else
2809   echo "$ac_t""no" 1>&6
2810 fi
2811 done
2812
2813 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2814 do
2815 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2816 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2817 echo "configure:2818: checking for $ac_hdr" >&5
2818 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2819   echo $ac_n "(cached) $ac_c" 1>&6
2820 else
2821   cat > conftest.$ac_ext <<EOF
2822 #line 2823 "configure"
2823 #include "confdefs.h"
2824 #include <$ac_hdr>
2825 EOF
2826 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2827 { (eval echo configure:2828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2828 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2829 if test -z "$ac_err"; then
2830   rm -rf conftest*
2831   eval "ac_cv_header_$ac_safe=yes"
2832 else
2833   echo "$ac_err" >&5
2834   echo "configure: failed program was:" >&5
2835   cat conftest.$ac_ext >&5
2836   rm -rf conftest*
2837   eval "ac_cv_header_$ac_safe=no"
2838 fi
2839 rm -f conftest*
2840 fi
2841 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2842   echo "$ac_t""yes" 1>&6
2843     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2844   cat >> confdefs.h <<EOF
2845 #define $ac_tr_hdr 1
2846 EOF
2847  
2848 else
2849   echo "$ac_t""no" 1>&6
2850 fi
2851 done
2852
2853 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2854 do
2855 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2856 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2857 echo "configure:2858: checking for $ac_hdr" >&5
2858 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2859   echo $ac_n "(cached) $ac_c" 1>&6
2860 else
2861   cat > conftest.$ac_ext <<EOF
2862 #line 2863 "configure"
2863 #include "confdefs.h"
2864 #include <$ac_hdr>
2865 EOF
2866 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2867 { (eval echo configure:2868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2868 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2869 if test -z "$ac_err"; then
2870   rm -rf conftest*
2871   eval "ac_cv_header_$ac_safe=yes"
2872 else
2873   echo "$ac_err" >&5
2874   echo "configure: failed program was:" >&5
2875   cat conftest.$ac_ext >&5
2876   rm -rf conftest*
2877   eval "ac_cv_header_$ac_safe=no"
2878 fi
2879 rm -f conftest*
2880 fi
2881 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2882   echo "$ac_t""yes" 1>&6
2883     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2884   cat >> confdefs.h <<EOF
2885 #define $ac_tr_hdr 1
2886 EOF
2887  
2888 else
2889   echo "$ac_t""no" 1>&6
2890 fi
2891 done
2892
2893
2894 # For experimental utmp support (lastlog on some BSD-like systems)
2895 for ac_hdr in utmp.h utmpx.h lastlog.h
2896 do
2897 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2898 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2899 echo "configure:2900: checking for $ac_hdr" >&5
2900 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2901   echo $ac_n "(cached) $ac_c" 1>&6
2902 else
2903   cat > conftest.$ac_ext <<EOF
2904 #line 2905 "configure"
2905 #include "confdefs.h"
2906 #include <$ac_hdr>
2907 EOF
2908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2909 { (eval echo configure:2910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2911 if test -z "$ac_err"; then
2912   rm -rf conftest*
2913   eval "ac_cv_header_$ac_safe=yes"
2914 else
2915   echo "$ac_err" >&5
2916   echo "configure: failed program was:" >&5
2917   cat conftest.$ac_ext >&5
2918   rm -rf conftest*
2919   eval "ac_cv_header_$ac_safe=no"
2920 fi
2921 rm -f conftest*
2922 fi
2923 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2924   echo "$ac_t""yes" 1>&6
2925     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2926   cat >> confdefs.h <<EOF
2927 #define $ac_tr_hdr 1
2928 EOF
2929  
2930 else
2931   echo "$ac_t""no" 1>&6
2932 fi
2933 done
2934
2935  
2936 # For quotas on Veritas VxFS filesystems
2937 for ac_hdr in sys/fs/vx_quota.h
2938 do
2939 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2940 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2941 echo "configure:2942: checking for $ac_hdr" >&5
2942 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2943   echo $ac_n "(cached) $ac_c" 1>&6
2944 else
2945   cat > conftest.$ac_ext <<EOF
2946 #line 2947 "configure"
2947 #include "confdefs.h"
2948 #include <$ac_hdr>
2949 EOF
2950 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2951 { (eval echo configure:2952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2952 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2953 if test -z "$ac_err"; then
2954   rm -rf conftest*
2955   eval "ac_cv_header_$ac_safe=yes"
2956 else
2957   echo "$ac_err" >&5
2958   echo "configure: failed program was:" >&5
2959   cat conftest.$ac_ext >&5
2960   rm -rf conftest*
2961   eval "ac_cv_header_$ac_safe=no"
2962 fi
2963 rm -f conftest*
2964 fi
2965 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2966   echo "$ac_t""yes" 1>&6
2967     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2968   cat >> confdefs.h <<EOF
2969 #define $ac_tr_hdr 1
2970 EOF
2971  
2972 else
2973   echo "$ac_t""no" 1>&6
2974 fi
2975 done
2976
2977
2978 # For quotas on Linux XFS filesystems
2979 for ac_hdr in linux/xqm.h
2980 do
2981 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2982 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2983 echo "configure:2984: checking for $ac_hdr" >&5
2984 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2985   echo $ac_n "(cached) $ac_c" 1>&6
2986 else
2987   cat > conftest.$ac_ext <<EOF
2988 #line 2989 "configure"
2989 #include "confdefs.h"
2990 #include <$ac_hdr>
2991 EOF
2992 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2993 { (eval echo configure:2994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2994 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2995 if test -z "$ac_err"; then
2996   rm -rf conftest*
2997   eval "ac_cv_header_$ac_safe=yes"
2998 else
2999   echo "$ac_err" >&5
3000   echo "configure: failed program was:" >&5
3001   cat conftest.$ac_ext >&5
3002   rm -rf conftest*
3003   eval "ac_cv_header_$ac_safe=no"
3004 fi
3005 rm -f conftest*
3006 fi
3007 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3008   echo "$ac_t""yes" 1>&6
3009     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3010   cat >> confdefs.h <<EOF
3011 #define $ac_tr_hdr 1
3012 EOF
3013  
3014 else
3015   echo "$ac_t""no" 1>&6
3016 fi
3017 done
3018
3019 for ac_hdr in xfs/xqm.h
3020 do
3021 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3022 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3023 echo "configure:3024: checking for $ac_hdr" >&5
3024 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3025   echo $ac_n "(cached) $ac_c" 1>&6
3026 else
3027   cat > conftest.$ac_ext <<EOF
3028 #line 3029 "configure"
3029 #include "confdefs.h"
3030 #include <$ac_hdr>
3031 EOF
3032 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3033 { (eval echo configure:3034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3034 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3035 if test -z "$ac_err"; then
3036   rm -rf conftest*
3037   eval "ac_cv_header_$ac_safe=yes"
3038 else
3039   echo "$ac_err" >&5
3040   echo "configure: failed program was:" >&5
3041   cat conftest.$ac_ext >&5
3042   rm -rf conftest*
3043   eval "ac_cv_header_$ac_safe=no"
3044 fi
3045 rm -f conftest*
3046 fi
3047 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3048   echo "$ac_t""yes" 1>&6
3049     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3050   cat >> confdefs.h <<EOF
3051 #define $ac_tr_hdr 1
3052 EOF
3053  
3054 else
3055   echo "$ac_t""no" 1>&6
3056 fi
3057 done
3058
3059
3060 echo $ac_n "checking size of int""... $ac_c" 1>&6
3061 echo "configure:3062: checking size of int" >&5
3062 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
3063   echo $ac_n "(cached) $ac_c" 1>&6
3064 else
3065   if test "$cross_compiling" = yes; then
3066   ac_cv_sizeof_int=cross
3067 else
3068   cat > conftest.$ac_ext <<EOF
3069 #line 3070 "configure"
3070 #include "confdefs.h"
3071 #include <stdio.h>
3072 int main()
3073 {
3074   FILE *f=fopen("conftestval", "w");
3075   if (!f) return(1);
3076   fprintf(f, "%d\n", sizeof(int));
3077   return(0);
3078 }
3079 EOF
3080 if { (eval echo configure:3081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3081 then
3082   ac_cv_sizeof_int=`cat conftestval`
3083 else
3084   echo "configure: failed program was:" >&5
3085   cat conftest.$ac_ext >&5
3086   rm -fr conftest*
3087   ac_cv_sizeof_int=0
3088 fi
3089 rm -fr conftest*
3090 fi
3091
3092 fi
3093 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
3094 cat >> confdefs.h <<EOF
3095 #define SIZEOF_INT $ac_cv_sizeof_int
3096 EOF
3097
3098
3099 echo $ac_n "checking size of long""... $ac_c" 1>&6
3100 echo "configure:3101: checking size of long" >&5
3101 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
3102   echo $ac_n "(cached) $ac_c" 1>&6
3103 else
3104   if test "$cross_compiling" = yes; then
3105   ac_cv_sizeof_long=cross
3106 else
3107   cat > conftest.$ac_ext <<EOF
3108 #line 3109 "configure"
3109 #include "confdefs.h"
3110 #include <stdio.h>
3111 int main()
3112 {
3113   FILE *f=fopen("conftestval", "w");
3114   if (!f) return(1);
3115   fprintf(f, "%d\n", sizeof(long));
3116   return(0);
3117 }
3118 EOF
3119 if { (eval echo configure:3120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3120 then
3121   ac_cv_sizeof_long=`cat conftestval`
3122 else
3123   echo "configure: failed program was:" >&5
3124   cat conftest.$ac_ext >&5
3125   rm -fr conftest*
3126   ac_cv_sizeof_long=0
3127 fi
3128 rm -fr conftest*
3129 fi
3130
3131 fi
3132 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
3133 cat >> confdefs.h <<EOF
3134 #define SIZEOF_LONG $ac_cv_sizeof_long
3135 EOF
3136
3137
3138 echo $ac_n "checking size of short""... $ac_c" 1>&6
3139 echo "configure:3140: checking size of short" >&5
3140 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
3141   echo $ac_n "(cached) $ac_c" 1>&6
3142 else
3143   if test "$cross_compiling" = yes; then
3144   ac_cv_sizeof_short=cross
3145 else
3146   cat > conftest.$ac_ext <<EOF
3147 #line 3148 "configure"
3148 #include "confdefs.h"
3149 #include <stdio.h>
3150 int main()
3151 {
3152   FILE *f=fopen("conftestval", "w");
3153   if (!f) return(1);
3154   fprintf(f, "%d\n", sizeof(short));
3155   return(0);
3156 }
3157 EOF
3158 if { (eval echo configure:3159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3159 then
3160   ac_cv_sizeof_short=`cat conftestval`
3161 else
3162   echo "configure: failed program was:" >&5
3163   cat conftest.$ac_ext >&5
3164   rm -fr conftest*
3165   ac_cv_sizeof_short=0
3166 fi
3167 rm -fr conftest*
3168 fi
3169
3170 fi
3171 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3172 cat >> confdefs.h <<EOF
3173 #define SIZEOF_SHORT $ac_cv_sizeof_short
3174 EOF
3175
3176
3177
3178 echo $ac_n "checking for working const""... $ac_c" 1>&6
3179 echo "configure:3180: checking for working const" >&5
3180 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3181   echo $ac_n "(cached) $ac_c" 1>&6
3182 else
3183   cat > conftest.$ac_ext <<EOF
3184 #line 3185 "configure"
3185 #include "confdefs.h"
3186
3187 int main() {
3188
3189 /* Ultrix mips cc rejects this.  */
3190 typedef int charset[2]; const charset x;
3191 /* SunOS 4.1.1 cc rejects this.  */
3192 char const *const *ccp;
3193 char **p;
3194 /* NEC SVR4.0.2 mips cc rejects this.  */
3195 struct point {int x, y;};
3196 static struct point const zero = {0,0};
3197 /* AIX XL C 1.02.0.0 rejects this.
3198    It does not let you subtract one const X* pointer from another in an arm
3199    of an if-expression whose if-part is not a constant expression */
3200 const char *g = "string";
3201 ccp = &g + (g ? g-g : 0);
3202 /* HPUX 7.0 cc rejects these. */
3203 ++ccp;
3204 p = (char**) ccp;
3205 ccp = (char const *const *) p;
3206 { /* SCO 3.2v4 cc rejects this.  */
3207   char *t;
3208   char const *s = 0 ? (char *) 0 : (char const *) 0;
3209
3210   *t++ = 0;
3211 }
3212 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3213   int x[] = {25, 17};
3214   const int *foo = &x[0];
3215   ++foo;
3216 }
3217 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3218   typedef const int *iptr;
3219   iptr p = 0;
3220   ++p;
3221 }
3222 { /* AIX XL C 1.02.0.0 rejects this saying
3223      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3224   struct s { int j; const int *ap[3]; };
3225   struct s *b; b->j = 5;
3226 }
3227 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3228   const int foo = 10;
3229 }
3230
3231 ; return 0; }
3232 EOF
3233 if { (eval echo configure:3234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3234   rm -rf conftest*
3235   ac_cv_c_const=yes
3236 else
3237   echo "configure: failed program was:" >&5
3238   cat conftest.$ac_ext >&5
3239   rm -rf conftest*
3240   ac_cv_c_const=no
3241 fi
3242 rm -f conftest*
3243 fi
3244
3245 echo "$ac_t""$ac_cv_c_const" 1>&6
3246 if test $ac_cv_c_const = no; then
3247   cat >> confdefs.h <<\EOF
3248 #define const 
3249 EOF
3250
3251 fi
3252
3253 echo $ac_n "checking for inline""... $ac_c" 1>&6
3254 echo "configure:3255: checking for inline" >&5
3255 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3256   echo $ac_n "(cached) $ac_c" 1>&6
3257 else
3258   ac_cv_c_inline=no
3259 for ac_kw in inline __inline__ __inline; do
3260   cat > conftest.$ac_ext <<EOF
3261 #line 3262 "configure"
3262 #include "confdefs.h"
3263
3264 int main() {
3265 } $ac_kw foo() {
3266 ; return 0; }
3267 EOF
3268 if { (eval echo configure:3269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3269   rm -rf conftest*
3270   ac_cv_c_inline=$ac_kw; break
3271 else
3272   echo "configure: failed program was:" >&5
3273   cat conftest.$ac_ext >&5
3274 fi
3275 rm -f conftest*
3276 done
3277
3278 fi
3279
3280 echo "$ac_t""$ac_cv_c_inline" 1>&6
3281 case "$ac_cv_c_inline" in
3282   inline | yes) ;;
3283   no) cat >> confdefs.h <<\EOF
3284 #define inline 
3285 EOF
3286  ;;
3287   *)  cat >> confdefs.h <<EOF
3288 #define inline $ac_cv_c_inline
3289 EOF
3290  ;;
3291 esac
3292
3293 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3294 echo "configure:3295: checking whether byte ordering is bigendian" >&5
3295 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3296   echo $ac_n "(cached) $ac_c" 1>&6
3297 else
3298   ac_cv_c_bigendian=unknown
3299 # See if sys/param.h defines the BYTE_ORDER macro.
3300 cat > conftest.$ac_ext <<EOF
3301 #line 3302 "configure"
3302 #include "confdefs.h"
3303 #include <sys/types.h>
3304 #include <sys/param.h>
3305 int main() {
3306
3307 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3308  bogus endian macros
3309 #endif
3310 ; return 0; }
3311 EOF
3312 if { (eval echo configure:3313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3313   rm -rf conftest*
3314   # It does; now see whether it defined to BIG_ENDIAN or not.
3315 cat > conftest.$ac_ext <<EOF
3316 #line 3317 "configure"
3317 #include "confdefs.h"
3318 #include <sys/types.h>
3319 #include <sys/param.h>
3320 int main() {
3321
3322 #if BYTE_ORDER != BIG_ENDIAN
3323  not big endian
3324 #endif
3325 ; return 0; }
3326 EOF
3327 if { (eval echo configure:3328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3328   rm -rf conftest*
3329   ac_cv_c_bigendian=yes
3330 else
3331   echo "configure: failed program was:" >&5
3332   cat conftest.$ac_ext >&5
3333   rm -rf conftest*
3334   ac_cv_c_bigendian=no
3335 fi
3336 rm -f conftest*
3337 else
3338   echo "configure: failed program was:" >&5
3339   cat conftest.$ac_ext >&5
3340 fi
3341 rm -f conftest*
3342 if test $ac_cv_c_bigendian = unknown; then
3343 if test "$cross_compiling" = yes; then
3344     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3345 else
3346   cat > conftest.$ac_ext <<EOF
3347 #line 3348 "configure"
3348 #include "confdefs.h"
3349 main () {
3350   /* Are we little or big endian?  From Harbison&Steele.  */
3351   union
3352   {
3353     long l;
3354     char c[sizeof (long)];
3355   } u;
3356   u.l = 1;
3357   exit (u.c[sizeof (long) - 1] == 1);
3358 }
3359 EOF
3360 if { (eval echo configure:3361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3361 then
3362   ac_cv_c_bigendian=no
3363 else
3364   echo "configure: failed program was:" >&5
3365   cat conftest.$ac_ext >&5
3366   rm -fr conftest*
3367   ac_cv_c_bigendian=yes
3368 fi
3369 rm -fr conftest*
3370 fi
3371
3372 fi
3373 fi
3374
3375 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3376 if test $ac_cv_c_bigendian = yes; then
3377   cat >> confdefs.h <<\EOF
3378 #define WORDS_BIGENDIAN 1
3379 EOF
3380
3381 fi
3382
3383 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
3384 echo "configure:3385: checking whether char is unsigned" >&5
3385 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3386   echo $ac_n "(cached) $ac_c" 1>&6
3387 else
3388   if test "$GCC" = yes; then
3389   # GCC predefines this symbol on systems where it applies.
3390 cat > conftest.$ac_ext <<EOF
3391 #line 3392 "configure"
3392 #include "confdefs.h"
3393 #ifdef __CHAR_UNSIGNED__
3394   yes
3395 #endif
3396
3397 EOF
3398 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3399   egrep "yes" >/dev/null 2>&1; then
3400   rm -rf conftest*
3401   ac_cv_c_char_unsigned=yes
3402 else
3403   rm -rf conftest*
3404   ac_cv_c_char_unsigned=no
3405 fi
3406 rm -f conftest*
3407
3408 else
3409 if test "$cross_compiling" = yes; then
3410     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3411 else
3412   cat > conftest.$ac_ext <<EOF
3413 #line 3414 "configure"
3414 #include "confdefs.h"
3415 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
3416 #if !defined(__STDC__) || __STDC__ != 1
3417 #define volatile
3418 #endif
3419 main() {
3420   volatile char c = 255; exit(c < 0);
3421 }
3422 EOF
3423 if { (eval echo configure:3424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3424 then
3425   ac_cv_c_char_unsigned=yes
3426 else
3427   echo "configure: failed program was:" >&5
3428   cat conftest.$ac_ext >&5
3429   rm -fr conftest*
3430   ac_cv_c_char_unsigned=no
3431 fi
3432 rm -fr conftest*
3433 fi
3434
3435 fi
3436 fi
3437
3438 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
3439 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3440   cat >> confdefs.h <<\EOF
3441 #define __CHAR_UNSIGNED__ 1
3442 EOF
3443
3444 fi
3445
3446
3447 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3448 echo "configure:3449: checking return type of signal handlers" >&5
3449 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3450   echo $ac_n "(cached) $ac_c" 1>&6
3451 else
3452   cat > conftest.$ac_ext <<EOF
3453 #line 3454 "configure"
3454 #include "confdefs.h"
3455 #include <sys/types.h>
3456 #include <signal.h>
3457 #ifdef signal
3458 #undef signal
3459 #endif
3460 #ifdef __cplusplus
3461 extern "C" void (*signal (int, void (*)(int)))(int);
3462 #else
3463 void (*signal ()) ();
3464 #endif
3465
3466 int main() {
3467 int i;
3468 ; return 0; }
3469 EOF
3470 if { (eval echo configure:3471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3471   rm -rf conftest*
3472   ac_cv_type_signal=void
3473 else
3474   echo "configure: failed program was:" >&5
3475   cat conftest.$ac_ext >&5
3476   rm -rf conftest*
3477   ac_cv_type_signal=int
3478 fi
3479 rm -f conftest*
3480 fi
3481
3482 echo "$ac_t""$ac_cv_type_signal" 1>&6
3483 cat >> confdefs.h <<EOF
3484 #define RETSIGTYPE $ac_cv_type_signal
3485 EOF
3486
3487
3488 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3489 echo "configure:3490: checking for uid_t in sys/types.h" >&5
3490 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3491   echo $ac_n "(cached) $ac_c" 1>&6
3492 else
3493   cat > conftest.$ac_ext <<EOF
3494 #line 3495 "configure"
3495 #include "confdefs.h"
3496 #include <sys/types.h>
3497 EOF
3498 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3499   egrep "uid_t" >/dev/null 2>&1; then
3500   rm -rf conftest*
3501   ac_cv_type_uid_t=yes
3502 else
3503   rm -rf conftest*
3504   ac_cv_type_uid_t=no
3505 fi
3506 rm -f conftest*
3507
3508 fi
3509
3510 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3511 if test $ac_cv_type_uid_t = no; then
3512   cat >> confdefs.h <<\EOF
3513 #define uid_t int
3514 EOF
3515
3516   cat >> confdefs.h <<\EOF
3517 #define gid_t int
3518 EOF
3519
3520 fi
3521
3522 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3523 echo "configure:3524: checking for mode_t" >&5
3524 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3525   echo $ac_n "(cached) $ac_c" 1>&6
3526 else
3527   cat > conftest.$ac_ext <<EOF
3528 #line 3529 "configure"
3529 #include "confdefs.h"
3530 #include <sys/types.h>
3531 #if STDC_HEADERS
3532 #include <stdlib.h>
3533 #include <stddef.h>
3534 #endif
3535 EOF
3536 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3537   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3538   rm -rf conftest*
3539   ac_cv_type_mode_t=yes
3540 else
3541   rm -rf conftest*
3542   ac_cv_type_mode_t=no
3543 fi
3544 rm -f conftest*
3545
3546 fi
3547 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3548 if test $ac_cv_type_mode_t = no; then
3549   cat >> confdefs.h <<\EOF
3550 #define mode_t int
3551 EOF
3552
3553 fi
3554
3555 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3556 echo "configure:3557: checking for off_t" >&5
3557 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3558   echo $ac_n "(cached) $ac_c" 1>&6
3559 else
3560   cat > conftest.$ac_ext <<EOF
3561 #line 3562 "configure"
3562 #include "confdefs.h"
3563 #include <sys/types.h>
3564 #if STDC_HEADERS
3565 #include <stdlib.h>
3566 #include <stddef.h>
3567 #endif
3568 EOF
3569 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3570   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3571   rm -rf conftest*
3572   ac_cv_type_off_t=yes
3573 else
3574   rm -rf conftest*
3575   ac_cv_type_off_t=no
3576 fi
3577 rm -f conftest*
3578
3579 fi
3580 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3581 if test $ac_cv_type_off_t = no; then
3582   cat >> confdefs.h <<\EOF
3583 #define off_t long
3584 EOF
3585
3586 fi
3587
3588 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3589 echo "configure:3590: checking for size_t" >&5
3590 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3591   echo $ac_n "(cached) $ac_c" 1>&6
3592 else
3593   cat > conftest.$ac_ext <<EOF
3594 #line 3595 "configure"
3595 #include "confdefs.h"
3596 #include <sys/types.h>
3597 #if STDC_HEADERS
3598 #include <stdlib.h>
3599 #include <stddef.h>
3600 #endif
3601 EOF
3602 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3603   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3604   rm -rf conftest*
3605   ac_cv_type_size_t=yes
3606 else
3607   rm -rf conftest*
3608   ac_cv_type_size_t=no
3609 fi
3610 rm -f conftest*
3611
3612 fi
3613 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3614 if test $ac_cv_type_size_t = no; then
3615   cat >> confdefs.h <<\EOF
3616 #define size_t unsigned
3617 EOF
3618
3619 fi
3620
3621 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3622 echo "configure:3623: checking for pid_t" >&5
3623 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3624   echo $ac_n "(cached) $ac_c" 1>&6
3625 else
3626   cat > conftest.$ac_ext <<EOF
3627 #line 3628 "configure"
3628 #include "confdefs.h"
3629 #include <sys/types.h>
3630 #if STDC_HEADERS
3631 #include <stdlib.h>
3632 #include <stddef.h>
3633 #endif
3634 EOF
3635 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3636   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3637   rm -rf conftest*
3638   ac_cv_type_pid_t=yes
3639 else
3640   rm -rf conftest*
3641   ac_cv_type_pid_t=no
3642 fi
3643 rm -f conftest*
3644
3645 fi
3646 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3647 if test $ac_cv_type_pid_t = no; then
3648   cat >> confdefs.h <<\EOF
3649 #define pid_t int
3650 EOF
3651
3652 fi
3653
3654 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3655 echo "configure:3656: checking for st_rdev in struct stat" >&5
3656 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3657   echo $ac_n "(cached) $ac_c" 1>&6
3658 else
3659   cat > conftest.$ac_ext <<EOF
3660 #line 3661 "configure"
3661 #include "confdefs.h"
3662 #include <sys/types.h>
3663 #include <sys/stat.h>
3664 int main() {
3665 struct stat s; s.st_rdev;
3666 ; return 0; }
3667 EOF
3668 if { (eval echo configure:3669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3669   rm -rf conftest*
3670   ac_cv_struct_st_rdev=yes
3671 else
3672   echo "configure: failed program was:" >&5
3673   cat conftest.$ac_ext >&5
3674   rm -rf conftest*
3675   ac_cv_struct_st_rdev=no
3676 fi
3677 rm -f conftest*
3678 fi
3679
3680 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3681 if test $ac_cv_struct_st_rdev = yes; then
3682   cat >> confdefs.h <<\EOF
3683 #define HAVE_ST_RDEV 1
3684 EOF
3685
3686 fi
3687
3688 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3689 echo "configure:3690: checking for d_off in dirent" >&5
3690 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3691   echo $ac_n "(cached) $ac_c" 1>&6
3692 else
3693   cat > conftest.$ac_ext <<EOF
3694 #line 3695 "configure"
3695 #include "confdefs.h"
3696
3697 #include <unistd.h>
3698 #include <sys/types.h>
3699 #include <dirent.h>
3700 int main() {
3701 struct dirent d; d.d_off;
3702 ; return 0; }
3703 EOF
3704 if { (eval echo configure:3705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3705   rm -rf conftest*
3706   ac_cv_dirent_d_off=yes
3707 else
3708   echo "configure: failed program was:" >&5
3709   cat conftest.$ac_ext >&5
3710   rm -rf conftest*
3711   ac_cv_dirent_d_off=no
3712 fi
3713 rm -f conftest*
3714 fi
3715
3716 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3717 if test $ac_cv_dirent_d_off = yes; then
3718   cat >> confdefs.h <<\EOF
3719 #define HAVE_DIRENT_D_OFF 1
3720 EOF
3721
3722 fi
3723
3724 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3725 echo "configure:3726: checking for ino_t" >&5
3726 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3727   echo $ac_n "(cached) $ac_c" 1>&6
3728 else
3729   cat > conftest.$ac_ext <<EOF
3730 #line 3731 "configure"
3731 #include "confdefs.h"
3732 #include <sys/types.h>
3733 #if STDC_HEADERS
3734 #include <stdlib.h>
3735 #include <stddef.h>
3736 #endif
3737 EOF
3738 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3739   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3740   rm -rf conftest*
3741   ac_cv_type_ino_t=yes
3742 else
3743   rm -rf conftest*
3744   ac_cv_type_ino_t=no
3745 fi
3746 rm -f conftest*
3747
3748 fi
3749 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3750 if test $ac_cv_type_ino_t = no; then
3751   cat >> confdefs.h <<\EOF
3752 #define ino_t unsigned
3753 EOF
3754
3755 fi
3756
3757 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3758 echo "configure:3759: checking for loff_t" >&5
3759 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3760   echo $ac_n "(cached) $ac_c" 1>&6
3761 else
3762   cat > conftest.$ac_ext <<EOF
3763 #line 3764 "configure"
3764 #include "confdefs.h"
3765 #include <sys/types.h>
3766 #if STDC_HEADERS
3767 #include <stdlib.h>
3768 #include <stddef.h>
3769 #endif
3770 EOF
3771 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3772   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3773   rm -rf conftest*
3774   ac_cv_type_loff_t=yes
3775 else
3776   rm -rf conftest*
3777   ac_cv_type_loff_t=no
3778 fi
3779 rm -f conftest*
3780
3781 fi
3782 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3783 if test $ac_cv_type_loff_t = no; then
3784   cat >> confdefs.h <<\EOF
3785 #define loff_t off_t
3786 EOF
3787
3788 fi
3789
3790 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3791 echo "configure:3792: checking for offset_t" >&5
3792 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3793   echo $ac_n "(cached) $ac_c" 1>&6
3794 else
3795   cat > conftest.$ac_ext <<EOF
3796 #line 3797 "configure"
3797 #include "confdefs.h"
3798 #include <sys/types.h>
3799 #if STDC_HEADERS
3800 #include <stdlib.h>
3801 #include <stddef.h>
3802 #endif
3803 EOF
3804 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3805   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3806   rm -rf conftest*
3807   ac_cv_type_offset_t=yes
3808 else
3809   rm -rf conftest*
3810   ac_cv_type_offset_t=no
3811 fi
3812 rm -f conftest*
3813
3814 fi
3815 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3816 if test $ac_cv_type_offset_t = no; then
3817   cat >> confdefs.h <<\EOF
3818 #define offset_t loff_t
3819 EOF
3820
3821 fi
3822
3823 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3824 echo "configure:3825: checking for ssize_t" >&5
3825 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3826   echo $ac_n "(cached) $ac_c" 1>&6
3827 else
3828   cat > conftest.$ac_ext <<EOF
3829 #line 3830 "configure"
3830 #include "confdefs.h"
3831 #include <sys/types.h>
3832 #if STDC_HEADERS
3833 #include <stdlib.h>
3834 #include <stddef.h>
3835 #endif
3836 EOF
3837 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3838   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3839   rm -rf conftest*
3840   ac_cv_type_ssize_t=yes
3841 else
3842   rm -rf conftest*
3843   ac_cv_type_ssize_t=no
3844 fi
3845 rm -f conftest*
3846
3847 fi
3848 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3849 if test $ac_cv_type_ssize_t = no; then
3850   cat >> confdefs.h <<\EOF
3851 #define ssize_t int
3852 EOF
3853
3854 fi
3855
3856 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3857 echo "configure:3858: checking for wchar_t" >&5
3858 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3859   echo $ac_n "(cached) $ac_c" 1>&6
3860 else
3861   cat > conftest.$ac_ext <<EOF
3862 #line 3863 "configure"
3863 #include "confdefs.h"
3864 #include <sys/types.h>
3865 #if STDC_HEADERS
3866 #include <stdlib.h>
3867 #include <stddef.h>
3868 #endif
3869 EOF
3870 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3871   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3872   rm -rf conftest*
3873   ac_cv_type_wchar_t=yes
3874 else
3875   rm -rf conftest*
3876   ac_cv_type_wchar_t=no
3877 fi
3878 rm -f conftest*
3879
3880 fi
3881 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3882 if test $ac_cv_type_wchar_t = no; then
3883   cat >> confdefs.h <<\EOF
3884 #define wchar_t unsigned short
3885 EOF
3886
3887 fi
3888
3889
3890 ############################################
3891 # for cups support we need libcups, and a handful of header files
3892
3893 # Check whether --enable-cups or --disable-cups was given.
3894 if test "${enable_cups+set}" = set; then
3895   enableval="$enable_cups"
3896   :
3897 fi
3898
3899
3900 if test x$enable_cups != xno; then
3901         # Extract the first word of "cups-config", so it can be a program name with args.
3902 set dummy cups-config; ac_word=$2
3903 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3904 echo "configure:3905: checking for $ac_word" >&5
3905 if eval "test \"`echo '$''{'ac_cv_path_CUPS_CONFIG'+set}'`\" = set"; then
3906   echo $ac_n "(cached) $ac_c" 1>&6
3907 else
3908   case "$CUPS_CONFIG" in
3909   /*)
3910   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a path.
3911   ;;
3912   ?:/*)                  
3913   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a dos path.
3914   ;;
3915   *)
3916   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3917   ac_dummy="$PATH"
3918   for ac_dir in $ac_dummy; do 
3919     test -z "$ac_dir" && ac_dir=.
3920     if test -f $ac_dir/$ac_word; then
3921       ac_cv_path_CUPS_CONFIG="$ac_dir/$ac_word"
3922       break
3923     fi
3924   done
3925   IFS="$ac_save_ifs"
3926   ;;
3927 esac
3928 fi
3929 CUPS_CONFIG="$ac_cv_path_CUPS_CONFIG"
3930 if test -n "$CUPS_CONFIG"; then
3931   echo "$ac_t""$CUPS_CONFIG" 1>&6
3932 else
3933   echo "$ac_t""no" 1>&6
3934 fi
3935
3936
3937         if test "x$CUPS_CONFIG" != x; then
3938                         cat >> confdefs.h <<\EOF
3939 #define HAVE_CUPS 1
3940 EOF
3941
3942                 CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
3943                 LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
3944                 PRINTLIBS="$PRINTLIBS `$CUPS_CONFIG --libs`"
3945         fi
3946 fi
3947
3948 ############################################
3949 # we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the plugin loading code
3950 for ac_func in dlopen
3951 do
3952 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3953 echo "configure:3954: checking for $ac_func" >&5
3954 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3955   echo $ac_n "(cached) $ac_c" 1>&6
3956 else
3957   cat > conftest.$ac_ext <<EOF
3958 #line 3959 "configure"
3959 #include "confdefs.h"
3960 /* System header to define __stub macros and hopefully few prototypes,
3961     which can conflict with char $ac_func(); below.  */
3962 #include <assert.h>
3963 /* Override any gcc2 internal prototype to avoid an error.  */
3964 /* We use char because int might match the return type of a gcc2
3965     builtin and then its argument prototype would still apply.  */
3966 char $ac_func();
3967
3968 int main() {
3969
3970 /* The GNU C library defines this for functions which it implements
3971     to always fail with ENOSYS.  Some functions are actually named
3972     something starting with __ and the normal name is an alias.  */
3973 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3974 choke me
3975 #else
3976 $ac_func();
3977 #endif
3978
3979 ; return 0; }
3980 EOF
3981 if { (eval echo configure:3982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3982   rm -rf conftest*
3983   eval "ac_cv_func_$ac_func=yes"
3984 else
3985   echo "configure: failed program was:" >&5
3986   cat conftest.$ac_ext >&5
3987   rm -rf conftest*
3988   eval "ac_cv_func_$ac_func=no"
3989 fi
3990 rm -f conftest*
3991 fi
3992
3993 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3994   echo "$ac_t""yes" 1>&6
3995     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3996   cat >> confdefs.h <<EOF
3997 #define $ac_tr_func 1
3998 EOF
3999  
4000 else
4001   echo "$ac_t""no" 1>&6
4002 fi
4003 done
4004
4005 if test x"$ac_cv_func_dlopen" = x"no"; then
4006     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4007 echo "configure:4008: checking for dlopen in -ldl" >&5
4008 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
4009 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4010   echo $ac_n "(cached) $ac_c" 1>&6
4011 else
4012   ac_save_LIBS="$LIBS"
4013 LIBS="-ldl  $LIBS"
4014 cat > conftest.$ac_ext <<EOF
4015 #line 4016 "configure"
4016 #include "confdefs.h"
4017 /* Override any gcc2 internal prototype to avoid an error.  */
4018 /* We use char because int might match the return type of a gcc2
4019     builtin and then its argument prototype would still apply.  */
4020 char dlopen();
4021
4022 int main() {
4023 dlopen()
4024 ; return 0; }
4025 EOF
4026 if { (eval echo configure:4027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4027   rm -rf conftest*
4028   eval "ac_cv_lib_$ac_lib_var=yes"
4029 else
4030   echo "configure: failed program was:" >&5
4031   cat conftest.$ac_ext >&5
4032   rm -rf conftest*
4033   eval "ac_cv_lib_$ac_lib_var=no"
4034 fi
4035 rm -f conftest*
4036 LIBS="$ac_save_LIBS"
4037
4038 fi
4039 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4040   echo "$ac_t""yes" 1>&6
4041   LIBS="$LIBS -ldl";
4042         cat >> confdefs.h <<\EOF
4043 #define HAVE_DLOPEN 1
4044 EOF
4045
4046 else
4047   echo "$ac_t""no" 1>&6
4048 fi
4049
4050 fi
4051 # dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
4052
4053 ############################################
4054 # check if the compiler can do immediate structures
4055 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
4056 echo "configure:4057: checking for immediate structures" >&5
4057 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
4058   echo $ac_n "(cached) $ac_c" 1>&6
4059 else
4060   
4061     cat > conftest.$ac_ext <<EOF
4062 #line 4063 "configure"
4063 #include "confdefs.h"
4064
4065 #include <stdio.h>
4066 int main() {
4067
4068    typedef struct {unsigned x;} FOOBAR;
4069    #define X_FOOBAR(x) ((FOOBAR) { x })
4070    #define FOO_ONE X_FOOBAR(1)
4071    FOOBAR f = FOO_ONE;   
4072    static struct {
4073         FOOBAR y; 
4074         } f2[] = {
4075                 {FOO_ONE}
4076         };   
4077
4078 ; return 0; }
4079 EOF
4080 if { (eval echo configure:4081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4081   rm -rf conftest*
4082   samba_cv_immediate_structures=yes
4083 else
4084   echo "configure: failed program was:" >&5
4085   cat conftest.$ac_ext >&5
4086   rm -rf conftest*
4087   samba_cv_immediate_structures=no
4088 fi
4089 rm -f conftest*
4090 fi
4091
4092 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
4093 if test x"$samba_cv_immediate_structures" = x"yes"; then
4094    cat >> confdefs.h <<\EOF
4095 #define HAVE_IMMEDIATE_STRUCTURES 1
4096 EOF
4097
4098 fi
4099
4100 ############################################
4101 # check for unix domain sockets
4102 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
4103 echo "configure:4104: checking for unix domain sockets" >&5
4104 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
4105   echo $ac_n "(cached) $ac_c" 1>&6
4106 else
4107   
4108     cat > conftest.$ac_ext <<EOF
4109 #line 4110 "configure"
4110 #include "confdefs.h"
4111
4112 #include <sys/types.h>
4113 #include <stdlib.h>
4114 #include <stddef.h>
4115 #include <sys/socket.h>
4116 #include <sys/un.h>
4117 int main() {
4118
4119   struct sockaddr_un sunaddr; 
4120   sunaddr.sun_family = AF_UNIX;
4121
4122 ; return 0; }
4123 EOF
4124 if { (eval echo configure:4125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4125   rm -rf conftest*
4126   samba_cv_unixsocket=yes
4127 else
4128   echo "configure: failed program was:" >&5
4129   cat conftest.$ac_ext >&5
4130   rm -rf conftest*
4131   samba_cv_unixsocket=no
4132 fi
4133 rm -f conftest*
4134 fi
4135
4136 echo "$ac_t""$samba_cv_unixsocket" 1>&6
4137 if test x"$samba_cv_unixsocket" = x"yes"; then
4138    cat >> confdefs.h <<\EOF
4139 #define HAVE_UNIXSOCKET 1
4140 EOF
4141
4142 fi
4143
4144
4145 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
4146 echo "configure:4147: checking for socklen_t type" >&5
4147 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
4148   echo $ac_n "(cached) $ac_c" 1>&6
4149 else
4150   
4151     cat > conftest.$ac_ext <<EOF
4152 #line 4153 "configure"
4153 #include "confdefs.h"
4154
4155 #include <sys/types.h>
4156 #if STDC_HEADERS
4157 #include <stdlib.h>
4158 #include <stddef.h>
4159 #endif
4160 #include <sys/socket.h>
4161 int main() {
4162 socklen_t i = 0
4163 ; return 0; }
4164 EOF
4165 if { (eval echo configure:4166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4166   rm -rf conftest*
4167   samba_cv_socklen_t=yes
4168 else
4169   echo "configure: failed program was:" >&5
4170   cat conftest.$ac_ext >&5
4171   rm -rf conftest*
4172   samba_cv_socklen_t=no
4173 fi
4174 rm -f conftest*
4175 fi
4176
4177 echo "$ac_t""$samba_cv_socklen_t" 1>&6
4178 if test x"$samba_cv_socklen_t" = x"yes"; then
4179    cat >> confdefs.h <<\EOF
4180 #define HAVE_SOCKLEN_T_TYPE 1
4181 EOF
4182
4183 fi
4184
4185 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
4186 echo "configure:4187: checking for sig_atomic_t type" >&5
4187 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
4188   echo $ac_n "(cached) $ac_c" 1>&6
4189 else
4190   
4191     cat > conftest.$ac_ext <<EOF
4192 #line 4193 "configure"
4193 #include "confdefs.h"
4194
4195 #include <sys/types.h>
4196 #if STDC_HEADERS
4197 #include <stdlib.h>
4198 #include <stddef.h>
4199 #endif
4200 #include <signal.h>
4201 int main() {
4202 sig_atomic_t i = 0
4203 ; return 0; }
4204 EOF
4205 if { (eval echo configure:4206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4206   rm -rf conftest*
4207   samba_cv_sig_atomic_t=yes
4208 else
4209   echo "configure: failed program was:" >&5
4210   cat conftest.$ac_ext >&5
4211   rm -rf conftest*
4212   samba_cv_sig_atomic_t=no
4213 fi
4214 rm -f conftest*
4215 fi
4216
4217 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
4218 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
4219    cat >> confdefs.h <<\EOF
4220 #define HAVE_SIG_ATOMIC_T_TYPE 1
4221 EOF
4222
4223 fi
4224
4225 # stupid headers have the functions but no declaration. grrrr.
4226
4227  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
4228 echo "configure:4229: checking for errno declaration" >&5
4229 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
4230   echo $ac_n "(cached) $ac_c" 1>&6
4231 else
4232   
4233     cat > conftest.$ac_ext <<EOF
4234 #line 4235 "configure"
4235 #include "confdefs.h"
4236 #include <errno.h>
4237 int main() {
4238 int i = (int)errno
4239 ; return 0; }
4240 EOF
4241 if { (eval echo configure:4242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4242   rm -rf conftest*
4243   ac_cv_have_errno_decl=yes
4244 else
4245   echo "configure: failed program was:" >&5
4246   cat conftest.$ac_ext >&5
4247   rm -rf conftest*
4248   ac_cv_have_errno_decl=no
4249 fi
4250 rm -f conftest*
4251 fi
4252
4253 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
4254  if test x"$ac_cv_have_errno_decl" = x"yes"; then
4255     cat >> confdefs.h <<\EOF
4256 #define HAVE_ERRNO_DECL 1
4257 EOF
4258
4259  fi
4260
4261
4262  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
4263 echo "configure:4264: checking for setresuid declaration" >&5
4264 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
4265   echo $ac_n "(cached) $ac_c" 1>&6
4266 else
4267   
4268     cat > conftest.$ac_ext <<EOF
4269 #line 4270 "configure"
4270 #include "confdefs.h"
4271 #include <unistd.h>
4272 int main() {
4273 int i = (int)setresuid
4274 ; return 0; }
4275 EOF
4276 if { (eval echo configure:4277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4277   rm -rf conftest*
4278   ac_cv_have_setresuid_decl=yes
4279 else
4280   echo "configure: failed program was:" >&5
4281   cat conftest.$ac_ext >&5
4282   rm -rf conftest*
4283   ac_cv_have_setresuid_decl=no
4284 fi
4285 rm -f conftest*
4286 fi
4287
4288 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
4289  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
4290     cat >> confdefs.h <<\EOF
4291 #define HAVE_SETRESUID_DECL 1
4292 EOF
4293
4294  fi
4295
4296
4297  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
4298 echo "configure:4299: checking for setresgid declaration" >&5
4299 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
4300   echo $ac_n "(cached) $ac_c" 1>&6
4301 else
4302   
4303     cat > conftest.$ac_ext <<EOF
4304 #line 4305 "configure"
4305 #include "confdefs.h"
4306 #include <unistd.h>
4307 int main() {
4308 int i = (int)setresgid
4309 ; return 0; }
4310 EOF
4311 if { (eval echo configure:4312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4312   rm -rf conftest*
4313   ac_cv_have_setresgid_decl=yes
4314 else
4315   echo "configure: failed program was:" >&5
4316   cat conftest.$ac_ext >&5
4317   rm -rf conftest*
4318   ac_cv_have_setresgid_decl=no
4319 fi
4320 rm -f conftest*
4321 fi
4322
4323 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
4324  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
4325     cat >> confdefs.h <<\EOF
4326 #define HAVE_SETRESGID_DECL 1
4327 EOF
4328
4329  fi
4330
4331
4332  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
4333 echo "configure:4334: checking for asprintf declaration" >&5
4334 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
4335   echo $ac_n "(cached) $ac_c" 1>&6
4336 else
4337   
4338     cat > conftest.$ac_ext <<EOF
4339 #line 4340 "configure"
4340 #include "confdefs.h"
4341 #include <stdio.h>
4342 int main() {
4343 int i = (int)asprintf
4344 ; return 0; }
4345 EOF
4346 if { (eval echo configure:4347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4347   rm -rf conftest*
4348   ac_cv_have_asprintf_decl=yes
4349 else
4350   echo "configure: failed program was:" >&5
4351   cat conftest.$ac_ext >&5
4352   rm -rf conftest*
4353   ac_cv_have_asprintf_decl=no
4354 fi
4355 rm -f conftest*
4356 fi
4357
4358 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
4359  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
4360     cat >> confdefs.h <<\EOF
4361 #define HAVE_ASPRINTF_DECL 1
4362 EOF
4363
4364  fi
4365
4366
4367  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
4368 echo "configure:4369: checking for vasprintf declaration" >&5
4369 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
4370   echo $ac_n "(cached) $ac_c" 1>&6
4371 else
4372   
4373     cat > conftest.$ac_ext <<EOF
4374 #line 4375 "configure"
4375 #include "confdefs.h"
4376 #include <stdio.h>
4377 int main() {
4378 int i = (int)vasprintf
4379 ; return 0; }
4380 EOF
4381 if { (eval echo configure:4382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4382   rm -rf conftest*
4383   ac_cv_have_vasprintf_decl=yes
4384 else
4385   echo "configure: failed program was:" >&5
4386   cat conftest.$ac_ext >&5
4387   rm -rf conftest*
4388   ac_cv_have_vasprintf_decl=no
4389 fi
4390 rm -f conftest*
4391 fi
4392
4393 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
4394  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
4395     cat >> confdefs.h <<\EOF
4396 #define HAVE_VASPRINTF_DECL 1
4397 EOF
4398
4399  fi
4400
4401
4402  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
4403 echo "configure:4404: checking for vsnprintf declaration" >&5
4404 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
4405   echo $ac_n "(cached) $ac_c" 1>&6
4406 else
4407   
4408     cat > conftest.$ac_ext <<EOF
4409 #line 4410 "configure"
4410 #include "confdefs.h"
4411 #include <stdio.h>
4412 int main() {
4413 int i = (int)vsnprintf
4414 ; return 0; }
4415 EOF
4416 if { (eval echo configure:4417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4417   rm -rf conftest*
4418   ac_cv_have_vsnprintf_decl=yes
4419 else
4420   echo "configure: failed program was:" >&5
4421   cat conftest.$ac_ext >&5
4422   rm -rf conftest*
4423   ac_cv_have_vsnprintf_decl=no
4424 fi
4425 rm -f conftest*
4426 fi
4427
4428 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
4429  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
4430     cat >> confdefs.h <<\EOF
4431 #define HAVE_VSNPRINTF_DECL 1
4432 EOF
4433
4434  fi
4435
4436
4437  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
4438 echo "configure:4439: checking for snprintf declaration" >&5
4439 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
4440   echo $ac_n "(cached) $ac_c" 1>&6
4441 else
4442   
4443     cat > conftest.$ac_ext <<EOF
4444 #line 4445 "configure"
4445 #include "confdefs.h"
4446 #include <stdio.h>
4447 int main() {
4448 int i = (int)snprintf
4449 ; return 0; }
4450 EOF
4451 if { (eval echo configure:4452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4452   rm -rf conftest*
4453   ac_cv_have_snprintf_decl=yes
4454 else
4455   echo "configure: failed program was:" >&5
4456   cat conftest.$ac_ext >&5
4457   rm -rf conftest*
4458   ac_cv_have_snprintf_decl=no
4459 fi
4460 rm -f conftest*
4461 fi
4462
4463 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
4464  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
4465     cat >> confdefs.h <<\EOF
4466 #define HAVE_SNPRINTF_DECL 1
4467 EOF
4468
4469  fi
4470
4471
4472 # and glibc has setresuid under linux but the function does
4473 # nothing until kernel 2.1.44! very dumb.
4474 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
4475 echo "configure:4476: checking for real setresuid" >&5
4476 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
4477   echo $ac_n "(cached) $ac_c" 1>&6
4478 else
4479   
4480     if test "$cross_compiling" = yes; then
4481   samba_cv_have_setresuid=cross
4482 else
4483   cat > conftest.$ac_ext <<EOF
4484 #line 4485 "configure"
4485 #include "confdefs.h"
4486 #include <errno.h>
4487 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4488 EOF
4489 if { (eval echo configure:4490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4490 then
4491   samba_cv_have_setresuid=yes
4492 else
4493   echo "configure: failed program was:" >&5
4494   cat conftest.$ac_ext >&5
4495   rm -fr conftest*
4496   samba_cv_have_setresuid=no
4497 fi
4498 rm -fr conftest*
4499 fi
4500
4501 fi
4502
4503 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4504 if test x"$samba_cv_have_setresuid" = x"yes"; then
4505     cat >> confdefs.h <<\EOF
4506 #define HAVE_SETRESUID 1
4507 EOF
4508
4509 fi
4510
4511 # Do the same check for setresguid...
4512 #
4513 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4514 echo "configure:4515: checking for real setresgid" >&5
4515 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4516   echo $ac_n "(cached) $ac_c" 1>&6
4517 else
4518   
4519     if test "$cross_compiling" = yes; then
4520   samba_cv_have_setresgid=cross
4521 else
4522   cat > conftest.$ac_ext <<EOF
4523 #line 4524 "configure"
4524 #include "confdefs.h"
4525 #include <unistd.h>
4526 #include <errno.h>
4527 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4528 EOF
4529 if { (eval echo configure:4530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4530 then
4531   samba_cv_have_setresgid=yes
4532 else
4533   echo "configure: failed program was:" >&5
4534   cat conftest.$ac_ext >&5
4535   rm -fr conftest*
4536   samba_cv_have_setresgid=no
4537 fi
4538 rm -fr conftest*
4539 fi
4540
4541 fi
4542
4543 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4544 if test x"$samba_cv_have_setresgid" = x"yes"; then
4545     cat >> confdefs.h <<\EOF
4546 #define HAVE_SETRESGID 1
4547 EOF
4548
4549 fi
4550
4551 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4552 echo "configure:4553: checking for 8-bit clean memcmp" >&5
4553 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4554   echo $ac_n "(cached) $ac_c" 1>&6
4555 else
4556   if test "$cross_compiling" = yes; then
4557   ac_cv_func_memcmp_clean=no
4558 else
4559   cat > conftest.$ac_ext <<EOF
4560 #line 4561 "configure"
4561 #include "confdefs.h"
4562
4563 main()
4564 {
4565   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4566   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4567 }
4568
4569 EOF
4570 if { (eval echo configure:4571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4571 then
4572   ac_cv_func_memcmp_clean=yes
4573 else
4574   echo "configure: failed program was:" >&5
4575   cat conftest.$ac_ext >&5
4576   rm -fr conftest*
4577   ac_cv_func_memcmp_clean=no
4578 fi
4579 rm -fr conftest*
4580 fi
4581
4582 fi
4583
4584 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4585 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4586
4587
4588 ###############################################
4589 # test for where we get crypt() from
4590 for ac_func in crypt
4591 do
4592 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4593 echo "configure:4594: checking for $ac_func" >&5
4594 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4595   echo $ac_n "(cached) $ac_c" 1>&6
4596 else
4597   cat > conftest.$ac_ext <<EOF
4598 #line 4599 "configure"
4599 #include "confdefs.h"
4600 /* System header to define __stub macros and hopefully few prototypes,
4601     which can conflict with char $ac_func(); below.  */
4602 #include <assert.h>
4603 /* Override any gcc2 internal prototype to avoid an error.  */
4604 /* We use char because int might match the return type of a gcc2
4605     builtin and then its argument prototype would still apply.  */
4606 char $ac_func();
4607
4608 int main() {
4609
4610 /* The GNU C library defines this for functions which it implements
4611     to always fail with ENOSYS.  Some functions are actually named
4612     something starting with __ and the normal name is an alias.  */
4613 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4614 choke me
4615 #else
4616 $ac_func();
4617 #endif
4618
4619 ; return 0; }
4620 EOF
4621 if { (eval echo configure:4622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4622   rm -rf conftest*
4623   eval "ac_cv_func_$ac_func=yes"
4624 else
4625   echo "configure: failed program was:" >&5
4626   cat conftest.$ac_ext >&5
4627   rm -rf conftest*
4628   eval "ac_cv_func_$ac_func=no"
4629 fi
4630 rm -f conftest*
4631 fi
4632
4633 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4634   echo "$ac_t""yes" 1>&6
4635     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4636   cat >> confdefs.h <<EOF
4637 #define $ac_tr_func 1
4638 EOF
4639  
4640 else
4641   echo "$ac_t""no" 1>&6
4642 fi
4643 done
4644
4645 if test x"$ac_cv_func_crypt" = x"no"; then
4646     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4647 echo "configure:4648: checking for crypt in -lcrypt" >&5
4648 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4649 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4650   echo $ac_n "(cached) $ac_c" 1>&6
4651 else
4652   ac_save_LIBS="$LIBS"
4653 LIBS="-lcrypt  $LIBS"
4654 cat > conftest.$ac_ext <<EOF
4655 #line 4656 "configure"
4656 #include "confdefs.h"
4657 /* Override any gcc2 internal prototype to avoid an error.  */
4658 /* We use char because int might match the return type of a gcc2
4659     builtin and then its argument prototype would still apply.  */
4660 char crypt();
4661
4662 int main() {
4663 crypt()
4664 ; return 0; }
4665 EOF
4666 if { (eval echo configure:4667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4667   rm -rf conftest*
4668   eval "ac_cv_lib_$ac_lib_var=yes"
4669 else
4670   echo "configure: failed program was:" >&5
4671   cat conftest.$ac_ext >&5
4672   rm -rf conftest*
4673   eval "ac_cv_lib_$ac_lib_var=no"
4674 fi
4675 rm -f conftest*
4676 LIBS="$ac_save_LIBS"
4677
4678 fi
4679 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4680   echo "$ac_t""yes" 1>&6
4681   AUTHLIBS="$AUTHLIBS -lcrypt";
4682         cat >> confdefs.h <<\EOF
4683 #define HAVE_CRYPT 1
4684 EOF
4685
4686 else
4687   echo "$ac_t""no" 1>&6
4688 fi
4689
4690 fi
4691
4692
4693 ###############################################
4694 # Readline included by default unless explicitly asked not to
4695 test "${with_readline+set}" != "set" && with_readline=yes
4696
4697 # test for where we get readline() from
4698 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4699 echo "configure:4700: checking whether to use readline" >&5
4700 # Check whether --with-readline or --without-readline was given.
4701 if test "${with_readline+set}" = set; then
4702   withval="$with_readline"
4703     case "$with_readline" in
4704   yes)
4705     echo "$ac_t""yes" 1>&6
4706
4707     for ac_hdr in readline.h history.h readline/readline.h
4708 do
4709 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4710 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4711 echo "configure:4712: checking for $ac_hdr" >&5
4712 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4713   echo $ac_n "(cached) $ac_c" 1>&6
4714 else
4715   cat > conftest.$ac_ext <<EOF
4716 #line 4717 "configure"
4717 #include "confdefs.h"
4718 #include <$ac_hdr>
4719 EOF
4720 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4721 { (eval echo configure:4722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4722 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4723 if test -z "$ac_err"; then
4724   rm -rf conftest*
4725   eval "ac_cv_header_$ac_safe=yes"
4726 else
4727   echo "$ac_err" >&5
4728   echo "configure: failed program was:" >&5
4729   cat conftest.$ac_ext >&5
4730   rm -rf conftest*
4731   eval "ac_cv_header_$ac_safe=no"
4732 fi
4733 rm -f conftest*
4734 fi
4735 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4736   echo "$ac_t""yes" 1>&6
4737     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4738   cat >> confdefs.h <<EOF
4739 #define $ac_tr_hdr 1
4740 EOF
4741  
4742 else
4743   echo "$ac_t""no" 1>&6
4744 fi
4745 done
4746
4747     for ac_hdr in readline/history.h
4748 do
4749 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4750 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4751 echo "configure:4752: checking for $ac_hdr" >&5
4752 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4753   echo $ac_n "(cached) $ac_c" 1>&6
4754 else
4755   cat > conftest.$ac_ext <<EOF
4756 #line 4757 "configure"
4757 #include "confdefs.h"
4758 #include <$ac_hdr>
4759 EOF
4760 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4761 { (eval echo configure:4762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4762 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4763 if test -z "$ac_err"; then
4764   rm -rf conftest*
4765   eval "ac_cv_header_$ac_safe=yes"
4766 else
4767   echo "$ac_err" >&5
4768   echo "configure: failed program was:" >&5
4769   cat conftest.$ac_ext >&5
4770   rm -rf conftest*
4771   eval "ac_cv_header_$ac_safe=no"
4772 fi
4773 rm -f conftest*
4774 fi
4775 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4776   echo "$ac_t""yes" 1>&6
4777     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4778   cat >> confdefs.h <<EOF
4779 #define $ac_tr_hdr 1
4780 EOF
4781  
4782 else
4783   echo "$ac_t""no" 1>&6
4784 fi
4785 done
4786
4787
4788     for ac_hdr in readline.h readline/readline.h
4789 do
4790 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4791 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4792 echo "configure:4793: checking for $ac_hdr" >&5
4793 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4794   echo $ac_n "(cached) $ac_c" 1>&6
4795 else
4796   cat > conftest.$ac_ext <<EOF
4797 #line 4798 "configure"
4798 #include "confdefs.h"
4799 #include <$ac_hdr>
4800 EOF
4801 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4802 { (eval echo configure:4803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4803 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4804 if test -z "$ac_err"; then
4805   rm -rf conftest*
4806   eval "ac_cv_header_$ac_safe=yes"
4807 else
4808   echo "$ac_err" >&5
4809   echo "configure: failed program was:" >&5
4810   cat conftest.$ac_ext >&5
4811   rm -rf conftest*
4812   eval "ac_cv_header_$ac_safe=no"
4813 fi
4814 rm -f conftest*
4815 fi
4816 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4817   echo "$ac_t""yes" 1>&6
4818     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4819   cat >> confdefs.h <<EOF
4820 #define $ac_tr_hdr 1
4821 EOF
4822  
4823       for termlib in ncurses curses termcap terminfo termlib; do
4824        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4825 echo "configure:4826: checking for tgetent in -l${termlib}" >&5
4826 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4827 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4828   echo $ac_n "(cached) $ac_c" 1>&6
4829 else
4830   ac_save_LIBS="$LIBS"
4831 LIBS="-l${termlib}  $LIBS"
4832 cat > conftest.$ac_ext <<EOF
4833 #line 4834 "configure"
4834 #include "confdefs.h"
4835 /* Override any gcc2 internal prototype to avoid an error.  */
4836 /* We use char because int might match the return type of a gcc2
4837     builtin and then its argument prototype would still apply.  */
4838 char tgetent();
4839
4840 int main() {
4841 tgetent()
4842 ; return 0; }
4843 EOF
4844 if { (eval echo configure:4845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4845   rm -rf conftest*
4846   eval "ac_cv_lib_$ac_lib_var=yes"
4847 else
4848   echo "configure: failed program was:" >&5
4849   cat conftest.$ac_ext >&5
4850   rm -rf conftest*
4851   eval "ac_cv_lib_$ac_lib_var=no"
4852 fi
4853 rm -f conftest*
4854 LIBS="$ac_save_LIBS"
4855
4856 fi
4857 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4858   echo "$ac_t""yes" 1>&6
4859   TERMLIBS="-l${termlib}"; break
4860 else
4861   echo "$ac_t""no" 1>&6
4862 fi
4863
4864       done
4865       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4866 echo "configure:4867: checking for rl_callback_handler_install in -lreadline" >&5
4867 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4868 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4869   echo $ac_n "(cached) $ac_c" 1>&6
4870 else
4871   ac_save_LIBS="$LIBS"
4872 LIBS="-lreadline $TERMLIBS $LIBS"
4873 cat > conftest.$ac_ext <<EOF
4874 #line 4875 "configure"
4875 #include "confdefs.h"
4876 /* Override any gcc2 internal prototype to avoid an error.  */
4877 /* We use char because int might match the return type of a gcc2
4878     builtin and then its argument prototype would still apply.  */
4879 char rl_callback_handler_install();
4880
4881 int main() {
4882 rl_callback_handler_install()
4883 ; return 0; }
4884 EOF
4885 if { (eval echo configure:4886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4886   rm -rf conftest*
4887   eval "ac_cv_lib_$ac_lib_var=yes"
4888 else
4889   echo "configure: failed program was:" >&5
4890   cat conftest.$ac_ext >&5
4891   rm -rf conftest*
4892   eval "ac_cv_lib_$ac_lib_var=no"
4893 fi
4894 rm -f conftest*
4895 LIBS="$ac_save_LIBS"
4896
4897 fi
4898 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4899   echo "$ac_t""yes" 1>&6
4900   TERMLIBS="-lreadline $TERMLIBS"
4901        cat >> confdefs.h <<\EOF
4902 #define HAVE_LIBREADLINE 1
4903 EOF
4904
4905        break
4906 else
4907   echo "$ac_t""no" 1>&6
4908 TERMLIBS=
4909 fi
4910
4911 else
4912   echo "$ac_t""no" 1>&6
4913 fi
4914 done
4915
4916     ;;
4917   no)
4918     echo "$ac_t""no" 1>&6
4919     ;;
4920   *)
4921     echo "$ac_t""yes" 1>&6
4922
4923     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4924     # alternate readline path
4925     _ldflags=${LDFLAGS}
4926     _cppflags=${CPPFLAGS}
4927
4928     # Add additional search path
4929     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4930     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4931
4932     for ac_hdr in readline.h history.h readline/readline.h
4933 do
4934 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4935 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4936 echo "configure:4937: checking for $ac_hdr" >&5
4937 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4938   echo $ac_n "(cached) $ac_c" 1>&6
4939 else
4940   cat > conftest.$ac_ext <<EOF
4941 #line 4942 "configure"
4942 #include "confdefs.h"
4943 #include <$ac_hdr>
4944 EOF
4945 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4946 { (eval echo configure:4947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4947 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4948 if test -z "$ac_err"; then
4949   rm -rf conftest*
4950   eval "ac_cv_header_$ac_safe=yes"
4951 else
4952   echo "$ac_err" >&5
4953   echo "configure: failed program was:" >&5
4954   cat conftest.$ac_ext >&5
4955   rm -rf conftest*
4956   eval "ac_cv_header_$ac_safe=no"
4957 fi
4958 rm -f conftest*
4959 fi
4960 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4961   echo "$ac_t""yes" 1>&6
4962     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4963   cat >> confdefs.h <<EOF
4964 #define $ac_tr_hdr 1
4965 EOF
4966  
4967 else
4968   echo "$ac_t""no" 1>&6
4969 fi
4970 done
4971
4972     for ac_hdr in readline/history.h
4973 do
4974 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4975 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4976 echo "configure:4977: checking for $ac_hdr" >&5
4977 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4978   echo $ac_n "(cached) $ac_c" 1>&6
4979 else
4980   cat > conftest.$ac_ext <<EOF
4981 #line 4982 "configure"
4982 #include "confdefs.h"
4983 #include <$ac_hdr>
4984 EOF
4985 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4986 { (eval echo configure:4987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4987 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4988 if test -z "$ac_err"; then
4989   rm -rf conftest*
4990   eval "ac_cv_header_$ac_safe=yes"
4991 else
4992   echo "$ac_err" >&5
4993   echo "configure: failed program was:" >&5
4994   cat conftest.$ac_ext >&5
4995   rm -rf conftest*
4996   eval "ac_cv_header_$ac_safe=no"
4997 fi
4998 rm -f conftest*
4999 fi
5000 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5001   echo "$ac_t""yes" 1>&6
5002     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5003   cat >> confdefs.h <<EOF
5004 #define $ac_tr_hdr 1
5005 EOF
5006  
5007 else
5008   echo "$ac_t""no" 1>&6
5009 fi
5010 done
5011
5012
5013     for ac_hdr in readline.h readline/readline.h
5014 do
5015 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5016 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5017 echo "configure:5018: checking for $ac_hdr" >&5
5018 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5019   echo $ac_n "(cached) $ac_c" 1>&6
5020 else
5021   cat > conftest.$ac_ext <<EOF
5022 #line 5023 "configure"
5023 #include "confdefs.h"
5024 #include <$ac_hdr>
5025 EOF
5026 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5027 { (eval echo configure:5028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5028 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5029 if test -z "$ac_err"; then
5030   rm -rf conftest*
5031   eval "ac_cv_header_$ac_safe=yes"
5032 else
5033   echo "$ac_err" >&5
5034   echo "configure: failed program was:" >&5
5035   cat conftest.$ac_ext >&5
5036   rm -rf conftest*
5037   eval "ac_cv_header_$ac_safe=no"
5038 fi
5039 rm -f conftest*
5040 fi
5041 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5042   echo "$ac_t""yes" 1>&6
5043     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5044   cat >> confdefs.h <<EOF
5045 #define $ac_tr_hdr 1
5046 EOF
5047  
5048       for termlib in ncurses curses termcap terminfo termlib; do
5049        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
5050 echo "configure:5051: checking for tgetent in -l${termlib}" >&5
5051 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
5052 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5053   echo $ac_n "(cached) $ac_c" 1>&6
5054 else
5055   ac_save_LIBS="$LIBS"
5056 LIBS="-l${termlib}  $LIBS"
5057 cat > conftest.$ac_ext <<EOF
5058 #line 5059 "configure"
5059 #include "confdefs.h"
5060 /* Override any gcc2 internal prototype to avoid an error.  */
5061 /* We use char because int might match the return type of a gcc2
5062     builtin and then its argument prototype would still apply.  */
5063 char tgetent();
5064
5065 int main() {
5066 tgetent()
5067 ; return 0; }
5068 EOF
5069 if { (eval echo configure:5070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5070   rm -rf conftest*
5071   eval "ac_cv_lib_$ac_lib_var=yes"
5072 else
5073   echo "configure: failed program was:" >&5
5074   cat conftest.$ac_ext >&5
5075   rm -rf conftest*
5076   eval "ac_cv_lib_$ac_lib_var=no"
5077 fi
5078 rm -f conftest*
5079 LIBS="$ac_save_LIBS"
5080
5081 fi
5082 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5083   echo "$ac_t""yes" 1>&6
5084   TERMLIBS="-l${termlib}"; break
5085 else
5086   echo "$ac_t""no" 1>&6
5087 fi
5088
5089       done
5090       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
5091 echo "configure:5092: checking for rl_callback_handler_install in -lreadline" >&5
5092 ac_lib_var=`echo readline'_'rl_callback_handler_install | 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="-lreadline $TERMLIBS $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 rl_callback_handler_install();
5105
5106 int main() {
5107 rl_callback_handler_install()
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   TERMLDFLAGS="-L$with_readline/lib"
5126        TERMCPPFLAGS="-I$with_readline/include"
5127        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
5128        TERMLIBS="-lreadline $TERMLIBS"
5129        cat >> confdefs.h <<\EOF
5130 #define HAVE_LIBREADLINE 1
5131 EOF
5132
5133        break
5134 else
5135   echo "$ac_t""no" 1>&6
5136 TERMLIBS= CPPFLAGS=$_cppflags
5137 fi
5138
5139 else
5140   echo "$ac_t""no" 1>&6
5141 fi
5142 done
5143
5144
5145     LDFLAGS=$_ldflags
5146     ;;
5147   esac
5148 else
5149   echo "$ac_t""no" 1>&6
5150
5151 fi
5152
5153
5154
5155
5156 # The readline API changed slightly from readline3 to readline4, so
5157 # code will generate warnings on one of them unless we have a few
5158 # special cases.
5159 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
5160 echo "configure:5161: checking for rl_completion_matches in -lreadline" >&5
5161 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
5162 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5163   echo $ac_n "(cached) $ac_c" 1>&6
5164 else
5165   ac_save_LIBS="$LIBS"
5166 LIBS="-lreadline $TERMLIBS $LIBS"
5167 cat > conftest.$ac_ext <<EOF
5168 #line 5169 "configure"
5169 #include "confdefs.h"
5170 /* Override any gcc2 internal prototype to avoid an error.  */
5171 /* We use char because int might match the return type of a gcc2
5172     builtin and then its argument prototype would still apply.  */
5173 char rl_completion_matches();
5174
5175 int main() {
5176 rl_completion_matches()
5177 ; return 0; }
5178 EOF
5179 if { (eval echo configure:5180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5180   rm -rf conftest*
5181   eval "ac_cv_lib_$ac_lib_var=yes"
5182 else
5183   echo "configure: failed program was:" >&5
5184   cat conftest.$ac_ext >&5
5185   rm -rf conftest*
5186   eval "ac_cv_lib_$ac_lib_var=no"
5187 fi
5188 rm -f conftest*
5189 LIBS="$ac_save_LIBS"
5190
5191 fi
5192 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5193   echo "$ac_t""yes" 1>&6
5194   cat >> confdefs.h <<\EOF
5195 #define HAVE_NEW_LIBREADLINE 1
5196 EOF
5197
5198 else
5199   echo "$ac_t""no" 1>&6
5200 fi
5201
5202
5203 # The following test taken from the cvs sources
5204 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
5205 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
5206 # libsocket.so which has a bad implementation of gethostbyname (it
5207 # only looks in /etc/hosts), so we only look for -lsocket if we need
5208 # it.
5209 for ac_func in connect
5210 do
5211 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5212 echo "configure:5213: checking for $ac_func" >&5
5213 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5214   echo $ac_n "(cached) $ac_c" 1>&6
5215 else
5216   cat > conftest.$ac_ext <<EOF
5217 #line 5218 "configure"
5218 #include "confdefs.h"
5219 /* System header to define __stub macros and hopefully few prototypes,
5220     which can conflict with char $ac_func(); below.  */
5221 #include <assert.h>
5222 /* Override any gcc2 internal prototype to avoid an error.  */
5223 /* We use char because int might match the return type of a gcc2
5224     builtin and then its argument prototype would still apply.  */
5225 char $ac_func();
5226
5227 int main() {
5228
5229 /* The GNU C library defines this for functions which it implements
5230     to always fail with ENOSYS.  Some functions are actually named
5231     something starting with __ and the normal name is an alias.  */
5232 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5233 choke me
5234 #else
5235 $ac_func();
5236 #endif
5237
5238 ; return 0; }
5239 EOF
5240 if { (eval echo configure:5241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5241   rm -rf conftest*
5242   eval "ac_cv_func_$ac_func=yes"
5243 else
5244   echo "configure: failed program was:" >&5
5245   cat conftest.$ac_ext >&5
5246   rm -rf conftest*
5247   eval "ac_cv_func_$ac_func=no"
5248 fi
5249 rm -f conftest*
5250 fi
5251
5252 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5253   echo "$ac_t""yes" 1>&6
5254     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5255   cat >> confdefs.h <<EOF
5256 #define $ac_tr_func 1
5257 EOF
5258  
5259 else
5260   echo "$ac_t""no" 1>&6
5261 fi
5262 done
5263
5264 if test x"$ac_cv_func_connect" = x"no"; then
5265     case "$LIBS" in
5266     *-lnsl*) ;;
5267     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
5268 echo "configure:5269: checking for printf in -lnsl_s" >&5
5269 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
5270 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5271   echo $ac_n "(cached) $ac_c" 1>&6
5272 else
5273   ac_save_LIBS="$LIBS"
5274 LIBS="-lnsl_s  $LIBS"
5275 cat > conftest.$ac_ext <<EOF
5276 #line 5277 "configure"
5277 #include "confdefs.h"
5278 /* Override any gcc2 internal prototype to avoid an error.  */
5279 /* We use char because int might match the return type of a gcc2
5280     builtin and then its argument prototype would still apply.  */
5281 char printf();
5282
5283 int main() {
5284 printf()
5285 ; return 0; }
5286 EOF
5287 if { (eval echo configure:5288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5288   rm -rf conftest*
5289   eval "ac_cv_lib_$ac_lib_var=yes"
5290 else
5291   echo "configure: failed program was:" >&5
5292   cat conftest.$ac_ext >&5
5293   rm -rf conftest*
5294   eval "ac_cv_lib_$ac_lib_var=no"
5295 fi
5296 rm -f conftest*
5297 LIBS="$ac_save_LIBS"
5298
5299 fi
5300 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5301   echo "$ac_t""yes" 1>&6
5302     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5303     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5304   cat >> confdefs.h <<EOF
5305 #define $ac_tr_lib 1
5306 EOF
5307
5308   LIBS="-lnsl_s $LIBS"
5309
5310 else
5311   echo "$ac_t""no" 1>&6
5312 fi
5313  ;;
5314     esac
5315     case "$LIBS" in
5316     *-lnsl*) ;;
5317     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
5318 echo "configure:5319: checking for printf in -lnsl" >&5
5319 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
5320 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5321   echo $ac_n "(cached) $ac_c" 1>&6
5322 else
5323   ac_save_LIBS="$LIBS"
5324 LIBS="-lnsl  $LIBS"
5325 cat > conftest.$ac_ext <<EOF
5326 #line 5327 "configure"
5327 #include "confdefs.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 printf();
5332
5333 int main() {
5334 printf()
5335 ; return 0; }
5336 EOF
5337 if { (eval echo configure:5338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5338   rm -rf conftest*
5339   eval "ac_cv_lib_$ac_lib_var=yes"
5340 else
5341   echo "configure: failed program was:" >&5
5342   cat conftest.$ac_ext >&5
5343   rm -rf conftest*
5344   eval "ac_cv_lib_$ac_lib_var=no"
5345 fi
5346 rm -f conftest*
5347 LIBS="$ac_save_LIBS"
5348
5349 fi
5350 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5351   echo "$ac_t""yes" 1>&6
5352     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5353     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5354   cat >> confdefs.h <<EOF
5355 #define $ac_tr_lib 1
5356 EOF
5357
5358   LIBS="-lnsl $LIBS"
5359
5360 else
5361   echo "$ac_t""no" 1>&6
5362 fi
5363  ;;
5364     esac
5365     case "$LIBS" in
5366     *-lsocket*) ;;
5367     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5368 echo "configure:5369: checking for connect in -lsocket" >&5
5369 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5370 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5371   echo $ac_n "(cached) $ac_c" 1>&6
5372 else
5373   ac_save_LIBS="$LIBS"
5374 LIBS="-lsocket  $LIBS"
5375 cat > conftest.$ac_ext <<EOF
5376 #line 5377 "configure"
5377 #include "confdefs.h"
5378 /* Override any gcc2 internal prototype to avoid an error.  */
5379 /* We use char because int might match the return type of a gcc2
5380     builtin and then its argument prototype would still apply.  */
5381 char connect();
5382
5383 int main() {
5384 connect()
5385 ; return 0; }
5386 EOF
5387 if { (eval echo configure:5388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5388   rm -rf conftest*
5389   eval "ac_cv_lib_$ac_lib_var=yes"
5390 else
5391   echo "configure: failed program was:" >&5
5392   cat conftest.$ac_ext >&5
5393   rm -rf conftest*
5394   eval "ac_cv_lib_$ac_lib_var=no"
5395 fi
5396 rm -f conftest*
5397 LIBS="$ac_save_LIBS"
5398
5399 fi
5400 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5401   echo "$ac_t""yes" 1>&6
5402     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5403     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5404   cat >> confdefs.h <<EOF
5405 #define $ac_tr_lib 1
5406 EOF
5407
5408   LIBS="-lsocket $LIBS"
5409
5410 else
5411   echo "$ac_t""no" 1>&6
5412 fi
5413  ;;
5414     esac
5415     case "$LIBS" in
5416     *-linet*) ;;
5417     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
5418 echo "configure:5419: checking for connect in -linet" >&5
5419 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
5420 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5421   echo $ac_n "(cached) $ac_c" 1>&6
5422 else
5423   ac_save_LIBS="$LIBS"
5424 LIBS="-linet  $LIBS"
5425 cat > conftest.$ac_ext <<EOF
5426 #line 5427 "configure"
5427 #include "confdefs.h"
5428 /* Override any gcc2 internal prototype to avoid an error.  */
5429 /* We use char because int might match the return type of a gcc2
5430     builtin and then its argument prototype would still apply.  */
5431 char connect();
5432
5433 int main() {
5434 connect()
5435 ; return 0; }
5436 EOF
5437 if { (eval echo configure:5438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5438   rm -rf conftest*
5439   eval "ac_cv_lib_$ac_lib_var=yes"
5440 else
5441   echo "configure: failed program was:" >&5
5442   cat conftest.$ac_ext >&5
5443   rm -rf conftest*
5444   eval "ac_cv_lib_$ac_lib_var=no"
5445 fi
5446 rm -f conftest*
5447 LIBS="$ac_save_LIBS"
5448
5449 fi
5450 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5451   echo "$ac_t""yes" 1>&6
5452     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5453     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5454   cat >> confdefs.h <<EOF
5455 #define $ac_tr_lib 1
5456 EOF
5457
5458   LIBS="-linet $LIBS"
5459
5460 else
5461   echo "$ac_t""no" 1>&6
5462 fi
5463  ;;
5464     esac
5465             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
5466        test x"$ac_cv_lib_inet_connect" = x"yes"; then
5467         # ac_cv_func_connect=yes
5468         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
5469         cat >> confdefs.h <<\EOF
5470 #define HAVE_CONNECT 1
5471 EOF
5472
5473     fi
5474 fi
5475
5476 ###############################################
5477 # test for where we get get_yp_default_domain() from
5478 for ac_func in yp_get_default_domain
5479 do
5480 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5481 echo "configure:5482: checking for $ac_func" >&5
5482 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5483   echo $ac_n "(cached) $ac_c" 1>&6
5484 else
5485   cat > conftest.$ac_ext <<EOF
5486 #line 5487 "configure"
5487 #include "confdefs.h"
5488 /* System header to define __stub macros and hopefully few prototypes,
5489     which can conflict with char $ac_func(); below.  */
5490 #include <assert.h>
5491 /* Override any gcc2 internal prototype to avoid an error.  */
5492 /* We use char because int might match the return type of a gcc2
5493     builtin and then its argument prototype would still apply.  */
5494 char $ac_func();
5495
5496 int main() {
5497
5498 /* The GNU C library defines this for functions which it implements
5499     to always fail with ENOSYS.  Some functions are actually named
5500     something starting with __ and the normal name is an alias.  */
5501 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5502 choke me
5503 #else
5504 $ac_func();
5505 #endif
5506
5507 ; return 0; }
5508 EOF
5509 if { (eval echo configure:5510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5510   rm -rf conftest*
5511   eval "ac_cv_func_$ac_func=yes"
5512 else
5513   echo "configure: failed program was:" >&5
5514   cat conftest.$ac_ext >&5
5515   rm -rf conftest*
5516   eval "ac_cv_func_$ac_func=no"
5517 fi
5518 rm -f conftest*
5519 fi
5520
5521 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5522   echo "$ac_t""yes" 1>&6
5523     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5524   cat >> confdefs.h <<EOF
5525 #define $ac_tr_func 1
5526 EOF
5527  
5528 else
5529   echo "$ac_t""no" 1>&6
5530 fi
5531 done
5532
5533 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5534         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5535 echo "configure:5536: checking for yp_get_default_domain in -lnsl" >&5
5536 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5537 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5538   echo $ac_n "(cached) $ac_c" 1>&6
5539 else
5540   ac_save_LIBS="$LIBS"
5541 LIBS="-lnsl  $LIBS"
5542 cat > conftest.$ac_ext <<EOF
5543 #line 5544 "configure"
5544 #include "confdefs.h"
5545 /* Override any gcc2 internal prototype to avoid an error.  */
5546 /* We use char because int might match the return type of a gcc2
5547     builtin and then its argument prototype would still apply.  */
5548 char yp_get_default_domain();
5549
5550 int main() {
5551 yp_get_default_domain()
5552 ; return 0; }
5553 EOF
5554 if { (eval echo configure:5555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5555   rm -rf conftest*
5556   eval "ac_cv_lib_$ac_lib_var=yes"
5557 else
5558   echo "configure: failed program was:" >&5
5559   cat conftest.$ac_ext >&5
5560   rm -rf conftest*
5561   eval "ac_cv_lib_$ac_lib_var=no"
5562 fi
5563 rm -f conftest*
5564 LIBS="$ac_save_LIBS"
5565
5566 fi
5567 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5568   echo "$ac_t""yes" 1>&6
5569   LIBS="$LIBS -lnsl";
5570         cat >> confdefs.h <<\EOF
5571 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5572 EOF
5573
5574 else
5575   echo "$ac_t""no" 1>&6
5576 fi
5577  
5578 fi
5579
5580 # Check if we have execl, if not we need to compile smbrun.
5581 for ac_func in execl
5582 do
5583 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5584 echo "configure:5585: checking for $ac_func" >&5
5585 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5586   echo $ac_n "(cached) $ac_c" 1>&6
5587 else
5588   cat > conftest.$ac_ext <<EOF
5589 #line 5590 "configure"
5590 #include "confdefs.h"
5591 /* System header to define __stub macros and hopefully few prototypes,
5592     which can conflict with char $ac_func(); below.  */
5593 #include <assert.h>
5594 /* Override any gcc2 internal prototype to avoid an error.  */
5595 /* We use char because int might match the return type of a gcc2
5596     builtin and then its argument prototype would still apply.  */
5597 char $ac_func();
5598
5599 int main() {
5600
5601 /* The GNU C library defines this for functions which it implements
5602     to always fail with ENOSYS.  Some functions are actually named
5603     something starting with __ and the normal name is an alias.  */
5604 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5605 choke me
5606 #else
5607 $ac_func();
5608 #endif
5609
5610 ; return 0; }
5611 EOF
5612 if { (eval echo configure:5613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5613   rm -rf conftest*
5614   eval "ac_cv_func_$ac_func=yes"
5615 else
5616   echo "configure: failed program was:" >&5
5617   cat conftest.$ac_ext >&5
5618   rm -rf conftest*
5619   eval "ac_cv_func_$ac_func=no"
5620 fi
5621 rm -f conftest*
5622 fi
5623
5624 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5625   echo "$ac_t""yes" 1>&6
5626     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5627   cat >> confdefs.h <<EOF
5628 #define $ac_tr_func 1
5629 EOF
5630  
5631 else
5632   echo "$ac_t""no" 1>&6
5633 fi
5634 done
5635
5636 if test x"$ac_cv_func_execl" = x"no"; then
5637     EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbrun\$(EXEEXT)"
5638 fi
5639
5640 for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64
5641 do
5642 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5643 echo "configure:5644: checking for $ac_func" >&5
5644 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5645   echo $ac_n "(cached) $ac_c" 1>&6
5646 else
5647   cat > conftest.$ac_ext <<EOF
5648 #line 5649 "configure"
5649 #include "confdefs.h"
5650 /* System header to define __stub macros and hopefully few prototypes,
5651     which can conflict with char $ac_func(); below.  */
5652 #include <assert.h>
5653 /* Override any gcc2 internal prototype to avoid an error.  */
5654 /* We use char because int might match the return type of a gcc2
5655     builtin and then its argument prototype would still apply.  */
5656 char $ac_func();
5657
5658 int main() {
5659
5660 /* The GNU C library defines this for functions which it implements
5661     to always fail with ENOSYS.  Some functions are actually named
5662     something starting with __ and the normal name is an alias.  */
5663 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5664 choke me
5665 #else
5666 $ac_func();
5667 #endif
5668
5669 ; return 0; }
5670 EOF
5671 if { (eval echo configure:5672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5672   rm -rf conftest*
5673   eval "ac_cv_func_$ac_func=yes"
5674 else
5675   echo "configure: failed program was:" >&5
5676   cat conftest.$ac_ext >&5
5677   rm -rf conftest*
5678   eval "ac_cv_func_$ac_func=no"
5679 fi
5680 rm -f conftest*
5681 fi
5682
5683 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5684   echo "$ac_t""yes" 1>&6
5685     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5686   cat >> confdefs.h <<EOF
5687 #define $ac_tr_func 1
5688 EOF
5689  
5690 else
5691   echo "$ac_t""no" 1>&6
5692 fi
5693 done
5694
5695 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid
5696 do
5697 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5698 echo "configure:5699: checking for $ac_func" >&5
5699 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5700   echo $ac_n "(cached) $ac_c" 1>&6
5701 else
5702   cat > conftest.$ac_ext <<EOF
5703 #line 5704 "configure"
5704 #include "confdefs.h"
5705 /* System header to define __stub macros and hopefully few prototypes,
5706     which can conflict with char $ac_func(); below.  */
5707 #include <assert.h>
5708 /* Override any gcc2 internal prototype to avoid an error.  */
5709 /* We use char because int might match the return type of a gcc2
5710     builtin and then its argument prototype would still apply.  */
5711 char $ac_func();
5712
5713 int main() {
5714
5715 /* The GNU C library defines this for functions which it implements
5716     to always fail with ENOSYS.  Some functions are actually named
5717     something starting with __ and the normal name is an alias.  */
5718 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5719 choke me
5720 #else
5721 $ac_func();
5722 #endif
5723
5724 ; return 0; }
5725 EOF
5726 if { (eval echo configure:5727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5727   rm -rf conftest*
5728   eval "ac_cv_func_$ac_func=yes"
5729 else
5730   echo "configure: failed program was:" >&5
5731   cat conftest.$ac_ext >&5
5732   rm -rf conftest*
5733   eval "ac_cv_func_$ac_func=no"
5734 fi
5735 rm -f conftest*
5736 fi
5737
5738 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5739   echo "$ac_t""yes" 1>&6
5740     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5741   cat >> confdefs.h <<EOF
5742 #define $ac_tr_func 1
5743 EOF
5744  
5745 else
5746   echo "$ac_t""no" 1>&6
5747 fi
5748 done
5749
5750 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5751 do
5752 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5753 echo "configure:5754: checking for $ac_func" >&5
5754 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5755   echo $ac_n "(cached) $ac_c" 1>&6
5756 else
5757   cat > conftest.$ac_ext <<EOF
5758 #line 5759 "configure"
5759 #include "confdefs.h"
5760 /* System header to define __stub macros and hopefully few prototypes,
5761     which can conflict with char $ac_func(); below.  */
5762 #include <assert.h>
5763 /* Override any gcc2 internal prototype to avoid an error.  */
5764 /* We use char because int might match the return type of a gcc2
5765     builtin and then its argument prototype would still apply.  */
5766 char $ac_func();
5767
5768 int main() {
5769
5770 /* The GNU C library defines this for functions which it implements
5771     to always fail with ENOSYS.  Some functions are actually named
5772     something starting with __ and the normal name is an alias.  */
5773 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5774 choke me
5775 #else
5776 $ac_func();
5777 #endif
5778
5779 ; return 0; }
5780 EOF
5781 if { (eval echo configure:5782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5782   rm -rf conftest*
5783   eval "ac_cv_func_$ac_func=yes"
5784 else
5785   echo "configure: failed program was:" >&5
5786   cat conftest.$ac_ext >&5
5787   rm -rf conftest*
5788   eval "ac_cv_func_$ac_func=no"
5789 fi
5790 rm -f conftest*
5791 fi
5792
5793 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5794   echo "$ac_t""yes" 1>&6
5795     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5796   cat >> confdefs.h <<EOF
5797 #define $ac_tr_func 1
5798 EOF
5799  
5800 else
5801   echo "$ac_t""no" 1>&6
5802 fi
5803 done
5804
5805 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5806 do
5807 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5808 echo "configure:5809: checking for $ac_func" >&5
5809 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5810   echo $ac_n "(cached) $ac_c" 1>&6
5811 else
5812   cat > conftest.$ac_ext <<EOF
5813 #line 5814 "configure"
5814 #include "confdefs.h"
5815 /* System header to define __stub macros and hopefully few prototypes,
5816     which can conflict with char $ac_func(); below.  */
5817 #include <assert.h>
5818 /* Override any gcc2 internal prototype to avoid an error.  */
5819 /* We use char because int might match the return type of a gcc2
5820     builtin and then its argument prototype would still apply.  */
5821 char $ac_func();
5822
5823 int main() {
5824
5825 /* The GNU C library defines this for functions which it implements
5826     to always fail with ENOSYS.  Some functions are actually named
5827     something starting with __ and the normal name is an alias.  */
5828 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5829 choke me
5830 #else
5831 $ac_func();
5832 #endif
5833
5834 ; return 0; }
5835 EOF
5836 if { (eval echo configure:5837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5837   rm -rf conftest*
5838   eval "ac_cv_func_$ac_func=yes"
5839 else
5840   echo "configure: failed program was:" >&5
5841   cat conftest.$ac_ext >&5
5842   rm -rf conftest*
5843   eval "ac_cv_func_$ac_func=no"
5844 fi
5845 rm -f conftest*
5846 fi
5847
5848 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5849   echo "$ac_t""yes" 1>&6
5850     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5851   cat >> confdefs.h <<EOF
5852 #define $ac_tr_func 1
5853 EOF
5854  
5855 else
5856   echo "$ac_t""no" 1>&6
5857 fi
5858 done
5859
5860 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath
5861 do
5862 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5863 echo "configure:5864: checking for $ac_func" >&5
5864 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5865   echo $ac_n "(cached) $ac_c" 1>&6
5866 else
5867   cat > conftest.$ac_ext <<EOF
5868 #line 5869 "configure"
5869 #include "confdefs.h"
5870 /* System header to define __stub macros and hopefully few prototypes,
5871     which can conflict with char $ac_func(); below.  */
5872 #include <assert.h>
5873 /* Override any gcc2 internal prototype to avoid an error.  */
5874 /* We use char because int might match the return type of a gcc2
5875     builtin and then its argument prototype would still apply.  */
5876 char $ac_func();
5877
5878 int main() {
5879
5880 /* The GNU C library defines this for functions which it implements
5881     to always fail with ENOSYS.  Some functions are actually named
5882     something starting with __ and the normal name is an alias.  */
5883 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5884 choke me
5885 #else
5886 $ac_func();
5887 #endif
5888
5889 ; return 0; }
5890 EOF
5891 if { (eval echo configure:5892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5892   rm -rf conftest*
5893   eval "ac_cv_func_$ac_func=yes"
5894 else
5895   echo "configure: failed program was:" >&5
5896   cat conftest.$ac_ext >&5
5897   rm -rf conftest*
5898   eval "ac_cv_func_$ac_func=no"
5899 fi
5900 rm -f conftest*
5901 fi
5902
5903 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5904   echo "$ac_t""yes" 1>&6
5905     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5906   cat >> confdefs.h <<EOF
5907 #define $ac_tr_func 1
5908 EOF
5909  
5910 else
5911   echo "$ac_t""no" 1>&6
5912 fi
5913 done
5914
5915 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5916 do
5917 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5918 echo "configure:5919: checking for $ac_func" >&5
5919 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5920   echo $ac_n "(cached) $ac_c" 1>&6
5921 else
5922   cat > conftest.$ac_ext <<EOF
5923 #line 5924 "configure"
5924 #include "confdefs.h"
5925 /* System header to define __stub macros and hopefully few prototypes,
5926     which can conflict with char $ac_func(); below.  */
5927 #include <assert.h>
5928 /* Override any gcc2 internal prototype to avoid an error.  */
5929 /* We use char because int might match the return type of a gcc2
5930     builtin and then its argument prototype would still apply.  */
5931 char $ac_func();
5932
5933 int main() {
5934
5935 /* The GNU C library defines this for functions which it implements
5936     to always fail with ENOSYS.  Some functions are actually named
5937     something starting with __ and the normal name is an alias.  */
5938 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5939 choke me
5940 #else
5941 $ac_func();
5942 #endif
5943
5944 ; return 0; }
5945 EOF
5946 if { (eval echo configure:5947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5947   rm -rf conftest*
5948   eval "ac_cv_func_$ac_func=yes"
5949 else
5950   echo "configure: failed program was:" >&5
5951   cat conftest.$ac_ext >&5
5952   rm -rf conftest*
5953   eval "ac_cv_func_$ac_func=no"
5954 fi
5955 rm -f conftest*
5956 fi
5957
5958 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5959   echo "$ac_t""yes" 1>&6
5960     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5961   cat >> confdefs.h <<EOF
5962 #define $ac_tr_func 1
5963 EOF
5964  
5965 else
5966   echo "$ac_t""no" 1>&6
5967 fi
5968 done
5969
5970 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5971 do
5972 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5973 echo "configure:5974: checking for $ac_func" >&5
5974 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5975   echo $ac_n "(cached) $ac_c" 1>&6
5976 else
5977   cat > conftest.$ac_ext <<EOF
5978 #line 5979 "configure"
5979 #include "confdefs.h"
5980 /* System header to define __stub macros and hopefully few prototypes,
5981     which can conflict with char $ac_func(); below.  */
5982 #include <assert.h>
5983 /* Override any gcc2 internal prototype to avoid an error.  */
5984 /* We use char because int might match the return type of a gcc2
5985     builtin and then its argument prototype would still apply.  */
5986 char $ac_func();
5987
5988 int main() {
5989
5990 /* The GNU C library defines this for functions which it implements
5991     to always fail with ENOSYS.  Some functions are actually named
5992     something starting with __ and the normal name is an alias.  */
5993 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5994 choke me
5995 #else
5996 $ac_func();
5997 #endif
5998
5999 ; return 0; }
6000 EOF
6001 if { (eval echo configure:6002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6002   rm -rf conftest*
6003   eval "ac_cv_func_$ac_func=yes"
6004 else
6005   echo "configure: failed program was:" >&5
6006   cat conftest.$ac_ext >&5
6007   rm -rf conftest*
6008   eval "ac_cv_func_$ac_func=no"
6009 fi
6010 rm -f conftest*
6011 fi
6012
6013 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6014   echo "$ac_t""yes" 1>&6
6015     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6016   cat >> confdefs.h <<EOF
6017 #define $ac_tr_func 1
6018 EOF
6019  
6020 else
6021   echo "$ac_t""no" 1>&6
6022 fi
6023 done
6024
6025 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
6026 do
6027 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6028 echo "configure:6029: checking for $ac_func" >&5
6029 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6030   echo $ac_n "(cached) $ac_c" 1>&6
6031 else
6032   cat > conftest.$ac_ext <<EOF
6033 #line 6034 "configure"
6034 #include "confdefs.h"
6035 /* System header to define __stub macros and hopefully few prototypes,
6036     which can conflict with char $ac_func(); below.  */
6037 #include <assert.h>
6038 /* Override any gcc2 internal prototype to avoid an error.  */
6039 /* We use char because int might match the return type of a gcc2
6040     builtin and then its argument prototype would still apply.  */
6041 char $ac_func();
6042
6043 int main() {
6044
6045 /* The GNU C library defines this for functions which it implements
6046     to always fail with ENOSYS.  Some functions are actually named
6047     something starting with __ and the normal name is an alias.  */
6048 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6049 choke me
6050 #else
6051 $ac_func();
6052 #endif
6053
6054 ; return 0; }
6055 EOF
6056 if { (eval echo configure:6057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6057   rm -rf conftest*
6058   eval "ac_cv_func_$ac_func=yes"
6059 else
6060   echo "configure: failed program was:" >&5
6061   cat conftest.$ac_ext >&5
6062   rm -rf conftest*
6063   eval "ac_cv_func_$ac_func=no"
6064 fi
6065 rm -f conftest*
6066 fi
6067
6068 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6069   echo "$ac_t""yes" 1>&6
6070     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6071   cat >> confdefs.h <<EOF
6072 #define $ac_tr_func 1
6073 EOF
6074  
6075 else
6076   echo "$ac_t""no" 1>&6
6077 fi
6078 done
6079
6080 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
6081 do
6082 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6083 echo "configure:6084: checking for $ac_func" >&5
6084 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6085   echo $ac_n "(cached) $ac_c" 1>&6
6086 else
6087   cat > conftest.$ac_ext <<EOF
6088 #line 6089 "configure"
6089 #include "confdefs.h"
6090 /* System header to define __stub macros and hopefully few prototypes,
6091     which can conflict with char $ac_func(); below.  */
6092 #include <assert.h>
6093 /* Override any gcc2 internal prototype to avoid an error.  */
6094 /* We use char because int might match the return type of a gcc2
6095     builtin and then its argument prototype would still apply.  */
6096 char $ac_func();
6097
6098 int main() {
6099
6100 /* The GNU C library defines this for functions which it implements
6101     to always fail with ENOSYS.  Some functions are actually named
6102     something starting with __ and the normal name is an alias.  */
6103 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6104 choke me
6105 #else
6106 $ac_func();
6107 #endif
6108
6109 ; return 0; }
6110 EOF
6111 if { (eval echo configure:6112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6112   rm -rf conftest*
6113   eval "ac_cv_func_$ac_func=yes"
6114 else
6115   echo "configure: failed program was:" >&5
6116   cat conftest.$ac_ext >&5
6117   rm -rf conftest*
6118   eval "ac_cv_func_$ac_func=no"
6119 fi
6120 rm -f conftest*
6121 fi
6122
6123 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6124   echo "$ac_t""yes" 1>&6
6125     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6126   cat >> confdefs.h <<EOF
6127 #define $ac_tr_func 1
6128 EOF
6129  
6130 else
6131   echo "$ac_t""no" 1>&6
6132 fi
6133 done
6134
6135 for ac_func in syslog vsyslog getgrouplist timegm
6136 do
6137 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6138 echo "configure:6139: checking for $ac_func" >&5
6139 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6140   echo $ac_n "(cached) $ac_c" 1>&6
6141 else
6142   cat > conftest.$ac_ext <<EOF
6143 #line 6144 "configure"
6144 #include "confdefs.h"
6145 /* System header to define __stub macros and hopefully few prototypes,
6146     which can conflict with char $ac_func(); below.  */
6147 #include <assert.h>
6148 /* Override any gcc2 internal prototype to avoid an error.  */
6149 /* We use char because int might match the return type of a gcc2
6150     builtin and then its argument prototype would still apply.  */
6151 char $ac_func();
6152
6153 int main() {
6154
6155 /* The GNU C library defines this for functions which it implements
6156     to always fail with ENOSYS.  Some functions are actually named
6157     something starting with __ and the normal name is an alias.  */
6158 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6159 choke me
6160 #else
6161 $ac_func();
6162 #endif
6163
6164 ; return 0; }
6165 EOF
6166 if { (eval echo configure:6167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6167   rm -rf conftest*
6168   eval "ac_cv_func_$ac_func=yes"
6169 else
6170   echo "configure: failed program was:" >&5
6171   cat conftest.$ac_ext >&5
6172   rm -rf conftest*
6173   eval "ac_cv_func_$ac_func=no"
6174 fi
6175 rm -f conftest*
6176 fi
6177
6178 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6179   echo "$ac_t""yes" 1>&6
6180     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6181   cat >> confdefs.h <<EOF
6182 #define $ac_tr_func 1
6183 EOF
6184  
6185 else
6186   echo "$ac_t""no" 1>&6
6187 fi
6188 done
6189
6190 # setbuffer, shmget, shm_open are needed for smbtorture
6191 for ac_func in setbuffer shmget shm_open
6192 do
6193 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6194 echo "configure:6195: checking for $ac_func" >&5
6195 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6196   echo $ac_n "(cached) $ac_c" 1>&6
6197 else
6198   cat > conftest.$ac_ext <<EOF
6199 #line 6200 "configure"
6200 #include "confdefs.h"
6201 /* System header to define __stub macros and hopefully few prototypes,
6202     which can conflict with char $ac_func(); below.  */
6203 #include <assert.h>
6204 /* Override any gcc2 internal prototype to avoid an error.  */
6205 /* We use char because int might match the return type of a gcc2
6206     builtin and then its argument prototype would still apply.  */
6207 char $ac_func();
6208
6209 int main() {
6210
6211 /* The GNU C library defines this for functions which it implements
6212     to always fail with ENOSYS.  Some functions are actually named
6213     something starting with __ and the normal name is an alias.  */
6214 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6215 choke me
6216 #else
6217 $ac_func();
6218 #endif
6219
6220 ; return 0; }
6221 EOF
6222 if { (eval echo configure:6223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6223   rm -rf conftest*
6224   eval "ac_cv_func_$ac_func=yes"
6225 else
6226   echo "configure: failed program was:" >&5
6227   cat conftest.$ac_ext >&5
6228   rm -rf conftest*
6229   eval "ac_cv_func_$ac_func=no"
6230 fi
6231 rm -f conftest*
6232 fi
6233
6234 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6235   echo "$ac_t""yes" 1>&6
6236     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6237   cat >> confdefs.h <<EOF
6238 #define $ac_tr_func 1
6239 EOF
6240  
6241 else
6242   echo "$ac_t""no" 1>&6
6243 fi
6244 done
6245
6246
6247 # syscall() is needed for smbwrapper.
6248 for ac_func in syscall
6249 do
6250 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6251 echo "configure:6252: checking for $ac_func" >&5
6252 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6253   echo $ac_n "(cached) $ac_c" 1>&6
6254 else
6255   cat > conftest.$ac_ext <<EOF
6256 #line 6257 "configure"
6257 #include "confdefs.h"
6258 /* System header to define __stub macros and hopefully few prototypes,
6259     which can conflict with char $ac_func(); below.  */
6260 #include <assert.h>
6261 /* Override any gcc2 internal prototype to avoid an error.  */
6262 /* We use char because int might match the return type of a gcc2
6263     builtin and then its argument prototype would still apply.  */
6264 char $ac_func();
6265
6266 int main() {
6267
6268 /* The GNU C library defines this for functions which it implements
6269     to always fail with ENOSYS.  Some functions are actually named
6270     something starting with __ and the normal name is an alias.  */
6271 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6272 choke me
6273 #else
6274 $ac_func();
6275 #endif
6276
6277 ; return 0; }
6278 EOF
6279 if { (eval echo configure:6280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6280   rm -rf conftest*
6281   eval "ac_cv_func_$ac_func=yes"
6282 else
6283   echo "configure: failed program was:" >&5
6284   cat conftest.$ac_ext >&5
6285   rm -rf conftest*
6286   eval "ac_cv_func_$ac_func=no"
6287 fi
6288 rm -f conftest*
6289 fi
6290
6291 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6292   echo "$ac_t""yes" 1>&6
6293     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6294   cat >> confdefs.h <<EOF
6295 #define $ac_tr_func 1
6296 EOF
6297  
6298 else
6299   echo "$ac_t""no" 1>&6
6300 fi
6301 done
6302
6303
6304 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
6305 do
6306 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6307 echo "configure:6308: checking for $ac_func" >&5
6308 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6309   echo $ac_n "(cached) $ac_c" 1>&6
6310 else
6311   cat > conftest.$ac_ext <<EOF
6312 #line 6313 "configure"
6313 #include "confdefs.h"
6314 /* System header to define __stub macros and hopefully few prototypes,
6315     which can conflict with char $ac_func(); below.  */
6316 #include <assert.h>
6317 /* Override any gcc2 internal prototype to avoid an error.  */
6318 /* We use char because int might match the return type of a gcc2
6319     builtin and then its argument prototype would still apply.  */
6320 char $ac_func();
6321
6322 int main() {
6323
6324 /* The GNU C library defines this for functions which it implements
6325     to always fail with ENOSYS.  Some functions are actually named
6326     something starting with __ and the normal name is an alias.  */
6327 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6328 choke me
6329 #else
6330 $ac_func();
6331 #endif
6332
6333 ; return 0; }
6334 EOF
6335 if { (eval echo configure:6336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6336   rm -rf conftest*
6337   eval "ac_cv_func_$ac_func=yes"
6338 else
6339   echo "configure: failed program was:" >&5
6340   cat conftest.$ac_ext >&5
6341   rm -rf conftest*
6342   eval "ac_cv_func_$ac_func=no"
6343 fi
6344 rm -f conftest*
6345 fi
6346
6347 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6348   echo "$ac_t""yes" 1>&6
6349     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6350   cat >> confdefs.h <<EOF
6351 #define $ac_tr_func 1
6352 EOF
6353  
6354 else
6355   echo "$ac_t""no" 1>&6
6356 fi
6357 done
6358
6359 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
6360 do
6361 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6362 echo "configure:6363: checking for $ac_func" >&5
6363 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6364   echo $ac_n "(cached) $ac_c" 1>&6
6365 else
6366   cat > conftest.$ac_ext <<EOF
6367 #line 6368 "configure"
6368 #include "confdefs.h"
6369 /* System header to define __stub macros and hopefully few prototypes,
6370     which can conflict with char $ac_func(); below.  */
6371 #include <assert.h>
6372 /* Override any gcc2 internal prototype to avoid an error.  */
6373 /* We use char because int might match the return type of a gcc2
6374     builtin and then its argument prototype would still apply.  */
6375 char $ac_func();
6376
6377 int main() {
6378
6379 /* The GNU C library defines this for functions which it implements
6380     to always fail with ENOSYS.  Some functions are actually named
6381     something starting with __ and the normal name is an alias.  */
6382 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6383 choke me
6384 #else
6385 $ac_func();
6386 #endif
6387
6388 ; return 0; }
6389 EOF
6390 if { (eval echo configure:6391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6391   rm -rf conftest*
6392   eval "ac_cv_func_$ac_func=yes"
6393 else
6394   echo "configure: failed program was:" >&5
6395   cat conftest.$ac_ext >&5
6396   rm -rf conftest*
6397   eval "ac_cv_func_$ac_func=no"
6398 fi
6399 rm -f conftest*
6400 fi
6401
6402 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6403   echo "$ac_t""yes" 1>&6
6404     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6405   cat >> confdefs.h <<EOF
6406 #define $ac_tr_func 1
6407 EOF
6408  
6409 else
6410   echo "$ac_t""no" 1>&6
6411 fi
6412 done
6413
6414 for ac_func in __getcwd _getcwd
6415 do
6416 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6417 echo "configure:6418: checking for $ac_func" >&5
6418 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6419   echo $ac_n "(cached) $ac_c" 1>&6
6420 else
6421   cat > conftest.$ac_ext <<EOF
6422 #line 6423 "configure"
6423 #include "confdefs.h"
6424 /* System header to define __stub macros and hopefully few prototypes,
6425     which can conflict with char $ac_func(); below.  */
6426 #include <assert.h>
6427 /* Override any gcc2 internal prototype to avoid an error.  */
6428 /* We use char because int might match the return type of a gcc2
6429     builtin and then its argument prototype would still apply.  */
6430 char $ac_func();
6431
6432 int main() {
6433
6434 /* The GNU C library defines this for functions which it implements
6435     to always fail with ENOSYS.  Some functions are actually named
6436     something starting with __ and the normal name is an alias.  */
6437 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6438 choke me
6439 #else
6440 $ac_func();
6441 #endif
6442
6443 ; return 0; }
6444 EOF
6445 if { (eval echo configure:6446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6446   rm -rf conftest*
6447   eval "ac_cv_func_$ac_func=yes"
6448 else
6449   echo "configure: failed program was:" >&5
6450   cat conftest.$ac_ext >&5
6451   rm -rf conftest*
6452   eval "ac_cv_func_$ac_func=no"
6453 fi
6454 rm -f conftest*
6455 fi
6456
6457 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6458   echo "$ac_t""yes" 1>&6
6459     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6460   cat >> confdefs.h <<EOF
6461 #define $ac_tr_func 1
6462 EOF
6463  
6464 else
6465   echo "$ac_t""no" 1>&6
6466 fi
6467 done
6468
6469 for ac_func in __xstat __fxstat __lxstat
6470 do
6471 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6472 echo "configure:6473: checking for $ac_func" >&5
6473 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6474   echo $ac_n "(cached) $ac_c" 1>&6
6475 else
6476   cat > conftest.$ac_ext <<EOF
6477 #line 6478 "configure"
6478 #include "confdefs.h"
6479 /* System header to define __stub macros and hopefully few prototypes,
6480     which can conflict with char $ac_func(); below.  */
6481 #include <assert.h>
6482 /* Override any gcc2 internal prototype to avoid an error.  */
6483 /* We use char because int might match the return type of a gcc2
6484     builtin and then its argument prototype would still apply.  */
6485 char $ac_func();
6486
6487 int main() {
6488
6489 /* The GNU C library defines this for functions which it implements
6490     to always fail with ENOSYS.  Some functions are actually named
6491     something starting with __ and the normal name is an alias.  */
6492 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6493 choke me
6494 #else
6495 $ac_func();
6496 #endif
6497
6498 ; return 0; }
6499 EOF
6500 if { (eval echo configure:6501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6501   rm -rf conftest*
6502   eval "ac_cv_func_$ac_func=yes"
6503 else
6504   echo "configure: failed program was:" >&5
6505   cat conftest.$ac_ext >&5
6506   rm -rf conftest*
6507   eval "ac_cv_func_$ac_func=no"
6508 fi
6509 rm -f conftest*
6510 fi
6511
6512 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6513   echo "$ac_t""yes" 1>&6
6514     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6515   cat >> confdefs.h <<EOF
6516 #define $ac_tr_func 1
6517 EOF
6518  
6519 else
6520   echo "$ac_t""no" 1>&6
6521 fi
6522 done
6523
6524 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6525 do
6526 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6527 echo "configure:6528: checking for $ac_func" >&5
6528 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6529   echo $ac_n "(cached) $ac_c" 1>&6
6530 else
6531   cat > conftest.$ac_ext <<EOF
6532 #line 6533 "configure"
6533 #include "confdefs.h"
6534 /* System header to define __stub macros and hopefully few prototypes,
6535     which can conflict with char $ac_func(); below.  */
6536 #include <assert.h>
6537 /* Override any gcc2 internal prototype to avoid an error.  */
6538 /* We use char because int might match the return type of a gcc2
6539     builtin and then its argument prototype would still apply.  */
6540 char $ac_func();
6541
6542 int main() {
6543
6544 /* The GNU C library defines this for functions which it implements
6545     to always fail with ENOSYS.  Some functions are actually named
6546     something starting with __ and the normal name is an alias.  */
6547 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6548 choke me
6549 #else
6550 $ac_func();
6551 #endif
6552
6553 ; return 0; }
6554 EOF
6555 if { (eval echo configure:6556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6556   rm -rf conftest*
6557   eval "ac_cv_func_$ac_func=yes"
6558 else
6559   echo "configure: failed program was:" >&5
6560   cat conftest.$ac_ext >&5
6561   rm -rf conftest*
6562   eval "ac_cv_func_$ac_func=no"
6563 fi
6564 rm -f conftest*
6565 fi
6566
6567 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6568   echo "$ac_t""yes" 1>&6
6569     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6570   cat >> confdefs.h <<EOF
6571 #define $ac_tr_func 1
6572 EOF
6573  
6574 else
6575   echo "$ac_t""no" 1>&6
6576 fi
6577 done
6578
6579 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6580 do
6581 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6582 echo "configure:6583: checking for $ac_func" >&5
6583 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6584   echo $ac_n "(cached) $ac_c" 1>&6
6585 else
6586   cat > conftest.$ac_ext <<EOF
6587 #line 6588 "configure"
6588 #include "confdefs.h"
6589 /* System header to define __stub macros and hopefully few prototypes,
6590     which can conflict with char $ac_func(); below.  */
6591 #include <assert.h>
6592 /* Override any gcc2 internal prototype to avoid an error.  */
6593 /* We use char because int might match the return type of a gcc2
6594     builtin and then its argument prototype would still apply.  */
6595 char $ac_func();
6596
6597 int main() {
6598
6599 /* The GNU C library defines this for functions which it implements
6600     to always fail with ENOSYS.  Some functions are actually named
6601     something starting with __ and the normal name is an alias.  */
6602 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6603 choke me
6604 #else
6605 $ac_func();
6606 #endif
6607
6608 ; return 0; }
6609 EOF
6610 if { (eval echo configure:6611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6611   rm -rf conftest*
6612   eval "ac_cv_func_$ac_func=yes"
6613 else
6614   echo "configure: failed program was:" >&5
6615   cat conftest.$ac_ext >&5
6616   rm -rf conftest*
6617   eval "ac_cv_func_$ac_func=no"
6618 fi
6619 rm -f conftest*
6620 fi
6621
6622 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6623   echo "$ac_t""yes" 1>&6
6624     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6625   cat >> confdefs.h <<EOF
6626 #define $ac_tr_func 1
6627 EOF
6628  
6629 else
6630   echo "$ac_t""no" 1>&6
6631 fi
6632 done
6633
6634 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6635 do
6636 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6637 echo "configure:6638: checking for $ac_func" >&5
6638 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6639   echo $ac_n "(cached) $ac_c" 1>&6
6640 else
6641   cat > conftest.$ac_ext <<EOF
6642 #line 6643 "configure"
6643 #include "confdefs.h"
6644 /* System header to define __stub macros and hopefully few prototypes,
6645     which can conflict with char $ac_func(); below.  */
6646 #include <assert.h>
6647 /* Override any gcc2 internal prototype to avoid an error.  */
6648 /* We use char because int might match the return type of a gcc2
6649     builtin and then its argument prototype would still apply.  */
6650 char $ac_func();
6651
6652 int main() {
6653
6654 /* The GNU C library defines this for functions which it implements
6655     to always fail with ENOSYS.  Some functions are actually named
6656     something starting with __ and the normal name is an alias.  */
6657 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6658 choke me
6659 #else
6660 $ac_func();
6661 #endif
6662
6663 ; return 0; }
6664 EOF
6665 if { (eval echo configure:6666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6666   rm -rf conftest*
6667   eval "ac_cv_func_$ac_func=yes"
6668 else
6669   echo "configure: failed program was:" >&5
6670   cat conftest.$ac_ext >&5
6671   rm -rf conftest*
6672   eval "ac_cv_func_$ac_func=no"
6673 fi
6674 rm -f conftest*
6675 fi
6676
6677 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6678   echo "$ac_t""yes" 1>&6
6679     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6680   cat >> confdefs.h <<EOF
6681 #define $ac_tr_func 1
6682 EOF
6683  
6684 else
6685   echo "$ac_t""no" 1>&6
6686 fi
6687 done
6688
6689 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6690 do
6691 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6692 echo "configure:6693: checking for $ac_func" >&5
6693 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6694   echo $ac_n "(cached) $ac_c" 1>&6
6695 else
6696   cat > conftest.$ac_ext <<EOF
6697 #line 6698 "configure"
6698 #include "confdefs.h"
6699 /* System header to define __stub macros and hopefully few prototypes,
6700     which can conflict with char $ac_func(); below.  */
6701 #include <assert.h>
6702 /* Override any gcc2 internal prototype to avoid an error.  */
6703 /* We use char because int might match the return type of a gcc2
6704     builtin and then its argument prototype would still apply.  */
6705 char $ac_func();
6706
6707 int main() {
6708
6709 /* The GNU C library defines this for functions which it implements
6710     to always fail with ENOSYS.  Some functions are actually named
6711     something starting with __ and the normal name is an alias.  */
6712 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6713 choke me
6714 #else
6715 $ac_func();
6716 #endif
6717
6718 ; return 0; }
6719 EOF
6720 if { (eval echo configure:6721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6721   rm -rf conftest*
6722   eval "ac_cv_func_$ac_func=yes"
6723 else
6724   echo "configure: failed program was:" >&5
6725   cat conftest.$ac_ext >&5
6726   rm -rf conftest*
6727   eval "ac_cv_func_$ac_func=no"
6728 fi
6729 rm -f conftest*
6730 fi
6731
6732 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6733   echo "$ac_t""yes" 1>&6
6734     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6735   cat >> confdefs.h <<EOF
6736 #define $ac_tr_func 1
6737 EOF
6738  
6739 else
6740   echo "$ac_t""no" 1>&6
6741 fi
6742 done
6743
6744 for ac_func in _write __write _fork __fork
6745 do
6746 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6747 echo "configure:6748: checking for $ac_func" >&5
6748 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6749   echo $ac_n "(cached) $ac_c" 1>&6
6750 else
6751   cat > conftest.$ac_ext <<EOF
6752 #line 6753 "configure"
6753 #include "confdefs.h"
6754 /* System header to define __stub macros and hopefully few prototypes,
6755     which can conflict with char $ac_func(); below.  */
6756 #include <assert.h>
6757 /* Override any gcc2 internal prototype to avoid an error.  */
6758 /* We use char because int might match the return type of a gcc2
6759     builtin and then its argument prototype would still apply.  */
6760 char $ac_func();
6761
6762 int main() {
6763
6764 /* The GNU C library defines this for functions which it implements
6765     to always fail with ENOSYS.  Some functions are actually named
6766     something starting with __ and the normal name is an alias.  */
6767 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6768 choke me
6769 #else
6770 $ac_func();
6771 #endif
6772
6773 ; return 0; }
6774 EOF
6775 if { (eval echo configure:6776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6776   rm -rf conftest*
6777   eval "ac_cv_func_$ac_func=yes"
6778 else
6779   echo "configure: failed program was:" >&5
6780   cat conftest.$ac_ext >&5
6781   rm -rf conftest*
6782   eval "ac_cv_func_$ac_func=no"
6783 fi
6784 rm -f conftest*
6785 fi
6786
6787 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6788   echo "$ac_t""yes" 1>&6
6789     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6790   cat >> confdefs.h <<EOF
6791 #define $ac_tr_func 1
6792 EOF
6793  
6794 else
6795   echo "$ac_t""no" 1>&6
6796 fi
6797 done
6798
6799 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6800 do
6801 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6802 echo "configure:6803: checking for $ac_func" >&5
6803 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6804   echo $ac_n "(cached) $ac_c" 1>&6
6805 else
6806   cat > conftest.$ac_ext <<EOF
6807 #line 6808 "configure"
6808 #include "confdefs.h"
6809 /* System header to define __stub macros and hopefully few prototypes,
6810     which can conflict with char $ac_func(); below.  */
6811 #include <assert.h>
6812 /* Override any gcc2 internal prototype to avoid an error.  */
6813 /* We use char because int might match the return type of a gcc2
6814     builtin and then its argument prototype would still apply.  */
6815 char $ac_func();
6816
6817 int main() {
6818
6819 /* The GNU C library defines this for functions which it implements
6820     to always fail with ENOSYS.  Some functions are actually named
6821     something starting with __ and the normal name is an alias.  */
6822 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6823 choke me
6824 #else
6825 $ac_func();
6826 #endif
6827
6828 ; return 0; }
6829 EOF
6830 if { (eval echo configure:6831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6831   rm -rf conftest*
6832   eval "ac_cv_func_$ac_func=yes"
6833 else
6834   echo "configure: failed program was:" >&5
6835   cat conftest.$ac_ext >&5
6836   rm -rf conftest*
6837   eval "ac_cv_func_$ac_func=no"
6838 fi
6839 rm -f conftest*
6840 fi
6841
6842 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6843   echo "$ac_t""yes" 1>&6
6844     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6845   cat >> confdefs.h <<EOF
6846 #define $ac_tr_func 1
6847 EOF
6848  
6849 else
6850   echo "$ac_t""no" 1>&6
6851 fi
6852 done
6853
6854 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6855 do
6856 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6857 echo "configure:6858: checking for $ac_func" >&5
6858 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6859   echo $ac_n "(cached) $ac_c" 1>&6
6860 else
6861   cat > conftest.$ac_ext <<EOF
6862 #line 6863 "configure"
6863 #include "confdefs.h"
6864 /* System header to define __stub macros and hopefully few prototypes,
6865     which can conflict with char $ac_func(); below.  */
6866 #include <assert.h>
6867 /* Override any gcc2 internal prototype to avoid an error.  */
6868 /* We use char because int might match the return type of a gcc2
6869     builtin and then its argument prototype would still apply.  */
6870 char $ac_func();
6871
6872 int main() {
6873
6874 /* The GNU C library defines this for functions which it implements
6875     to always fail with ENOSYS.  Some functions are actually named
6876     something starting with __ and the normal name is an alias.  */
6877 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6878 choke me
6879 #else
6880 $ac_func();
6881 #endif
6882
6883 ; return 0; }
6884 EOF
6885 if { (eval echo configure:6886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6886   rm -rf conftest*
6887   eval "ac_cv_func_$ac_func=yes"
6888 else
6889   echo "configure: failed program was:" >&5
6890   cat conftest.$ac_ext >&5
6891   rm -rf conftest*
6892   eval "ac_cv_func_$ac_func=no"
6893 fi
6894 rm -f conftest*
6895 fi
6896
6897 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6898   echo "$ac_t""yes" 1>&6
6899     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6900   cat >> confdefs.h <<EOF
6901 #define $ac_tr_func 1
6902 EOF
6903  
6904 else
6905   echo "$ac_t""no" 1>&6
6906 fi
6907 done
6908
6909 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6910 do
6911 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6912 echo "configure:6913: checking for $ac_func" >&5
6913 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6914   echo $ac_n "(cached) $ac_c" 1>&6
6915 else
6916   cat > conftest.$ac_ext <<EOF
6917 #line 6918 "configure"
6918 #include "confdefs.h"
6919 /* System header to define __stub macros and hopefully few prototypes,
6920     which can conflict with char $ac_func(); below.  */
6921 #include <assert.h>
6922 /* Override any gcc2 internal prototype to avoid an error.  */
6923 /* We use char because int might match the return type of a gcc2
6924     builtin and then its argument prototype would still apply.  */
6925 char $ac_func();
6926
6927 int main() {
6928
6929 /* The GNU C library defines this for functions which it implements
6930     to always fail with ENOSYS.  Some functions are actually named
6931     something starting with __ and the normal name is an alias.  */
6932 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6933 choke me
6934 #else
6935 $ac_func();
6936 #endif
6937
6938 ; return 0; }
6939 EOF
6940 if { (eval echo configure:6941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6941   rm -rf conftest*
6942   eval "ac_cv_func_$ac_func=yes"
6943 else
6944   echo "configure: failed program was:" >&5
6945   cat conftest.$ac_ext >&5
6946   rm -rf conftest*
6947   eval "ac_cv_func_$ac_func=no"
6948 fi
6949 rm -f conftest*
6950 fi
6951
6952 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6953   echo "$ac_t""yes" 1>&6
6954     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6955   cat >> confdefs.h <<EOF
6956 #define $ac_tr_func 1
6957 EOF
6958  
6959 else
6960   echo "$ac_t""no" 1>&6
6961 fi
6962 done
6963
6964 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6965 do
6966 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6967 echo "configure:6968: checking for $ac_func" >&5
6968 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6969   echo $ac_n "(cached) $ac_c" 1>&6
6970 else
6971   cat > conftest.$ac_ext <<EOF
6972 #line 6973 "configure"
6973 #include "confdefs.h"
6974 /* System header to define __stub macros and hopefully few prototypes,
6975     which can conflict with char $ac_func(); below.  */
6976 #include <assert.h>
6977 /* Override any gcc2 internal prototype to avoid an error.  */
6978 /* We use char because int might match the return type of a gcc2
6979     builtin and then its argument prototype would still apply.  */
6980 char $ac_func();
6981
6982 int main() {
6983
6984 /* The GNU C library defines this for functions which it implements
6985     to always fail with ENOSYS.  Some functions are actually named
6986     something starting with __ and the normal name is an alias.  */
6987 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6988 choke me
6989 #else
6990 $ac_func();
6991 #endif
6992
6993 ; return 0; }
6994 EOF
6995 if { (eval echo configure:6996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6996   rm -rf conftest*
6997   eval "ac_cv_func_$ac_func=yes"
6998 else
6999   echo "configure: failed program was:" >&5
7000   cat conftest.$ac_ext >&5
7001   rm -rf conftest*
7002   eval "ac_cv_func_$ac_func=no"
7003 fi
7004 rm -f conftest*
7005 fi
7006
7007 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7008   echo "$ac_t""yes" 1>&6
7009     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7010   cat >> confdefs.h <<EOF
7011 #define $ac_tr_func 1
7012 EOF
7013  
7014 else
7015   echo "$ac_t""no" 1>&6
7016 fi
7017 done
7018
7019 for ac_func in open64 _open64 __open64 creat64
7020 do
7021 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7022 echo "configure:7023: checking for $ac_func" >&5
7023 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7024   echo $ac_n "(cached) $ac_c" 1>&6
7025 else
7026   cat > conftest.$ac_ext <<EOF
7027 #line 7028 "configure"
7028 #include "confdefs.h"
7029 /* System header to define __stub macros and hopefully few prototypes,
7030     which can conflict with char $ac_func(); below.  */
7031 #include <assert.h>
7032 /* Override any gcc2 internal prototype to avoid an error.  */
7033 /* We use char because int might match the return type of a gcc2
7034     builtin and then its argument prototype would still apply.  */
7035 char $ac_func();
7036
7037 int main() {
7038
7039 /* The GNU C library defines this for functions which it implements
7040     to always fail with ENOSYS.  Some functions are actually named
7041     something starting with __ and the normal name is an alias.  */
7042 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7043 choke me
7044 #else
7045 $ac_func();
7046 #endif
7047
7048 ; return 0; }
7049 EOF
7050 if { (eval echo configure:7051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7051   rm -rf conftest*
7052   eval "ac_cv_func_$ac_func=yes"
7053 else
7054   echo "configure: failed program was:" >&5
7055   cat conftest.$ac_ext >&5
7056   rm -rf conftest*
7057   eval "ac_cv_func_$ac_func=no"
7058 fi
7059 rm -f conftest*
7060 fi
7061
7062 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7063   echo "$ac_t""yes" 1>&6
7064     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7065   cat >> confdefs.h <<EOF
7066 #define $ac_tr_func 1
7067 EOF
7068  
7069 else
7070   echo "$ac_t""no" 1>&6
7071 fi
7072 done
7073
7074
7075 #
7076 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
7077 #
7078
7079 if test x$ac_cv_func_stat64 = xno ; then
7080   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
7081 echo "configure:7082: checking for stat64 in <sys/stat.h>" >&5
7082   cat > conftest.$ac_ext <<EOF
7083 #line 7084 "configure"
7084 #include "confdefs.h"
7085
7086 #if defined(HAVE_UNISTD_H)
7087 #include <unistd.h>
7088 #endif
7089 #include <sys/stat.h>
7090
7091 int main() {
7092 struct stat64 st64; exit(stat64(".",&st64));
7093 ; return 0; }
7094 EOF
7095 if { (eval echo configure:7096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7096   rm -rf conftest*
7097   ac_cv_func_stat64=yes
7098 else
7099   echo "configure: failed program was:" >&5
7100   cat conftest.$ac_ext >&5
7101 fi
7102 rm -f conftest*
7103   echo "$ac_t""$ac_cv_func_stat64" 1>&6
7104   if test x$ac_cv_func_stat64 = xyes ; then
7105     cat >> confdefs.h <<\EOF
7106 #define HAVE_STAT64 1
7107 EOF
7108
7109   fi
7110 fi
7111
7112 if test x$ac_cv_func_lstat64 = xno ; then
7113   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
7114 echo "configure:7115: checking for lstat64 in <sys/stat.h>" >&5
7115   cat > conftest.$ac_ext <<EOF
7116 #line 7117 "configure"
7117 #include "confdefs.h"
7118
7119 #if defined(HAVE_UNISTD_H)
7120 #include <unistd.h>
7121 #endif
7122 #include <sys/stat.h>
7123
7124 int main() {
7125 struct stat64 st64; exit(lstat64(".",&st64));
7126 ; return 0; }
7127 EOF
7128 if { (eval echo configure:7129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7129   rm -rf conftest*
7130   ac_cv_func_lstat64=yes
7131 else
7132   echo "configure: failed program was:" >&5
7133   cat conftest.$ac_ext >&5
7134 fi
7135 rm -f conftest*
7136   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
7137   if test x$ac_cv_func_lstat64 = xyes ; then
7138     cat >> confdefs.h <<\EOF
7139 #define HAVE_LSTAT64 Whether lstat64() is available
7140 EOF
7141
7142   fi
7143 fi
7144
7145 if test x$ac_cv_func_fstat64 = xno ; then
7146   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
7147 echo "configure:7148: checking for fstat64 in <sys/stat.h>" >&5
7148   cat > conftest.$ac_ext <<EOF
7149 #line 7150 "configure"
7150 #include "confdefs.h"
7151
7152 #if defined(HAVE_UNISTD_H)
7153 #include <unistd.h>
7154 #endif
7155 #include <sys/stat.h>
7156
7157 int main() {
7158 struct stat64 st64; exit(fstat64(0,&st64));
7159 ; return 0; }
7160 EOF
7161 if { (eval echo configure:7162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7162   rm -rf conftest*
7163   ac_cv_func_fstat64=yes
7164 else
7165   echo "configure: failed program was:" >&5
7166   cat conftest.$ac_ext >&5
7167 fi
7168 rm -f conftest*
7169   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
7170   if test x$ac_cv_func_fstat64 = xyes ; then
7171     cat >> confdefs.h <<\EOF
7172 #define HAVE_FSTAT64 1
7173 EOF
7174
7175   fi
7176 fi
7177
7178 #####################################
7179 # we might need the resolv library on some systems
7180 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
7181 echo "configure:7182: checking for dn_expand in -lresolv" >&5
7182 ac_lib_var=`echo resolv'_'dn_expand | 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="-lresolv  $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 dn_expand();
7195
7196 int main() {
7197 dn_expand()
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 resolv | 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="-lresolv $LIBS"
7222
7223 else
7224   echo "$ac_t""no" 1>&6
7225 fi
7226
7227
7228 #
7229 # Check for the functions putprpwnam, set_auth_parameters,
7230 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
7231 # Needed for OSF1 and HPUX.
7232 #
7233
7234 case "$LIBS" in
7235   *-lsecurity*) for ac_func in putprpwnam
7236 do
7237 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7238 echo "configure:7239: checking for $ac_func" >&5
7239 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7240   echo $ac_n "(cached) $ac_c" 1>&6
7241 else
7242   cat > conftest.$ac_ext <<EOF
7243 #line 7244 "configure"
7244 #include "confdefs.h"
7245 /* System header to define __stub macros and hopefully few prototypes,
7246     which can conflict with char $ac_func(); below.  */
7247 #include <assert.h>
7248 /* Override any gcc2 internal prototype to avoid an error.  */
7249 /* We use char because int might match the return type of a gcc2
7250     builtin and then its argument prototype would still apply.  */
7251 char $ac_func();
7252
7253 int main() {
7254
7255 /* The GNU C library defines this for functions which it implements
7256     to always fail with ENOSYS.  Some functions are actually named
7257     something starting with __ and the normal name is an alias.  */
7258 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7259 choke me
7260 #else
7261 $ac_func();
7262 #endif
7263
7264 ; return 0; }
7265 EOF
7266 if { (eval echo configure:7267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7267   rm -rf conftest*
7268   eval "ac_cv_func_$ac_func=yes"
7269 else
7270   echo "configure: failed program was:" >&5
7271   cat conftest.$ac_ext >&5
7272   rm -rf conftest*
7273   eval "ac_cv_func_$ac_func=no"
7274 fi
7275 rm -f conftest*
7276 fi
7277
7278 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7279   echo "$ac_t""yes" 1>&6
7280     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7281   cat >> confdefs.h <<EOF
7282 #define $ac_tr_func 1
7283 EOF
7284  
7285 else
7286   echo "$ac_t""no" 1>&6
7287 fi
7288 done
7289  ;;
7290   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
7291 echo "configure:7292: checking for putprpwnam in -lsecurity" >&5
7292 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
7293 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7294   echo $ac_n "(cached) $ac_c" 1>&6
7295 else
7296   ac_save_LIBS="$LIBS"
7297 LIBS="-lsecurity  $LIBS"
7298 cat > conftest.$ac_ext <<EOF
7299 #line 7300 "configure"
7300 #include "confdefs.h"
7301 /* Override any gcc2 internal prototype to avoid an error.  */
7302 /* We use char because int might match the return type of a gcc2
7303     builtin and then its argument prototype would still apply.  */
7304 char putprpwnam();
7305
7306 int main() {
7307 putprpwnam()
7308 ; return 0; }
7309 EOF
7310 if { (eval echo configure:7311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7311   rm -rf conftest*
7312   eval "ac_cv_lib_$ac_lib_var=yes"
7313 else
7314   echo "configure: failed program was:" >&5
7315   cat conftest.$ac_ext >&5
7316   rm -rf conftest*
7317   eval "ac_cv_lib_$ac_lib_var=no"
7318 fi
7319 rm -f conftest*
7320 LIBS="$ac_save_LIBS"
7321
7322 fi
7323 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7324   echo "$ac_t""yes" 1>&6
7325     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7326     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7327   cat >> confdefs.h <<EOF
7328 #define $ac_tr_lib 1
7329 EOF
7330
7331   LIBS="-lsecurity $LIBS"
7332
7333 else
7334   echo "$ac_t""no" 1>&6
7335 fi
7336  
7337      for ac_func in putprpwnam
7338 do
7339 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7340 echo "configure:7341: checking for $ac_func" >&5
7341 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7342   echo $ac_n "(cached) $ac_c" 1>&6
7343 else
7344   cat > conftest.$ac_ext <<EOF
7345 #line 7346 "configure"
7346 #include "confdefs.h"
7347 /* System header to define __stub macros and hopefully few prototypes,
7348     which can conflict with char $ac_func(); below.  */
7349 #include <assert.h>
7350 /* Override any gcc2 internal prototype to avoid an error.  */
7351 /* We use char because int might match the return type of a gcc2
7352     builtin and then its argument prototype would still apply.  */
7353 char $ac_func();
7354
7355 int main() {
7356
7357 /* The GNU C library defines this for functions which it implements
7358     to always fail with ENOSYS.  Some functions are actually named
7359     something starting with __ and the normal name is an alias.  */
7360 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7361 choke me
7362 #else
7363 $ac_func();
7364 #endif
7365
7366 ; return 0; }
7367 EOF
7368 if { (eval echo configure:7369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7369   rm -rf conftest*
7370   eval "ac_cv_func_$ac_func=yes"
7371 else
7372   echo "configure: failed program was:" >&5
7373   cat conftest.$ac_ext >&5
7374   rm -rf conftest*
7375   eval "ac_cv_func_$ac_func=no"
7376 fi
7377 rm -f conftest*
7378 fi
7379
7380 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7381   echo "$ac_t""yes" 1>&6
7382     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7383   cat >> confdefs.h <<EOF
7384 #define $ac_tr_func 1
7385 EOF
7386  
7387 else
7388   echo "$ac_t""no" 1>&6
7389 fi
7390 done
7391
7392   ;;
7393   esac
7394
7395 case "$LIBS" in
7396   *-lsec*) for ac_func in putprpwnam
7397 do
7398 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7399 echo "configure:7400: checking for $ac_func" >&5
7400 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7401   echo $ac_n "(cached) $ac_c" 1>&6
7402 else
7403   cat > conftest.$ac_ext <<EOF
7404 #line 7405 "configure"
7405 #include "confdefs.h"
7406 /* System header to define __stub macros and hopefully few prototypes,
7407     which can conflict with char $ac_func(); below.  */
7408 #include <assert.h>
7409 /* Override any gcc2 internal prototype to avoid an error.  */
7410 /* We use char because int might match the return type of a gcc2
7411     builtin and then its argument prototype would still apply.  */
7412 char $ac_func();
7413
7414 int main() {
7415
7416 /* The GNU C library defines this for functions which it implements
7417     to always fail with ENOSYS.  Some functions are actually named
7418     something starting with __ and the normal name is an alias.  */
7419 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7420 choke me
7421 #else
7422 $ac_func();
7423 #endif
7424
7425 ; return 0; }
7426 EOF
7427 if { (eval echo configure:7428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7428   rm -rf conftest*
7429   eval "ac_cv_func_$ac_func=yes"
7430 else
7431   echo "configure: failed program was:" >&5
7432   cat conftest.$ac_ext >&5
7433   rm -rf conftest*
7434   eval "ac_cv_func_$ac_func=no"
7435 fi
7436 rm -f conftest*
7437 fi
7438
7439 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7440   echo "$ac_t""yes" 1>&6
7441     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7442   cat >> confdefs.h <<EOF
7443 #define $ac_tr_func 1
7444 EOF
7445  
7446 else
7447   echo "$ac_t""no" 1>&6
7448 fi
7449 done
7450  ;;
7451   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
7452 echo "configure:7453: checking for putprpwnam in -lsec" >&5
7453 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
7454 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7455   echo $ac_n "(cached) $ac_c" 1>&6
7456 else
7457   ac_save_LIBS="$LIBS"
7458 LIBS="-lsec  $LIBS"
7459 cat > conftest.$ac_ext <<EOF
7460 #line 7461 "configure"
7461 #include "confdefs.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 putprpwnam();
7466
7467 int main() {
7468 putprpwnam()
7469 ; return 0; }
7470 EOF
7471 if { (eval echo configure:7472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7472   rm -rf conftest*
7473   eval "ac_cv_lib_$ac_lib_var=yes"
7474 else
7475   echo "configure: failed program was:" >&5
7476   cat conftest.$ac_ext >&5
7477   rm -rf conftest*
7478   eval "ac_cv_lib_$ac_lib_var=no"
7479 fi
7480 rm -f conftest*
7481 LIBS="$ac_save_LIBS"
7482
7483 fi
7484 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7485   echo "$ac_t""yes" 1>&6
7486     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7487     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7488   cat >> confdefs.h <<EOF
7489 #define $ac_tr_lib 1
7490 EOF
7491
7492   LIBS="-lsec $LIBS"
7493
7494 else
7495   echo "$ac_t""no" 1>&6
7496 fi
7497  
7498      for ac_func in putprpwnam
7499 do
7500 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7501 echo "configure:7502: checking for $ac_func" >&5
7502 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7503   echo $ac_n "(cached) $ac_c" 1>&6
7504 else
7505   cat > conftest.$ac_ext <<EOF
7506 #line 7507 "configure"
7507 #include "confdefs.h"
7508 /* System header to define __stub macros and hopefully few prototypes,
7509     which can conflict with char $ac_func(); below.  */
7510 #include <assert.h>
7511 /* Override any gcc2 internal prototype to avoid an error.  */
7512 /* We use char because int might match the return type of a gcc2
7513     builtin and then its argument prototype would still apply.  */
7514 char $ac_func();
7515
7516 int main() {
7517
7518 /* The GNU C library defines this for functions which it implements
7519     to always fail with ENOSYS.  Some functions are actually named
7520     something starting with __ and the normal name is an alias.  */
7521 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7522 choke me
7523 #else
7524 $ac_func();
7525 #endif
7526
7527 ; return 0; }
7528 EOF
7529 if { (eval echo configure:7530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7530   rm -rf conftest*
7531   eval "ac_cv_func_$ac_func=yes"
7532 else
7533   echo "configure: failed program was:" >&5
7534   cat conftest.$ac_ext >&5
7535   rm -rf conftest*
7536   eval "ac_cv_func_$ac_func=no"
7537 fi
7538 rm -f conftest*
7539 fi
7540
7541 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7542   echo "$ac_t""yes" 1>&6
7543     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7544   cat >> confdefs.h <<EOF
7545 #define $ac_tr_func 1
7546 EOF
7547  
7548 else
7549   echo "$ac_t""no" 1>&6
7550 fi
7551 done
7552
7553   ;;
7554   esac
7555
7556
7557 case "$LIBS" in
7558   *-lsecurity*) for ac_func in set_auth_parameters
7559 do
7560 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7561 echo "configure:7562: checking for $ac_func" >&5
7562 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7563   echo $ac_n "(cached) $ac_c" 1>&6
7564 else
7565   cat > conftest.$ac_ext <<EOF
7566 #line 7567 "configure"
7567 #include "confdefs.h"
7568 /* System header to define __stub macros and hopefully few prototypes,
7569     which can conflict with char $ac_func(); below.  */
7570 #include <assert.h>
7571 /* Override any gcc2 internal prototype to avoid an error.  */
7572 /* We use char because int might match the return type of a gcc2
7573     builtin and then its argument prototype would still apply.  */
7574 char $ac_func();
7575
7576 int main() {
7577
7578 /* The GNU C library defines this for functions which it implements
7579     to always fail with ENOSYS.  Some functions are actually named
7580     something starting with __ and the normal name is an alias.  */
7581 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7582 choke me
7583 #else
7584 $ac_func();
7585 #endif
7586
7587 ; return 0; }
7588 EOF
7589 if { (eval echo configure:7590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7590   rm -rf conftest*
7591   eval "ac_cv_func_$ac_func=yes"
7592 else
7593   echo "configure: failed program was:" >&5
7594   cat conftest.$ac_ext >&5
7595   rm -rf conftest*
7596   eval "ac_cv_func_$ac_func=no"
7597 fi
7598 rm -f conftest*
7599 fi
7600
7601 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7602   echo "$ac_t""yes" 1>&6
7603     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7604   cat >> confdefs.h <<EOF
7605 #define $ac_tr_func 1
7606 EOF
7607  
7608 else
7609   echo "$ac_t""no" 1>&6
7610 fi
7611 done
7612  ;;
7613   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7614 echo "configure:7615: checking for set_auth_parameters in -lsecurity" >&5
7615 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7616 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7617   echo $ac_n "(cached) $ac_c" 1>&6
7618 else
7619   ac_save_LIBS="$LIBS"
7620 LIBS="-lsecurity  $LIBS"
7621 cat > conftest.$ac_ext <<EOF
7622 #line 7623 "configure"
7623 #include "confdefs.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 set_auth_parameters();
7628
7629 int main() {
7630 set_auth_parameters()
7631 ; return 0; }
7632 EOF
7633 if { (eval echo configure:7634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7634   rm -rf conftest*
7635   eval "ac_cv_lib_$ac_lib_var=yes"
7636 else
7637   echo "configure: failed program was:" >&5
7638   cat conftest.$ac_ext >&5
7639   rm -rf conftest*
7640   eval "ac_cv_lib_$ac_lib_var=no"
7641 fi
7642 rm -f conftest*
7643 LIBS="$ac_save_LIBS"
7644
7645 fi
7646 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7647   echo "$ac_t""yes" 1>&6
7648     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7649     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7650   cat >> confdefs.h <<EOF
7651 #define $ac_tr_lib 1
7652 EOF
7653
7654   LIBS="-lsecurity $LIBS"
7655
7656 else
7657   echo "$ac_t""no" 1>&6
7658 fi
7659  
7660      for ac_func in set_auth_parameters
7661 do
7662 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7663 echo "configure:7664: checking for $ac_func" >&5
7664 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7665   echo $ac_n "(cached) $ac_c" 1>&6
7666 else
7667   cat > conftest.$ac_ext <<EOF
7668 #line 7669 "configure"
7669 #include "confdefs.h"
7670 /* System header to define __stub macros and hopefully few prototypes,
7671     which can conflict with char $ac_func(); below.  */
7672 #include <assert.h>
7673 /* Override any gcc2 internal prototype to avoid an error.  */
7674 /* We use char because int might match the return type of a gcc2
7675     builtin and then its argument prototype would still apply.  */
7676 char $ac_func();
7677
7678 int main() {
7679
7680 /* The GNU C library defines this for functions which it implements
7681     to always fail with ENOSYS.  Some functions are actually named
7682     something starting with __ and the normal name is an alias.  */
7683 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7684 choke me
7685 #else
7686 $ac_func();
7687 #endif
7688
7689 ; return 0; }
7690 EOF
7691 if { (eval echo configure:7692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7692   rm -rf conftest*
7693   eval "ac_cv_func_$ac_func=yes"
7694 else
7695   echo "configure: failed program was:" >&5
7696   cat conftest.$ac_ext >&5
7697   rm -rf conftest*
7698   eval "ac_cv_func_$ac_func=no"
7699 fi
7700 rm -f conftest*
7701 fi
7702
7703 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7704   echo "$ac_t""yes" 1>&6
7705     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7706   cat >> confdefs.h <<EOF
7707 #define $ac_tr_func 1
7708 EOF
7709  
7710 else
7711   echo "$ac_t""no" 1>&6
7712 fi
7713 done
7714
7715   ;;
7716   esac
7717
7718 case "$LIBS" in
7719   *-lsec*) for ac_func in set_auth_parameters
7720 do
7721 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7722 echo "configure:7723: checking for $ac_func" >&5
7723 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7724   echo $ac_n "(cached) $ac_c" 1>&6
7725 else
7726   cat > conftest.$ac_ext <<EOF
7727 #line 7728 "configure"
7728 #include "confdefs.h"
7729 /* System header to define __stub macros and hopefully few prototypes,
7730     which can conflict with char $ac_func(); below.  */
7731 #include <assert.h>
7732 /* Override any gcc2 internal prototype to avoid an error.  */
7733 /* We use char because int might match the return type of a gcc2
7734     builtin and then its argument prototype would still apply.  */
7735 char $ac_func();
7736
7737 int main() {
7738
7739 /* The GNU C library defines this for functions which it implements
7740     to always fail with ENOSYS.  Some functions are actually named
7741     something starting with __ and the normal name is an alias.  */
7742 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7743 choke me
7744 #else
7745 $ac_func();
7746 #endif
7747
7748 ; return 0; }
7749 EOF
7750 if { (eval echo configure:7751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7751   rm -rf conftest*
7752   eval "ac_cv_func_$ac_func=yes"
7753 else
7754   echo "configure: failed program was:" >&5
7755   cat conftest.$ac_ext >&5
7756   rm -rf conftest*
7757   eval "ac_cv_func_$ac_func=no"
7758 fi
7759 rm -f conftest*
7760 fi
7761
7762 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7763   echo "$ac_t""yes" 1>&6
7764     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7765   cat >> confdefs.h <<EOF
7766 #define $ac_tr_func 1
7767 EOF
7768  
7769 else
7770   echo "$ac_t""no" 1>&6
7771 fi
7772 done
7773  ;;
7774   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7775 echo "configure:7776: checking for set_auth_parameters in -lsec" >&5
7776 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7777 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7778   echo $ac_n "(cached) $ac_c" 1>&6
7779 else
7780   ac_save_LIBS="$LIBS"
7781 LIBS="-lsec  $LIBS"
7782 cat > conftest.$ac_ext <<EOF
7783 #line 7784 "configure"
7784 #include "confdefs.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 set_auth_parameters();
7789
7790 int main() {
7791 set_auth_parameters()
7792 ; return 0; }
7793 EOF
7794 if { (eval echo configure:7795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7795   rm -rf conftest*
7796   eval "ac_cv_lib_$ac_lib_var=yes"
7797 else
7798   echo "configure: failed program was:" >&5
7799   cat conftest.$ac_ext >&5
7800   rm -rf conftest*
7801   eval "ac_cv_lib_$ac_lib_var=no"
7802 fi
7803 rm -f conftest*
7804 LIBS="$ac_save_LIBS"
7805
7806 fi
7807 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7808   echo "$ac_t""yes" 1>&6
7809     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7810     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7811   cat >> confdefs.h <<EOF
7812 #define $ac_tr_lib 1
7813 EOF
7814
7815   LIBS="-lsec $LIBS"
7816
7817 else
7818   echo "$ac_t""no" 1>&6
7819 fi
7820  
7821      for ac_func in set_auth_parameters
7822 do
7823 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7824 echo "configure:7825: checking for $ac_func" >&5
7825 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7826   echo $ac_n "(cached) $ac_c" 1>&6
7827 else
7828   cat > conftest.$ac_ext <<EOF
7829 #line 7830 "configure"
7830 #include "confdefs.h"
7831 /* System header to define __stub macros and hopefully few prototypes,
7832     which can conflict with char $ac_func(); below.  */
7833 #include <assert.h>
7834 /* Override any gcc2 internal prototype to avoid an error.  */
7835 /* We use char because int might match the return type of a gcc2
7836     builtin and then its argument prototype would still apply.  */
7837 char $ac_func();
7838
7839 int main() {
7840
7841 /* The GNU C library defines this for functions which it implements
7842     to always fail with ENOSYS.  Some functions are actually named
7843     something starting with __ and the normal name is an alias.  */
7844 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7845 choke me
7846 #else
7847 $ac_func();
7848 #endif
7849
7850 ; return 0; }
7851 EOF
7852 if { (eval echo configure:7853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7853   rm -rf conftest*
7854   eval "ac_cv_func_$ac_func=yes"
7855 else
7856   echo "configure: failed program was:" >&5
7857   cat conftest.$ac_ext >&5
7858   rm -rf conftest*
7859   eval "ac_cv_func_$ac_func=no"
7860 fi
7861 rm -f conftest*
7862 fi
7863
7864 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7865   echo "$ac_t""yes" 1>&6
7866     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7867   cat >> confdefs.h <<EOF
7868 #define $ac_tr_func 1
7869 EOF
7870  
7871 else
7872   echo "$ac_t""no" 1>&6
7873 fi
7874 done
7875
7876   ;;
7877   esac
7878
7879
7880 # UnixWare 7.x has its getspnam in -lgen
7881 case "$LIBS" in
7882   *-lgen*) for ac_func in getspnam
7883 do
7884 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7885 echo "configure:7886: checking for $ac_func" >&5
7886 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7887   echo $ac_n "(cached) $ac_c" 1>&6
7888 else
7889   cat > conftest.$ac_ext <<EOF
7890 #line 7891 "configure"
7891 #include "confdefs.h"
7892 /* System header to define __stub macros and hopefully few prototypes,
7893     which can conflict with char $ac_func(); below.  */
7894 #include <assert.h>
7895 /* Override any gcc2 internal prototype to avoid an error.  */
7896 /* We use char because int might match the return type of a gcc2
7897     builtin and then its argument prototype would still apply.  */
7898 char $ac_func();
7899
7900 int main() {
7901
7902 /* The GNU C library defines this for functions which it implements
7903     to always fail with ENOSYS.  Some functions are actually named
7904     something starting with __ and the normal name is an alias.  */
7905 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7906 choke me
7907 #else
7908 $ac_func();
7909 #endif
7910
7911 ; return 0; }
7912 EOF
7913 if { (eval echo configure:7914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7914   rm -rf conftest*
7915   eval "ac_cv_func_$ac_func=yes"
7916 else
7917   echo "configure: failed program was:" >&5
7918   cat conftest.$ac_ext >&5
7919   rm -rf conftest*
7920   eval "ac_cv_func_$ac_func=no"
7921 fi
7922 rm -f conftest*
7923 fi
7924
7925 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7926   echo "$ac_t""yes" 1>&6
7927     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7928   cat >> confdefs.h <<EOF
7929 #define $ac_tr_func 1
7930 EOF
7931  
7932 else
7933   echo "$ac_t""no" 1>&6
7934 fi
7935 done
7936  ;;
7937   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7938 echo "configure:7939: checking for getspnam in -lgen" >&5
7939 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7940 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7941   echo $ac_n "(cached) $ac_c" 1>&6
7942 else
7943   ac_save_LIBS="$LIBS"
7944 LIBS="-lgen  $LIBS"
7945 cat > conftest.$ac_ext <<EOF
7946 #line 7947 "configure"
7947 #include "confdefs.h"
7948 /* Override any gcc2 internal prototype to avoid an error.  */
7949 /* We use char because int might match the return type of a gcc2
7950     builtin and then its argument prototype would still apply.  */
7951 char getspnam();
7952
7953 int main() {
7954 getspnam()
7955 ; return 0; }
7956 EOF
7957 if { (eval echo configure:7958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7958   rm -rf conftest*
7959   eval "ac_cv_lib_$ac_lib_var=yes"
7960 else
7961   echo "configure: failed program was:" >&5
7962   cat conftest.$ac_ext >&5
7963   rm -rf conftest*
7964   eval "ac_cv_lib_$ac_lib_var=no"
7965 fi
7966 rm -f conftest*
7967 LIBS="$ac_save_LIBS"
7968
7969 fi
7970 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7971   echo "$ac_t""yes" 1>&6
7972     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7973     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7974   cat >> confdefs.h <<EOF
7975 #define $ac_tr_lib 1
7976 EOF
7977
7978   LIBS="-lgen $LIBS"
7979
7980 else
7981   echo "$ac_t""no" 1>&6
7982 fi
7983  
7984      for ac_func in getspnam
7985 do
7986 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7987 echo "configure:7988: checking for $ac_func" >&5
7988 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7989   echo $ac_n "(cached) $ac_c" 1>&6
7990 else
7991   cat > conftest.$ac_ext <<EOF
7992 #line 7993 "configure"
7993 #include "confdefs.h"
7994 /* System header to define __stub macros and hopefully few prototypes,
7995     which can conflict with char $ac_func(); below.  */
7996 #include <assert.h>
7997 /* Override any gcc2 internal prototype to avoid an error.  */
7998 /* We use char because int might match the return type of a gcc2
7999     builtin and then its argument prototype would still apply.  */
8000 char $ac_func();
8001
8002 int main() {
8003
8004 /* The GNU C library defines this for functions which it implements
8005     to always fail with ENOSYS.  Some functions are actually named
8006     something starting with __ and the normal name is an alias.  */
8007 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8008 choke me
8009 #else
8010 $ac_func();
8011 #endif
8012
8013 ; return 0; }
8014 EOF
8015 if { (eval echo configure:8016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8016   rm -rf conftest*
8017   eval "ac_cv_func_$ac_func=yes"
8018 else
8019   echo "configure: failed program was:" >&5
8020   cat conftest.$ac_ext >&5
8021   rm -rf conftest*
8022   eval "ac_cv_func_$ac_func=no"
8023 fi
8024 rm -f conftest*
8025 fi
8026
8027 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8028   echo "$ac_t""yes" 1>&6
8029     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8030   cat >> confdefs.h <<EOF
8031 #define $ac_tr_func 1
8032 EOF
8033  
8034 else
8035   echo "$ac_t""no" 1>&6
8036 fi
8037 done
8038
8039   ;;
8040   esac
8041
8042
8043 case "$LIBS" in
8044   *-lsecurity*) for ac_func in getspnam
8045 do
8046 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8047 echo "configure:8048: checking for $ac_func" >&5
8048 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8049   echo $ac_n "(cached) $ac_c" 1>&6
8050 else
8051   cat > conftest.$ac_ext <<EOF
8052 #line 8053 "configure"
8053 #include "confdefs.h"
8054 /* System header to define __stub macros and hopefully few prototypes,
8055     which can conflict with char $ac_func(); below.  */
8056 #include <assert.h>
8057 /* Override any gcc2 internal prototype to avoid an error.  */
8058 /* We use char because int might match the return type of a gcc2
8059     builtin and then its argument prototype would still apply.  */
8060 char $ac_func();
8061
8062 int main() {
8063
8064 /* The GNU C library defines this for functions which it implements
8065     to always fail with ENOSYS.  Some functions are actually named
8066     something starting with __ and the normal name is an alias.  */
8067 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8068 choke me
8069 #else
8070 $ac_func();
8071 #endif
8072
8073 ; return 0; }
8074 EOF
8075 if { (eval echo configure:8076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8076   rm -rf conftest*
8077   eval "ac_cv_func_$ac_func=yes"
8078 else
8079   echo "configure: failed program was:" >&5
8080   cat conftest.$ac_ext >&5
8081   rm -rf conftest*
8082   eval "ac_cv_func_$ac_func=no"
8083 fi
8084 rm -f conftest*
8085 fi
8086
8087 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8088   echo "$ac_t""yes" 1>&6
8089     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8090   cat >> confdefs.h <<EOF
8091 #define $ac_tr_func 1
8092 EOF
8093  
8094 else
8095   echo "$ac_t""no" 1>&6
8096 fi
8097 done
8098  ;;
8099   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
8100 echo "configure:8101: checking for getspnam in -lsecurity" >&5
8101 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
8102 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8103   echo $ac_n "(cached) $ac_c" 1>&6
8104 else
8105   ac_save_LIBS="$LIBS"
8106 LIBS="-lsecurity  $LIBS"
8107 cat > conftest.$ac_ext <<EOF
8108 #line 8109 "configure"
8109 #include "confdefs.h"
8110 /* Override any gcc2 internal prototype to avoid an error.  */
8111 /* We use char because int might match the return type of a gcc2
8112     builtin and then its argument prototype would still apply.  */
8113 char getspnam();
8114
8115 int main() {
8116 getspnam()
8117 ; return 0; }
8118 EOF
8119 if { (eval echo configure:8120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8120   rm -rf conftest*
8121   eval "ac_cv_lib_$ac_lib_var=yes"
8122 else
8123   echo "configure: failed program was:" >&5
8124   cat conftest.$ac_ext >&5
8125   rm -rf conftest*
8126   eval "ac_cv_lib_$ac_lib_var=no"
8127 fi
8128 rm -f conftest*
8129 LIBS="$ac_save_LIBS"
8130
8131 fi
8132 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8133   echo "$ac_t""yes" 1>&6
8134     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8135     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8136   cat >> confdefs.h <<EOF
8137 #define $ac_tr_lib 1
8138 EOF
8139
8140   LIBS="-lsecurity $LIBS"
8141
8142 else
8143   echo "$ac_t""no" 1>&6
8144 fi
8145  
8146      for ac_func in getspnam
8147 do
8148 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8149 echo "configure:8150: checking for $ac_func" >&5
8150 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8151   echo $ac_n "(cached) $ac_c" 1>&6
8152 else
8153   cat > conftest.$ac_ext <<EOF
8154 #line 8155 "configure"
8155 #include "confdefs.h"
8156 /* System header to define __stub macros and hopefully few prototypes,
8157     which can conflict with char $ac_func(); below.  */
8158 #include <assert.h>
8159 /* Override any gcc2 internal prototype to avoid an error.  */
8160 /* We use char because int might match the return type of a gcc2
8161     builtin and then its argument prototype would still apply.  */
8162 char $ac_func();
8163
8164 int main() {
8165
8166 /* The GNU C library defines this for functions which it implements
8167     to always fail with ENOSYS.  Some functions are actually named
8168     something starting with __ and the normal name is an alias.  */
8169 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8170 choke me
8171 #else
8172 $ac_func();
8173 #endif
8174
8175 ; return 0; }
8176 EOF
8177 if { (eval echo configure:8178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8178   rm -rf conftest*
8179   eval "ac_cv_func_$ac_func=yes"
8180 else
8181   echo "configure: failed program was:" >&5
8182   cat conftest.$ac_ext >&5
8183   rm -rf conftest*
8184   eval "ac_cv_func_$ac_func=no"
8185 fi
8186 rm -f conftest*
8187 fi
8188
8189 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8190   echo "$ac_t""yes" 1>&6
8191     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8192   cat >> confdefs.h <<EOF
8193 #define $ac_tr_func 1
8194 EOF
8195  
8196 else
8197   echo "$ac_t""no" 1>&6
8198 fi
8199 done
8200
8201   ;;
8202   esac
8203
8204 case "$LIBS" in
8205   *-lsec*) for ac_func in getspnam
8206 do
8207 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8208 echo "configure:8209: checking for $ac_func" >&5
8209 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8210   echo $ac_n "(cached) $ac_c" 1>&6
8211 else
8212   cat > conftest.$ac_ext <<EOF
8213 #line 8214 "configure"
8214 #include "confdefs.h"
8215 /* System header to define __stub macros and hopefully few prototypes,
8216     which can conflict with char $ac_func(); below.  */
8217 #include <assert.h>
8218 /* Override any gcc2 internal prototype to avoid an error.  */
8219 /* We use char because int might match the return type of a gcc2
8220     builtin and then its argument prototype would still apply.  */
8221 char $ac_func();
8222
8223 int main() {
8224
8225 /* The GNU C library defines this for functions which it implements
8226     to always fail with ENOSYS.  Some functions are actually named
8227     something starting with __ and the normal name is an alias.  */
8228 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8229 choke me
8230 #else
8231 $ac_func();
8232 #endif
8233
8234 ; return 0; }
8235 EOF
8236 if { (eval echo configure:8237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8237   rm -rf conftest*
8238   eval "ac_cv_func_$ac_func=yes"
8239 else
8240   echo "configure: failed program was:" >&5
8241   cat conftest.$ac_ext >&5
8242   rm -rf conftest*
8243   eval "ac_cv_func_$ac_func=no"
8244 fi
8245 rm -f conftest*
8246 fi
8247
8248 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8249   echo "$ac_t""yes" 1>&6
8250     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8251   cat >> confdefs.h <<EOF
8252 #define $ac_tr_func 1
8253 EOF
8254  
8255 else
8256   echo "$ac_t""no" 1>&6
8257 fi
8258 done
8259  ;;
8260   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
8261 echo "configure:8262: checking for getspnam in -lsec" >&5
8262 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
8263 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8264   echo $ac_n "(cached) $ac_c" 1>&6
8265 else
8266   ac_save_LIBS="$LIBS"
8267 LIBS="-lsec  $LIBS"
8268 cat > conftest.$ac_ext <<EOF
8269 #line 8270 "configure"
8270 #include "confdefs.h"
8271 /* Override any gcc2 internal prototype to avoid an error.  */
8272 /* We use char because int might match the return type of a gcc2
8273     builtin and then its argument prototype would still apply.  */
8274 char getspnam();
8275
8276 int main() {
8277 getspnam()
8278 ; return 0; }
8279 EOF
8280 if { (eval echo configure:8281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8281   rm -rf conftest*
8282   eval "ac_cv_lib_$ac_lib_var=yes"
8283 else
8284   echo "configure: failed program was:" >&5
8285   cat conftest.$ac_ext >&5
8286   rm -rf conftest*
8287   eval "ac_cv_lib_$ac_lib_var=no"
8288 fi
8289 rm -f conftest*
8290 LIBS="$ac_save_LIBS"
8291
8292 fi
8293 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8294   echo "$ac_t""yes" 1>&6
8295     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8296     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8297   cat >> confdefs.h <<EOF
8298 #define $ac_tr_lib 1
8299 EOF
8300
8301   LIBS="-lsec $LIBS"
8302
8303 else
8304   echo "$ac_t""no" 1>&6
8305 fi
8306  
8307      for ac_func in getspnam
8308 do
8309 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8310 echo "configure:8311: checking for $ac_func" >&5
8311 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8312   echo $ac_n "(cached) $ac_c" 1>&6
8313 else
8314   cat > conftest.$ac_ext <<EOF
8315 #line 8316 "configure"
8316 #include "confdefs.h"
8317 /* System header to define __stub macros and hopefully few prototypes,
8318     which can conflict with char $ac_func(); below.  */
8319 #include <assert.h>
8320 /* Override any gcc2 internal prototype to avoid an error.  */
8321 /* We use char because int might match the return type of a gcc2
8322     builtin and then its argument prototype would still apply.  */
8323 char $ac_func();
8324
8325 int main() {
8326
8327 /* The GNU C library defines this for functions which it implements
8328     to always fail with ENOSYS.  Some functions are actually named
8329     something starting with __ and the normal name is an alias.  */
8330 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8331 choke me
8332 #else
8333 $ac_func();
8334 #endif
8335
8336 ; return 0; }
8337 EOF
8338 if { (eval echo configure:8339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8339   rm -rf conftest*
8340   eval "ac_cv_func_$ac_func=yes"
8341 else
8342   echo "configure: failed program was:" >&5
8343   cat conftest.$ac_ext >&5
8344   rm -rf conftest*
8345   eval "ac_cv_func_$ac_func=no"
8346 fi
8347 rm -f conftest*
8348 fi
8349
8350 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8351   echo "$ac_t""yes" 1>&6
8352     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8353   cat >> confdefs.h <<EOF
8354 #define $ac_tr_func 1
8355 EOF
8356  
8357 else
8358   echo "$ac_t""no" 1>&6
8359 fi
8360 done
8361
8362   ;;
8363   esac
8364
8365
8366 case "$LIBS" in
8367   *-lsecurity*) for ac_func in bigcrypt
8368 do
8369 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8370 echo "configure:8371: checking for $ac_func" >&5
8371 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8372   echo $ac_n "(cached) $ac_c" 1>&6
8373 else
8374   cat > conftest.$ac_ext <<EOF
8375 #line 8376 "configure"
8376 #include "confdefs.h"
8377 /* System header to define __stub macros and hopefully few prototypes,
8378     which can conflict with char $ac_func(); below.  */
8379 #include <assert.h>
8380 /* Override any gcc2 internal prototype to avoid an error.  */
8381 /* We use char because int might match the return type of a gcc2
8382     builtin and then its argument prototype would still apply.  */
8383 char $ac_func();
8384
8385 int main() {
8386
8387 /* The GNU C library defines this for functions which it implements
8388     to always fail with ENOSYS.  Some functions are actually named
8389     something starting with __ and the normal name is an alias.  */
8390 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8391 choke me
8392 #else
8393 $ac_func();
8394 #endif
8395
8396 ; return 0; }
8397 EOF
8398 if { (eval echo configure:8399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8399   rm -rf conftest*
8400   eval "ac_cv_func_$ac_func=yes"
8401 else
8402   echo "configure: failed program was:" >&5
8403   cat conftest.$ac_ext >&5
8404   rm -rf conftest*
8405   eval "ac_cv_func_$ac_func=no"
8406 fi
8407 rm -f conftest*
8408 fi
8409
8410 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8411   echo "$ac_t""yes" 1>&6
8412     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8413   cat >> confdefs.h <<EOF
8414 #define $ac_tr_func 1
8415 EOF
8416  
8417 else
8418   echo "$ac_t""no" 1>&6
8419 fi
8420 done
8421  ;;
8422   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
8423 echo "configure:8424: checking for bigcrypt in -lsecurity" >&5
8424 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
8425 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8426   echo $ac_n "(cached) $ac_c" 1>&6
8427 else
8428   ac_save_LIBS="$LIBS"
8429 LIBS="-lsecurity  $LIBS"
8430 cat > conftest.$ac_ext <<EOF
8431 #line 8432 "configure"
8432 #include "confdefs.h"
8433 /* Override any gcc2 internal prototype to avoid an error.  */
8434 /* We use char because int might match the return type of a gcc2
8435     builtin and then its argument prototype would still apply.  */
8436 char bigcrypt();
8437
8438 int main() {
8439 bigcrypt()
8440 ; return 0; }
8441 EOF
8442 if { (eval echo configure:8443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8443   rm -rf conftest*
8444   eval "ac_cv_lib_$ac_lib_var=yes"
8445 else
8446   echo "configure: failed program was:" >&5
8447   cat conftest.$ac_ext >&5
8448   rm -rf conftest*
8449   eval "ac_cv_lib_$ac_lib_var=no"
8450 fi
8451 rm -f conftest*
8452 LIBS="$ac_save_LIBS"
8453
8454 fi
8455 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8456   echo "$ac_t""yes" 1>&6
8457     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8458     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8459   cat >> confdefs.h <<EOF
8460 #define $ac_tr_lib 1
8461 EOF
8462
8463   LIBS="-lsecurity $LIBS"
8464
8465 else
8466   echo "$ac_t""no" 1>&6
8467 fi
8468  
8469      for ac_func in bigcrypt
8470 do
8471 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8472 echo "configure:8473: checking for $ac_func" >&5
8473 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8474   echo $ac_n "(cached) $ac_c" 1>&6
8475 else
8476   cat > conftest.$ac_ext <<EOF
8477 #line 8478 "configure"
8478 #include "confdefs.h"
8479 /* System header to define __stub macros and hopefully few prototypes,
8480     which can conflict with char $ac_func(); below.  */
8481 #include <assert.h>
8482 /* Override any gcc2 internal prototype to avoid an error.  */
8483 /* We use char because int might match the return type of a gcc2
8484     builtin and then its argument prototype would still apply.  */
8485 char $ac_func();
8486
8487 int main() {
8488
8489 /* The GNU C library defines this for functions which it implements
8490     to always fail with ENOSYS.  Some functions are actually named
8491     something starting with __ and the normal name is an alias.  */
8492 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8493 choke me
8494 #else
8495 $ac_func();
8496 #endif
8497
8498 ; return 0; }
8499 EOF
8500 if { (eval echo configure:8501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8501   rm -rf conftest*
8502   eval "ac_cv_func_$ac_func=yes"
8503 else
8504   echo "configure: failed program was:" >&5
8505   cat conftest.$ac_ext >&5
8506   rm -rf conftest*
8507   eval "ac_cv_func_$ac_func=no"
8508 fi
8509 rm -f conftest*
8510 fi
8511
8512 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8513   echo "$ac_t""yes" 1>&6
8514     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8515   cat >> confdefs.h <<EOF
8516 #define $ac_tr_func 1
8517 EOF
8518  
8519 else
8520   echo "$ac_t""no" 1>&6
8521 fi
8522 done
8523
8524   ;;
8525   esac
8526
8527 case "$LIBS" in
8528   *-lsec*) for ac_func in bigcrypt
8529 do
8530 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8531 echo "configure:8532: checking for $ac_func" >&5
8532 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8533   echo $ac_n "(cached) $ac_c" 1>&6
8534 else
8535   cat > conftest.$ac_ext <<EOF
8536 #line 8537 "configure"
8537 #include "confdefs.h"
8538 /* System header to define __stub macros and hopefully few prototypes,
8539     which can conflict with char $ac_func(); below.  */
8540 #include <assert.h>
8541 /* Override any gcc2 internal prototype to avoid an error.  */
8542 /* We use char because int might match the return type of a gcc2
8543     builtin and then its argument prototype would still apply.  */
8544 char $ac_func();
8545
8546 int main() {
8547
8548 /* The GNU C library defines this for functions which it implements
8549     to always fail with ENOSYS.  Some functions are actually named
8550     something starting with __ and the normal name is an alias.  */
8551 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8552 choke me
8553 #else
8554 $ac_func();
8555 #endif
8556
8557 ; return 0; }
8558 EOF
8559 if { (eval echo configure:8560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8560   rm -rf conftest*
8561   eval "ac_cv_func_$ac_func=yes"
8562 else
8563   echo "configure: failed program was:" >&5
8564   cat conftest.$ac_ext >&5
8565   rm -rf conftest*
8566   eval "ac_cv_func_$ac_func=no"
8567 fi
8568 rm -f conftest*
8569 fi
8570
8571 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8572   echo "$ac_t""yes" 1>&6
8573     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8574   cat >> confdefs.h <<EOF
8575 #define $ac_tr_func 1
8576 EOF
8577  
8578 else
8579   echo "$ac_t""no" 1>&6
8580 fi
8581 done
8582  ;;
8583   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8584 echo "configure:8585: checking for bigcrypt in -lsec" >&5
8585 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8586 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8587   echo $ac_n "(cached) $ac_c" 1>&6
8588 else
8589   ac_save_LIBS="$LIBS"
8590 LIBS="-lsec  $LIBS"
8591 cat > conftest.$ac_ext <<EOF
8592 #line 8593 "configure"
8593 #include "confdefs.h"
8594 /* Override any gcc2 internal prototype to avoid an error.  */
8595 /* We use char because int might match the return type of a gcc2
8596     builtin and then its argument prototype would still apply.  */
8597 char bigcrypt();
8598
8599 int main() {
8600 bigcrypt()
8601 ; return 0; }
8602 EOF
8603 if { (eval echo configure:8604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8604   rm -rf conftest*
8605   eval "ac_cv_lib_$ac_lib_var=yes"
8606 else
8607   echo "configure: failed program was:" >&5
8608   cat conftest.$ac_ext >&5
8609   rm -rf conftest*
8610   eval "ac_cv_lib_$ac_lib_var=no"
8611 fi
8612 rm -f conftest*
8613 LIBS="$ac_save_LIBS"
8614
8615 fi
8616 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8617   echo "$ac_t""yes" 1>&6
8618     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8619     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8620   cat >> confdefs.h <<EOF
8621 #define $ac_tr_lib 1
8622 EOF
8623
8624   LIBS="-lsec $LIBS"
8625
8626 else
8627   echo "$ac_t""no" 1>&6
8628 fi
8629  
8630      for ac_func in bigcrypt
8631 do
8632 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8633 echo "configure:8634: checking for $ac_func" >&5
8634 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8635   echo $ac_n "(cached) $ac_c" 1>&6
8636 else
8637   cat > conftest.$ac_ext <<EOF
8638 #line 8639 "configure"
8639 #include "confdefs.h"
8640 /* System header to define __stub macros and hopefully few prototypes,
8641     which can conflict with char $ac_func(); below.  */
8642 #include <assert.h>
8643 /* Override any gcc2 internal prototype to avoid an error.  */
8644 /* We use char because int might match the return type of a gcc2
8645     builtin and then its argument prototype would still apply.  */
8646 char $ac_func();
8647
8648 int main() {
8649
8650 /* The GNU C library defines this for functions which it implements
8651     to always fail with ENOSYS.  Some functions are actually named
8652     something starting with __ and the normal name is an alias.  */
8653 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8654 choke me
8655 #else
8656 $ac_func();
8657 #endif
8658
8659 ; return 0; }
8660 EOF
8661 if { (eval echo configure:8662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8662   rm -rf conftest*
8663   eval "ac_cv_func_$ac_func=yes"
8664 else
8665   echo "configure: failed program was:" >&5
8666   cat conftest.$ac_ext >&5
8667   rm -rf conftest*
8668   eval "ac_cv_func_$ac_func=no"
8669 fi
8670 rm -f conftest*
8671 fi
8672
8673 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8674   echo "$ac_t""yes" 1>&6
8675     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8676   cat >> confdefs.h <<EOF
8677 #define $ac_tr_func 1
8678 EOF
8679  
8680 else
8681   echo "$ac_t""no" 1>&6
8682 fi
8683 done
8684
8685   ;;
8686   esac
8687
8688
8689 case "$LIBS" in
8690   *-lsecurity*) for ac_func in getprpwnam
8691 do
8692 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8693 echo "configure:8694: checking for $ac_func" >&5
8694 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8695   echo $ac_n "(cached) $ac_c" 1>&6
8696 else
8697   cat > conftest.$ac_ext <<EOF
8698 #line 8699 "configure"
8699 #include "confdefs.h"
8700 /* System header to define __stub macros and hopefully few prototypes,
8701     which can conflict with char $ac_func(); below.  */
8702 #include <assert.h>
8703 /* Override any gcc2 internal prototype to avoid an error.  */
8704 /* We use char because int might match the return type of a gcc2
8705     builtin and then its argument prototype would still apply.  */
8706 char $ac_func();
8707
8708 int main() {
8709
8710 /* The GNU C library defines this for functions which it implements
8711     to always fail with ENOSYS.  Some functions are actually named
8712     something starting with __ and the normal name is an alias.  */
8713 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8714 choke me
8715 #else
8716 $ac_func();
8717 #endif
8718
8719 ; return 0; }
8720 EOF
8721 if { (eval echo configure:8722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8722   rm -rf conftest*
8723   eval "ac_cv_func_$ac_func=yes"
8724 else
8725   echo "configure: failed program was:" >&5
8726   cat conftest.$ac_ext >&5
8727   rm -rf conftest*
8728   eval "ac_cv_func_$ac_func=no"
8729 fi
8730 rm -f conftest*
8731 fi
8732
8733 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8734   echo "$ac_t""yes" 1>&6
8735     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8736   cat >> confdefs.h <<EOF
8737 #define $ac_tr_func 1
8738 EOF
8739  
8740 else
8741   echo "$ac_t""no" 1>&6
8742 fi
8743 done
8744  ;;
8745   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8746 echo "configure:8747: checking for getprpwnam in -lsecurity" >&5
8747 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8748 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8749   echo $ac_n "(cached) $ac_c" 1>&6
8750 else
8751   ac_save_LIBS="$LIBS"
8752 LIBS="-lsecurity  $LIBS"
8753 cat > conftest.$ac_ext <<EOF
8754 #line 8755 "configure"
8755 #include "confdefs.h"
8756 /* Override any gcc2 internal prototype to avoid an error.  */
8757 /* We use char because int might match the return type of a gcc2
8758     builtin and then its argument prototype would still apply.  */
8759 char getprpwnam();
8760
8761 int main() {
8762 getprpwnam()
8763 ; return 0; }
8764 EOF
8765 if { (eval echo configure:8766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8766   rm -rf conftest*
8767   eval "ac_cv_lib_$ac_lib_var=yes"
8768 else
8769   echo "configure: failed program was:" >&5
8770   cat conftest.$ac_ext >&5
8771   rm -rf conftest*
8772   eval "ac_cv_lib_$ac_lib_var=no"
8773 fi
8774 rm -f conftest*
8775 LIBS="$ac_save_LIBS"
8776
8777 fi
8778 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8779   echo "$ac_t""yes" 1>&6
8780     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8781     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8782   cat >> confdefs.h <<EOF
8783 #define $ac_tr_lib 1
8784 EOF
8785
8786   LIBS="-lsecurity $LIBS"
8787
8788 else
8789   echo "$ac_t""no" 1>&6
8790 fi
8791  
8792      for ac_func in getprpwnam
8793 do
8794 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8795 echo "configure:8796: checking for $ac_func" >&5
8796 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8797   echo $ac_n "(cached) $ac_c" 1>&6
8798 else
8799   cat > conftest.$ac_ext <<EOF
8800 #line 8801 "configure"
8801 #include "confdefs.h"
8802 /* System header to define __stub macros and hopefully few prototypes,
8803     which can conflict with char $ac_func(); below.  */
8804 #include <assert.h>
8805 /* Override any gcc2 internal prototype to avoid an error.  */
8806 /* We use char because int might match the return type of a gcc2
8807     builtin and then its argument prototype would still apply.  */
8808 char $ac_func();
8809
8810 int main() {
8811
8812 /* The GNU C library defines this for functions which it implements
8813     to always fail with ENOSYS.  Some functions are actually named
8814     something starting with __ and the normal name is an alias.  */
8815 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8816 choke me
8817 #else
8818 $ac_func();
8819 #endif
8820
8821 ; return 0; }
8822 EOF
8823 if { (eval echo configure:8824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8824   rm -rf conftest*
8825   eval "ac_cv_func_$ac_func=yes"
8826 else
8827   echo "configure: failed program was:" >&5
8828   cat conftest.$ac_ext >&5
8829   rm -rf conftest*
8830   eval "ac_cv_func_$ac_func=no"
8831 fi
8832 rm -f conftest*
8833 fi
8834
8835 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8836   echo "$ac_t""yes" 1>&6
8837     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8838   cat >> confdefs.h <<EOF
8839 #define $ac_tr_func 1
8840 EOF
8841  
8842 else
8843   echo "$ac_t""no" 1>&6
8844 fi
8845 done
8846
8847   ;;
8848   esac
8849
8850 case "$LIBS" in
8851   *-lsec*) for ac_func in getprpwnam
8852 do
8853 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8854 echo "configure:8855: checking for $ac_func" >&5
8855 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8856   echo $ac_n "(cached) $ac_c" 1>&6
8857 else
8858   cat > conftest.$ac_ext <<EOF
8859 #line 8860 "configure"
8860 #include "confdefs.h"
8861 /* System header to define __stub macros and hopefully few prototypes,
8862     which can conflict with char $ac_func(); below.  */
8863 #include <assert.h>
8864 /* Override any gcc2 internal prototype to avoid an error.  */
8865 /* We use char because int might match the return type of a gcc2
8866     builtin and then its argument prototype would still apply.  */
8867 char $ac_func();
8868
8869 int main() {
8870
8871 /* The GNU C library defines this for functions which it implements
8872     to always fail with ENOSYS.  Some functions are actually named
8873     something starting with __ and the normal name is an alias.  */
8874 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8875 choke me
8876 #else
8877 $ac_func();
8878 #endif
8879
8880 ; return 0; }
8881 EOF
8882 if { (eval echo configure:8883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8883   rm -rf conftest*
8884   eval "ac_cv_func_$ac_func=yes"
8885 else
8886   echo "configure: failed program was:" >&5
8887   cat conftest.$ac_ext >&5
8888   rm -rf conftest*
8889   eval "ac_cv_func_$ac_func=no"
8890 fi
8891 rm -f conftest*
8892 fi
8893
8894 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8895   echo "$ac_t""yes" 1>&6
8896     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8897   cat >> confdefs.h <<EOF
8898 #define $ac_tr_func 1
8899 EOF
8900  
8901 else
8902   echo "$ac_t""no" 1>&6
8903 fi
8904 done
8905  ;;
8906   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8907 echo "configure:8908: checking for getprpwnam in -lsec" >&5
8908 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8909 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8910   echo $ac_n "(cached) $ac_c" 1>&6
8911 else
8912   ac_save_LIBS="$LIBS"
8913 LIBS="-lsec  $LIBS"
8914 cat > conftest.$ac_ext <<EOF
8915 #line 8916 "configure"
8916 #include "confdefs.h"
8917 /* Override any gcc2 internal prototype to avoid an error.  */
8918 /* We use char because int might match the return type of a gcc2
8919     builtin and then its argument prototype would still apply.  */
8920 char getprpwnam();
8921
8922 int main() {
8923 getprpwnam()
8924 ; return 0; }
8925 EOF
8926 if { (eval echo configure:8927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8927   rm -rf conftest*
8928   eval "ac_cv_lib_$ac_lib_var=yes"
8929 else
8930   echo "configure: failed program was:" >&5
8931   cat conftest.$ac_ext >&5
8932   rm -rf conftest*
8933   eval "ac_cv_lib_$ac_lib_var=no"
8934 fi
8935 rm -f conftest*
8936 LIBS="$ac_save_LIBS"
8937
8938 fi
8939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8940   echo "$ac_t""yes" 1>&6
8941     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8942     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8943   cat >> confdefs.h <<EOF
8944 #define $ac_tr_lib 1
8945 EOF
8946
8947   LIBS="-lsec $LIBS"
8948
8949 else
8950   echo "$ac_t""no" 1>&6
8951 fi
8952  
8953      for ac_func in getprpwnam
8954 do
8955 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8956 echo "configure:8957: checking for $ac_func" >&5
8957 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8958   echo $ac_n "(cached) $ac_c" 1>&6
8959 else
8960   cat > conftest.$ac_ext <<EOF
8961 #line 8962 "configure"
8962 #include "confdefs.h"
8963 /* System header to define __stub macros and hopefully few prototypes,
8964     which can conflict with char $ac_func(); below.  */
8965 #include <assert.h>
8966 /* Override any gcc2 internal prototype to avoid an error.  */
8967 /* We use char because int might match the return type of a gcc2
8968     builtin and then its argument prototype would still apply.  */
8969 char $ac_func();
8970
8971 int main() {
8972
8973 /* The GNU C library defines this for functions which it implements
8974     to always fail with ENOSYS.  Some functions are actually named
8975     something starting with __ and the normal name is an alias.  */
8976 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8977 choke me
8978 #else
8979 $ac_func();
8980 #endif
8981
8982 ; return 0; }
8983 EOF
8984 if { (eval echo configure:8985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8985   rm -rf conftest*
8986   eval "ac_cv_func_$ac_func=yes"
8987 else
8988   echo "configure: failed program was:" >&5
8989   cat conftest.$ac_ext >&5
8990   rm -rf conftest*
8991   eval "ac_cv_func_$ac_func=no"
8992 fi
8993 rm -f conftest*
8994 fi
8995
8996 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8997   echo "$ac_t""yes" 1>&6
8998     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8999   cat >> confdefs.h <<EOF
9000 #define $ac_tr_func 1
9001 EOF
9002  
9003 else
9004   echo "$ac_t""no" 1>&6
9005 fi
9006 done
9007
9008   ;;
9009   esac
9010
9011
9012 # this bit needs to be modified for each OS that is suported by
9013 # smbwrapper. You need to specify how to created a shared library and
9014 # how to compile C code to produce PIC object files
9015
9016 # these are the defaults, good for lots of systems
9017 HOST_OS="$host_os"
9018 LDSHFLAGS="-shared"
9019 SONAMEFLAG="#"
9020 SHLD="\${CC}"
9021 PICFLAG=""
9022 PICSUFFIX="po"
9023 POBAD_CC="#"
9024 SHLIBEXT="so"
9025 # Assume non-shared by default and override below
9026 BLDSHARED="false"
9027 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
9028 echo "configure:9029: checking ability to build shared libraries" >&5
9029
9030 # and these are for particular systems
9031 case "$host_os" in
9032                 *linux*)   cat >> confdefs.h <<\EOF
9033 #define LINUX 1
9034 EOF
9035
9036                         BLDSHARED="true"
9037                         LDSHFLAGS="-shared" 
9038                         DYNEXP="-Wl,--export-dynamic"
9039                         PICFLAG="-fPIC"
9040                         SONAMEFLAG="-Wl,-soname="
9041                         cat >> confdefs.h <<\EOF
9042 #define STAT_ST_BLOCKSIZE 512
9043 EOF
9044
9045                         ;;
9046                 *solaris*) cat >> confdefs.h <<\EOF
9047 #define SUNOS5 1
9048 EOF
9049
9050                         BLDSHARED="true"
9051                         LDSHFLAGS="-G"
9052                         SONAMEFLAG="-h "
9053                         if test "${GCC}" = "yes"; then
9054                                 PICFLAG="-fPIC"
9055                                 if test "${ac_cv_prog_gnu_ld}" = "yes"; then
9056                                         DYNEXP="-Wl,-E"
9057                                 fi
9058                         else
9059                                 PICFLAG="-KPIC"
9060                                 ## ${CFLAGS} added for building 64-bit shared 
9061                                 ## libs using Sun's Compiler
9062                                 LDSHFLAGS="-G \${CFLAGS}"
9063                                 POBAD_CC=""
9064                                 PICSUFFIX="po.o"
9065                         fi
9066                         cat >> confdefs.h <<\EOF
9067 #define STAT_ST_BLOCKSIZE 512
9068 EOF
9069
9070                         ;;
9071                 *sunos*) cat >> confdefs.h <<\EOF
9072 #define SUNOS4 1
9073 EOF
9074
9075                         BLDSHARED="true"
9076                         LDSHFLAGS="-G"
9077                         SONAMEFLAG="-Wl,-h,"
9078                         PICFLAG="-KPIC"   # Is this correct for SunOS
9079                         cat >> confdefs.h <<\EOF
9080 #define STAT_ST_BLOCKSIZE 512
9081 EOF
9082
9083                         ;;
9084                 *freebsd*)  BLDSHARED="true"
9085                         LDSHFLAGS="-shared"
9086                         DYNEXP="-Wl,--export-dynamic"
9087                         SONAMEFLAG="-Wl,-soname,"
9088                         PICFLAG="-fPIC -DPIC"
9089                         cat >> confdefs.h <<\EOF
9090 #define STAT_ST_BLOCKSIZE 512
9091 EOF
9092
9093                         ;;
9094                 *openbsd*)  BLDSHARED="true"
9095                         LDSHFLAGS="-shared"
9096                         DYNEXP="-Wl,-Bdynamic"
9097                         SONAMEFLAG="-Wl,-soname,"
9098                         PICFLAG="-fPIC"
9099                         cat >> confdefs.h <<\EOF
9100 #define STAT_ST_BLOCKSIZE 512
9101 EOF
9102
9103                         ;;
9104                 *irix*) cat >> confdefs.h <<\EOF
9105 #define IRIX 1
9106 EOF
9107
9108                         case "$host_os" in
9109                         *irix6*) cat >> confdefs.h <<\EOF
9110 #define IRIX6 1
9111 EOF
9112
9113                         ;;
9114                         esac
9115                         ATTEMPT_WRAP32_BUILD=yes
9116                         BLDSHARED="true"
9117                         LDSHFLAGS="-set_version sgi1.0 -shared"
9118                         SONAMEFLAG="-soname "
9119                         SHLD="\${LD}"
9120                         if test "${GCC}" = "yes"; then
9121                                 PICFLAG="-fPIC"
9122                         else 
9123                                 PICFLAG="-KPIC"
9124                         fi
9125                         cat >> confdefs.h <<\EOF
9126 #define STAT_ST_BLOCKSIZE 512
9127 EOF
9128
9129                         ;;
9130                 *aix*) cat >> confdefs.h <<\EOF
9131 #define AIX 1
9132 EOF
9133
9134                         BLDSHARED="true"
9135                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
9136                         DYNEXP="-Wl,-brtl,-bexpall"
9137                         PICFLAG="-O2"
9138                         if test "${GCC}" != "yes"; then
9139                                 ## for funky AIX compiler using strncpy()
9140                                 CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000"
9141                         fi
9142
9143                         cat >> confdefs.h <<\EOF
9144 #define STAT_ST_BLOCKSIZE DEV_BSIZE
9145 EOF
9146
9147                         ;;
9148                 *hpux*) cat >> confdefs.h <<\EOF
9149 #define HPUX 1
9150 EOF
9151
9152                         SHLIBEXT="sl"
9153                         # Use special PIC flags for the native HP-UX compiler.
9154                         if test $ac_cv_prog_cc_Ae = yes; then
9155                                 BLDSHARED="true"
9156                                 SHLD="/usr/bin/ld"
9157                                 LDSHFLAGS="-B symbolic -b -z"
9158                                 SONAMEFLAG="+h "
9159                                 PICFLAG="+z"
9160                         fi
9161                         DYNEXP="-Wl,-E"
9162                         cat >> confdefs.h <<\EOF
9163 #define STAT_ST_BLOCKSIZE 8192
9164 EOF
9165
9166                         ;;
9167                 *qnx*) cat >> confdefs.h <<\EOF
9168 #define QNX 1
9169 EOF
9170
9171                         cat >> confdefs.h <<\EOF
9172 #define STAT_ST_BLOCKSIZE 512
9173 EOF
9174
9175                         ;;
9176                 *osf*) cat >> confdefs.h <<\EOF
9177 #define OSF1 1
9178 EOF
9179
9180                         BLDSHARED="true"
9181                         LDSHFLAGS="-shared"
9182                         SONAMEFLAG="-Wl,-soname,"
9183                         PICFLAG="-fPIC"
9184                         cat >> confdefs.h <<\EOF
9185 #define STAT_ST_BLOCKSIZE 512
9186 EOF
9187
9188                         ;;
9189                 *sco*) cat >> confdefs.h <<\EOF
9190 #define SCO 1
9191 EOF
9192
9193                         cat >> confdefs.h <<\EOF
9194 #define STAT_ST_BLOCKSIZE 512
9195 EOF
9196
9197                         ;;
9198                 *unixware*) cat >> confdefs.h <<\EOF
9199 #define UNIXWARE 1
9200 EOF
9201
9202                         BLDSHARED="true"
9203                         LDSHFLAGS="-shared"
9204                         SONAMEFLAG="-Wl,-soname,"
9205                         PICFLAG="-KPIC"
9206                         cat >> confdefs.h <<\EOF
9207 #define STAT_ST_BLOCKSIZE 512
9208 EOF
9209
9210                         ;;
9211                 *next2*) cat >> confdefs.h <<\EOF
9212 #define NEXT2 1
9213 EOF
9214
9215                         cat >> confdefs.h <<\EOF
9216 #define STAT_ST_BLOCKSIZE 512
9217 EOF
9218
9219                         ;;
9220                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
9221 set dummy groff; ac_word=$2
9222 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9223 echo "configure:9224: checking for $ac_word" >&5
9224 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
9225   echo $ac_n "(cached) $ac_c" 1>&6
9226 else
9227   if test -n "$ROFF"; then
9228   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
9229 else
9230   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
9231   ac_dummy="$PATH"
9232   for ac_dir in $ac_dummy; do
9233     test -z "$ac_dir" && ac_dir=.
9234     if test -f $ac_dir/$ac_word; then
9235       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
9236       break
9237     fi
9238   done
9239   IFS="$ac_save_ifs"
9240 fi
9241 fi
9242 ROFF="$ac_cv_prog_ROFF"
9243 if test -n "$ROFF"; then
9244   echo "$ac_t""$ROFF" 1>&6
9245 else
9246   echo "$ac_t""no" 1>&6
9247 fi
9248
9249                         cat >> confdefs.h <<\EOF
9250 #define STAT_ST_BLOCKSIZE 512
9251 EOF
9252
9253                         ;;
9254                 *sysv4*) cat >> confdefs.h <<\EOF
9255 #define SYSV 1
9256 EOF
9257
9258                         case "$host" in
9259                                 *-univel-*)     if  test "$GCC" != yes ; then
9260                                                 cat >> confdefs.h <<\EOF
9261 #define HAVE_MEMSET 1
9262 EOF
9263
9264                                         fi
9265                                         LDSHFLAGS="-G"
9266                                         DYNEXP="-Bexport"
9267                                 ;;
9268                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
9269 #define RELIANTUNIX 1
9270 EOF
9271 ;;
9272                         esac
9273                         cat >> confdefs.h <<\EOF
9274 #define STAT_ST_BLOCKSIZE 512
9275 EOF
9276
9277                         ;;
9278
9279                 *sysv5*) cat >> confdefs.h <<\EOF
9280 #define SYSV 1
9281 EOF
9282
9283                         if  test "$GCC" != yes ; then
9284                                 cat >> confdefs.h <<\EOF
9285 #define HAVE_MEMSET 1
9286 EOF
9287
9288                         fi
9289                         LDSHFLAGS="-G"
9290                         cat >> confdefs.h <<\EOF
9291 #define STAT_ST_BLOCKSIZE 512
9292 EOF
9293
9294                         ;;
9295                 *)
9296                         cat >> confdefs.h <<\EOF
9297 #define STAT_ST_BLOCKSIZE 512
9298 EOF
9299
9300                         ;;
9301 esac
9302
9303 echo "$ac_t""$BLDSHARED" 1>&6
9304 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
9305 echo "configure:9306: checking linker flags for shared libraries" >&5
9306 echo "$ac_t""$LDSHFLAGS" 1>&6
9307 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
9308 echo "configure:9309: checking compiler flags for position-independent code" >&5
9309 echo "$ac_t""$PICFLAGS" 1>&6
9310
9311 #######################################################
9312 # test whether building a shared library actually works
9313 if test $BLDSHARED = true; then
9314 echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6
9315 echo "configure:9316: checking whether building shared libraries actually works" >&5
9316 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then
9317   echo $ac_n "(cached) $ac_c" 1>&6
9318 else
9319   
9320    ac_cv_shlib_works=no
9321    # try building a trivial shared library
9322    if test "$PICSUFFIX" = "po"; then
9323      $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
9324        $CC $CPPFLAGS $CFLAGS `eval echo $LDSHFLAGS` -o shlib.so shlib.po &&
9325        ac_cv_shlib_works=yes
9326    else
9327      $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.$PICSUFFIX ${srcdir-.}/tests/shlib.c &&
9328        mv shlib.$PICSUFFIX shlib.po &&
9329        $CC $CPPFLAGS $CFLAGS `eval echo $LDSHFLAGS` -o shlib.so shlib.po &&
9330        ac_cv_shlib_works=yes
9331    fi
9332    rm -f shlib.so shlib.po
9333
9334 fi
9335
9336 echo "$ac_t""$ac_cv_shlib_works" 1>&6
9337 if test $ac_cv_shlib_works = no; then
9338    BLDSHARED=false
9339 fi
9340 fi
9341
9342
9343 # this updates our target list if we can build shared libs
9344 if test $BLDSHARED = true; then
9345    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
9346 else
9347    LIBSMBCLIENT_SHARED=
9348 fi
9349
9350 ################
9351
9352 echo $ac_n "checking for long long""... $ac_c" 1>&6
9353 echo "configure:9354: checking for long long" >&5
9354 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
9355   echo $ac_n "(cached) $ac_c" 1>&6
9356 else
9357   
9358 if test "$cross_compiling" = yes; then
9359   samba_cv_have_longlong=cross
9360 else
9361   cat > conftest.$ac_ext <<EOF
9362 #line 9363 "configure"
9363 #include "confdefs.h"
9364 #include <stdio.h>
9365 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
9366 EOF
9367 if { (eval echo configure:9368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9368 then
9369   samba_cv_have_longlong=yes
9370 else
9371   echo "configure: failed program was:" >&5
9372   cat conftest.$ac_ext >&5
9373   rm -fr conftest*
9374   samba_cv_have_longlong=no
9375 fi
9376 rm -fr conftest*
9377 fi
9378
9379 fi
9380
9381 echo "$ac_t""$samba_cv_have_longlong" 1>&6
9382 if test x"$samba_cv_have_longlong" = x"yes"; then
9383     cat >> confdefs.h <<\EOF
9384 #define HAVE_LONGLONG 1
9385 EOF
9386
9387 fi
9388
9389 #
9390 # Check if the compiler supports the LL prefix on long long integers.
9391 # AIX needs this.
9392
9393 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
9394 echo "configure:9395: checking for LL suffix on long long integers" >&5
9395 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
9396   echo $ac_n "(cached) $ac_c" 1>&6
9397 else
9398   
9399     cat > conftest.$ac_ext <<EOF
9400 #line 9401 "configure"
9401 #include "confdefs.h"
9402 #include <stdio.h>
9403 int main() {
9404 long long i = 0x8000000000LL
9405 ; return 0; }
9406 EOF
9407 if { (eval echo configure:9408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9408   rm -rf conftest*
9409   samba_cv_compiler_supports_ll=yes
9410 else
9411   echo "configure: failed program was:" >&5
9412   cat conftest.$ac_ext >&5
9413   rm -rf conftest*
9414   samba_cv_compiler_supports_ll=no
9415 fi
9416 rm -f conftest*
9417 fi
9418
9419 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
9420 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
9421    cat >> confdefs.h <<\EOF
9422 #define COMPILER_SUPPORTS_LL 1
9423 EOF
9424
9425 fi
9426
9427   
9428 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
9429 echo "configure:9430: checking for 64 bit off_t" >&5
9430 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
9431   echo $ac_n "(cached) $ac_c" 1>&6
9432 else
9433   
9434 if test "$cross_compiling" = yes; then
9435   samba_cv_SIZEOF_OFF_T=cross
9436 else
9437   cat > conftest.$ac_ext <<EOF
9438 #line 9439 "configure"
9439 #include "confdefs.h"
9440 #include <stdio.h>
9441 #include <sys/stat.h>
9442 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
9443 EOF
9444 if { (eval echo configure:9445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9445 then
9446   samba_cv_SIZEOF_OFF_T=yes
9447 else
9448   echo "configure: failed program was:" >&5
9449   cat conftest.$ac_ext >&5
9450   rm -fr conftest*
9451   samba_cv_SIZEOF_OFF_T=no
9452 fi
9453 rm -fr conftest*
9454 fi
9455
9456 fi
9457
9458 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
9459 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
9460     cat >> confdefs.h <<\EOF
9461 #define SIZEOF_OFF_T 8
9462 EOF
9463
9464 fi
9465
9466 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
9467 echo "configure:9468: checking for off64_t" >&5
9468 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
9469   echo $ac_n "(cached) $ac_c" 1>&6
9470 else
9471   
9472 if test "$cross_compiling" = yes; then
9473   samba_cv_HAVE_OFF64_T=cross
9474 else
9475   cat > conftest.$ac_ext <<EOF
9476 #line 9477 "configure"
9477 #include "confdefs.h"
9478
9479 #if defined(HAVE_UNISTD_H)
9480 #include <unistd.h>
9481 #endif
9482 #include <stdio.h>
9483 #include <sys/stat.h>
9484 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9485 EOF
9486 if { (eval echo configure:9487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9487 then
9488   samba_cv_HAVE_OFF64_T=yes
9489 else
9490   echo "configure: failed program was:" >&5
9491   cat conftest.$ac_ext >&5
9492   rm -fr conftest*
9493   samba_cv_HAVE_OFF64_T=no
9494 fi
9495 rm -fr conftest*
9496 fi
9497
9498 fi
9499
9500 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
9501 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
9502     cat >> confdefs.h <<\EOF
9503 #define HAVE_OFF64_T 1
9504 EOF
9505
9506 fi
9507
9508 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
9509 echo "configure:9510: checking for 64 bit ino_t" >&5
9510 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
9511   echo $ac_n "(cached) $ac_c" 1>&6
9512 else
9513   
9514 if test "$cross_compiling" = yes; then
9515   samba_cv_SIZEOF_INO_T=cross
9516 else
9517   cat > conftest.$ac_ext <<EOF
9518 #line 9519 "configure"
9519 #include "confdefs.h"
9520 #include <stdio.h>
9521 #include <sys/stat.h>
9522 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
9523 EOF
9524 if { (eval echo configure:9525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9525 then
9526   samba_cv_SIZEOF_INO_T=yes
9527 else
9528   echo "configure: failed program was:" >&5
9529   cat conftest.$ac_ext >&5
9530   rm -fr conftest*
9531   samba_cv_SIZEOF_INO_T=no
9532 fi
9533 rm -fr conftest*
9534 fi
9535
9536 fi
9537
9538 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
9539 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
9540     cat >> confdefs.h <<\EOF
9541 #define SIZEOF_INO_T 8
9542 EOF
9543
9544 fi
9545
9546 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
9547 echo "configure:9548: checking for ino64_t" >&5
9548 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
9549   echo $ac_n "(cached) $ac_c" 1>&6
9550 else
9551   
9552 if test "$cross_compiling" = yes; then
9553   samba_cv_HAVE_INO64_T=cross
9554 else
9555   cat > conftest.$ac_ext <<EOF
9556 #line 9557 "configure"
9557 #include "confdefs.h"
9558
9559 #if defined(HAVE_UNISTD_H)
9560 #include <unistd.h>
9561 #endif
9562 #include <stdio.h>
9563 #include <sys/stat.h>
9564 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9565 EOF
9566 if { (eval echo configure:9567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9567 then
9568   samba_cv_HAVE_INO64_T=yes
9569 else
9570   echo "configure: failed program was:" >&5
9571   cat conftest.$ac_ext >&5
9572   rm -fr conftest*
9573   samba_cv_HAVE_INO64_T=no
9574 fi
9575 rm -fr conftest*
9576 fi
9577
9578 fi
9579
9580 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9581 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9582     cat >> confdefs.h <<\EOF
9583 #define HAVE_INO64_T 1
9584 EOF
9585
9586 fi
9587
9588 echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
9589 echo "configure:9590: checking for dev64_t" >&5
9590 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then
9591   echo $ac_n "(cached) $ac_c" 1>&6
9592 else
9593   
9594 if test "$cross_compiling" = yes; then
9595   samba_cv_HAVE_DEV64_T=cross
9596 else
9597   cat > conftest.$ac_ext <<EOF
9598 #line 9599 "configure"
9599 #include "confdefs.h"
9600
9601 #if defined(HAVE_UNISTD_H)
9602 #include <unistd.h>
9603 #endif
9604 #include <stdio.h>
9605 #include <sys/stat.h>
9606 main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9607 EOF
9608 if { (eval echo configure:9609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9609 then
9610   samba_cv_HAVE_DEV64_T=yes
9611 else
9612   echo "configure: failed program was:" >&5
9613   cat conftest.$ac_ext >&5
9614   rm -fr conftest*
9615   samba_cv_HAVE_DEV64_T=no
9616 fi
9617 rm -fr conftest*
9618 fi
9619
9620 fi
9621
9622 echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6
9623 if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
9624     cat >> confdefs.h <<\EOF
9625 #define HAVE_DEV64_T 1
9626 EOF
9627
9628 fi
9629
9630 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9631 echo "configure:9632: checking for struct dirent64" >&5
9632 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9633   echo $ac_n "(cached) $ac_c" 1>&6
9634 else
9635   
9636 cat > conftest.$ac_ext <<EOF
9637 #line 9638 "configure"
9638 #include "confdefs.h"
9639
9640 #if defined(HAVE_UNISTD_H)
9641 #include <unistd.h>
9642 #endif
9643 #include <sys/types.h>
9644 #include <dirent.h>
9645 int main() {
9646 struct dirent64 de;
9647 ; return 0; }
9648 EOF
9649 if { (eval echo configure:9650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9650   rm -rf conftest*
9651   samba_cv_HAVE_STRUCT_DIRENT64=yes
9652 else
9653   echo "configure: failed program was:" >&5
9654   cat conftest.$ac_ext >&5
9655   rm -rf conftest*
9656   samba_cv_HAVE_STRUCT_DIRENT64=no
9657 fi
9658 rm -f conftest*
9659 fi
9660
9661 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9662 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes" && test x"$ac_cv_func_readdir64" = x"yes"; then
9663     cat >> confdefs.h <<\EOF
9664 #define HAVE_STRUCT_DIRENT64 1
9665 EOF
9666
9667 fi
9668
9669 echo $ac_n "checking for major macro""... $ac_c" 1>&6
9670 echo "configure:9671: checking for major macro" >&5
9671 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then
9672   echo $ac_n "(cached) $ac_c" 1>&6
9673 else
9674   
9675 if test "$cross_compiling" = yes; then
9676   samba_cv_HAVE_DEVICE_MAJOR_FN=cross
9677 else
9678   cat > conftest.$ac_ext <<EOF
9679 #line 9680 "configure"
9680 #include "confdefs.h"
9681
9682 #if defined(HAVE_UNISTD_H)
9683 #include <unistd.h>
9684 #endif
9685 #include <sys/types.h>
9686 main() { dev_t dev; int i = major(dev); return 0; }
9687 EOF
9688 if { (eval echo configure:9689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9689 then
9690   samba_cv_HAVE_DEVICE_MAJOR_FN=yes
9691 else
9692   echo "configure: failed program was:" >&5
9693   cat conftest.$ac_ext >&5
9694   rm -fr conftest*
9695   samba_cv_HAVE_DEVICE_MAJOR_FN=no
9696 fi
9697 rm -fr conftest*
9698 fi
9699
9700 fi
9701
9702 echo "$ac_t""$samba_cv_HAVE_DEVICE_MAJOR_FN" 1>&6
9703 if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then
9704     cat >> confdefs.h <<\EOF
9705 #define HAVE_DEVICE_MAJOR_FN 1
9706 EOF
9707
9708 fi
9709
9710 echo $ac_n "checking for minor macro""... $ac_c" 1>&6
9711 echo "configure:9712: checking for minor macro" >&5
9712 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then
9713   echo $ac_n "(cached) $ac_c" 1>&6
9714 else
9715   
9716 if test "$cross_compiling" = yes; then
9717   samba_cv_HAVE_DEVICE_MINOR_FN=cross
9718 else
9719   cat > conftest.$ac_ext <<EOF
9720 #line 9721 "configure"
9721 #include "confdefs.h"
9722
9723 #if defined(HAVE_UNISTD_H)
9724 #include <unistd.h>
9725 #endif
9726 #include <sys/types.h>
9727 main() { dev_t dev; int i = minor(dev); return 0; }
9728 EOF
9729 if { (eval echo configure:9730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9730 then
9731   samba_cv_HAVE_DEVICE_MINOR_FN=yes
9732 else
9733   echo "configure: failed program was:" >&5
9734   cat conftest.$ac_ext >&5
9735   rm -fr conftest*
9736   samba_cv_HAVE_DEVICE_MINOR_FN=no
9737 fi
9738 rm -fr conftest*
9739 fi
9740
9741 fi
9742
9743 echo "$ac_t""$samba_cv_HAVE_DEVICE_MINOR_FN" 1>&6
9744 if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then
9745     cat >> confdefs.h <<\EOF
9746 #define HAVE_DEVICE_MINOR_FN 1
9747 EOF
9748
9749 fi
9750
9751 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9752 echo "configure:9753: checking for unsigned char" >&5
9753 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9754   echo $ac_n "(cached) $ac_c" 1>&6
9755 else
9756   
9757 if test "$cross_compiling" = yes; then
9758   samba_cv_HAVE_UNSIGNED_CHAR=cross
9759 else
9760   cat > conftest.$ac_ext <<EOF
9761 #line 9762 "configure"
9762 #include "confdefs.h"
9763 #include <stdio.h>
9764 main() { char c; c=250; exit((c > 0)?0:1); }
9765 EOF
9766 if { (eval echo configure:9767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9767 then
9768   samba_cv_HAVE_UNSIGNED_CHAR=yes
9769 else
9770   echo "configure: failed program was:" >&5
9771   cat conftest.$ac_ext >&5
9772   rm -fr conftest*
9773   samba_cv_HAVE_UNSIGNED_CHAR=no
9774 fi
9775 rm -fr conftest*
9776 fi
9777
9778 fi
9779
9780 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9781 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9782     cat >> confdefs.h <<\EOF
9783 #define HAVE_UNSIGNED_CHAR 1
9784 EOF
9785
9786 fi
9787
9788 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9789 echo "configure:9790: checking for sin_len in sock" >&5
9790 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9791   echo $ac_n "(cached) $ac_c" 1>&6
9792 else
9793   
9794 cat > conftest.$ac_ext <<EOF
9795 #line 9796 "configure"
9796 #include "confdefs.h"
9797 #include <sys/types.h>
9798 #include <sys/socket.h>
9799 #include <netinet/in.h>
9800 int main() {
9801 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9802 ; return 0; }
9803 EOF
9804 if { (eval echo configure:9805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9805   rm -rf conftest*
9806   samba_cv_HAVE_SOCK_SIN_LEN=yes
9807 else
9808   echo "configure: failed program was:" >&5
9809   cat conftest.$ac_ext >&5
9810   rm -rf conftest*
9811   samba_cv_HAVE_SOCK_SIN_LEN=no
9812 fi
9813 rm -f conftest*
9814 fi
9815
9816 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9817 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9818     cat >> confdefs.h <<\EOF
9819 #define HAVE_SOCK_SIN_LEN 1
9820 EOF
9821
9822 fi
9823
9824 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9825 echo "configure:9826: checking whether seekdir returns void" >&5
9826 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9827   echo $ac_n "(cached) $ac_c" 1>&6
9828 else
9829   
9830 cat > conftest.$ac_ext <<EOF
9831 #line 9832 "configure"
9832 #include "confdefs.h"
9833 #include <sys/types.h>
9834 #include <dirent.h>
9835 void seekdir(DIR *d, long loc) { return; }
9836 int main() {
9837 return 0;
9838 ; return 0; }
9839 EOF
9840 if { (eval echo configure:9841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9841   rm -rf conftest*
9842   samba_cv_SEEKDIR_RETURNS_VOID=yes
9843 else
9844   echo "configure: failed program was:" >&5
9845   cat conftest.$ac_ext >&5
9846   rm -rf conftest*
9847   samba_cv_SEEKDIR_RETURNS_VOID=no
9848 fi
9849 rm -f conftest*
9850 fi
9851
9852 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9853 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9854     cat >> confdefs.h <<\EOF
9855 #define SEEKDIR_RETURNS_VOID 1
9856 EOF
9857
9858 fi
9859
9860 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9861 echo "configure:9862: checking for __FILE__ macro" >&5
9862 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9863   echo $ac_n "(cached) $ac_c" 1>&6
9864 else
9865   
9866 cat > conftest.$ac_ext <<EOF
9867 #line 9868 "configure"
9868 #include "confdefs.h"
9869 #include <stdio.h>
9870 int main() {
9871 printf("%s\n", __FILE__);
9872 ; return 0; }
9873 EOF
9874 if { (eval echo configure:9875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9875   rm -rf conftest*
9876   samba_cv_HAVE_FILE_MACRO=yes
9877 else
9878   echo "configure: failed program was:" >&5
9879   cat conftest.$ac_ext >&5
9880   rm -rf conftest*
9881   samba_cv_HAVE_FILE_MACRO=no
9882 fi
9883 rm -f conftest*
9884 fi
9885
9886 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9887 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9888     cat >> confdefs.h <<\EOF
9889 #define HAVE_FILE_MACRO 1
9890 EOF
9891
9892 fi
9893
9894 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9895 echo "configure:9896: checking for __FUNCTION__ macro" >&5
9896 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9897   echo $ac_n "(cached) $ac_c" 1>&6
9898 else
9899   
9900 cat > conftest.$ac_ext <<EOF
9901 #line 9902 "configure"
9902 #include "confdefs.h"
9903 #include <stdio.h>
9904 int main() {
9905 printf("%s\n", __FUNCTION__);
9906 ; return 0; }
9907 EOF
9908 if { (eval echo configure:9909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9909   rm -rf conftest*
9910   samba_cv_HAVE_FUNCTION_MACRO=yes
9911 else
9912   echo "configure: failed program was:" >&5
9913   cat conftest.$ac_ext >&5
9914   rm -rf conftest*
9915   samba_cv_HAVE_FUNCTION_MACRO=no
9916 fi
9917 rm -f conftest*
9918 fi
9919
9920 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9921 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9922     cat >> confdefs.h <<\EOF
9923 #define HAVE_FUNCTION_MACRO 1
9924 EOF
9925
9926 fi
9927
9928 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9929 echo "configure:9930: checking if gettimeofday takes tz argument" >&5
9930 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9931   echo $ac_n "(cached) $ac_c" 1>&6
9932 else
9933   
9934 if test "$cross_compiling" = yes; then
9935   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9936 else
9937   cat > conftest.$ac_ext <<EOF
9938 #line 9939 "configure"
9939 #include "confdefs.h"
9940
9941 #include <sys/time.h>
9942 #include <unistd.h>
9943 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9944 EOF
9945 if { (eval echo configure:9946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9946 then
9947   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9948 else
9949   echo "configure: failed program was:" >&5
9950   cat conftest.$ac_ext >&5
9951   rm -fr conftest*
9952   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9953 fi
9954 rm -fr conftest*
9955 fi
9956
9957 fi
9958
9959 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9960 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9961     cat >> confdefs.h <<\EOF
9962 #define HAVE_GETTIMEOFDAY_TZ 1
9963 EOF
9964
9965 fi
9966
9967 echo $ac_n "checking for __va_copy""... $ac_c" 1>&6
9968 echo "configure:9969: checking for __va_copy" >&5
9969 if eval "test \"`echo '$''{'samba_cv_HAVE_VA_COPY'+set}'`\" = set"; then
9970   echo $ac_n "(cached) $ac_c" 1>&6
9971 else
9972   
9973 cat > conftest.$ac_ext <<EOF
9974 #line 9975 "configure"
9975 #include "confdefs.h"
9976 #include <stdarg.h>
9977 va_list ap1,ap2;
9978 int main() {
9979 __va_copy(ap1,ap2);
9980 ; return 0; }
9981 EOF
9982 if { (eval echo configure:9983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9983   rm -rf conftest*
9984   samba_cv_HAVE_VA_COPY=yes
9985 else
9986   echo "configure: failed program was:" >&5
9987   cat conftest.$ac_ext >&5
9988   rm -rf conftest*
9989   samba_cv_HAVE_VA_COPY=no
9990 fi
9991 rm -f conftest*
9992 fi
9993
9994 echo "$ac_t""$samba_cv_HAVE_VA_COPY" 1>&6
9995 if test x"$samba_cv_HAVE_VA_COPY" = x"yes"; then
9996     cat >> confdefs.h <<\EOF
9997 #define HAVE_VA_COPY 1
9998 EOF
9999
10000 fi
10001
10002 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
10003 echo "configure:10004: checking for C99 vsnprintf" >&5
10004 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
10005   echo $ac_n "(cached) $ac_c" 1>&6
10006 else
10007   
10008 if test "$cross_compiling" = yes; then
10009   samba_cv_HAVE_C99_VSNPRINTF=cross
10010 else
10011   cat > conftest.$ac_ext <<EOF
10012 #line 10013 "configure"
10013 #include "confdefs.h"
10014
10015 #include <sys/types.h>
10016 #include <stdarg.h>
10017 void foo(const char *format, ...) { 
10018        va_list ap;
10019        int len;
10020        char buf[5];
10021
10022        va_start(ap, format);
10023        len = vsnprintf(buf, 0, format, ap);
10024        va_end(ap);
10025        if (len != 5) exit(1);
10026
10027        va_start(ap, format);
10028        len = vsnprintf(0, 0, format, ap);
10029        va_end(ap);
10030        if (len != 5) exit(1);
10031
10032        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
10033
10034        exit(0);
10035 }
10036 main() { foo("hello"); }
10037
10038 EOF
10039 if { (eval echo configure:10040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10040 then
10041   samba_cv_HAVE_C99_VSNPRINTF=yes
10042 else
10043   echo "configure: failed program was:" >&5
10044   cat conftest.$ac_ext >&5
10045   rm -fr conftest*
10046   samba_cv_HAVE_C99_VSNPRINTF=no
10047 fi
10048 rm -fr conftest*
10049 fi
10050
10051 fi
10052
10053 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
10054 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
10055     cat >> confdefs.h <<\EOF
10056 #define HAVE_C99_VSNPRINTF 1
10057 EOF
10058
10059 fi
10060
10061 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
10062 echo "configure:10063: checking for broken readdir" >&5
10063 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
10064   echo $ac_n "(cached) $ac_c" 1>&6
10065 else
10066   
10067 if test "$cross_compiling" = yes; then
10068   samba_cv_HAVE_BROKEN_READDIR=cross
10069 else
10070   cat > conftest.$ac_ext <<EOF
10071 #line 10072 "configure"
10072 #include "confdefs.h"
10073 #include <sys/types.h>
10074 #include <dirent.h>
10075 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
10076 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
10077 di->d_name[0] == 0) exit(0); exit(1);} 
10078 EOF
10079 if { (eval echo configure:10080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10080 then
10081   samba_cv_HAVE_BROKEN_READDIR=yes
10082 else
10083   echo "configure: failed program was:" >&5
10084   cat conftest.$ac_ext >&5
10085   rm -fr conftest*
10086   samba_cv_HAVE_BROKEN_READDIR=no
10087 fi
10088 rm -fr conftest*
10089 fi
10090
10091 fi
10092
10093 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
10094 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
10095     cat >> confdefs.h <<\EOF
10096 #define HAVE_BROKEN_READDIR 1
10097 EOF
10098
10099 fi
10100
10101 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
10102 echo "configure:10103: checking for utimbuf" >&5
10103 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
10104   echo $ac_n "(cached) $ac_c" 1>&6
10105 else
10106   
10107 cat > conftest.$ac_ext <<EOF
10108 #line 10109 "configure"
10109 #include "confdefs.h"
10110 #include <sys/types.h>
10111 #include <utime.h>
10112 int main() {
10113 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
10114 ; return 0; }
10115 EOF
10116 if { (eval echo configure:10117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10117   rm -rf conftest*
10118   samba_cv_HAVE_UTIMBUF=yes
10119 else
10120   echo "configure: failed program was:" >&5
10121   cat conftest.$ac_ext >&5
10122   rm -rf conftest*
10123   samba_cv_HAVE_UTIMBUF=no
10124 fi
10125 rm -f conftest*
10126 fi
10127
10128 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
10129 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
10130     cat >> confdefs.h <<\EOF
10131 #define HAVE_UTIMBUF 1
10132 EOF
10133
10134 fi
10135
10136
10137 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
10138 do
10139 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10140 echo "configure:10141: checking for $ac_func" >&5
10141 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10142   echo $ac_n "(cached) $ac_c" 1>&6
10143 else
10144   cat > conftest.$ac_ext <<EOF
10145 #line 10146 "configure"
10146 #include "confdefs.h"
10147 /* System header to define __stub macros and hopefully few prototypes,
10148     which can conflict with char $ac_func(); below.  */
10149 #include <assert.h>
10150 /* Override any gcc2 internal prototype to avoid an error.  */
10151 /* We use char because int might match the return type of a gcc2
10152     builtin and then its argument prototype would still apply.  */
10153 char $ac_func();
10154
10155 int main() {
10156
10157 /* The GNU C library defines this for functions which it implements
10158     to always fail with ENOSYS.  Some functions are actually named
10159     something starting with __ and the normal name is an alias.  */
10160 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10161 choke me
10162 #else
10163 $ac_func();
10164 #endif
10165
10166 ; return 0; }
10167 EOF
10168 if { (eval echo configure:10169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10169   rm -rf conftest*
10170   eval "ac_cv_func_$ac_func=yes"
10171 else
10172   echo "configure: failed program was:" >&5
10173   cat conftest.$ac_ext >&5
10174   rm -rf conftest*
10175   eval "ac_cv_func_$ac_func=no"
10176 fi
10177 rm -f conftest*
10178 fi
10179
10180 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10181   echo "$ac_t""yes" 1>&6
10182     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10183   cat >> confdefs.h <<EOF
10184 #define $ac_tr_func 1
10185 EOF
10186  
10187 else
10188   echo "$ac_t""no" 1>&6
10189 fi
10190 done
10191
10192
10193 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
10194 echo "configure:10195: checking for ut_name in utmp" >&5
10195 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
10196   echo $ac_n "(cached) $ac_c" 1>&6
10197 else
10198   
10199 cat > conftest.$ac_ext <<EOF
10200 #line 10201 "configure"
10201 #include "confdefs.h"
10202 #include <sys/types.h>
10203 #include <utmp.h>
10204 int main() {
10205 struct utmp ut;  ut.ut_name[0] = 'a';
10206 ; return 0; }
10207 EOF
10208 if { (eval echo configure:10209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10209   rm -rf conftest*
10210   samba_cv_HAVE_UT_UT_NAME=yes
10211 else
10212   echo "configure: failed program was:" >&5
10213   cat conftest.$ac_ext >&5
10214   rm -rf conftest*
10215   samba_cv_HAVE_UT_UT_NAME=no
10216 fi
10217 rm -f conftest*
10218 fi
10219
10220 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
10221 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
10222     cat >> confdefs.h <<\EOF
10223 #define HAVE_UT_UT_NAME 1
10224 EOF
10225
10226 fi 
10227
10228 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
10229 echo "configure:10230: checking for ut_user in utmp" >&5
10230 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
10231   echo $ac_n "(cached) $ac_c" 1>&6
10232 else
10233   
10234 cat > conftest.$ac_ext <<EOF
10235 #line 10236 "configure"
10236 #include "confdefs.h"
10237 #include <sys/types.h>
10238 #include <utmp.h>
10239 int main() {
10240 struct utmp ut;  ut.ut_user[0] = 'a';
10241 ; return 0; }
10242 EOF
10243 if { (eval echo configure:10244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10244   rm -rf conftest*
10245   samba_cv_HAVE_UT_UT_USER=yes
10246 else
10247   echo "configure: failed program was:" >&5
10248   cat conftest.$ac_ext >&5
10249   rm -rf conftest*
10250   samba_cv_HAVE_UT_UT_USER=no
10251 fi
10252 rm -f conftest*
10253 fi
10254
10255 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
10256 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
10257     cat >> confdefs.h <<\EOF
10258 #define HAVE_UT_UT_USER 1
10259 EOF
10260
10261 fi 
10262
10263 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
10264 echo "configure:10265: checking for ut_id in utmp" >&5
10265 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
10266   echo $ac_n "(cached) $ac_c" 1>&6
10267 else
10268   
10269 cat > conftest.$ac_ext <<EOF
10270 #line 10271 "configure"
10271 #include "confdefs.h"
10272 #include <sys/types.h>
10273 #include <utmp.h>
10274 int main() {
10275 struct utmp ut;  ut.ut_id[0] = 'a';
10276 ; return 0; }
10277 EOF
10278 if { (eval echo configure:10279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10279   rm -rf conftest*
10280   samba_cv_HAVE_UT_UT_ID=yes
10281 else
10282   echo "configure: failed program was:" >&5
10283   cat conftest.$ac_ext >&5
10284   rm -rf conftest*
10285   samba_cv_HAVE_UT_UT_ID=no
10286 fi
10287 rm -f conftest*
10288 fi
10289
10290 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
10291 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
10292     cat >> confdefs.h <<\EOF
10293 #define HAVE_UT_UT_ID 1
10294 EOF
10295
10296 fi 
10297
10298 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
10299 echo "configure:10300: checking for ut_host in utmp" >&5
10300 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
10301   echo $ac_n "(cached) $ac_c" 1>&6
10302 else
10303   
10304 cat > conftest.$ac_ext <<EOF
10305 #line 10306 "configure"
10306 #include "confdefs.h"
10307 #include <sys/types.h>
10308 #include <utmp.h>
10309 int main() {
10310 struct utmp ut;  ut.ut_host[0] = 'a';
10311 ; return 0; }
10312 EOF
10313 if { (eval echo configure:10314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10314   rm -rf conftest*
10315   samba_cv_HAVE_UT_UT_HOST=yes
10316 else
10317   echo "configure: failed program was:" >&5
10318   cat conftest.$ac_ext >&5
10319   rm -rf conftest*
10320   samba_cv_HAVE_UT_UT_HOST=no
10321 fi
10322 rm -f conftest*
10323 fi
10324
10325 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
10326 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
10327     cat >> confdefs.h <<\EOF
10328 #define HAVE_UT_UT_HOST 1
10329 EOF
10330
10331 fi 
10332
10333 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
10334 echo "configure:10335: checking for ut_time in utmp" >&5
10335 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
10336   echo $ac_n "(cached) $ac_c" 1>&6
10337 else
10338   
10339 cat > conftest.$ac_ext <<EOF
10340 #line 10341 "configure"
10341 #include "confdefs.h"
10342 #include <sys/types.h>
10343 #include <utmp.h>
10344 int main() {
10345 struct utmp ut;  time_t t; ut.ut_time = t;
10346 ; return 0; }
10347 EOF
10348 if { (eval echo configure:10349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10349   rm -rf conftest*
10350   samba_cv_HAVE_UT_UT_TIME=yes
10351 else
10352   echo "configure: failed program was:" >&5
10353   cat conftest.$ac_ext >&5
10354   rm -rf conftest*
10355   samba_cv_HAVE_UT_UT_TIME=no
10356 fi
10357 rm -f conftest*
10358 fi
10359
10360 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
10361 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
10362     cat >> confdefs.h <<\EOF
10363 #define HAVE_UT_UT_TIME 1
10364 EOF
10365
10366 fi 
10367
10368 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
10369 echo "configure:10370: checking for ut_tv in utmp" >&5
10370 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
10371   echo $ac_n "(cached) $ac_c" 1>&6
10372 else
10373   
10374 cat > conftest.$ac_ext <<EOF
10375 #line 10376 "configure"
10376 #include "confdefs.h"
10377 #include <sys/types.h>
10378 #include <utmp.h>
10379 int main() {
10380 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
10381 ; return 0; }
10382 EOF
10383 if { (eval echo configure:10384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10384   rm -rf conftest*
10385   samba_cv_HAVE_UT_UT_TV=yes
10386 else
10387   echo "configure: failed program was:" >&5
10388   cat conftest.$ac_ext >&5
10389   rm -rf conftest*
10390   samba_cv_HAVE_UT_UT_TV=no
10391 fi
10392 rm -f conftest*
10393 fi
10394
10395 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
10396 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
10397     cat >> confdefs.h <<\EOF
10398 #define HAVE_UT_UT_TV 1
10399 EOF
10400
10401 fi 
10402
10403 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
10404 echo "configure:10405: checking for ut_type in utmp" >&5
10405 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
10406   echo $ac_n "(cached) $ac_c" 1>&6
10407 else
10408   
10409 cat > conftest.$ac_ext <<EOF
10410 #line 10411 "configure"
10411 #include "confdefs.h"
10412 #include <sys/types.h>
10413 #include <utmp.h>
10414 int main() {
10415 struct utmp ut;  ut.ut_type = 0;
10416 ; return 0; }
10417 EOF
10418 if { (eval echo configure:10419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10419   rm -rf conftest*
10420   samba_cv_HAVE_UT_UT_TYPE=yes
10421 else
10422   echo "configure: failed program was:" >&5
10423   cat conftest.$ac_ext >&5
10424   rm -rf conftest*
10425   samba_cv_HAVE_UT_UT_TYPE=no
10426 fi
10427 rm -f conftest*
10428 fi
10429
10430 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
10431 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
10432     cat >> confdefs.h <<\EOF
10433 #define HAVE_UT_UT_TYPE 1
10434 EOF
10435
10436 fi 
10437
10438 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
10439 echo "configure:10440: checking for ut_pid in utmp" >&5
10440 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
10441   echo $ac_n "(cached) $ac_c" 1>&6
10442 else
10443   
10444 cat > conftest.$ac_ext <<EOF
10445 #line 10446 "configure"
10446 #include "confdefs.h"
10447 #include <sys/types.h>
10448 #include <utmp.h>
10449 int main() {
10450 struct utmp ut;  ut.ut_pid = 0;
10451 ; return 0; }
10452 EOF
10453 if { (eval echo configure:10454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10454   rm -rf conftest*
10455   samba_cv_HAVE_UT_UT_PID=yes
10456 else
10457   echo "configure: failed program was:" >&5
10458   cat conftest.$ac_ext >&5
10459   rm -rf conftest*
10460   samba_cv_HAVE_UT_UT_PID=no
10461 fi
10462 rm -f conftest*
10463 fi
10464
10465 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
10466 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
10467     cat >> confdefs.h <<\EOF
10468 #define HAVE_UT_UT_PID 1
10469 EOF
10470
10471 fi 
10472
10473 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
10474 echo "configure:10475: checking for ut_exit in utmp" >&5
10475 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
10476   echo $ac_n "(cached) $ac_c" 1>&6
10477 else
10478   
10479 cat > conftest.$ac_ext <<EOF
10480 #line 10481 "configure"
10481 #include "confdefs.h"
10482 #include <sys/types.h>
10483 #include <utmp.h>
10484 int main() {
10485 struct utmp ut;  ut.ut_exit.e_exit = 0;
10486 ; return 0; }
10487 EOF
10488 if { (eval echo configure:10489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10489   rm -rf conftest*
10490   samba_cv_HAVE_UT_UT_EXIT=yes
10491 else
10492   echo "configure: failed program was:" >&5
10493   cat conftest.$ac_ext >&5
10494   rm -rf conftest*
10495   samba_cv_HAVE_UT_UT_EXIT=no
10496 fi
10497 rm -f conftest*
10498 fi
10499
10500 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
10501 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
10502     cat >> confdefs.h <<\EOF
10503 #define HAVE_UT_UT_EXIT 1
10504 EOF
10505
10506 fi 
10507
10508 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
10509 echo "configure:10510: checking for ut_addr in utmp" >&5
10510 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
10511   echo $ac_n "(cached) $ac_c" 1>&6
10512 else
10513   
10514 cat > conftest.$ac_ext <<EOF
10515 #line 10516 "configure"
10516 #include "confdefs.h"
10517 #include <sys/types.h>
10518 #include <utmp.h>
10519 int main() {
10520 struct utmp ut;  ut.ut_addr = 0;
10521 ; return 0; }
10522 EOF
10523 if { (eval echo configure:10524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10524   rm -rf conftest*
10525   samba_cv_HAVE_UT_UT_ADDR=yes
10526 else
10527   echo "configure: failed program was:" >&5
10528   cat conftest.$ac_ext >&5
10529   rm -rf conftest*
10530   samba_cv_HAVE_UT_UT_ADDR=no
10531 fi
10532 rm -f conftest*
10533 fi
10534
10535 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
10536 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
10537     cat >> confdefs.h <<\EOF
10538 #define HAVE_UT_UT_ADDR 1
10539 EOF
10540
10541 fi 
10542
10543 if test x$ac_cv_func_pututline = xyes ; then
10544   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
10545 echo "configure:10546: checking whether pututline returns pointer" >&5
10546 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
10547   echo $ac_n "(cached) $ac_c" 1>&6
10548 else
10549   
10550   cat > conftest.$ac_ext <<EOF
10551 #line 10552 "configure"
10552 #include "confdefs.h"
10553 #include <sys/types.h>
10554 #include <utmp.h>
10555 int main() {
10556 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
10557 ; return 0; }
10558 EOF
10559 if { (eval echo configure:10560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10560   rm -rf conftest*
10561   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
10562 else
10563   echo "configure: failed program was:" >&5
10564   cat conftest.$ac_ext >&5
10565   rm -rf conftest*
10566   samba_cv_PUTUTLINE_RETURNS_UTMP=no
10567 fi
10568 rm -f conftest*
10569 fi
10570
10571 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
10572   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
10573       cat >> confdefs.h <<\EOF
10574 #define PUTUTLINE_RETURNS_UTMP 1
10575 EOF
10576
10577   fi
10578 fi
10579
10580 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
10581 echo "configure:10582: checking for ut_syslen in utmpx" >&5
10582 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
10583   echo $ac_n "(cached) $ac_c" 1>&6
10584 else
10585   
10586 cat > conftest.$ac_ext <<EOF
10587 #line 10588 "configure"
10588 #include "confdefs.h"
10589 #include <sys/types.h>
10590 #include <utmpx.h>
10591 int main() {
10592 struct utmpx ux;  ux.ut_syslen = 0;
10593 ; return 0; }
10594 EOF
10595 if { (eval echo configure:10596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10596   rm -rf conftest*
10597   samba_cv_HAVE_UX_UT_SYSLEN=yes
10598 else
10599   echo "configure: failed program was:" >&5
10600   cat conftest.$ac_ext >&5
10601   rm -rf conftest*
10602   samba_cv_HAVE_UX_UT_SYSLEN=no
10603 fi
10604 rm -f conftest*
10605 fi
10606
10607 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
10608 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
10609     cat >> confdefs.h <<\EOF
10610 #define HAVE_UX_UT_SYSLEN 1
10611 EOF
10612
10613 fi 
10614
10615
10616 #################################################
10617 # check for libiconv support
10618 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
10619 echo "configure:10620: checking whether to use libiconv" >&5
10620 # Check whether --with-libiconv or --without-libiconv was given.
10621 if test "${with_libiconv+set}" = set; then
10622   withval="$with_libiconv"
10623    case "$withval" in
10624   no)
10625     echo "$ac_t""no" 1>&6
10626     ;;
10627   *)
10628     echo "$ac_t""yes" 1>&6
10629     CFLAGS="$CFLAGS -I$withval/include"
10630     LDFLAGS="$LDFLAGS -L$withval/lib"
10631     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
10632 echo "configure:10633: checking for iconv_open in -liconv" >&5
10633 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
10634 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10635   echo $ac_n "(cached) $ac_c" 1>&6
10636 else
10637   ac_save_LIBS="$LIBS"
10638 LIBS="-liconv  $LIBS"
10639 cat > conftest.$ac_ext <<EOF
10640 #line 10641 "configure"
10641 #include "confdefs.h"
10642 /* Override any gcc2 internal prototype to avoid an error.  */
10643 /* We use char because int might match the return type of a gcc2
10644     builtin and then its argument prototype would still apply.  */
10645 char iconv_open();
10646
10647 int main() {
10648 iconv_open()
10649 ; return 0; }
10650 EOF
10651 if { (eval echo configure:10652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10652   rm -rf conftest*
10653   eval "ac_cv_lib_$ac_lib_var=yes"
10654 else
10655   echo "configure: failed program was:" >&5
10656   cat conftest.$ac_ext >&5
10657   rm -rf conftest*
10658   eval "ac_cv_lib_$ac_lib_var=no"
10659 fi
10660 rm -f conftest*
10661 LIBS="$ac_save_LIBS"
10662
10663 fi
10664 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10665   echo "$ac_t""yes" 1>&6
10666     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10667     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10668   cat >> confdefs.h <<EOF
10669 #define $ac_tr_lib 1
10670 EOF
10671
10672   LIBS="-liconv $LIBS"
10673
10674 else
10675   echo "$ac_t""no" 1>&6
10676 fi
10677
10678     cat >> confdefs.h <<EOF
10679 #define WITH_LIBICONV "${withval}"
10680 EOF
10681
10682     ;;
10683   esac 
10684 else
10685   echo "$ac_t""no" 1>&6
10686
10687 fi
10688
10689
10690
10691 ############
10692 # check for iconv in libc
10693 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
10694 echo "configure:10695: checking for working iconv" >&5
10695 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
10696   echo $ac_n "(cached) $ac_c" 1>&6
10697 else
10698   
10699 if test "$cross_compiling" = yes; then
10700   samba_cv_HAVE_NATIVE_ICONV=cross
10701 else
10702   cat > conftest.$ac_ext <<EOF
10703 #line 10704 "configure"
10704 #include "confdefs.h"
10705
10706 #include <iconv.h>
10707 main() {
10708        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
10709        if (cd == 0 || cd == (iconv_t)-1) return -1;
10710        return 0;
10711 }
10712
10713 EOF
10714 if { (eval echo configure:10715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10715 then
10716   samba_cv_HAVE_NATIVE_ICONV=yes
10717 else
10718   echo "configure: failed program was:" >&5
10719   cat conftest.$ac_ext >&5
10720   rm -fr conftest*
10721   samba_cv_HAVE_NATIVE_ICONV=no
10722 fi
10723 rm -fr conftest*
10724 fi
10725
10726 fi
10727
10728 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
10729 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
10730     cat >> confdefs.h <<\EOF
10731 #define HAVE_NATIVE_ICONV 1
10732 EOF
10733
10734 fi
10735
10736
10737 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
10738 echo "configure:10739: checking for Linux kernel oplocks" >&5
10739 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
10740   echo $ac_n "(cached) $ac_c" 1>&6
10741 else
10742   
10743 if test "$cross_compiling" = yes; then
10744   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
10745 else
10746   cat > conftest.$ac_ext <<EOF
10747 #line 10748 "configure"
10748 #include "confdefs.h"
10749
10750 #include <sys/types.h>
10751 #include <fcntl.h>
10752 #ifndef F_GETLEASE
10753 #define F_GETLEASE      1025
10754 #endif
10755 main() {
10756        int fd = open("/dev/null", O_RDONLY);
10757        return fcntl(fd, F_GETLEASE, 0) == -1;
10758 }
10759
10760 EOF
10761 if { (eval echo configure:10762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10762 then
10763   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10764 else
10765   echo "configure: failed program was:" >&5
10766   cat conftest.$ac_ext >&5
10767   rm -fr conftest*
10768   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10769 fi
10770 rm -fr conftest*
10771 fi
10772
10773 fi
10774
10775 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10776 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10777     cat >> confdefs.h <<\EOF
10778 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10779 EOF
10780
10781 fi
10782
10783 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10784 echo "configure:10785: checking for kernel change notify support" >&5
10785 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10786   echo $ac_n "(cached) $ac_c" 1>&6
10787 else
10788   
10789 if test "$cross_compiling" = yes; then
10790   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10791 else
10792   cat > conftest.$ac_ext <<EOF
10793 #line 10794 "configure"
10794 #include "confdefs.h"
10795
10796 #include <sys/types.h>
10797 #include <fcntl.h>
10798 #include <signal.h>
10799 #ifndef F_NOTIFY
10800 #define F_NOTIFY 1026
10801 #endif
10802 main() {
10803         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10804 }
10805
10806 EOF
10807 if { (eval echo configure:10808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10808 then
10809   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10810 else
10811   echo "configure: failed program was:" >&5
10812   cat conftest.$ac_ext >&5
10813   rm -fr conftest*
10814   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10815 fi
10816 rm -fr conftest*
10817 fi
10818
10819 fi
10820
10821 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10822 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10823     cat >> confdefs.h <<\EOF
10824 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10825 EOF
10826
10827 fi
10828
10829 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10830 echo "configure:10831: checking for kernel share modes" >&5
10831 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10832   echo $ac_n "(cached) $ac_c" 1>&6
10833 else
10834   
10835 if test "$cross_compiling" = yes; then
10836   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10837 else
10838   cat > conftest.$ac_ext <<EOF
10839 #line 10840 "configure"
10840 #include "confdefs.h"
10841
10842 #include <sys/types.h>
10843 #include <fcntl.h>
10844 #include <signal.h>
10845 #include <sys/file.h>
10846 #ifndef LOCK_MAND
10847 #define LOCK_MAND       32
10848 #define LOCK_READ       64
10849 #endif
10850 main() {
10851         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10852 }
10853
10854 EOF
10855 if { (eval echo configure:10856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10856 then
10857   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10858 else
10859   echo "configure: failed program was:" >&5
10860   cat conftest.$ac_ext >&5
10861   rm -fr conftest*
10862   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10863 fi
10864 rm -fr conftest*
10865 fi
10866
10867 fi
10868
10869 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10870 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10871     cat >> confdefs.h <<\EOF
10872 #define HAVE_KERNEL_SHARE_MODES 1
10873 EOF
10874
10875 fi
10876
10877
10878
10879
10880 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10881 echo "configure:10882: checking for IRIX kernel oplock type definitions" >&5
10882 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10883   echo $ac_n "(cached) $ac_c" 1>&6
10884 else
10885   
10886 cat > conftest.$ac_ext <<EOF
10887 #line 10888 "configure"
10888 #include "confdefs.h"
10889 #include <sys/types.h>
10890 #include <fcntl.h>
10891 int main() {
10892 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10893 ; return 0; }
10894 EOF
10895 if { (eval echo configure:10896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10896   rm -rf conftest*
10897   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10898 else
10899   echo "configure: failed program was:" >&5
10900   cat conftest.$ac_ext >&5
10901   rm -rf conftest*
10902   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10903 fi
10904 rm -f conftest*
10905 fi
10906
10907 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10908 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10909     cat >> confdefs.h <<\EOF
10910 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10911 EOF
10912
10913 fi
10914
10915 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10916 echo "configure:10917: checking for irix specific capabilities" >&5
10917 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10918   echo $ac_n "(cached) $ac_c" 1>&6
10919 else
10920   
10921 if test "$cross_compiling" = yes; then
10922   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10923 else
10924   cat > conftest.$ac_ext <<EOF
10925 #line 10926 "configure"
10926 #include "confdefs.h"
10927 #include <sys/types.h>
10928 #include <sys/capability.h>
10929 main() {
10930  cap_t cap;
10931  if ((cap = cap_get_proc()) == NULL)
10932    exit(1);
10933  cap->cap_effective |= CAP_NETWORK_MGT;
10934  cap->cap_inheritable |= CAP_NETWORK_MGT;
10935  cap_set_proc(cap);
10936  exit(0);
10937 }
10938
10939 EOF
10940 if { (eval echo configure:10941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10941 then
10942   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10943 else
10944   echo "configure: failed program was:" >&5
10945   cat conftest.$ac_ext >&5
10946   rm -fr conftest*
10947   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10948 fi
10949 rm -fr conftest*
10950 fi
10951
10952 fi
10953
10954 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10955 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10956     cat >> confdefs.h <<\EOF
10957 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10958 EOF
10959
10960 fi
10961
10962 #
10963 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10964 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10965 #
10966
10967 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10968 echo "configure:10969: checking for int16 typedef included by rpc/rpc.h" >&5
10969 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10970   echo $ac_n "(cached) $ac_c" 1>&6
10971 else
10972   
10973 cat > conftest.$ac_ext <<EOF
10974 #line 10975 "configure"
10975 #include "confdefs.h"
10976 #include <sys/types.h>
10977 #if defined(HAVE_RPC_RPC_H)
10978 #include <rpc/rpc.h>
10979 #endif
10980 int main() {
10981 int16 testvar;
10982 ; return 0; }
10983 EOF
10984 if { (eval echo configure:10985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10985   rm -rf conftest*
10986   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10987 else
10988   echo "configure: failed program was:" >&5
10989   cat conftest.$ac_ext >&5
10990   rm -rf conftest*
10991   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10992 fi
10993 rm -f conftest*
10994 fi
10995
10996 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10997 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10998     cat >> confdefs.h <<\EOF
10999 #define HAVE_INT16_FROM_RPC_RPC_H 1
11000 EOF
11001
11002 fi
11003
11004 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
11005 echo "configure:11006: checking for uint16 typedef included by rpc/rpc.h" >&5
11006 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
11007   echo $ac_n "(cached) $ac_c" 1>&6
11008 else
11009   
11010 cat > conftest.$ac_ext <<EOF
11011 #line 11012 "configure"
11012 #include "confdefs.h"
11013 #include <sys/types.h>
11014 #if defined(HAVE_RPC_RPC_H)
11015 #include <rpc/rpc.h>
11016 #endif
11017 int main() {
11018 uint16 testvar;
11019 ; return 0; }
11020 EOF
11021 if { (eval echo configure:11022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11022   rm -rf conftest*
11023   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
11024 else
11025   echo "configure: failed program was:" >&5
11026   cat conftest.$ac_ext >&5
11027   rm -rf conftest*
11028   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
11029 fi
11030 rm -f conftest*
11031 fi
11032
11033 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
11034 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
11035     cat >> confdefs.h <<\EOF
11036 #define HAVE_UINT16_FROM_RPC_RPC_H 1
11037 EOF
11038
11039 fi
11040
11041 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
11042 echo "configure:11043: checking for int32 typedef included by rpc/rpc.h" >&5
11043 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
11044   echo $ac_n "(cached) $ac_c" 1>&6
11045 else
11046   
11047 cat > conftest.$ac_ext <<EOF
11048 #line 11049 "configure"
11049 #include "confdefs.h"
11050 #include <sys/types.h>
11051 #if defined(HAVE_RPC_RPC_H)
11052 #include <rpc/rpc.h>
11053 #endif
11054 int main() {
11055 int32 testvar;
11056 ; return 0; }
11057 EOF
11058 if { (eval echo configure:11059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11059   rm -rf conftest*
11060   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
11061 else
11062   echo "configure: failed program was:" >&5
11063   cat conftest.$ac_ext >&5
11064   rm -rf conftest*
11065   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
11066 fi
11067 rm -f conftest*
11068 fi
11069
11070 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
11071 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
11072     cat >> confdefs.h <<\EOF
11073 #define HAVE_INT32_FROM_RPC_RPC_H 1
11074 EOF
11075
11076 fi
11077
11078 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
11079 echo "configure:11080: checking for uint32 typedef included by rpc/rpc.h" >&5
11080 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
11081   echo $ac_n "(cached) $ac_c" 1>&6
11082 else
11083   
11084 cat > conftest.$ac_ext <<EOF
11085 #line 11086 "configure"
11086 #include "confdefs.h"
11087 #include <sys/types.h>
11088 #if defined(HAVE_RPC_RPC_H)
11089 #include <rpc/rpc.h>
11090 #endif
11091 int main() {
11092 uint32 testvar;
11093 ; return 0; }
11094 EOF
11095 if { (eval echo configure:11096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11096   rm -rf conftest*
11097   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
11098 else
11099   echo "configure: failed program was:" >&5
11100   cat conftest.$ac_ext >&5
11101   rm -rf conftest*
11102   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
11103 fi
11104 rm -f conftest*
11105 fi
11106
11107 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
11108 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
11109     cat >> confdefs.h <<\EOF
11110 #define HAVE_UINT32_FROM_RPC_RPC_H 1
11111 EOF
11112
11113 fi
11114
11115
11116 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
11117 echo "configure:11118: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
11118 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
11119   echo $ac_n "(cached) $ac_c" 1>&6
11120 else
11121   
11122 cat > conftest.$ac_ext <<EOF
11123 #line 11124 "configure"
11124 #include "confdefs.h"
11125 #include <sys/types.h>
11126 #ifdef HAVE_SYS_SECURITY_H
11127 #include <sys/security.h>
11128 #include <prot.h>
11129 #endif  /* HAVE_SYS_SECURITY_H */
11130 #if defined(HAVE_RPC_RPC_H)
11131 #include <rpc/rpc.h>
11132 #endif
11133 int main() {
11134 int testvar;
11135 ; return 0; }
11136 EOF
11137 if { (eval echo configure:11138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11138   rm -rf conftest*
11139   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
11140 else
11141   echo "configure: failed program was:" >&5
11142   cat conftest.$ac_ext >&5
11143   rm -rf conftest*
11144   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
11145 fi
11146 rm -f conftest*
11147 fi
11148
11149 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
11150 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
11151     cat >> confdefs.h <<\EOF
11152 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
11153 EOF
11154
11155 fi
11156
11157 echo $ac_n "checking for test routines""... $ac_c" 1>&6
11158 echo "configure:11159: checking for test routines" >&5
11159 if test "$cross_compiling" = yes; then
11160   echo "configure: warning: cannot run when cross-compiling" 1>&2
11161 else
11162   cat > conftest.$ac_ext <<EOF
11163 #line 11164 "configure"
11164 #include "confdefs.h"
11165 #include "${srcdir-.}/tests/trivial.c"
11166 EOF
11167 if { (eval echo configure:11168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11168 then
11169   echo "$ac_t""yes" 1>&6
11170 else
11171   echo "configure: failed program was:" >&5
11172   cat conftest.$ac_ext >&5
11173   rm -fr conftest*
11174   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
11175 fi
11176 rm -fr conftest*
11177 fi
11178
11179
11180 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
11181 echo "configure:11182: checking for ftruncate extend" >&5
11182 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
11183   echo $ac_n "(cached) $ac_c" 1>&6
11184 else
11185   
11186 if test "$cross_compiling" = yes; then
11187   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
11188 else
11189   cat > conftest.$ac_ext <<EOF
11190 #line 11191 "configure"
11191 #include "confdefs.h"
11192 #include "${srcdir-.}/tests/ftruncate.c"
11193 EOF
11194 if { (eval echo configure:11195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11195 then
11196   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
11197 else
11198   echo "configure: failed program was:" >&5
11199   cat conftest.$ac_ext >&5
11200   rm -fr conftest*
11201   samba_cv_HAVE_FTRUNCATE_EXTEND=no
11202 fi
11203 rm -fr conftest*
11204 fi
11205
11206 fi
11207
11208 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
11209 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
11210     cat >> confdefs.h <<\EOF
11211 #define HAVE_FTRUNCATE_EXTEND 1
11212 EOF
11213
11214 fi
11215
11216 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
11217 echo "configure:11218: checking for AF_LOCAL socket support" >&5
11218 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
11219   echo $ac_n "(cached) $ac_c" 1>&6
11220 else
11221   
11222 if test "$cross_compiling" = yes; then
11223   samba_cv_HAVE_WORKING_AF_LOCAL=cross
11224 else
11225   cat > conftest.$ac_ext <<EOF
11226 #line 11227 "configure"
11227 #include "confdefs.h"
11228 #include "${srcdir-.}/tests/unixsock.c"
11229 EOF
11230 if { (eval echo configure:11231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11231 then
11232   samba_cv_HAVE_WORKING_AF_LOCAL=yes
11233 else
11234   echo "configure: failed program was:" >&5
11235   cat conftest.$ac_ext >&5
11236   rm -fr conftest*
11237   samba_cv_HAVE_WORKING_AF_LOCAL=no
11238 fi
11239 rm -fr conftest*
11240 fi
11241
11242 fi
11243
11244 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
11245 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
11246 then
11247     cat >> confdefs.h <<\EOF
11248 #define HAVE_WORKING_AF_LOCAL 1
11249 EOF
11250
11251 fi
11252
11253 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
11254 echo "configure:11255: checking for broken getgroups" >&5
11255 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
11256   echo $ac_n "(cached) $ac_c" 1>&6
11257 else
11258   
11259 if test "$cross_compiling" = yes; then
11260   samba_cv_HAVE_BROKEN_GETGROUPS=cross
11261 else
11262   cat > conftest.$ac_ext <<EOF
11263 #line 11264 "configure"
11264 #include "confdefs.h"
11265 #include "${srcdir-.}/tests/getgroups.c"
11266 EOF
11267 if { (eval echo configure:11268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11268 then
11269   samba_cv_HAVE_BROKEN_GETGROUPS=yes
11270 else
11271   echo "configure: failed program was:" >&5
11272   cat conftest.$ac_ext >&5
11273   rm -fr conftest*
11274   samba_cv_HAVE_BROKEN_GETGROUPS=no
11275 fi
11276 rm -fr conftest*
11277 fi
11278
11279 fi
11280
11281 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
11282 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
11283     cat >> confdefs.h <<\EOF
11284 #define HAVE_BROKEN_GETGROUPS 1
11285 EOF
11286
11287 fi
11288
11289 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
11290 echo "configure:11291: checking whether getpass should be replaced" >&5
11291 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
11292   echo $ac_n "(cached) $ac_c" 1>&6
11293 else
11294   
11295 SAVE_CPPFLAGS="$CPPFLAGS"
11296 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt  -I${srcdir-.}/smbwrapper"
11297 cat > conftest.$ac_ext <<EOF
11298 #line 11299 "configure"
11299 #include "confdefs.h"
11300
11301 #define REPLACE_GETPASS 1
11302 #define NO_CONFIG_H 1
11303 #define main dont_declare_main
11304 #include "${srcdir-.}/lib/getsmbpass.c"
11305 #undef main
11306
11307 int main() {
11308
11309 ; return 0; }
11310 EOF
11311 if { (eval echo configure:11312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11312   rm -rf conftest*
11313   samba_cv_REPLACE_GETPASS=yes
11314 else
11315   echo "configure: failed program was:" >&5
11316   cat conftest.$ac_ext >&5
11317   rm -rf conftest*
11318   samba_cv_REPLACE_GETPASS=no
11319 fi
11320 rm -f conftest*
11321 CPPFLAGS="$SAVE_CPPFLAGS"
11322
11323 fi
11324
11325 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
11326 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
11327         cat >> confdefs.h <<\EOF
11328 #define REPLACE_GETPASS 1
11329 EOF
11330
11331 fi
11332
11333 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
11334 echo "configure:11335: checking for broken inet_ntoa" >&5
11335 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
11336   echo $ac_n "(cached) $ac_c" 1>&6
11337 else
11338   
11339 if test "$cross_compiling" = yes; then
11340   samba_cv_REPLACE_INET_NTOA=cross
11341 else
11342   cat > conftest.$ac_ext <<EOF
11343 #line 11344 "configure"
11344 #include "confdefs.h"
11345
11346 #include <stdio.h>
11347 #include <sys/types.h>
11348 #include <netinet/in.h>
11349 #ifdef HAVE_ARPA_INET_H
11350 #include <arpa/inet.h>
11351 #endif
11352 main() { struct in_addr ip; ip.s_addr = 0x12345678;
11353 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
11354     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
11355 exit(1);}
11356 EOF
11357 if { (eval echo configure:11358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11358 then
11359   samba_cv_REPLACE_INET_NTOA=yes
11360 else
11361   echo "configure: failed program was:" >&5
11362   cat conftest.$ac_ext >&5
11363   rm -fr conftest*
11364   samba_cv_REPLACE_INET_NTOA=no
11365 fi
11366 rm -fr conftest*
11367 fi
11368
11369 fi
11370
11371 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
11372 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
11373     cat >> confdefs.h <<\EOF
11374 #define REPLACE_INET_NTOA 1
11375 EOF
11376
11377 fi
11378
11379 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
11380 echo "configure:11381: checking for secure mkstemp" >&5
11381 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
11382   echo $ac_n "(cached) $ac_c" 1>&6
11383 else
11384   
11385 if test "$cross_compiling" = yes; then
11386   samba_cv_HAVE_SECURE_MKSTEMP=cross
11387 else
11388   cat > conftest.$ac_ext <<EOF
11389 #line 11390 "configure"
11390 #include "confdefs.h"
11391 #include <stdlib.h>
11392 #include <sys/types.h>
11393 #include <sys/stat.h>
11394 #include <unistd.h>
11395 main() { 
11396   struct stat st;
11397   char tpl[20]="/tmp/test.XXXXXX"; 
11398   int fd = mkstemp(tpl); 
11399   if (fd == -1) exit(1);
11400   unlink(tpl);
11401   if (fstat(fd, &st) != 0) exit(1);
11402   if ((st.st_mode & 0777) != 0600) exit(1);
11403   exit(0);
11404 }
11405 EOF
11406 if { (eval echo configure:11407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11407 then
11408   samba_cv_HAVE_SECURE_MKSTEMP=yes
11409 else
11410   echo "configure: failed program was:" >&5
11411   cat conftest.$ac_ext >&5
11412   rm -fr conftest*
11413   samba_cv_HAVE_SECURE_MKSTEMP=no
11414 fi
11415 rm -fr conftest*
11416 fi
11417
11418 fi
11419
11420 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
11421 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
11422     cat >> confdefs.h <<\EOF
11423 #define HAVE_SECURE_MKSTEMP 1
11424 EOF
11425
11426 fi
11427
11428 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
11429 echo "configure:11430: checking for sysconf(_SC_NGROUPS_MAX)" >&5
11430 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
11431   echo $ac_n "(cached) $ac_c" 1>&6
11432 else
11433   
11434 if test "$cross_compiling" = yes; then
11435   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
11436 else
11437   cat > conftest.$ac_ext <<EOF
11438 #line 11439 "configure"
11439 #include "confdefs.h"
11440 #include <unistd.h>
11441 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
11442 EOF
11443 if { (eval echo configure:11444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11444 then
11445   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
11446 else
11447   echo "configure: failed program was:" >&5
11448   cat conftest.$ac_ext >&5
11449   rm -fr conftest*
11450   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
11451 fi
11452 rm -fr conftest*
11453 fi
11454
11455 fi
11456
11457 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
11458 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
11459     cat >> confdefs.h <<\EOF
11460 #define SYSCONF_SC_NGROUPS_MAX 1
11461 EOF
11462
11463 fi
11464
11465 echo $ac_n "checking for root""... $ac_c" 1>&6
11466 echo "configure:11467: checking for root" >&5
11467 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
11468   echo $ac_n "(cached) $ac_c" 1>&6
11469 else
11470   
11471 if test "$cross_compiling" = yes; then
11472   samba_cv_HAVE_ROOT=cross
11473 else
11474   cat > conftest.$ac_ext <<EOF
11475 #line 11476 "configure"
11476 #include "confdefs.h"
11477 main() { exit(getuid() != 0); }
11478 EOF
11479 if { (eval echo configure:11480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11480 then
11481   samba_cv_HAVE_ROOT=yes
11482 else
11483   echo "configure: failed program was:" >&5
11484   cat conftest.$ac_ext >&5
11485   rm -fr conftest*
11486   samba_cv_HAVE_ROOT=no
11487 fi
11488 rm -fr conftest*
11489 fi
11490
11491 fi
11492
11493 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
11494 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
11495     cat >> confdefs.h <<\EOF
11496 #define HAVE_ROOT 1
11497 EOF
11498
11499 else
11500     echo "configure: warning: running as non-root will disable some tests" 1>&2
11501 fi
11502
11503 ##################
11504 # look for a method of finding the list of network interfaces
11505 iface=no;
11506 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
11507 echo "configure:11508: checking for iface AIX" >&5
11508 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
11509   echo $ac_n "(cached) $ac_c" 1>&6
11510 else
11511   
11512 if test "$cross_compiling" = yes; then
11513   samba_cv_HAVE_IFACE_AIX=cross
11514 else
11515   cat > conftest.$ac_ext <<EOF
11516 #line 11517 "configure"
11517 #include "confdefs.h"
11518
11519 #define HAVE_IFACE_AIX 1
11520 #define AUTOCONF_TEST 1
11521 #include "confdefs.h"
11522 #include "${srcdir-.}/lib/interfaces.c"
11523 EOF
11524 if { (eval echo configure:11525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11525 then
11526   samba_cv_HAVE_IFACE_AIX=yes
11527 else
11528   echo "configure: failed program was:" >&5
11529   cat conftest.$ac_ext >&5
11530   rm -fr conftest*
11531   samba_cv_HAVE_IFACE_AIX=no
11532 fi
11533 rm -fr conftest*
11534 fi
11535
11536 fi
11537
11538 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
11539 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
11540     iface=yes;cat >> confdefs.h <<\EOF
11541 #define HAVE_IFACE_AIX 1
11542 EOF
11543
11544 fi
11545
11546 if test $iface = no; then
11547 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
11548 echo "configure:11549: checking for iface ifconf" >&5
11549 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
11550   echo $ac_n "(cached) $ac_c" 1>&6
11551 else
11552   
11553 if test "$cross_compiling" = yes; then
11554   samba_cv_HAVE_IFACE_IFCONF=cross
11555 else
11556   cat > conftest.$ac_ext <<EOF
11557 #line 11558 "configure"
11558 #include "confdefs.h"
11559
11560 #define HAVE_IFACE_IFCONF 1
11561 #define AUTOCONF_TEST 1
11562 #include "confdefs.h"
11563 #include "${srcdir-.}/lib/interfaces.c"
11564 EOF
11565 if { (eval echo configure:11566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11566 then
11567   samba_cv_HAVE_IFACE_IFCONF=yes
11568 else
11569   echo "configure: failed program was:" >&5
11570   cat conftest.$ac_ext >&5
11571   rm -fr conftest*
11572   samba_cv_HAVE_IFACE_IFCONF=no
11573 fi
11574 rm -fr conftest*
11575 fi
11576
11577 fi
11578
11579 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
11580 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
11581     iface=yes;cat >> confdefs.h <<\EOF
11582 #define HAVE_IFACE_IFCONF 1
11583 EOF
11584
11585 fi
11586 fi
11587
11588 if test $iface = no; then
11589 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
11590 echo "configure:11591: checking for iface ifreq" >&5
11591 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
11592   echo $ac_n "(cached) $ac_c" 1>&6
11593 else
11594   
11595 if test "$cross_compiling" = yes; then
11596   samba_cv_HAVE_IFACE_IFREQ=cross
11597 else
11598   cat > conftest.$ac_ext <<EOF
11599 #line 11600 "configure"
11600 #include "confdefs.h"
11601
11602 #define HAVE_IFACE_IFREQ 1
11603 #define AUTOCONF_TEST 1
11604 #include "confdefs.h"
11605 #include "${srcdir-.}/lib/interfaces.c"
11606 EOF
11607 if { (eval echo configure:11608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11608 then
11609   samba_cv_HAVE_IFACE_IFREQ=yes
11610 else
11611   echo "configure: failed program was:" >&5
11612   cat conftest.$ac_ext >&5
11613   rm -fr conftest*
11614   samba_cv_HAVE_IFACE_IFREQ=no
11615 fi
11616 rm -fr conftest*
11617 fi
11618
11619 fi
11620
11621 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
11622 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
11623     iface=yes;cat >> confdefs.h <<\EOF
11624 #define HAVE_IFACE_IFREQ 1
11625 EOF
11626
11627 fi
11628 fi
11629
11630
11631 ################################################
11632 # look for a method of setting the effective uid
11633 seteuid=no;
11634 if test $seteuid = no; then
11635 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
11636 echo "configure:11637: checking for setresuid" >&5
11637 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
11638   echo $ac_n "(cached) $ac_c" 1>&6
11639 else
11640   
11641 if test "$cross_compiling" = yes; then
11642   samba_cv_USE_SETRESUID=cross
11643 else
11644   cat > conftest.$ac_ext <<EOF
11645 #line 11646 "configure"
11646 #include "confdefs.h"
11647
11648 #define AUTOCONF_TEST 1
11649 #define USE_SETRESUID 1
11650 #include "confdefs.h"
11651 #include "${srcdir-.}/lib/util_sec.c"
11652 EOF
11653 if { (eval echo configure:11654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11654 then
11655   samba_cv_USE_SETRESUID=yes
11656 else
11657   echo "configure: failed program was:" >&5
11658   cat conftest.$ac_ext >&5
11659   rm -fr conftest*
11660   samba_cv_USE_SETRESUID=no
11661 fi
11662 rm -fr conftest*
11663 fi
11664
11665 fi
11666
11667 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
11668 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
11669     seteuid=yes;cat >> confdefs.h <<\EOF
11670 #define USE_SETRESUID 1
11671 EOF
11672
11673 fi
11674 fi
11675
11676
11677 if test $seteuid = no; then
11678 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
11679 echo "configure:11680: checking for setreuid" >&5
11680 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
11681   echo $ac_n "(cached) $ac_c" 1>&6
11682 else
11683   
11684 if test "$cross_compiling" = yes; then
11685   samba_cv_USE_SETREUID=cross
11686 else
11687   cat > conftest.$ac_ext <<EOF
11688 #line 11689 "configure"
11689 #include "confdefs.h"
11690
11691 #define AUTOCONF_TEST 1
11692 #define USE_SETREUID 1
11693 #include "confdefs.h"
11694 #include "${srcdir-.}/lib/util_sec.c"
11695 EOF
11696 if { (eval echo configure:11697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11697 then
11698   samba_cv_USE_SETREUID=yes
11699 else
11700   echo "configure: failed program was:" >&5
11701   cat conftest.$ac_ext >&5
11702   rm -fr conftest*
11703   samba_cv_USE_SETREUID=no
11704 fi
11705 rm -fr conftest*
11706 fi
11707
11708 fi
11709
11710 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
11711 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
11712     seteuid=yes;cat >> confdefs.h <<\EOF
11713 #define USE_SETREUID 1
11714 EOF
11715
11716 fi
11717 fi
11718
11719 if test $seteuid = no; then
11720 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
11721 echo "configure:11722: checking for seteuid" >&5
11722 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
11723   echo $ac_n "(cached) $ac_c" 1>&6
11724 else
11725   
11726 if test "$cross_compiling" = yes; then
11727   samba_cv_USE_SETEUID=cross
11728 else
11729   cat > conftest.$ac_ext <<EOF
11730 #line 11731 "configure"
11731 #include "confdefs.h"
11732
11733 #define AUTOCONF_TEST 1
11734 #define USE_SETEUID 1
11735 #include "confdefs.h"
11736 #include "${srcdir-.}/lib/util_sec.c"
11737 EOF
11738 if { (eval echo configure:11739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11739 then
11740   samba_cv_USE_SETEUID=yes
11741 else
11742   echo "configure: failed program was:" >&5
11743   cat conftest.$ac_ext >&5
11744   rm -fr conftest*
11745   samba_cv_USE_SETEUID=no
11746 fi
11747 rm -fr conftest*
11748 fi
11749
11750 fi
11751
11752 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
11753 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
11754     seteuid=yes;cat >> confdefs.h <<\EOF
11755 #define USE_SETEUID 1
11756 EOF
11757
11758 fi
11759 fi
11760
11761 if test $seteuid = no; then
11762 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11763 echo "configure:11764: checking for setuidx" >&5
11764 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
11765   echo $ac_n "(cached) $ac_c" 1>&6
11766 else
11767   
11768 if test "$cross_compiling" = yes; then
11769   samba_cv_USE_SETUIDX=cross
11770 else
11771   cat > conftest.$ac_ext <<EOF
11772 #line 11773 "configure"
11773 #include "confdefs.h"
11774
11775 #define AUTOCONF_TEST 1
11776 #define USE_SETUIDX 1
11777 #include "confdefs.h"
11778 #include "${srcdir-.}/lib/util_sec.c"
11779 EOF
11780 if { (eval echo configure:11781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11781 then
11782   samba_cv_USE_SETUIDX=yes
11783 else
11784   echo "configure: failed program was:" >&5
11785   cat conftest.$ac_ext >&5
11786   rm -fr conftest*
11787   samba_cv_USE_SETUIDX=no
11788 fi
11789 rm -fr conftest*
11790 fi
11791
11792 fi
11793
11794 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11795 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11796     seteuid=yes;cat >> confdefs.h <<\EOF
11797 #define USE_SETUIDX 1
11798 EOF
11799
11800 fi
11801 fi
11802
11803
11804 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11805 echo "configure:11806: checking for working mmap" >&5
11806 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11807   echo $ac_n "(cached) $ac_c" 1>&6
11808 else
11809   
11810 if test "$cross_compiling" = yes; then
11811   samba_cv_HAVE_MMAP=cross
11812 else
11813   cat > conftest.$ac_ext <<EOF
11814 #line 11815 "configure"
11815 #include "confdefs.h"
11816 #include "${srcdir-.}/tests/shared_mmap.c"
11817 EOF
11818 if { (eval echo configure:11819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11819 then
11820   samba_cv_HAVE_MMAP=yes
11821 else
11822   echo "configure: failed program was:" >&5
11823   cat conftest.$ac_ext >&5
11824   rm -fr conftest*
11825   samba_cv_HAVE_MMAP=no
11826 fi
11827 rm -fr conftest*
11828 fi
11829
11830 fi
11831
11832 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11833 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11834     cat >> confdefs.h <<\EOF
11835 #define HAVE_MMAP 1
11836 EOF
11837
11838 fi
11839
11840 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11841 echo "configure:11842: checking for ftruncate needs root" >&5
11842 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11843   echo $ac_n "(cached) $ac_c" 1>&6
11844 else
11845   
11846 if test "$cross_compiling" = yes; then
11847   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11848 else
11849   cat > conftest.$ac_ext <<EOF
11850 #line 11851 "configure"
11851 #include "confdefs.h"
11852 #include "${srcdir-.}/tests/ftruncroot.c"
11853 EOF
11854 if { (eval echo configure:11855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11855 then
11856   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11857 else
11858   echo "configure: failed program was:" >&5
11859   cat conftest.$ac_ext >&5
11860   rm -fr conftest*
11861   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11862 fi
11863 rm -fr conftest*
11864 fi
11865
11866 fi
11867
11868 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11869 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11870     cat >> confdefs.h <<\EOF
11871 #define FTRUNCATE_NEEDS_ROOT 1
11872 EOF
11873
11874 fi
11875
11876 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11877 echo "configure:11878: checking for fcntl locking" >&5
11878 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11879   echo $ac_n "(cached) $ac_c" 1>&6
11880 else
11881   
11882 if test "$cross_compiling" = yes; then
11883   samba_cv_HAVE_FCNTL_LOCK=cross
11884 else
11885   cat > conftest.$ac_ext <<EOF
11886 #line 11887 "configure"
11887 #include "confdefs.h"
11888 #include "${srcdir-.}/tests/fcntl_lock.c"
11889 EOF
11890 if { (eval echo configure:11891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11891 then
11892   samba_cv_HAVE_FCNTL_LOCK=yes
11893 else
11894   echo "configure: failed program was:" >&5
11895   cat conftest.$ac_ext >&5
11896   rm -fr conftest*
11897   samba_cv_HAVE_FCNTL_LOCK=no
11898 fi
11899 rm -fr conftest*
11900 fi
11901
11902 fi
11903
11904 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11905 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11906     cat >> confdefs.h <<\EOF
11907 #define HAVE_FCNTL_LOCK 1
11908 EOF
11909
11910 fi
11911
11912 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11913 echo "configure:11914: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11914 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11915   echo $ac_n "(cached) $ac_c" 1>&6
11916 else
11917   
11918 if test "$cross_compiling" = yes; then
11919   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11920 else
11921   cat > conftest.$ac_ext <<EOF
11922 #line 11923 "configure"
11923 #include "confdefs.h"
11924 #include "${srcdir-.}/tests/fcntl_lock64.c"
11925 EOF
11926 if { (eval echo configure:11927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11927 then
11928   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11929 else
11930   echo "configure: failed program was:" >&5
11931   cat conftest.$ac_ext >&5
11932   rm -fr conftest*
11933   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11934 fi
11935 rm -fr conftest*
11936 fi
11937
11938 fi
11939
11940 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11941 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11942     cat >> confdefs.h <<\EOF
11943 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11944 EOF
11945
11946
11947 else
11948
11949
11950   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11951 echo "configure:11952: checking for 64 bit fcntl locking" >&5
11952 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11953   echo $ac_n "(cached) $ac_c" 1>&6
11954 else
11955   
11956   if test "$cross_compiling" = yes; then
11957   samba_cv_HAVE_STRUCT_FLOCK64=cross
11958 else
11959   cat > conftest.$ac_ext <<EOF
11960 #line 11961 "configure"
11961 #include "confdefs.h"
11962
11963 #if defined(HAVE_UNISTD_H)
11964 #include <unistd.h>
11965 #endif
11966 #include <stdio.h>
11967 #include <stdlib.h>
11968
11969 #ifdef HAVE_FCNTL_H
11970 #include <fcntl.h>
11971 #endif
11972
11973 #ifdef HAVE_SYS_FCNTL_H
11974 #include <sys/fcntl.h>
11975 #endif
11976 main() { struct flock64 fl64;
11977 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11978 exit(0);
11979 #else
11980 exit(1);
11981 #endif
11982 }
11983 EOF
11984 if { (eval echo configure:11985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11985 then
11986   samba_cv_HAVE_STRUCT_FLOCK64=yes
11987 else
11988   echo "configure: failed program was:" >&5
11989   cat conftest.$ac_ext >&5
11990   rm -fr conftest*
11991   samba_cv_HAVE_STRUCT_FLOCK64=no
11992 fi
11993 rm -fr conftest*
11994 fi
11995
11996 fi
11997
11998 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11999
12000   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
12001       cat >> confdefs.h <<\EOF
12002 #define HAVE_STRUCT_FLOCK64 1
12003 EOF
12004
12005   fi
12006 fi
12007
12008 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
12009 echo "configure:12010: checking for st_blocks in struct stat" >&5
12010 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then
12011   echo $ac_n "(cached) $ac_c" 1>&6
12012 else
12013   
12014 cat > conftest.$ac_ext <<EOF
12015 #line 12016 "configure"
12016 #include "confdefs.h"
12017 #include <sys/types.h>
12018 #include <sys/stat.h>
12019 #include <unistd.h>
12020 int main() {
12021 struct stat st;  st.st_blocks = 0;
12022 ; return 0; }
12023 EOF
12024 if { (eval echo configure:12025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12025   rm -rf conftest*
12026   samba_cv_HAVE_STAT_ST_BLOCKS=yes
12027 else
12028   echo "configure: failed program was:" >&5
12029   cat conftest.$ac_ext >&5
12030   rm -rf conftest*
12031   samba_cv_HAVE_STAT_ST_BLOCKS=no
12032 fi
12033 rm -f conftest*
12034 fi
12035
12036 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6
12037 if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
12038     cat >> confdefs.h <<\EOF
12039 #define HAVE_STAT_ST_BLOCKS 1
12040 EOF
12041
12042 fi 
12043
12044 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
12045 echo "configure:12046: checking for st_blksize in struct stat" >&5
12046 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLKSIZE'+set}'`\" = set"; then
12047   echo $ac_n "(cached) $ac_c" 1>&6
12048 else
12049   
12050 cat > conftest.$ac_ext <<EOF
12051 #line 12052 "configure"
12052 #include "confdefs.h"
12053 #include <sys/types.h>
12054 #include <sys/stat.h>
12055 #include <unistd.h>
12056 int main() {
12057 struct stat st;  st.st_blksize = 0;
12058 ; return 0; }
12059 EOF
12060 if { (eval echo configure:12061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12061   rm -rf conftest*
12062   samba_cv_HAVE_STAT_ST_BLKSIZE=yes
12063 else
12064   echo "configure: failed program was:" >&5
12065   cat conftest.$ac_ext >&5
12066   rm -rf conftest*
12067   samba_cv_HAVE_STAT_ST_BLKSIZE=no
12068 fi
12069 rm -f conftest*
12070 fi
12071
12072 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLKSIZE" 1>&6
12073 if test x"$samba_cv_HAVE_STAT_ST_BLKSIZE" = x"yes"; then
12074     cat >> confdefs.h <<\EOF
12075 #define HAVE_STAT_ST_BLKSIZE 1
12076 EOF
12077
12078 fi
12079
12080 case "$host_os" in
12081 *linux*)
12082 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
12083 echo "configure:12084: checking for broken RedHat 7.2 system header files" >&5
12084 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
12085   echo $ac_n "(cached) $ac_c" 1>&6
12086 else
12087   
12088 cat > conftest.$ac_ext <<EOF
12089 #line 12090 "configure"
12090 #include "confdefs.h"
12091
12092 #ifdef HAVE_SYS_VFS_H
12093 #include <sys/vfs.h>
12094 #endif
12095 #ifdef HAVE_SYS_CAPABILITY_H
12096 #include <sys/capability.h>
12097 #endif
12098
12099 int main() {
12100 int i;
12101 ; return 0; }
12102 EOF
12103 if { (eval echo configure:12104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12104   rm -rf conftest*
12105   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
12106 else
12107   echo "configure: failed program was:" >&5
12108   cat conftest.$ac_ext >&5
12109   rm -rf conftest*
12110   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
12111 fi
12112 rm -f conftest*
12113 fi
12114
12115 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
12116 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
12117    cat >> confdefs.h <<\EOF
12118 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
12119 EOF
12120
12121 fi
12122 ;;
12123 esac
12124
12125 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
12126 echo "configure:12127: checking for broken nisplus include files" >&5
12127 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
12128   echo $ac_n "(cached) $ac_c" 1>&6
12129 else
12130   
12131 cat > conftest.$ac_ext <<EOF
12132 #line 12133 "configure"
12133 #include "confdefs.h"
12134 #include <sys/acl.h>
12135 #if defined(HAVE_RPCSVC_NIS_H)
12136 #include <rpcsvc/nis.h>
12137 #endif
12138 int main() {
12139 int i;
12140 ; return 0; }
12141 EOF
12142 if { (eval echo configure:12143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12143   rm -rf conftest*
12144   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
12145 else
12146   echo "configure: failed program was:" >&5
12147   cat conftest.$ac_ext >&5
12148   rm -rf conftest*
12149   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
12150 fi
12151 rm -f conftest*
12152 fi
12153
12154 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
12155 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
12156         cat >> confdefs.h <<\EOF
12157 #define BROKEN_NISPLUS_INCLUDE_FILES 1
12158 EOF
12159
12160 fi
12161
12162
12163 #################################################
12164 # check for smbwrapper support
12165 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
12166 echo "configure:12167: checking whether to use smbwrapper" >&5
12167 # Check whether --with-smbwrapper or --without-smbwrapper was given.
12168 if test "${with_smbwrapper+set}" = set; then
12169   withval="$with_smbwrapper"
12170    case "$withval" in
12171   yes)
12172     echo "$ac_t""yes" 1>&6
12173     cat >> confdefs.h <<\EOF
12174 #define WITH_SMBWRAPPER 1
12175 EOF
12176
12177         WRAPPROG="bin/smbsh\$(EXEEXT)"
12178         WRAP="bin/smbwrapper.$SHLIBEXT"
12179
12180         if test x$ATTEMPT_WRAP32_BUILD = x; then
12181                 WRAP32=""
12182         else
12183                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
12184         fi
12185
12186 # Conditions under which smbwrapper should not be built.
12187
12188         if test x$PICFLAG = x; then
12189            echo No support for PIC code - disabling smbwrapper and smbsh
12190            WRAPPROG=""
12191            WRAP=""
12192            WRAP32=""
12193         elif test x$ac_cv_func_syscall = xno; then
12194            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
12195            WRAPPROG=""
12196            WRAP=""
12197            WRAP32=""
12198         fi
12199         EXTRA_ALL_TARGETS="$EXTRA_ALL_TARGETS $WRAPPROG $WRAP $WRAP32"
12200         SMBWRAPPER="$WRAPPROG $WRAP $WRAP32"
12201     ;;
12202   *)
12203     echo "$ac_t""no" 1>&6
12204     ;;
12205   esac 
12206 else
12207   echo "$ac_t""no" 1>&6
12208
12209 fi
12210
12211
12212 #################################################
12213 # check for AFS clear-text auth support
12214 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
12215 echo "configure:12216: checking whether to use AFS clear-text auth" >&5
12216 # Check whether --with-afs or --without-afs was given.
12217 if test "${with_afs+set}" = set; then
12218   withval="$with_afs"
12219    case "$withval" in
12220   yes)
12221     echo "$ac_t""yes" 1>&6
12222     cat >> confdefs.h <<\EOF
12223 #define WITH_AFS 1
12224 EOF
12225
12226     ;;
12227   *)
12228     echo "$ac_t""no" 1>&6
12229     ;;
12230   esac 
12231 else
12232   echo "$ac_t""no" 1>&6
12233
12234 fi
12235
12236
12237
12238 #################################################
12239 # check for the DFS clear-text auth system
12240 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
12241 echo "configure:12242: checking whether to use DFS clear-text auth" >&5
12242 # Check whether --with-dfs or --without-dfs was given.
12243 if test "${with_dfs+set}" = set; then
12244   withval="$with_dfs"
12245    case "$withval" in
12246   yes)
12247     echo "$ac_t""yes" 1>&6
12248     cat >> confdefs.h <<\EOF
12249 #define WITH_DFS 1
12250 EOF
12251
12252     ;;
12253   *)
12254     echo "$ac_t""no" 1>&6
12255     ;;
12256   esac 
12257 else
12258   echo "$ac_t""no" 1>&6
12259
12260 fi
12261
12262
12263 #################################################
12264 # active directory support
12265
12266 with_ads_support=yes
12267 echo $ac_n "checking whether to use Active Directory""... $ac_c" 1>&6
12268 echo "configure:12269: checking whether to use Active Directory" >&5
12269
12270 # Check whether --with-ads or --without-ads was given.
12271 if test "${with_ads+set}" = set; then
12272   withval="$with_ads"
12273    case "$withval" in
12274     no)
12275         with_ads_support=no
12276         ;;
12277   esac 
12278 fi
12279
12280
12281 if test x"$with_ads_support" = x"yes"; then
12282    cat >> confdefs.h <<\EOF
12283 #define WITH_ADS 1
12284 EOF
12285
12286 fi
12287
12288 echo "$ac_t""$with_ads_support" 1>&6
12289
12290 FOUND_KRB5=no
12291 if test x"$with_ads_support" = x"yes"; then
12292
12293   #################################################
12294   # check for location of Kerberos 5 install
12295   echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
12296 echo "configure:12297: checking for kerberos 5 install path" >&5
12297   # Check whether --with-krb5 or --without-krb5 was given.
12298 if test "${with_krb5+set}" = set; then
12299   withval="$with_krb5"
12300    case "$withval" in
12301     no)
12302       echo "$ac_t""no" 1>&6
12303       ;;
12304     *)
12305       echo "$ac_t""yes" 1>&6
12306       LIBS="$LIBS -lkrb5"
12307       CFLAGS="$CFLAGS -I$withval/include"
12308       CPPFLAGS="$CPPFLAGS -I$withval/include"
12309       LDFLAGS="$LDFLAGS -L$withval/lib"
12310       FOUND_KRB5=yes
12311       ;;
12312     esac 
12313 else
12314   echo "$ac_t""no" 1>&6
12315   
12316 fi
12317
12318
12319
12320 if test x$FOUND_KRB5 = x"no"; then
12321 #################################################
12322 # see if this box has the SuSE location for the heimdal kerberos implementation
12323 echo $ac_n "checking for /usr/include/heimdal""... $ac_c" 1>&6
12324 echo "configure:12325: checking for /usr/include/heimdal" >&5
12325 if test -d /usr/include/heimdal; then
12326     CFLAGS="$CFLAGS -I/usr/include/heimdal"
12327     CPPFLAGS="$CPPFLAGS -I/usr/include/heimdal"
12328     echo "$ac_t""yes" 1>&6
12329 else
12330     echo "$ac_t""no" 1>&6
12331 fi
12332 fi
12333
12334
12335 if test x$FOUND_KRB5 = x"no"; then
12336 #################################################
12337 # see if this box has the RedHat location for kerberos
12338 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
12339 echo "configure:12340: checking for /usr/kerberos" >&5
12340 if test -d /usr/kerberos; then
12341     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
12342     CFLAGS="$CFLAGS -I/usr/kerberos/include"
12343     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
12344     echo "$ac_t""yes" 1>&6
12345 else
12346     echo "$ac_t""no" 1>&6
12347 fi
12348 fi
12349
12350
12351   # now check for krb5.h. Some systems have the libraries without the headers!
12352   # note that this check is done here to allow for different kerberos
12353   # include paths
12354   for ac_hdr in krb5.h
12355 do
12356 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12357 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12358 echo "configure:12359: checking for $ac_hdr" >&5
12359 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12360   echo $ac_n "(cached) $ac_c" 1>&6
12361 else
12362   cat > conftest.$ac_ext <<EOF
12363 #line 12364 "configure"
12364 #include "confdefs.h"
12365 #include <$ac_hdr>
12366 EOF
12367 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12368 { (eval echo configure:12369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12369 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12370 if test -z "$ac_err"; then
12371   rm -rf conftest*
12372   eval "ac_cv_header_$ac_safe=yes"
12373 else
12374   echo "$ac_err" >&5
12375   echo "configure: failed program was:" >&5
12376   cat conftest.$ac_ext >&5
12377   rm -rf conftest*
12378   eval "ac_cv_header_$ac_safe=no"
12379 fi
12380 rm -f conftest*
12381 fi
12382 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12383   echo "$ac_t""yes" 1>&6
12384     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12385   cat >> confdefs.h <<EOF
12386 #define $ac_tr_hdr 1
12387 EOF
12388  
12389 else
12390   echo "$ac_t""no" 1>&6
12391 fi
12392 done
12393
12394
12395   # now check for gssapi headers.  This is also done here to allow for
12396   # different kerberos include paths
12397   for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
12398 do
12399 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12400 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12401 echo "configure:12402: checking for $ac_hdr" >&5
12402 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12403   echo $ac_n "(cached) $ac_c" 1>&6
12404 else
12405   cat > conftest.$ac_ext <<EOF
12406 #line 12407 "configure"
12407 #include "confdefs.h"
12408 #include <$ac_hdr>
12409 EOF
12410 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12411 { (eval echo configure:12412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12412 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12413 if test -z "$ac_err"; then
12414   rm -rf conftest*
12415   eval "ac_cv_header_$ac_safe=yes"
12416 else
12417   echo "$ac_err" >&5
12418   echo "configure: failed program was:" >&5
12419   cat conftest.$ac_ext >&5
12420   rm -rf conftest*
12421   eval "ac_cv_header_$ac_safe=no"
12422 fi
12423 rm -f conftest*
12424 fi
12425 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12426   echo "$ac_t""yes" 1>&6
12427     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12428   cat >> confdefs.h <<EOF
12429 #define $ac_tr_hdr 1
12430 EOF
12431  
12432 else
12433   echo "$ac_t""no" 1>&6
12434 fi
12435 done
12436
12437
12438   ##################################################################
12439   # we might need the k5crypto and com_err libraries on some systems
12440   echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
12441 echo "configure:12442: checking for _et_list in -lcom_err" >&5
12442 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
12443 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12444   echo $ac_n "(cached) $ac_c" 1>&6
12445 else
12446   ac_save_LIBS="$LIBS"
12447 LIBS="-lcom_err  $LIBS"
12448 cat > conftest.$ac_ext <<EOF
12449 #line 12450 "configure"
12450 #include "confdefs.h"
12451 /* Override any gcc2 internal prototype to avoid an error.  */
12452 /* We use char because int might match the return type of a gcc2
12453     builtin and then its argument prototype would still apply.  */
12454 char _et_list();
12455
12456 int main() {
12457 _et_list()
12458 ; return 0; }
12459 EOF
12460 if { (eval echo configure:12461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12461   rm -rf conftest*
12462   eval "ac_cv_lib_$ac_lib_var=yes"
12463 else
12464   echo "configure: failed program was:" >&5
12465   cat conftest.$ac_ext >&5
12466   rm -rf conftest*
12467   eval "ac_cv_lib_$ac_lib_var=no"
12468 fi
12469 rm -f conftest*
12470 LIBS="$ac_save_LIBS"
12471
12472 fi
12473 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12474   echo "$ac_t""yes" 1>&6
12475   LIBS="$LIBS -lcom_err"
12476 else
12477   echo "$ac_t""no" 1>&6
12478 fi
12479
12480   echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
12481 echo "configure:12482: checking for krb5_encrypt_data in -lk5crypto" >&5
12482 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
12483 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12484   echo $ac_n "(cached) $ac_c" 1>&6
12485 else
12486   ac_save_LIBS="$LIBS"
12487 LIBS="-lk5crypto  $LIBS"
12488 cat > conftest.$ac_ext <<EOF
12489 #line 12490 "configure"
12490 #include "confdefs.h"
12491 /* Override any gcc2 internal prototype to avoid an error.  */
12492 /* We use char because int might match the return type of a gcc2
12493     builtin and then its argument prototype would still apply.  */
12494 char krb5_encrypt_data();
12495
12496 int main() {
12497 krb5_encrypt_data()
12498 ; return 0; }
12499 EOF
12500 if { (eval echo configure:12501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12501   rm -rf conftest*
12502   eval "ac_cv_lib_$ac_lib_var=yes"
12503 else
12504   echo "configure: failed program was:" >&5
12505   cat conftest.$ac_ext >&5
12506   rm -rf conftest*
12507   eval "ac_cv_lib_$ac_lib_var=no"
12508 fi
12509 rm -f conftest*
12510 LIBS="$ac_save_LIBS"
12511
12512 fi
12513 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12514   echo "$ac_t""yes" 1>&6
12515   LIBS="$LIBS -lk5crypto"
12516 else
12517   echo "$ac_t""no" 1>&6
12518 fi
12519
12520
12521   ########################################################
12522   # now see if we can find the krb5 libs in standard paths
12523   # or as specified above
12524   echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
12525 echo "configure:12526: checking for krb5_mk_req_extended in -lkrb5" >&5
12526 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
12527 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12528   echo $ac_n "(cached) $ac_c" 1>&6
12529 else
12530   ac_save_LIBS="$LIBS"
12531 LIBS="-lkrb5  $LIBS"
12532 cat > conftest.$ac_ext <<EOF
12533 #line 12534 "configure"
12534 #include "confdefs.h"
12535 /* Override any gcc2 internal prototype to avoid an error.  */
12536 /* We use char because int might match the return type of a gcc2
12537     builtin and then its argument prototype would still apply.  */
12538 char krb5_mk_req_extended();
12539
12540 int main() {
12541 krb5_mk_req_extended()
12542 ; return 0; }
12543 EOF
12544 if { (eval echo configure:12545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12545   rm -rf conftest*
12546   eval "ac_cv_lib_$ac_lib_var=yes"
12547 else
12548   echo "configure: failed program was:" >&5
12549   cat conftest.$ac_ext >&5
12550   rm -rf conftest*
12551   eval "ac_cv_lib_$ac_lib_var=no"
12552 fi
12553 rm -f conftest*
12554 LIBS="$ac_save_LIBS"
12555
12556 fi
12557 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12558   echo "$ac_t""yes" 1>&6
12559   LIBS="$LIBS -lkrb5";
12560         cat >> confdefs.h <<\EOF
12561 #define HAVE_KRB5 1
12562 EOF
12563
12564 else
12565   echo "$ac_t""no" 1>&6
12566 fi
12567
12568
12569   ########################################################
12570   # now see if we can find the gssapi libs in standard paths
12571   echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
12572 echo "configure:12573: checking for gss_display_status in -lgssapi_krb5" >&5
12573 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
12574 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12575   echo $ac_n "(cached) $ac_c" 1>&6
12576 else
12577   ac_save_LIBS="$LIBS"
12578 LIBS="-lgssapi_krb5  $LIBS"
12579 cat > conftest.$ac_ext <<EOF
12580 #line 12581 "configure"
12581 #include "confdefs.h"
12582 /* Override any gcc2 internal prototype to avoid an error.  */
12583 /* We use char because int might match the return type of a gcc2
12584     builtin and then its argument prototype would still apply.  */
12585 char gss_display_status();
12586
12587 int main() {
12588 gss_display_status()
12589 ; return 0; }
12590 EOF
12591 if { (eval echo configure:12592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12592   rm -rf conftest*
12593   eval "ac_cv_lib_$ac_lib_var=yes"
12594 else
12595   echo "configure: failed program was:" >&5
12596   cat conftest.$ac_ext >&5
12597   rm -rf conftest*
12598   eval "ac_cv_lib_$ac_lib_var=no"
12599 fi
12600 rm -f conftest*
12601 LIBS="$ac_save_LIBS"
12602
12603 fi
12604 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12605   echo "$ac_t""yes" 1>&6
12606   LIBS="$LIBS -lgssapi_krb5";
12607         cat >> confdefs.h <<\EOF
12608 #define HAVE_GSSAPI 1
12609 EOF
12610
12611 else
12612   echo "$ac_t""no" 1>&6
12613 fi
12614
12615 fi
12616
12617 ########################################################
12618 # Compile with LDAP support?
12619
12620 with_ldap_support=yes
12621 echo $ac_n "checking whether to use LDAP""... $ac_c" 1>&6
12622 echo "configure:12623: checking whether to use LDAP" >&5
12623
12624 # Check whether --with-ldap or --without-ldap was given.
12625 if test "${with_ldap+set}" = set; then
12626   withval="$with_ldap"
12627    case "$withval" in
12628     no)
12629         with_ldap_support=no
12630         ;;
12631   esac 
12632 fi
12633
12634
12635 echo "$ac_t""$with_ldap_support" 1>&6
12636
12637 if test x"$with_ldap_support" = x"yes"; then
12638
12639   ##################################################################
12640   # we might need the lber lib on some systems. To avoid link errors
12641   # this test must be before the libldap test
12642   echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
12643 echo "configure:12644: checking for ber_scanf in -llber" >&5
12644 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
12645 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12646   echo $ac_n "(cached) $ac_c" 1>&6
12647 else
12648   ac_save_LIBS="$LIBS"
12649 LIBS="-llber  $LIBS"
12650 cat > conftest.$ac_ext <<EOF
12651 #line 12652 "configure"
12652 #include "confdefs.h"
12653 /* Override any gcc2 internal prototype to avoid an error.  */
12654 /* We use char because int might match the return type of a gcc2
12655     builtin and then its argument prototype would still apply.  */
12656 char ber_scanf();
12657
12658 int main() {
12659 ber_scanf()
12660 ; return 0; }
12661 EOF
12662 if { (eval echo configure:12663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12663   rm -rf conftest*
12664   eval "ac_cv_lib_$ac_lib_var=yes"
12665 else
12666   echo "configure: failed program was:" >&5
12667   cat conftest.$ac_ext >&5
12668   rm -rf conftest*
12669   eval "ac_cv_lib_$ac_lib_var=no"
12670 fi
12671 rm -f conftest*
12672 LIBS="$ac_save_LIBS"
12673
12674 fi
12675 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12676   echo "$ac_t""yes" 1>&6
12677   LIBS="$LIBS -llber"
12678 else
12679   echo "$ac_t""no" 1>&6
12680 fi
12681
12682
12683   ########################################################
12684   # now see if we can find the ldap libs in standard paths
12685   if test x$have_ldap != xyes; then
12686   echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
12687 echo "configure:12688: checking for ldap_domain2hostlist in -lldap" >&5
12688 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
12689 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12690   echo $ac_n "(cached) $ac_c" 1>&6
12691 else
12692   ac_save_LIBS="$LIBS"
12693 LIBS="-lldap  $LIBS"
12694 cat > conftest.$ac_ext <<EOF
12695 #line 12696 "configure"
12696 #include "confdefs.h"
12697 /* Override any gcc2 internal prototype to avoid an error.  */
12698 /* We use char because int might match the return type of a gcc2
12699     builtin and then its argument prototype would still apply.  */
12700 char ldap_domain2hostlist();
12701
12702 int main() {
12703 ldap_domain2hostlist()
12704 ; return 0; }
12705 EOF
12706 if { (eval echo configure:12707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12707   rm -rf conftest*
12708   eval "ac_cv_lib_$ac_lib_var=yes"
12709 else
12710   echo "configure: failed program was:" >&5
12711   cat conftest.$ac_ext >&5
12712   rm -rf conftest*
12713   eval "ac_cv_lib_$ac_lib_var=no"
12714 fi
12715 rm -f conftest*
12716 LIBS="$ac_save_LIBS"
12717
12718 fi
12719 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12720   echo "$ac_t""yes" 1>&6
12721   LIBS="$LIBS -lldap";
12722         cat >> confdefs.h <<\EOF
12723 #define HAVE_LDAP 1
12724 EOF
12725
12726 else
12727   echo "$ac_t""no" 1>&6
12728 fi
12729
12730
12731         ########################################################
12732         # If we have LDAP, does it's rebind procedure take 2 or 3 arguments?
12733         # Check found in pam_ldap 145.
12734         for ac_func in ldap_set_rebind_proc
12735 do
12736 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12737 echo "configure:12738: checking for $ac_func" >&5
12738 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12739   echo $ac_n "(cached) $ac_c" 1>&6
12740 else
12741   cat > conftest.$ac_ext <<EOF
12742 #line 12743 "configure"
12743 #include "confdefs.h"
12744 /* System header to define __stub macros and hopefully few prototypes,
12745     which can conflict with char $ac_func(); below.  */
12746 #include <assert.h>
12747 /* Override any gcc2 internal prototype to avoid an error.  */
12748 /* We use char because int might match the return type of a gcc2
12749     builtin and then its argument prototype would still apply.  */
12750 char $ac_func();
12751
12752 int main() {
12753
12754 /* The GNU C library defines this for functions which it implements
12755     to always fail with ENOSYS.  Some functions are actually named
12756     something starting with __ and the normal name is an alias.  */
12757 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12758 choke me
12759 #else
12760 $ac_func();
12761 #endif
12762
12763 ; return 0; }
12764 EOF
12765 if { (eval echo configure:12766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12766   rm -rf conftest*
12767   eval "ac_cv_func_$ac_func=yes"
12768 else
12769   echo "configure: failed program was:" >&5
12770   cat conftest.$ac_ext >&5
12771   rm -rf conftest*
12772   eval "ac_cv_func_$ac_func=no"
12773 fi
12774 rm -f conftest*
12775 fi
12776
12777 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12778   echo "$ac_t""yes" 1>&6
12779     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12780   cat >> confdefs.h <<EOF
12781 #define $ac_tr_func 1
12782 EOF
12783  
12784 else
12785   echo "$ac_t""no" 1>&6
12786 fi
12787 done
12788
12789         echo $ac_n "checking whether ldap_set_rebind_proc takes 3 arguments""... $ac_c" 1>&6
12790 echo "configure:12791: checking whether ldap_set_rebind_proc takes 3 arguments" >&5
12791 if eval "test \"`echo '$''{'pam_ldap_cv_ldap_set_rebind_proc'+set}'`\" = set"; then
12792   echo $ac_n "(cached) $ac_c" 1>&6
12793 else
12794   
12795         cat > conftest.$ac_ext <<EOF
12796 #line 12797 "configure"
12797 #include "confdefs.h"
12798
12799         #include <lber.h>
12800         #include <ldap.h>
12801 int main() {
12802 ldap_set_rebind_proc(0, 0, 0);
12803 ; return 0; }
12804 EOF
12805 if { (eval echo configure:12806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12806   rm -rf conftest*
12807   pam_ldap_cv_ldap_set_rebind_proc=3
12808 else
12809   echo "configure: failed program was:" >&5
12810   cat conftest.$ac_ext >&5
12811   rm -rf conftest*
12812   pam_ldap_cv_ldap_set_rebind_proc=2
12813 fi
12814 rm -f conftest* 
12815 fi
12816
12817 echo "$ac_t""$pam_ldap_cv_ldap_set_rebind_proc" 1>&6
12818         cat >> confdefs.h <<EOF
12819 #define LDAP_SET_REBIND_PROC_ARGS $pam_ldap_cv_ldap_set_rebind_proc
12820 EOF
12821
12822   fi
12823 fi
12824
12825 ########################################################
12826 # Compile with MySQL support?
12827 # Check whether --with-mysql-prefix or --without-mysql-prefix was given.
12828 if test "${with_mysql_prefix+set}" = set; then
12829   withval="$with_mysql_prefix"
12830   mysql_prefix="$withval"
12831 else
12832   mysql_prefix=""
12833 fi
12834
12835 # Check whether --with-mysql-exec-prefix or --without-mysql-exec-prefix was given.
12836 if test "${with_mysql_exec_prefix+set}" = set; then
12837   withval="$with_mysql_exec_prefix"
12838   mysql_exec_prefix="$withval"
12839 else
12840   mysql_exec_prefix=""
12841 fi
12842
12843 # Check whether --enable-mysqltest or --disable-mysqltest was given.
12844 if test "${enable_mysqltest+set}" = set; then
12845   enableval="$enable_mysqltest"
12846   :
12847 else
12848   enable_mysqltest=yes
12849 fi
12850
12851
12852   if test x$mysql_exec_prefix != x ; then
12853      mysql_args="$mysql_args --exec-prefix=$mysql_exec_prefix"
12854      if test x${MYSQL_CONFIG+set} != xset ; then
12855         MYSQL_CONFIG=$mysql_exec_prefix/bin/mysql_config
12856      fi
12857   fi
12858   if test x$mysql_prefix != x ; then
12859      mysql_args="$mysql_args --prefix=$mysql_prefix"
12860      if test x${MYSQL_CONFIG+set} != xset ; then
12861         MYSQL_CONFIG=$mysql_prefix/bin/mysql_config
12862      fi
12863   fi
12864
12865   
12866   # Extract the first word of "mysql_config", so it can be a program name with args.
12867 set dummy mysql_config; ac_word=$2
12868 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
12869 echo "configure:12870: checking for $ac_word" >&5
12870 if eval "test \"`echo '$''{'ac_cv_path_MYSQL_CONFIG'+set}'`\" = set"; then
12871   echo $ac_n "(cached) $ac_c" 1>&6
12872 else
12873   case "$MYSQL_CONFIG" in
12874   /*)
12875   ac_cv_path_MYSQL_CONFIG="$MYSQL_CONFIG" # Let the user override the test with a path.
12876   ;;
12877   ?:/*)                  
12878   ac_cv_path_MYSQL_CONFIG="$MYSQL_CONFIG" # Let the user override the test with a dos path.
12879   ;;
12880   *)
12881   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
12882   ac_dummy="$PATH"
12883   for ac_dir in $ac_dummy; do 
12884     test -z "$ac_dir" && ac_dir=.
12885     if test -f $ac_dir/$ac_word; then
12886       ac_cv_path_MYSQL_CONFIG="$ac_dir/$ac_word"
12887       break
12888     fi
12889   done
12890   IFS="$ac_save_ifs"
12891   test -z "$ac_cv_path_MYSQL_CONFIG" && ac_cv_path_MYSQL_CONFIG="no"
12892   ;;
12893 esac
12894 fi
12895 MYSQL_CONFIG="$ac_cv_path_MYSQL_CONFIG"
12896 if test -n "$MYSQL_CONFIG"; then
12897   echo "$ac_t""$MYSQL_CONFIG" 1>&6
12898 else
12899   echo "$ac_t""no" 1>&6
12900 fi
12901
12902   min_mysql_version=0.11.0
12903   echo $ac_n "checking for MYSQL - version >= $min_mysql_version""... $ac_c" 1>&6
12904 echo "configure:12905: checking for MYSQL - version >= $min_mysql_version" >&5
12905   no_mysql=""
12906   if test "$MYSQL_CONFIG" = "no" ; then
12907     no_mysql=yes
12908   else
12909     MYSQL_CFLAGS=`$MYSQL_CONFIG $mysqlconf_args --cflags | sed -e "s/'//g"`
12910     MYSQL_LIBS=`$MYSQL_CONFIG $mysqlconf_args --libs | sed -e "s/'//g"`
12911
12912     mysql_major_version=`$MYSQL_CONFIG $mysql_args --version | \
12913            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
12914     mysql_minor_version=`$MYSQL_CONFIG $mysql_args --version | \
12915            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
12916     mysql_micro_version=`$MYSQL_CONFIG $mysql_config_args --version | \
12917            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
12918     if test "x$enable_mysqltest" = "xyes" ; then
12919       ac_save_CFLAGS="$CFLAGS"
12920       ac_save_LIBS="$LIBS"
12921       CFLAGS="$CFLAGS $MYSQL_CFLAGS"
12922       LIBS="$LIBS $MYSQL_LIBS"
12923       rm -f conf.mysqltest
12924       if test "$cross_compiling" = yes; then
12925   echo $ac_n "cross compiling; assumed OK... $ac_c"
12926 else
12927   cat > conftest.$ac_ext <<EOF
12928 #line 12929 "configure"
12929 #include "confdefs.h"
12930
12931 #include <stdio.h>
12932 #include <stdlib.h>
12933 #include <string.h>
12934 #include <mysql.h>
12935
12936 char*
12937 my_strdup (char *str)
12938 {
12939   char *new_str;
12940
12941   if (str)
12942     {
12943       new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
12944       strcpy (new_str, str);
12945     }
12946   else
12947     new_str = NULL;
12948
12949   return new_str;
12950 }
12951
12952 int main (int argc, char *argv[])
12953 {
12954 int major, minor, micro;
12955   char *tmp_version;
12956
12957   /* This hangs on some systems (?)
12958   system ("touch conf.mysqltest");
12959   */
12960   { FILE *fp = fopen("conf.mysqltest", "a"); if ( fp ) fclose(fp); }
12961
12962   /* HP/UX 9 (%@#!) writes to sscanf strings */
12963   tmp_version = my_strdup("$min_mysql_version");
12964   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
12965      printf("%s, bad version string\n", "$min_mysql_version");
12966      exit(1);
12967    }
12968
12969    if (($mysql_major_version > major) ||
12970       (($mysql_major_version == major) && ($mysql_minor_version > minor)) ||
12971       (($mysql_major_version == major) && ($mysql_minor_version == minor) && ($mysql_micro_version >= micro)))
12972     {
12973       return 0;
12974     }
12975   else
12976     {
12977       printf("\n*** 'mysql_config --version' returned %d.%d.%d, but the minimum version\n", $mysql_major_version, $mysql_minor_version, $mysql_micro_version);
12978       printf("*** of MYSQL required is %d.%d.%d. If mysql_config is correct, then it is\n", major, minor, micro);
12979       printf("*** best to upgrade to the required version.\n");
12980       printf("*** If mysql_config was wrong, set the environment variable MYSQL_CONFIG\n");
12981       printf("*** to point to the correct copy of mysql_config, and remove the file\n");
12982       printf("*** config.cache before re-running configure\n");
12983       return 1;
12984     }
12985 }
12986
12987
12988 EOF
12989 if { (eval echo configure:12990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12990 then
12991   :
12992 else
12993   echo "configure: failed program was:" >&5
12994   cat conftest.$ac_ext >&5
12995   rm -fr conftest*
12996   no_mysql=yes
12997 fi
12998 rm -fr conftest*
12999 fi
13000
13001        CFLAGS="$ac_save_CFLAGS"
13002        LIBS="$ac_save_LIBS"
13003      fi
13004   fi
13005   if test "x$no_mysql" = x ; then
13006      echo "$ac_t""yes" 1>&6
13007      MODULE_MYSQL=bin/mysql.so
13008   else
13009      echo "$ac_t""no" 1>&6
13010      if test "$MYSQL_CONFIG" = "no" ; then
13011        echo "*** The mysql_config script installed by MYSQL could not be found"
13012        echo "*** If MYSQL was installed in PREFIX, make sure PREFIX/bin is in"
13013        echo "*** your path, or set the MYSQL_CONFIG environment variable to the"
13014        echo "*** full path to mysql_config."
13015      else
13016        if test -f conf.mysqltest ; then
13017         :
13018        else
13019           echo "*** Could not run MYSQL test program, checking why..."
13020           CFLAGS="$CFLAGS $MYSQL_CFLAGS"
13021           LIBS="$LIBS $MYSQL_LIBS"
13022           cat > conftest.$ac_ext <<EOF
13023 #line 13024 "configure"
13024 #include "confdefs.h"
13025
13026 #include <stdio.h>
13027 #include <mysql.h>
13028
13029 int main(int argc, char *argv[])
13030 { return 0; }
13031 #undef  main
13032 #define main K_and_R_C_main
13033
13034 int main() {
13035  return 0; 
13036 ; return 0; }
13037 EOF
13038 if { (eval echo configure:13039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13039   rm -rf conftest*
13040    echo "*** The test program compiled, but did not run. This usually means"
13041           echo "*** that the run-time linker is not finding MYSQL or finding the wrong"
13042           echo "*** version of MYSQL. If it is not finding MYSQL, you'll need to set your"
13043           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
13044           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
13045           echo "*** is required on your system"
13046     echo "***"
13047           echo "*** If you have an old version installed, it is best to remove it, although"
13048           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
13049 else
13050   echo "configure: failed program was:" >&5
13051   cat conftest.$ac_ext >&5
13052   rm -rf conftest*
13053    echo "*** The test program failed to compile or link. See the file config.log for the"
13054           echo "*** exact error that occured. This usually means MYSQL was incorrectly installed"
13055           echo "*** or that you have moved MYSQL since it was installed. In the latter case, you"
13056           echo "*** may want to edit the mysql_config script: $MYSQL_CONFIG" 
13057 fi
13058 rm -f conftest*
13059           CFLAGS="$ac_save_CFLAGS"
13060           LIBS="$ac_save_LIBS"
13061        fi
13062      fi
13063      MYSQL_CFLAGS=""
13064      MYSQL_LIBS=""
13065      MODULE_MYSQL=
13066   fi
13067   
13068   
13069   rm -f conf.mysqltest
13070
13071 CFLAGS="$CFLAGS $MYSQL_CFLAGS"
13072
13073
13074 ########################################################
13075 # Compile with XML support?
13076  
13077 # Check whether --with-xml-prefix or --without-xml-prefix was given.
13078 if test "${with_xml_prefix+set}" = set; then
13079   withval="$with_xml_prefix"
13080   xml_config_prefix="$withval"
13081 else
13082   xml_config_prefix=""
13083 fi
13084
13085 # Check whether --with-xml-exec-prefix or --without-xml-exec-prefix was given.
13086 if test "${with_xml_exec_prefix+set}" = set; then
13087   withval="$with_xml_exec_prefix"
13088   xml_config_exec_prefix="$withval"
13089 else
13090   xml_config_exec_prefix=""
13091 fi
13092
13093 # Check whether --enable-xmltest or --disable-xmltest was given.
13094 if test "${enable_xmltest+set}" = set; then
13095   enableval="$enable_xmltest"
13096   :
13097 else
13098   enable_xmltest=yes
13099 fi
13100
13101
13102   if test x$xml_config_exec_prefix != x ; then
13103      xml_config_args="$xml_config_args --exec-prefix=$xml_config_exec_prefix"
13104      if test x${XML2_CONFIG+set} != xset ; then
13105         XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config
13106      fi
13107   fi
13108   if test x$xml_config_prefix != x ; then
13109      xml_config_args="$xml_config_args --prefix=$xml_config_prefix"
13110      if test x${XML2_CONFIG+set} != xset ; then
13111         XML2_CONFIG=$xml_config_prefix/bin/xml2-config
13112      fi
13113   fi
13114
13115   # Extract the first word of "xml2-config", so it can be a program name with args.
13116 set dummy xml2-config; ac_word=$2
13117 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13118 echo "configure:13119: checking for $ac_word" >&5
13119 if eval "test \"`echo '$''{'ac_cv_path_XML2_CONFIG'+set}'`\" = set"; then
13120   echo $ac_n "(cached) $ac_c" 1>&6
13121 else
13122   case "$XML2_CONFIG" in
13123   /*)
13124   ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
13125   ;;
13126   ?:/*)                  
13127   ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a dos path.
13128   ;;
13129   *)
13130   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13131   ac_dummy="$PATH"
13132   for ac_dir in $ac_dummy; do 
13133     test -z "$ac_dir" && ac_dir=.
13134     if test -f $ac_dir/$ac_word; then
13135       ac_cv_path_XML2_CONFIG="$ac_dir/$ac_word"
13136       break
13137     fi
13138   done
13139   IFS="$ac_save_ifs"
13140   test -z "$ac_cv_path_XML2_CONFIG" && ac_cv_path_XML2_CONFIG="no"
13141   ;;
13142 esac
13143 fi
13144 XML2_CONFIG="$ac_cv_path_XML2_CONFIG"
13145 if test -n "$XML2_CONFIG"; then
13146   echo "$ac_t""$XML2_CONFIG" 1>&6
13147 else
13148   echo "$ac_t""no" 1>&6
13149 fi
13150
13151   min_xml_version=2.0.0
13152   echo $ac_n "checking for libxml - version >= $min_xml_version""... $ac_c" 1>&6
13153 echo "configure:13154: checking for libxml - version >= $min_xml_version" >&5
13154   no_xml=""
13155   if test "$XML2_CONFIG" = "no" ; then
13156     no_xml=yes
13157   else
13158     XML_CFLAGS=`$XML2_CONFIG $xml_config_args --cflags`
13159     XML_LIBS=`$XML2_CONFIG $xml_config_args --libs`
13160     xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \
13161            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
13162     xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \
13163            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
13164     xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \
13165            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
13166     if test "x$enable_xmltest" = "xyes" ; then
13167       ac_save_CFLAGS="$CFLAGS"
13168       ac_save_LIBS="$LIBS"
13169       CFLAGS="$CFLAGS $XML_CFLAGS"
13170       LIBS="$XML_LIBS $LIBS"
13171       rm -f conf.xmltest
13172       if test "$cross_compiling" = yes; then
13173   echo $ac_n "cross compiling; assumed OK... $ac_c"
13174 else
13175   cat > conftest.$ac_ext <<EOF
13176 #line 13177 "configure"
13177 #include "confdefs.h"
13178
13179 #include <stdlib.h>
13180 #include <stdio.h>
13181 #include <string.h>
13182 #include <libxml/xmlversion.h>
13183
13184 int 
13185 main()
13186 {
13187   int xml_major_version, xml_minor_version, xml_micro_version;
13188   int major, minor, micro;
13189   char *tmp_version;
13190
13191   system("touch conf.xmltest");
13192
13193   /* Capture xml2-config output via autoconf/configure variables */
13194   /* HP/UX 9 (%@#!) writes to sscanf strings */
13195   tmp_version = (char *)strdup("$min_xml_version");
13196   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
13197      printf("%s, bad version string from xml2-config\n", "$min_xml_version");
13198      exit(1);
13199    }
13200    free(tmp_version);
13201
13202    /* Capture the version information from the header files */
13203    tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION);
13204    if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) {
13205      printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION");
13206      exit(1);
13207    }
13208    free(tmp_version);
13209
13210  /* Compare xml2-config output to the libxml headers */
13211   if ((xml_major_version != $xml_config_major_version) ||
13212       (xml_minor_version != $xml_config_minor_version) ||
13213       (xml_micro_version != $xml_config_micro_version))
13214     {
13215       printf("*** libxml header files (version %d.%d.%d) do not match\n",
13216          xml_major_version, xml_minor_version, xml_micro_version);
13217       printf("*** xml2-config (version %d.%d.%d)\n",
13218          $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version);
13219       return 1;
13220     } 
13221 /* Compare the headers to the library to make sure we match */
13222   /* Less than ideal -- doesn't provide us with return value feedback, 
13223    * only exits if there's a serious mismatch between header and library.
13224    */
13225     LIBXML_TEST_VERSION;
13226
13227     /* Test that the library is greater than our minimum version */
13228     if ((xml_major_version > major) ||
13229         ((xml_major_version == major) && (xml_minor_version > minor)) ||
13230         ((xml_major_version == major) && (xml_minor_version == minor) &&
13231         (xml_micro_version >= micro)))
13232       {
13233         return 0;
13234        }
13235      else
13236       {
13237         printf("\n*** An old version of libxml (%d.%d.%d) was found.\n",
13238                xml_major_version, xml_minor_version, xml_micro_version);
13239         printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n",
13240            major, minor, micro);
13241         printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n");
13242         printf("***\n");
13243         printf("*** If you have already installed a sufficiently new version, this error\n");
13244         printf("*** probably means that the wrong copy of the xml2-config shell script is\n");
13245         printf("*** being found. The easiest way to fix this is to remove the old version\n");
13246         printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n");
13247         printf("*** correct copy of xml2-config. (In this case, you will have to\n");
13248         printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
13249         printf("*** so that the correct libraries are found at run-time))\n");
13250     }
13251   return 1;
13252 }
13253
13254 EOF
13255 if { (eval echo configure:13256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13256 then
13257   :
13258 else
13259   echo "configure: failed program was:" >&5
13260   cat conftest.$ac_ext >&5
13261   rm -fr conftest*
13262   no_xml=yes
13263 fi
13264 rm -fr conftest*
13265 fi
13266
13267        CFLAGS="$ac_save_CFLAGS"
13268        LIBS="$ac_save_LIBS"
13269      fi
13270   fi
13271
13272   if test "x$no_xml" = x ; then
13273      echo "$ac_t""yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version)" 1>&6
13274      MODULE_XML=bin/xml.so     
13275   else
13276      echo "$ac_t""no" 1>&6
13277      if test "$XML2_CONFIG" = "no" ; then
13278        echo "*** The xml2-config script installed by LIBXML could not be found"
13279        echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in"
13280        echo "*** your path, or set the XML2_CONFIG environment variable to the"
13281        echo "*** full path to xml2-config."
13282      else
13283        if test -f conf.xmltest ; then
13284         :
13285        else
13286           echo "*** Could not run libxml test program, checking why..."
13287           CFLAGS="$CFLAGS $XML_CFLAGS"
13288           LIBS="$LIBS $XML_LIBS"
13289           cat > conftest.$ac_ext <<EOF
13290 #line 13291 "configure"
13291 #include "confdefs.h"
13292
13293 #include <libxml/xmlversion.h>
13294 #include <stdio.h>
13295
13296 int main() {
13297  LIBXML_TEST_VERSION; return 0;
13298 ; return 0; }
13299 EOF
13300 if { (eval echo configure:13301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13301   rm -rf conftest*
13302    echo "*** The test program compiled, but did not run. This usually means"
13303           echo "*** that the run-time linker is not finding LIBXML or finding the wrong"
13304           echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your"
13305           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
13306           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
13307           echo "*** is required on your system"
13308           echo "***"
13309           echo "*** If you have an old version installed, it is best to remove it, although"
13310           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" 
13311 else
13312   echo "configure: failed program was:" >&5
13313   cat conftest.$ac_ext >&5
13314   rm -rf conftest*
13315    echo "*** The test program failed to compile or link. See the file config.log for the"
13316           echo "*** exact error that occured. This usually means LIBXML was incorrectly installed"
13317           echo "*** or that you have moved LIBXML since it was installed. In the latter case, you"
13318           echo "*** may want to edit the xml2-config script: $XML2_CONFIG" 
13319 fi
13320 rm -f conftest*
13321           CFLAGS="$ac_save_CFLAGS"
13322           LIBS="$ac_save_LIBS"
13323        fi
13324      fi
13325
13326      XML_CFLAGS=""
13327      XML_LIBS=""
13328      MODULE_XML=
13329   fi
13330   
13331   
13332   rm -f conf.xmltest
13333
13334 CFLAGS="$CFLAGS $XML_CFLAGS"
13335
13336
13337 #################################################
13338 # check for automount support
13339 echo $ac_n "checking whether to use automount""... $ac_c" 1>&6
13340 echo "configure:13341: checking whether to use automount" >&5
13341 # Check whether --with-automount or --without-automount was given.
13342 if test "${with_automount+set}" = set; then
13343   withval="$with_automount"
13344    case "$withval" in
13345   yes)
13346     echo "$ac_t""yes" 1>&6
13347     cat >> confdefs.h <<\EOF
13348 #define WITH_AUTOMOUNT 1
13349 EOF
13350
13351     ;;
13352   *)
13353     echo "$ac_t""no" 1>&6
13354     ;;
13355   esac 
13356 else
13357   echo "$ac_t""no" 1>&6
13358
13359 fi
13360
13361
13362 #################################################
13363 # check for smbmount support
13364 echo $ac_n "checking whether to use smbmount""... $ac_c" 1>&6
13365 echo "configure:13366: checking whether to use smbmount" >&5
13366 # Check whether --with-smbmount or --without-smbmount was given.
13367 if test "${with_smbmount+set}" = set; then
13368   withval="$with_smbmount"
13369    case "$withval" in
13370   yes)
13371         case "$host_os" in
13372         *linux*)
13373                 echo "$ac_t""yes" 1>&6
13374                 cat >> confdefs.h <<\EOF
13375 #define WITH_SMBMOUNT 1
13376 EOF
13377
13378                 EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbmount bin/smbmnt bin/smbumount"
13379                 ;;
13380         *)
13381                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
13382                 ;;
13383         esac
13384     ;;
13385   *)
13386     echo "$ac_t""no" 1>&6
13387     ;;
13388   esac 
13389 else
13390   echo "$ac_t""no" 1>&6
13391
13392 fi
13393
13394
13395
13396 #################################################
13397 # check for a PAM clear-text auth, accounts, password and session support
13398 with_pam_for_crypt=no
13399 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
13400 echo "configure:13401: checking whether to use PAM" >&5
13401 # Check whether --with-pam or --without-pam was given.
13402 if test "${with_pam+set}" = set; then
13403   withval="$with_pam"
13404    case "$withval" in
13405   yes)
13406     echo "$ac_t""yes" 1>&6
13407     cat >> confdefs.h <<\EOF
13408 #define WITH_PAM 1
13409 EOF
13410
13411     AUTHLIBS="$AUTHLIBS -lpam"
13412     with_pam_for_crypt=yes
13413     ;;
13414   *)
13415     echo "$ac_t""no" 1>&6
13416     ;;
13417   esac 
13418 else
13419   echo "$ac_t""no" 1>&6
13420
13421 fi
13422
13423
13424 # we can't build a pam module if we don't have pam.
13425 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
13426 echo "configure:13427: checking for pam_get_data in -lpam" >&5
13427 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
13428 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13429   echo $ac_n "(cached) $ac_c" 1>&6
13430 else
13431   ac_save_LIBS="$LIBS"
13432 LIBS="-lpam  $LIBS"
13433 cat > conftest.$ac_ext <<EOF
13434 #line 13435 "configure"
13435 #include "confdefs.h"
13436 /* Override any gcc2 internal prototype to avoid an error.  */
13437 /* We use char because int might match the return type of a gcc2
13438     builtin and then its argument prototype would still apply.  */
13439 char pam_get_data();
13440
13441 int main() {
13442 pam_get_data()
13443 ; return 0; }
13444 EOF
13445 if { (eval echo configure:13446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13446   rm -rf conftest*
13447   eval "ac_cv_lib_$ac_lib_var=yes"
13448 else
13449   echo "configure: failed program was:" >&5
13450   cat conftest.$ac_ext >&5
13451   rm -rf conftest*
13452   eval "ac_cv_lib_$ac_lib_var=no"
13453 fi
13454 rm -f conftest*
13455 LIBS="$ac_save_LIBS"
13456
13457 fi
13458 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13459   echo "$ac_t""yes" 1>&6
13460   cat >> confdefs.h <<\EOF
13461 #define HAVE_LIBPAM 1
13462 EOF
13463
13464 else
13465   echo "$ac_t""no" 1>&6
13466 fi
13467
13468
13469 #################################################
13470 # check for pam_smbpass support
13471 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
13472 echo "configure:13473: checking whether to use pam_smbpass" >&5
13473 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
13474 if test "${with_pam_smbpass+set}" = set; then
13475   withval="$with_pam_smbpass"
13476    case "$withval" in
13477   yes)
13478     echo "$ac_t""yes" 1>&6
13479
13480 # Conditions under which pam_smbpass should not be built.
13481
13482        if test x$PICFLAG = x; then
13483           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
13484        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
13485           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
13486        else
13487           SHLIB_PROGS="$SHLIB_PROGS bin/pam_smbpass.so"
13488        fi
13489     ;;
13490   *)
13491     echo "$ac_t""no" 1>&6
13492     ;;
13493   esac 
13494 else
13495   echo "$ac_t""no" 1>&6
13496
13497 fi
13498
13499
13500
13501 ###############################################
13502 # test for where we get crypt() from, but only
13503 # if not using PAM
13504 if test x"$with_pam_for_crypt" = x"no"; then
13505 for ac_func in crypt
13506 do
13507 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13508 echo "configure:13509: checking for $ac_func" >&5
13509 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
13510   echo $ac_n "(cached) $ac_c" 1>&6
13511 else
13512   cat > conftest.$ac_ext <<EOF
13513 #line 13514 "configure"
13514 #include "confdefs.h"
13515 /* System header to define __stub macros and hopefully few prototypes,
13516     which can conflict with char $ac_func(); below.  */
13517 #include <assert.h>
13518 /* Override any gcc2 internal prototype to avoid an error.  */
13519 /* We use char because int might match the return type of a gcc2
13520     builtin and then its argument prototype would still apply.  */
13521 char $ac_func();
13522
13523 int main() {
13524
13525 /* The GNU C library defines this for functions which it implements
13526     to always fail with ENOSYS.  Some functions are actually named
13527     something starting with __ and the normal name is an alias.  */
13528 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13529 choke me
13530 #else
13531 $ac_func();
13532 #endif
13533
13534 ; return 0; }
13535 EOF
13536 if { (eval echo configure:13537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13537   rm -rf conftest*
13538   eval "ac_cv_func_$ac_func=yes"
13539 else
13540   echo "configure: failed program was:" >&5
13541   cat conftest.$ac_ext >&5
13542   rm -rf conftest*
13543   eval "ac_cv_func_$ac_func=no"
13544 fi
13545 rm -f conftest*
13546 fi
13547
13548 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13549   echo "$ac_t""yes" 1>&6
13550     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13551   cat >> confdefs.h <<EOF
13552 #define $ac_tr_func 1
13553 EOF
13554  
13555 else
13556   echo "$ac_t""no" 1>&6
13557 fi
13558 done
13559
13560 if test x"$ac_cv_func_crypt" = x"no"; then
13561     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13562 echo "configure:13563: checking for crypt in -lcrypt" >&5
13563 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
13564 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13565   echo $ac_n "(cached) $ac_c" 1>&6
13566 else
13567   ac_save_LIBS="$LIBS"
13568 LIBS="-lcrypt  $LIBS"
13569 cat > conftest.$ac_ext <<EOF
13570 #line 13571 "configure"
13571 #include "confdefs.h"
13572 /* Override any gcc2 internal prototype to avoid an error.  */
13573 /* We use char because int might match the return type of a gcc2
13574     builtin and then its argument prototype would still apply.  */
13575 char crypt();
13576
13577 int main() {
13578 crypt()
13579 ; return 0; }
13580 EOF
13581 if { (eval echo configure:13582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13582   rm -rf conftest*
13583   eval "ac_cv_lib_$ac_lib_var=yes"
13584 else
13585   echo "configure: failed program was:" >&5
13586   cat conftest.$ac_ext >&5
13587   rm -rf conftest*
13588   eval "ac_cv_lib_$ac_lib_var=no"
13589 fi
13590 rm -f conftest*
13591 LIBS="$ac_save_LIBS"
13592
13593 fi
13594 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13595   echo "$ac_t""yes" 1>&6
13596   AUTHLIBS="$AUTHLIBS -lcrypt";
13597         cat >> confdefs.h <<\EOF
13598 #define HAVE_CRYPT 1
13599 EOF
13600
13601 else
13602   echo "$ac_t""no" 1>&6
13603 fi
13604
13605 fi
13606 fi
13607
13608 ##
13609 ## moved after the check for -lcrypt in order to
13610 ## ensure that the necessary libraries are included
13611 ## check checking for truncated salt.  Wrapped by the
13612 ## $with_pam_for_crypt variable as above   --jerry
13613 ##
13614 if test $with_pam_for_crypt = no; then
13615 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
13616 echo "configure:13617: checking for a crypt that needs truncated salt" >&5
13617 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
13618   echo $ac_n "(cached) $ac_c" 1>&6
13619 else
13620   
13621 crypt_LIBS="$LIBS"
13622 LIBS="$AUTHLIBS $LIBS"
13623 if test "$cross_compiling" = yes; then
13624   samba_cv_HAVE_TRUNCATED_SALT=cross
13625 else
13626   cat > conftest.$ac_ext <<EOF
13627 #line 13628 "configure"
13628 #include "confdefs.h"
13629 #include "${srcdir-.}/tests/crypttest.c"
13630 EOF
13631 if { (eval echo configure:13632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13632 then
13633   samba_cv_HAVE_TRUNCATED_SALT=no
13634 else
13635   echo "configure: failed program was:" >&5
13636   cat conftest.$ac_ext >&5
13637   rm -fr conftest*
13638   samba_cv_HAVE_TRUNCATED_SALT=yes
13639 fi
13640 rm -fr conftest*
13641 fi
13642
13643 LIBS="$crypt_LIBS"
13644 fi
13645
13646 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
13647 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
13648         cat >> confdefs.h <<\EOF
13649 #define HAVE_TRUNCATED_SALT 1
13650 EOF
13651
13652 fi
13653 fi
13654
13655 # New experimental SAM system
13656
13657 echo $ac_n "checking whether to build the new (experimental) SAM database""... $ac_c" 1>&6
13658 echo "configure:13659: checking whether to build the new (experimental) SAM database" >&5
13659 # Check whether --with-sam or --without-sam was given.
13660 if test "${with_sam+set}" = set; then
13661   withval="$with_sam"
13662    case "$withval" in
13663   yes)
13664     echo "$ac_t""yes" 1>&6
13665     cat >> confdefs.h <<\EOF
13666 #define WITH_SAM 1
13667 EOF
13668
13669     ;;
13670   *)
13671     echo "$ac_t""no" 1>&6
13672     ;;
13673   esac 
13674 else
13675   echo "$ac_t""no" 1>&6
13676
13677 fi
13678
13679
13680
13681 ########################################################################################
13682 ##
13683 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
13684 ##
13685 ########################################################################################
13686
13687 #################################################
13688 # check for a LDAP password database configuration backwards compatibility
13689 echo $ac_n "checking whether to use LDAP SAM 2.2 compatible configuration""... $ac_c" 1>&6
13690 echo "configure:13691: checking whether to use LDAP SAM 2.2 compatible configuration" >&5
13691 # Check whether --with-ldapsam or --without-ldapsam was given.
13692 if test "${with_ldapsam+set}" = set; then
13693   withval="$with_ldapsam"
13694    case "$withval" in
13695   yes)
13696     echo "$ac_t""yes" 1>&6
13697     cat >> confdefs.h <<\EOF
13698 #define WITH_LDAP_SAMCONFIG 1
13699 EOF
13700
13701     ;;
13702   *)
13703     echo "$ac_t""no" 1>&6
13704     ;;
13705   esac 
13706 else
13707   echo "$ac_t""no" 1>&6
13708
13709 fi
13710
13711
13712 #################################################
13713 # check for a TDB password database
13714 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
13715 echo "configure:13716: checking whether to use TDB SAM database" >&5
13716 # Check whether --with-tdbsam or --without-tdbsam was given.
13717 if test "${with_tdbsam+set}" = set; then
13718   withval="$with_tdbsam"
13719    case "$withval" in
13720   yes)
13721     echo "$ac_t""yes" 1>&6
13722     cat >> confdefs.h <<\EOF
13723 #define WITH_TDB_SAM 1
13724 EOF
13725
13726     ;;
13727   *)
13728     echo "$ac_t""no" 1>&6
13729     ;;
13730   esac 
13731 else
13732   echo "$ac_t""no" 1>&6
13733
13734 fi
13735
13736
13737 #################################################
13738 # check for a NISPLUS password database
13739 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
13740 echo "configure:13741: checking whether to use NISPLUS SAM database" >&5
13741 # Check whether --with-nisplussam or --without-nisplussam was given.
13742 if test "${with_nisplussam+set}" = set; then
13743   withval="$with_nisplussam"
13744    case "$withval" in
13745   yes)
13746     echo "$ac_t""yes" 1>&6
13747     cat >> confdefs.h <<\EOF
13748 #define WITH_NISPLUS_SAM 1
13749 EOF
13750
13751     ;;
13752   *)
13753     echo "$ac_t""no" 1>&6
13754     ;;
13755   esac 
13756 else
13757   echo "$ac_t""no" 1>&6
13758
13759 fi
13760
13761
13762 ########################################################################################
13763 ##
13764 ## END OF TESTS FOR SAM BACKENDS.  
13765 ##
13766 ########################################################################################
13767
13768 #################################################
13769 # check for a NISPLUS_HOME support 
13770 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
13771 echo "configure:13772: checking whether to use NISPLUS_HOME" >&5
13772 # Check whether --with-nisplus-home or --without-nisplus-home was given.
13773 if test "${with_nisplus_home+set}" = set; then
13774   withval="$with_nisplus_home"
13775    case "$withval" in
13776   yes)
13777     echo "$ac_t""yes" 1>&6
13778     cat >> confdefs.h <<\EOF
13779 #define WITH_NISPLUS_HOME 1
13780 EOF
13781
13782     ;;
13783   *)
13784     echo "$ac_t""no" 1>&6
13785     ;;
13786   esac 
13787 else
13788   echo "$ac_t""no" 1>&6
13789
13790 fi
13791
13792
13793 #################################################
13794 # check for syslog logging
13795 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
13796 echo "configure:13797: checking whether to use syslog logging" >&5
13797 # Check whether --with-syslog or --without-syslog was given.
13798 if test "${with_syslog+set}" = set; then
13799   withval="$with_syslog"
13800    case "$withval" in
13801   yes)
13802     echo "$ac_t""yes" 1>&6
13803     cat >> confdefs.h <<\EOF
13804 #define WITH_SYSLOG 1
13805 EOF
13806
13807     ;;
13808   *)
13809     echo "$ac_t""no" 1>&6
13810     ;;
13811   esac 
13812 else
13813   echo "$ac_t""no" 1>&6
13814
13815 fi
13816
13817
13818 #################################################
13819 # check for a shared memory profiling support
13820 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
13821 echo "configure:13822: checking whether to use profiling" >&5
13822 # Check whether --with-profiling-data or --without-profiling-data was given.
13823 if test "${with_profiling_data+set}" = set; then
13824   withval="$with_profiling_data"
13825    case "$withval" in
13826   yes)
13827     echo "$ac_t""yes" 1>&6
13828     cat >> confdefs.h <<\EOF
13829 #define WITH_PROFILE 1
13830 EOF
13831
13832     ;;
13833   *)
13834     echo "$ac_t""no" 1>&6
13835     ;;
13836   esac 
13837 else
13838   echo "$ac_t""no" 1>&6
13839
13840 fi
13841
13842
13843
13844 #################################################
13845 # check for experimental disk-quotas support
13846 QUOTAOBJS=smbd/noquotas.o
13847
13848 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
13849 echo "configure:13850: checking whether to support disk-quotas" >&5
13850 # Check whether --with-quotas or --without-quotas was given.
13851 if test "${with_quotas+set}" = set; then
13852   withval="$with_quotas"
13853    case "$withval" in
13854   yes)
13855     echo "$ac_t""yes" 1>&6
13856     case "$host_os" in
13857       *linux*)
13858         # Check for kernel 2.4.x quota braindamage...
13859         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
13860 echo "configure:13861: checking for linux 2.4.x quota braindamage.." >&5
13861 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
13862   echo $ac_n "(cached) $ac_c" 1>&6
13863 else
13864   
13865         cat > conftest.$ac_ext <<EOF
13866 #line 13867 "configure"
13867 #include "confdefs.h"
13868 #include <stdio.h>
13869 #include <sys/types.h>
13870 #include <asm/types.h>
13871 #include <linux/quota.h>
13872 #include <mntent.h>
13873 #include <linux/unistd.h>
13874 int main() {
13875 struct mem_dqblk D;
13876 ; return 0; }
13877 EOF
13878 if { (eval echo configure:13879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13879   rm -rf conftest*
13880   samba_cv_linux_2_4_quota_braindamage=yes
13881 else
13882   echo "configure: failed program was:" >&5
13883   cat conftest.$ac_ext >&5
13884   rm -rf conftest*
13885   samba_cv_linux_2_4_quota_braindamage=no
13886 fi
13887 rm -f conftest*
13888 fi
13889
13890 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
13891 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
13892         cat >> confdefs.h <<\EOF
13893 #define LINUX_QUOTAS_2 1
13894 EOF
13895
13896 else
13897         cat >> confdefs.h <<\EOF
13898 #define LINUX_QUOTAS_1 1
13899 EOF
13900
13901 fi
13902         ;;
13903       *)
13904         ;;
13905     esac
13906     QUOTAOBJS=smbd/quotas.o
13907     cat >> confdefs.h <<\EOF
13908 #define WITH_QUOTAS 1
13909 EOF
13910
13911     ;;
13912   *)
13913     echo "$ac_t""no" 1>&6
13914     ;;
13915   esac 
13916 else
13917   echo "$ac_t""no" 1>&6
13918
13919 fi
13920
13921
13922
13923 #################################################
13924 # check for experimental utmp accounting
13925
13926 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
13927 echo "configure:13928: checking whether to support utmp accounting" >&5
13928 # Check whether --with-utmp or --without-utmp was given.
13929 if test "${with_utmp+set}" = set; then
13930   withval="$with_utmp"
13931    case "$withval" in
13932   yes)
13933     echo "$ac_t""yes" 1>&6
13934     cat >> confdefs.h <<\EOF
13935 #define WITH_UTMP 1
13936 EOF
13937
13938     ;;
13939   *)
13940     echo "$ac_t""no" 1>&6
13941     ;;
13942   esac 
13943 else
13944   echo "$ac_t""no" 1>&6
13945
13946 fi
13947
13948
13949 #################################################
13950 # choose native language(s) of man pages
13951 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
13952 echo "configure:13953: checking chosen man pages' language(s)" >&5
13953 # Check whether --with-manpages-langs or --without-manpages-langs was given.
13954 if test "${with_manpages_langs+set}" = set; then
13955   withval="$with_manpages_langs"
13956    case "$withval" in
13957   yes|no)
13958     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
13959     manlangs="en"
13960   ;;
13961   *)
13962     manlangs="$withval"
13963   ;;
13964   esac
13965
13966   echo "$ac_t""$manlangs" 1>&6
13967   manlangs=`echo $manlangs | sed "s/,/ /g"`   # replacing commas with spaces to produce a list
13968   
13969 else
13970   manlangs="en"
13971   echo "$ac_t""$manlangs" 1>&6
13972   
13973
13974 fi
13975
13976
13977 #################################################
13978 # should we build libsmbclient?
13979
13980 LIBSMBCLIENT_SHARED=
13981 LIBSMBCLIENT=
13982 echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6
13983 echo "configure:13984: checking whether to build the libsmbclient shared library" >&5
13984 # Check whether --with-libsmbclient or --without-libsmbclient was given.
13985 if test "${with_libsmbclient+set}" = set; then
13986   withval="$with_libsmbclient"
13987    case "$withval" in
13988   no) 
13989      echo "$ac_t""no" 1>&6
13990      ;;
13991   *)
13992      if test $BLDSHARED = true; then
13993         LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
13994         LIBSMBCLIENT=libsmbclient
13995         echo "$ac_t""yes" 1>&6
13996      else
13997         echo "$ac_t""no shared library support" 1>&6
13998      fi
13999      ;;
14000   esac 
14001 else
14002   echo "$ac_t""yes" 1>&6
14003
14004 fi
14005
14006
14007
14008 #################################################
14009 # these tests are taken from the GNU fileutils package
14010 echo "checking how to get filesystem space usage" 1>&6
14011 echo "configure:14012: checking how to get filesystem space usage" >&5
14012 space=no
14013
14014 # Test for statvfs64.
14015 if test $space = no; then
14016   # SVR4
14017   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
14018 echo "configure:14019: checking statvfs64 function (SVR4)" >&5
14019 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
14020   echo $ac_n "(cached) $ac_c" 1>&6
14021 else
14022   if test "$cross_compiling" = yes; then
14023   fu_cv_sys_stat_statvfs64=cross
14024 else
14025   cat > conftest.$ac_ext <<EOF
14026 #line 14027 "configure"
14027 #include "confdefs.h"
14028
14029 #if defined(HAVE_UNISTD_H)
14030 #include <unistd.h>
14031 #endif
14032 #include <sys/types.h>
14033 #include <sys/statvfs.h>
14034   main ()
14035   {
14036     struct statvfs64 fsd;
14037     exit (statvfs64 (".", &fsd));
14038   }
14039 EOF
14040 if { (eval echo configure:14041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14041 then
14042   fu_cv_sys_stat_statvfs64=yes
14043 else
14044   echo "configure: failed program was:" >&5
14045   cat conftest.$ac_ext >&5
14046   rm -fr conftest*
14047   fu_cv_sys_stat_statvfs64=no
14048 fi
14049 rm -fr conftest*
14050 fi
14051
14052 fi
14053
14054 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
14055   if test $fu_cv_sys_stat_statvfs64 = yes; then
14056     space=yes
14057     cat >> confdefs.h <<\EOF
14058 #define STAT_STATVFS64 1
14059 EOF
14060
14061   fi
14062 fi
14063
14064 # Perform only the link test since it seems there are no variants of the
14065 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
14066 # because that got a false positive on SCO OSR5.  Adding the declaration
14067 # of a `struct statvfs' causes this test to fail (as it should) on such
14068 # systems.  That system is reported to work fine with STAT_STATFS4 which
14069 # is what it gets when this test fails.
14070 if test $space = no; then
14071   # SVR4
14072   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
14073 echo "configure:14074: checking statvfs function (SVR4)" >&5
14074 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
14075   echo $ac_n "(cached) $ac_c" 1>&6
14076 else
14077   cat > conftest.$ac_ext <<EOF
14078 #line 14079 "configure"
14079 #include "confdefs.h"
14080 #include <sys/types.h>
14081 #include <sys/statvfs.h>
14082 int main() {
14083 struct statvfs fsd; statvfs (0, &fsd);
14084 ; return 0; }
14085 EOF
14086 if { (eval echo configure:14087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14087   rm -rf conftest*
14088   fu_cv_sys_stat_statvfs=yes
14089 else
14090   echo "configure: failed program was:" >&5
14091   cat conftest.$ac_ext >&5
14092   rm -rf conftest*
14093   fu_cv_sys_stat_statvfs=no
14094 fi
14095 rm -f conftest*
14096 fi
14097
14098 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
14099   if test $fu_cv_sys_stat_statvfs = yes; then
14100     space=yes
14101     cat >> confdefs.h <<\EOF
14102 #define STAT_STATVFS 1
14103 EOF
14104
14105   fi
14106 fi
14107
14108 if test $space = no; then
14109   # DEC Alpha running OSF/1
14110   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
14111 echo "configure:14112: checking for 3-argument statfs function (DEC OSF/1)" >&5
14112   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
14113   echo $ac_n "(cached) $ac_c" 1>&6
14114 else
14115   if test "$cross_compiling" = yes; then
14116   fu_cv_sys_stat_statfs3_osf1=no
14117 else
14118   cat > conftest.$ac_ext <<EOF
14119 #line 14120 "configure"
14120 #include "confdefs.h"
14121
14122 #include <sys/param.h>
14123 #include <sys/types.h>
14124 #include <sys/mount.h>
14125   main ()
14126   {
14127     struct statfs fsd;
14128     fsd.f_fsize = 0;
14129     exit (statfs (".", &fsd, sizeof (struct statfs)));
14130   }
14131 EOF
14132 if { (eval echo configure:14133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14133 then
14134   fu_cv_sys_stat_statfs3_osf1=yes
14135 else
14136   echo "configure: failed program was:" >&5
14137   cat conftest.$ac_ext >&5
14138   rm -fr conftest*
14139   fu_cv_sys_stat_statfs3_osf1=no
14140 fi
14141 rm -fr conftest*
14142 fi
14143
14144 fi
14145
14146   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
14147   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
14148     space=yes
14149     cat >> confdefs.h <<\EOF
14150 #define STAT_STATFS3_OSF1 1
14151 EOF
14152
14153   fi
14154 fi
14155
14156 if test $space = no; then
14157 # AIX
14158   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
14159 echo "configure:14160: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
14160   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
14161   echo $ac_n "(cached) $ac_c" 1>&6
14162 else
14163   if test "$cross_compiling" = yes; then
14164   fu_cv_sys_stat_statfs2_bsize=no
14165 else
14166   cat > conftest.$ac_ext <<EOF
14167 #line 14168 "configure"
14168 #include "confdefs.h"
14169
14170 #ifdef HAVE_SYS_PARAM_H
14171 #include <sys/param.h>
14172 #endif
14173 #ifdef HAVE_SYS_MOUNT_H
14174 #include <sys/mount.h>
14175 #endif
14176 #ifdef HAVE_SYS_VFS_H
14177 #include <sys/vfs.h>
14178 #endif
14179   main ()
14180   {
14181   struct statfs fsd;
14182   fsd.f_bsize = 0;
14183   exit (statfs (".", &fsd));
14184   }
14185 EOF
14186 if { (eval echo configure:14187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14187 then
14188   fu_cv_sys_stat_statfs2_bsize=yes
14189 else
14190   echo "configure: failed program was:" >&5
14191   cat conftest.$ac_ext >&5
14192   rm -fr conftest*
14193   fu_cv_sys_stat_statfs2_bsize=no
14194 fi
14195 rm -fr conftest*
14196 fi
14197
14198 fi
14199
14200   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
14201   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
14202     space=yes
14203     cat >> confdefs.h <<\EOF
14204 #define STAT_STATFS2_BSIZE 1
14205 EOF
14206
14207   fi
14208 fi
14209
14210 if test $space = no; then
14211 # SVR3
14212   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
14213 echo "configure:14214: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
14214   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
14215   echo $ac_n "(cached) $ac_c" 1>&6
14216 else
14217   if test "$cross_compiling" = yes; then
14218   fu_cv_sys_stat_statfs4=no
14219 else
14220   cat > conftest.$ac_ext <<EOF
14221 #line 14222 "configure"
14222 #include "confdefs.h"
14223 #include <sys/types.h>
14224 #include <sys/statfs.h>
14225   main ()
14226   {
14227   struct statfs fsd;
14228   exit (statfs (".", &fsd, sizeof fsd, 0));
14229   }
14230 EOF
14231 if { (eval echo configure:14232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14232 then
14233   fu_cv_sys_stat_statfs4=yes
14234 else
14235   echo "configure: failed program was:" >&5
14236   cat conftest.$ac_ext >&5
14237   rm -fr conftest*
14238   fu_cv_sys_stat_statfs4=no
14239 fi
14240 rm -fr conftest*
14241 fi
14242
14243 fi
14244
14245   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
14246   if test $fu_cv_sys_stat_statfs4 = yes; then
14247     space=yes
14248     cat >> confdefs.h <<\EOF
14249 #define STAT_STATFS4 1
14250 EOF
14251
14252   fi
14253 fi
14254
14255 if test $space = no; then
14256 # 4.4BSD and NetBSD
14257   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
14258 echo "configure:14259: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
14259   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
14260   echo $ac_n "(cached) $ac_c" 1>&6
14261 else
14262   if test "$cross_compiling" = yes; then
14263   fu_cv_sys_stat_statfs2_fsize=no
14264 else
14265   cat > conftest.$ac_ext <<EOF
14266 #line 14267 "configure"
14267 #include "confdefs.h"
14268 #include <sys/types.h>
14269 #ifdef HAVE_SYS_PARAM_H
14270 #include <sys/param.h>
14271 #endif
14272 #ifdef HAVE_SYS_MOUNT_H
14273 #include <sys/mount.h>
14274 #endif
14275   main ()
14276   {
14277   struct statfs fsd;
14278   fsd.f_fsize = 0;
14279   exit (statfs (".", &fsd));
14280   }
14281 EOF
14282 if { (eval echo configure:14283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14283 then
14284   fu_cv_sys_stat_statfs2_fsize=yes
14285 else
14286   echo "configure: failed program was:" >&5
14287   cat conftest.$ac_ext >&5
14288   rm -fr conftest*
14289   fu_cv_sys_stat_statfs2_fsize=no
14290 fi
14291 rm -fr conftest*
14292 fi
14293
14294 fi
14295
14296   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
14297   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
14298     space=yes
14299         cat >> confdefs.h <<\EOF
14300 #define STAT_STATFS2_FSIZE 1
14301 EOF
14302
14303   fi
14304 fi
14305
14306 if test $space = no; then
14307   # Ultrix
14308   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
14309 echo "configure:14310: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
14310   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
14311   echo $ac_n "(cached) $ac_c" 1>&6
14312 else
14313   if test "$cross_compiling" = yes; then
14314   fu_cv_sys_stat_fs_data=no
14315 else
14316   cat > conftest.$ac_ext <<EOF
14317 #line 14318 "configure"
14318 #include "confdefs.h"
14319 #include <sys/types.h>
14320 #ifdef HAVE_SYS_PARAM_H
14321 #include <sys/param.h>
14322 #endif
14323 #ifdef HAVE_SYS_MOUNT_H
14324 #include <sys/mount.h>
14325 #endif
14326 #ifdef HAVE_SYS_FS_TYPES_H
14327 #include <sys/fs_types.h>
14328 #endif
14329   main ()
14330   {
14331   struct fs_data fsd;
14332   /* Ultrix's statfs returns 1 for success,
14333      0 for not mounted, -1 for failure.  */
14334   exit (statfs (".", &fsd) != 1);
14335   }
14336 EOF
14337 if { (eval echo configure:14338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14338 then
14339   fu_cv_sys_stat_fs_data=yes
14340 else
14341   echo "configure: failed program was:" >&5
14342   cat conftest.$ac_ext >&5
14343   rm -fr conftest*
14344   fu_cv_sys_stat_fs_data=no
14345 fi
14346 rm -fr conftest*
14347 fi
14348
14349 fi
14350
14351   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
14352   if test $fu_cv_sys_stat_fs_data = yes; then
14353     space=yes
14354     cat >> confdefs.h <<\EOF
14355 #define STAT_STATFS2_FS_DATA 1
14356 EOF
14357
14358   fi
14359 fi
14360
14361 #
14362 # As a gating factor for large file support, in order to
14363 # use <4GB files we must have the following minimal support
14364 # available.
14365 # long long, and a 64 bit off_t or off64_t.
14366 # If we don't have all of these then disable large
14367 # file support.
14368 #
14369 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
14370 echo "configure:14371: checking if large file support can be enabled" >&5
14371 cat > conftest.$ac_ext <<EOF
14372 #line 14373 "configure"
14373 #include "confdefs.h"
14374
14375 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
14376 #include <sys/types.h>
14377 #else
14378 __COMPILE_ERROR_
14379 #endif
14380
14381 int main() {
14382 int i
14383 ; return 0; }
14384 EOF
14385 if { (eval echo configure:14386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14386   rm -rf conftest*
14387   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
14388 else
14389   echo "configure: failed program was:" >&5
14390   cat conftest.$ac_ext >&5
14391   rm -rf conftest*
14392   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
14393 fi
14394 rm -f conftest*
14395 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
14396         cat >> confdefs.h <<\EOF
14397 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
14398 EOF
14399
14400 fi
14401 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
14402
14403 # Check whether --with-spinlocks or --without-spinlocks was given.
14404 if test "${with_spinlocks+set}" = set; then
14405   withval="$with_spinlocks"
14406   :
14407 fi
14408
14409 if test "x$with_spinlocks" = "xyes"; then
14410     cat >> confdefs.h <<\EOF
14411 #define USE_SPINLOCKS 1
14412 EOF
14413
14414
14415     case "$host_cpu" in
14416         sparc)
14417             cat >> confdefs.h <<\EOF
14418 #define SPARC_SPINLOCKS 1
14419 EOF
14420
14421             ;;
14422
14423         i386|i486|i586|i686)
14424             cat >> confdefs.h <<\EOF
14425 #define INTEL_SPINLOCKS 1
14426 EOF
14427
14428             ;;
14429
14430         mips)
14431             cat >> confdefs.h <<\EOF
14432 #define MIPS_SPINLOCKS 1
14433 EOF
14434
14435             ;;
14436
14437         powerpc)
14438             cat >> confdefs.h <<\EOF
14439 #define POWERPC_SPINLOCKS 1
14440 EOF
14441
14442             ;;
14443     esac
14444 fi
14445
14446 #################################################
14447 # check for ACL support
14448
14449 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
14450 echo "configure:14451: checking whether to support ACLs" >&5
14451 # Check whether --with-acl-support or --without-acl-support was given.
14452 if test "${with_acl_support+set}" = set; then
14453   withval="$with_acl_support"
14454    case "$withval" in
14455   yes)
14456
14457         case "$host_os" in
14458         *sysv5*)
14459                 echo "$ac_t""Using UnixWare ACLs" 1>&6
14460                 cat >> confdefs.h <<\EOF
14461 #define HAVE_UNIXWARE_ACLS 1
14462 EOF
14463
14464                 ;;
14465         *solaris*)
14466                 echo "$ac_t""Using solaris ACLs" 1>&6
14467                 cat >> confdefs.h <<\EOF
14468 #define HAVE_SOLARIS_ACLS 1
14469 EOF
14470
14471                 ;;
14472         *hpux*)
14473                 echo "$ac_t""Using HPUX ACLs" 1>&6
14474                 cat >> confdefs.h <<\EOF
14475 #define HAVE_HPUX_ACLS 1
14476 EOF
14477
14478                 ;;
14479         *irix*)
14480                 echo "$ac_t""Using IRIX ACLs" 1>&6
14481                 cat >> confdefs.h <<\EOF
14482 #define HAVE_IRIX_ACLS 1
14483 EOF
14484
14485                 ;;
14486         *aix*)
14487                 echo "$ac_t""Using AIX ACLs" 1>&6
14488                 cat >> confdefs.h <<\EOF
14489 #define HAVE_AIX_ACLS 1
14490 EOF
14491
14492                 ;;
14493         *osf*)
14494                 echo "$ac_t""Using Tru64 ACLs" 1>&6
14495                 cat >> confdefs.h <<\EOF
14496 #define HAVE_TRU64_ACLS 1
14497 EOF
14498
14499                 LIBS="$LIBS -lpacl"
14500                 ;;
14501         *)
14502                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
14503 echo "configure:14504: checking for acl_get_file in -lacl" >&5
14504 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
14505 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14506   echo $ac_n "(cached) $ac_c" 1>&6
14507 else
14508   ac_save_LIBS="$LIBS"
14509 LIBS="-lacl  $LIBS"
14510 cat > conftest.$ac_ext <<EOF
14511 #line 14512 "configure"
14512 #include "confdefs.h"
14513 /* Override any gcc2 internal prototype to avoid an error.  */
14514 /* We use char because int might match the return type of a gcc2
14515     builtin and then its argument prototype would still apply.  */
14516 char acl_get_file();
14517
14518 int main() {
14519 acl_get_file()
14520 ; return 0; }
14521 EOF
14522 if { (eval echo configure:14523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14523   rm -rf conftest*
14524   eval "ac_cv_lib_$ac_lib_var=yes"
14525 else
14526   echo "configure: failed program was:" >&5
14527   cat conftest.$ac_ext >&5
14528   rm -rf conftest*
14529   eval "ac_cv_lib_$ac_lib_var=no"
14530 fi
14531 rm -f conftest*
14532 LIBS="$ac_save_LIBS"
14533
14534 fi
14535 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14536   echo "$ac_t""yes" 1>&6
14537     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14538     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14539   cat >> confdefs.h <<EOF
14540 #define $ac_tr_lib 1
14541 EOF
14542
14543   LIBS="-lacl $LIBS"
14544
14545 else
14546   echo "$ac_t""no" 1>&6
14547 fi
14548
14549                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
14550 echo "configure:14551: checking for ACL support" >&5
14551 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
14552   echo $ac_n "(cached) $ac_c" 1>&6
14553 else
14554   
14555                 cat > conftest.$ac_ext <<EOF
14556 #line 14557 "configure"
14557 #include "confdefs.h"
14558 #include <sys/types.h>
14559 #include <sys/acl.h>
14560 int main() {
14561  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
14562 ; return 0; }
14563 EOF
14564 if { (eval echo configure:14565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14565   rm -rf conftest*
14566   samba_cv_HAVE_POSIX_ACLS=yes
14567 else
14568   echo "configure: failed program was:" >&5
14569   cat conftest.$ac_ext >&5
14570   rm -rf conftest*
14571   samba_cv_HAVE_POSIX_ACLS=no
14572 fi
14573 rm -f conftest*
14574 fi
14575
14576 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
14577                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
14578                                 echo "$ac_t""Using posix ACLs" 1>&6
14579                                 cat >> confdefs.h <<\EOF
14580 #define HAVE_POSIX_ACLS 1
14581 EOF
14582
14583                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
14584 echo "configure:14585: checking for acl_get_perm_np" >&5
14585 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
14586   echo $ac_n "(cached) $ac_c" 1>&6
14587 else
14588   
14589                                 cat > conftest.$ac_ext <<EOF
14590 #line 14591 "configure"
14591 #include "confdefs.h"
14592 #include <sys/types.h>
14593 #include <sys/acl.h>
14594 int main() {
14595  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
14596 ; return 0; }
14597 EOF
14598 if { (eval echo configure:14599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14599   rm -rf conftest*
14600   samba_cv_HAVE_ACL_GET_PERM_NP=yes
14601 else
14602   echo "configure: failed program was:" >&5
14603   cat conftest.$ac_ext >&5
14604   rm -rf conftest*
14605   samba_cv_HAVE_ACL_GET_PERM_NP=no
14606 fi
14607 rm -f conftest*
14608 fi
14609
14610 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
14611                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
14612                                         cat >> confdefs.h <<\EOF
14613 #define HAVE_ACL_GET_PERM_NP 1
14614 EOF
14615
14616                                 fi
14617                         fi
14618             ;;
14619         esac
14620         ;;
14621   *)
14622     echo "$ac_t""no" 1>&6
14623     cat >> confdefs.h <<\EOF
14624 #define HAVE_NO_ACLS 1
14625 EOF
14626
14627     ;;
14628   esac 
14629 else
14630   cat >> confdefs.h <<\EOF
14631 #define HAVE_NO_ACLS 1
14632 EOF
14633
14634   echo "$ac_t""no" 1>&6
14635
14636 fi
14637
14638
14639 #################################################
14640 # check for sendfile support
14641
14642 with_sendfile_support=yes
14643 echo $ac_n "checking whether to check to support sendfile""... $ac_c" 1>&6
14644 echo "configure:14645: checking whether to check to support sendfile" >&5
14645 # Check whether --with-sendfile-support or --without-sendfile-support was given.
14646 if test "${with_sendfile_support+set}" = set; then
14647   withval="$with_sendfile_support"
14648    case "$withval" in
14649   yes)
14650
14651         echo "$ac_t""yes" 1>&6;
14652
14653         case "$host_os" in
14654         *linux*)
14655                 echo $ac_n "checking for linux sendfile64 support""... $ac_c" 1>&6
14656 echo "configure:14657: checking for linux sendfile64 support" >&5
14657 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE64'+set}'`\" = set"; then
14658   echo $ac_n "(cached) $ac_c" 1>&6
14659 else
14660   
14661                 cat > conftest.$ac_ext <<EOF
14662 #line 14663 "configure"
14663 #include "confdefs.h"
14664 #include <sys/sendfile.h>
14665 int main() {
14666 \
14667 int tofd, fromfd;
14668 off64_t offset;
14669 size_t total;
14670 ssize_t nwritten = sendfile64(tofd, fromfd, &offset, total);
14671
14672 ; return 0; }
14673 EOF
14674 if { (eval echo configure:14675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14675   rm -rf conftest*
14676   samba_cv_HAVE_SENDFILE64=yes
14677 else
14678   echo "configure: failed program was:" >&5
14679   cat conftest.$ac_ext >&5
14680   rm -rf conftest*
14681   samba_cv_HAVE_SENDFILE64=no
14682 fi
14683 rm -f conftest*
14684 fi
14685
14686 echo "$ac_t""$samba_cv_HAVE_SENDFILE64" 1>&6
14687
14688                 echo $ac_n "checking for linux sendfile support""... $ac_c" 1>&6
14689 echo "configure:14690: checking for linux sendfile support" >&5
14690 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then
14691   echo $ac_n "(cached) $ac_c" 1>&6
14692 else
14693   
14694                 cat > conftest.$ac_ext <<EOF
14695 #line 14696 "configure"
14696 #include "confdefs.h"
14697 #include <sys/sendfile.h>
14698 int main() {
14699 \
14700 int tofd, fromfd;
14701 off_t offset;
14702 size_t total;
14703 ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
14704
14705 ; return 0; }
14706 EOF
14707 if { (eval echo configure:14708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14708   rm -rf conftest*
14709   samba_cv_HAVE_SENDFILE=yes
14710 else
14711   echo "configure: failed program was:" >&5
14712   cat conftest.$ac_ext >&5
14713   rm -rf conftest*
14714   samba_cv_HAVE_SENDFILE=no
14715 fi
14716 rm -f conftest*
14717 fi
14718
14719 echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6
14720
14721 # Try and cope with broken Linux sendfile....
14722                 echo $ac_n "checking for broken linux sendfile support""... $ac_c" 1>&6
14723 echo "configure:14724: checking for broken linux sendfile support" >&5
14724 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_LINUX_SENDFILE'+set}'`\" = set"; then
14725   echo $ac_n "(cached) $ac_c" 1>&6
14726 else
14727   
14728                 cat > conftest.$ac_ext <<EOF
14729 #line 14730 "configure"
14730 #include "confdefs.h"
14731 \
14732 #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
14733 #undef _FILE_OFFSET_BITS
14734 #endif
14735 #include <sys/sendfile.h>
14736 int main() {
14737 \
14738 int tofd, fromfd;
14739 off_t offset;
14740 size_t total;
14741 ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
14742
14743 ; return 0; }
14744 EOF
14745 if { (eval echo configure:14746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14746   rm -rf conftest*
14747   samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes
14748 else
14749   echo "configure: failed program was:" >&5
14750   cat conftest.$ac_ext >&5
14751   rm -rf conftest*
14752   samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no
14753 fi
14754 rm -f conftest*
14755 fi
14756
14757 echo "$ac_t""$samba_cv_HAVE_BROKEN_LINUX_SENDFILE" 1>&6
14758
14759         if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then
14760                 cat >> confdefs.h <<\EOF
14761 #define HAVE_SENDFILE64 1
14762 EOF
14763
14764                 cat >> confdefs.h <<\EOF
14765 #define LINUX_SENDFILE_API 1
14766 EOF
14767
14768                 cat >> confdefs.h <<\EOF
14769 #define WITH_SENDFILE 1
14770 EOF
14771
14772         elif test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then
14773                 cat >> confdefs.h <<\EOF
14774 #define HAVE_SENDFILE 1
14775 EOF
14776
14777                 cat >> confdefs.h <<\EOF
14778 #define LINUX_SENDFILE_API 1
14779 EOF
14780
14781                 cat >> confdefs.h <<\EOF
14782 #define WITH_SENDFILE 1
14783 EOF
14784
14785         elif test x"$samba_cv_HAVE_BROKEN_LINUX_SENDFILE" = x"yes"; then
14786                 cat >> confdefs.h <<\EOF
14787 #define LINUX_BROKEN_SENDFILE_API 1
14788 EOF
14789
14790                 cat >> confdefs.h <<\EOF
14791 #define WITH_SENDFILE 1
14792 EOF
14793
14794         else
14795                 echo "$ac_t""no" 1>&6;
14796         fi
14797
14798         ;;
14799         *freebsd*)
14800                 echo $ac_n "checking for freebsd sendfile support""... $ac_c" 1>&6
14801 echo "configure:14802: checking for freebsd sendfile support" >&5
14802 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then
14803   echo $ac_n "(cached) $ac_c" 1>&6
14804 else
14805   
14806                 cat > conftest.$ac_ext <<EOF
14807 #line 14808 "configure"
14808 #include "confdefs.h"
14809 \
14810 #include <sys/types.h>
14811 #include <sys/socket.h>
14812 #include <sys/uio.h>
14813 int main() {
14814 \
14815         int fromfd, tofd;
14816         off_t offset, nwritten;
14817         struct sf_hdtr hdr;
14818         struct iovec hdtrl;
14819         hdr->headers = &hdtrl;
14820         hdr->hdr_cnt = 1;
14821         hdr->trailers = NULL;
14822         hdr->trl_cnt = 0;
14823         hdtrl.iov_base = NULL;
14824         hdtrl.iov_len = 0;
14825         int ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0);
14826
14827 ; return 0; }
14828 EOF
14829 if { (eval echo configure:14830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14830   rm -rf conftest*
14831   samba_cv_HAVE_SENDFILE=yes
14832 else
14833   echo "configure: failed program was:" >&5
14834   cat conftest.$ac_ext >&5
14835   rm -rf conftest*
14836   samba_cv_HAVE_SENDFILE=no
14837 fi
14838 rm -f conftest*
14839 fi
14840
14841 echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6
14842
14843         if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then
14844                 cat >> confdefs.h <<\EOF
14845 #define HAVE_SENDFILE 1
14846 EOF
14847
14848                 cat >> confdefs.h <<\EOF
14849 #define FREEBSD_SENDFILE_API 1
14850 EOF
14851
14852                 cat >> confdefs.h <<\EOF
14853 #define WITH_SENDFILE 1
14854 EOF
14855
14856         else
14857                 echo "$ac_t""no" 1>&6;
14858         fi
14859         ;;
14860
14861         *hpux*)
14862                 echo $ac_n "checking for hpux sendfile64 support""... $ac_c" 1>&6
14863 echo "configure:14864: checking for hpux sendfile64 support" >&5
14864 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE64'+set}'`\" = set"; then
14865   echo $ac_n "(cached) $ac_c" 1>&6
14866 else
14867   
14868                 cat > conftest.$ac_ext <<EOF
14869 #line 14870 "configure"
14870 #include "confdefs.h"
14871 \
14872 #include <sys/socket.h>
14873 #include <sys/uio.h>
14874 int main() {
14875 \
14876         int fromfd, tofd;
14877         size_t total=0;
14878         struct iovec hdtrl[2];
14879         ssize_t nwritten;
14880         off64_t offset;
14881
14882         hdtrl[0].iov_base = 0;
14883         hdtrl[0].iov_len = 0;
14884
14885         nwritten = sendfile64(tofd, fromfd, offset, total, &hdtrl[0], 0);
14886
14887 ; return 0; }
14888 EOF
14889 if { (eval echo configure:14890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14890   rm -rf conftest*
14891   samba_cv_HAVE_SENDFILE64=yes
14892 else
14893   echo "configure: failed program was:" >&5
14894   cat conftest.$ac_ext >&5
14895   rm -rf conftest*
14896   samba_cv_HAVE_SENDFILE64=no
14897 fi
14898 rm -f conftest*
14899 fi
14900
14901 echo "$ac_t""$samba_cv_HAVE_SENDFILE64" 1>&6
14902         if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then
14903                 cat >> confdefs.h <<\EOF
14904 #define HAVE_SENDFILE64 1
14905 EOF
14906
14907                 cat >> confdefs.h <<\EOF
14908 #define HPUX_SENDFILE_API 1
14909 EOF
14910
14911                 cat >> confdefs.h <<\EOF
14912 #define WITH_SENDFILE 1
14913 EOF
14914
14915         else
14916                 echo "$ac_t""no" 1>&6;
14917         fi
14918
14919                 echo $ac_n "checking for hpux sendfile support""... $ac_c" 1>&6
14920 echo "configure:14921: checking for hpux sendfile support" >&5
14921 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then
14922   echo $ac_n "(cached) $ac_c" 1>&6
14923 else
14924   
14925                 cat > conftest.$ac_ext <<EOF
14926 #line 14927 "configure"
14927 #include "confdefs.h"
14928 \
14929 #include <sys/socket.h>
14930 #include <sys/uio.h>
14931 int main() {
14932 \
14933         int fromfd, tofd;
14934         size_t total=0;
14935         struct iovec hdtrl[2];
14936         ssize_t nwritten;
14937         off_t offset;
14938
14939         hdtrl[0].iov_base = 0;
14940         hdtrl[0].iov_len = 0;
14941
14942         nwritten = sendfile(tofd, fromfd, offset, total, &hdtrl[0], 0);
14943
14944 ; return 0; }
14945 EOF
14946 if { (eval echo configure:14947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14947   rm -rf conftest*
14948   samba_cv_HAVE_SENDFILE=yes
14949 else
14950   echo "configure: failed program was:" >&5
14951   cat conftest.$ac_ext >&5
14952   rm -rf conftest*
14953   samba_cv_HAVE_SENDFILE=no
14954 fi
14955 rm -f conftest*
14956 fi
14957
14958 echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6
14959         if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then
14960                 cat >> confdefs.h <<\EOF
14961 #define HAVE_SENDFILE 1
14962 EOF
14963
14964                 cat >> confdefs.h <<\EOF
14965 #define HPUX_SENDFILE_API 1
14966 EOF
14967
14968                 cat >> confdefs.h <<\EOF
14969 #define WITH_SENDFILE 1
14970 EOF
14971
14972         else
14973                 echo "$ac_t""no" 1>&6;
14974         fi
14975         ;;
14976
14977         *solaris*)
14978                 echo $ac_n "checking for sendfilev in -lsendfile""... $ac_c" 1>&6
14979 echo "configure:14980: checking for sendfilev in -lsendfile" >&5
14980 ac_lib_var=`echo sendfile'_'sendfilev | sed 'y%./+-%__p_%'`
14981 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14982   echo $ac_n "(cached) $ac_c" 1>&6
14983 else
14984   ac_save_LIBS="$LIBS"
14985 LIBS="-lsendfile  $LIBS"
14986 cat > conftest.$ac_ext <<EOF
14987 #line 14988 "configure"
14988 #include "confdefs.h"
14989 /* Override any gcc2 internal prototype to avoid an error.  */
14990 /* We use char because int might match the return type of a gcc2
14991     builtin and then its argument prototype would still apply.  */
14992 char sendfilev();
14993
14994 int main() {
14995 sendfilev()
14996 ; return 0; }
14997 EOF
14998 if { (eval echo configure:14999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14999   rm -rf conftest*
15000   eval "ac_cv_lib_$ac_lib_var=yes"
15001 else
15002   echo "configure: failed program was:" >&5
15003   cat conftest.$ac_ext >&5
15004   rm -rf conftest*
15005   eval "ac_cv_lib_$ac_lib_var=no"
15006 fi
15007 rm -f conftest*
15008 LIBS="$ac_save_LIBS"
15009
15010 fi
15011 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15012   echo "$ac_t""yes" 1>&6
15013     ac_tr_lib=HAVE_LIB`echo sendfile | sed -e 's/[^a-zA-Z0-9_]/_/g' \
15014     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
15015   cat >> confdefs.h <<EOF
15016 #define $ac_tr_lib 1
15017 EOF
15018
15019   LIBS="-lsendfile $LIBS"
15020
15021 else
15022   echo "$ac_t""no" 1>&6
15023 fi
15024
15025                 echo $ac_n "checking for solaris sendfilev64 support""... $ac_c" 1>&6
15026 echo "configure:15027: checking for solaris sendfilev64 support" >&5
15027 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILEV64'+set}'`\" = set"; then
15028   echo $ac_n "(cached) $ac_c" 1>&6
15029 else
15030   
15031                 cat > conftest.$ac_ext <<EOF
15032 #line 15033 "configure"
15033 #include "confdefs.h"
15034 \
15035 #include <sys/sendfile.h>
15036 int main() {
15037 \
15038         int sfvcnt;
15039         size_t xferred;
15040         struct sendfilevec vec[2];
15041         ssize_t nwritten;
15042         int tofd;
15043
15044         sfvcnt = 2;
15045
15046         vec[0].sfv_fd = SFV_FD_SELF;
15047         vec[0].sfv_flag = 0;
15048         vec[0].sfv_off = 0;
15049         vec[0].sfv_len = 0;
15050
15051         vec[1].sfv_fd = 0;
15052         vec[1].sfv_flag = 0;
15053         vec[1].sfv_off = 0;
15054         vec[1].sfv_len = 0;
15055         nwritten = sendfilev64(tofd, vec, sfvcnt, &xferred);
15056
15057 ; return 0; }
15058 EOF
15059 if { (eval echo configure:15060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15060   rm -rf conftest*
15061   samba_cv_HAVE_SENDFILEV64=yes
15062 else
15063   echo "configure: failed program was:" >&5
15064   cat conftest.$ac_ext >&5
15065   rm -rf conftest*
15066   samba_cv_HAVE_SENDFILEV64=no
15067 fi
15068 rm -f conftest*
15069 fi
15070
15071 echo "$ac_t""$samba_cv_HAVE_SENDFILEV64" 1>&6
15072
15073         if test x"$samba_cv_HAVE_SENDFILEV64" = x"yes"; then
15074                 cat >> confdefs.h <<\EOF
15075 #define HAVE_SENDFILEV64 1
15076 EOF
15077
15078                 cat >> confdefs.h <<\EOF
15079 #define SOLARIS_SENDFILE_API 1
15080 EOF
15081
15082                 cat >> confdefs.h <<\EOF
15083 #define WITH_SENDFILE 1
15084 EOF
15085
15086         else
15087                 echo "$ac_t""no" 1>&6;
15088         fi
15089
15090                 echo $ac_n "checking for solaris sendfilev support""... $ac_c" 1>&6
15091 echo "configure:15092: checking for solaris sendfilev support" >&5
15092 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILEV'+set}'`\" = set"; then
15093   echo $ac_n "(cached) $ac_c" 1>&6
15094 else
15095   
15096                 cat > conftest.$ac_ext <<EOF
15097 #line 15098 "configure"
15098 #include "confdefs.h"
15099 \
15100 #include <sys/sendfile.h>
15101 int main() {
15102 \
15103         int sfvcnt;
15104         size_t xferred;
15105         struct sendfilevec vec[2];
15106         ssize_t nwritten;
15107         int tofd;
15108
15109         sfvcnt = 2;
15110
15111         vec[0].sfv_fd = SFV_FD_SELF;
15112         vec[0].sfv_flag = 0;
15113         vec[0].sfv_off = 0;
15114         vec[0].sfv_len = 0;
15115
15116         vec[1].sfv_fd = 0;
15117         vec[1].sfv_flag = 0;
15118         vec[1].sfv_off = 0;
15119         vec[1].sfv_len = 0;
15120         nwritten = sendfilev(tofd, vec, sfvcnt, &xferred);
15121
15122 ; return 0; }
15123 EOF
15124 if { (eval echo configure:15125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15125   rm -rf conftest*
15126   samba_cv_HAVE_SENDFILEV=yes
15127 else
15128   echo "configure: failed program was:" >&5
15129   cat conftest.$ac_ext >&5
15130   rm -rf conftest*
15131   samba_cv_HAVE_SENDFILEV=no
15132 fi
15133 rm -f conftest*
15134 fi
15135
15136 echo "$ac_t""$samba_cv_HAVE_SENDFILEV" 1>&6
15137
15138         if test x"$samba_cv_HAVE_SENDFILEV" = x"yes"; then
15139                 cat >> confdefs.h <<\EOF
15140 #define HAVE_SENDFILEV 1
15141 EOF
15142
15143                 cat >> confdefs.h <<\EOF
15144 #define SOLARIS_SENDFILE_API 1
15145 EOF
15146
15147                 cat >> confdefs.h <<\EOF
15148 #define WITH_SENDFILE 1
15149 EOF
15150
15151         else
15152                 echo "$ac_t""no" 1>&6;
15153         fi
15154         ;;
15155
15156         *)
15157         ;;
15158         esac
15159         ;;
15160   *)
15161     echo "$ac_t""no" 1>&6
15162     ;;
15163   esac 
15164 else
15165   echo "$ac_t""yes" 1>&6
15166
15167 fi
15168
15169
15170
15171 #################################################
15172 # Check whether winbind is supported on this platform.  If so we need to
15173 # build and install client programs, sbin programs and shared libraries
15174
15175 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
15176 echo "configure:15177: checking whether to build winbind" >&5
15177
15178 # Initially, the value of $host_os decides whether winbind is supported
15179
15180 case "$host_os" in
15181         *linux*|*irix*)
15182                 HAVE_WINBIND=yes
15183                 ;;
15184         *solaris*)
15185                 HAVE_WINBIND=yes
15186                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
15187                 WINBIND_NSS_EXTRA_LIBS="-lsocket"
15188                 ;;
15189         *hpux11*)
15190                 HAVE_WINBIND=yes
15191                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
15192                 ;;
15193         *)
15194                 HAVE_WINBIND=no
15195                 winbind_no_reason=", unsupported on $host_os"
15196                 ;;
15197 esac
15198
15199
15200
15201
15202 # Check the setting of --with-winbindd
15203
15204 # Check whether --with-winbind or --without-winbind was given.
15205 if test "${with_winbind+set}" = set; then
15206   withval="$with_winbind"
15207    
15208   case "$withval" in
15209         yes)
15210                 HAVE_WINBIND=yes
15211                 ;;
15212         no)
15213                 HAVE_WINBIND=no
15214                 winbind_reason=""
15215                 ;;
15216   esac 
15217 fi
15218
15219
15220 # We need unix domain sockets for winbind
15221
15222 if test x"$HAVE_WINBIND" = x"yes"; then
15223         if test x"$samba_cv_unixsocket" = x"no"; then
15224                 winbind_no_reason=", no unix domain socket support on $host_os"
15225                 HAVE_WINBIND=no
15226         fi
15227 fi
15228
15229 # Display test results
15230
15231 if test x"$HAVE_WINBIND" = x"yes"; then
15232         echo "$ac_t""yes" 1>&6
15233         cat >> confdefs.h <<\EOF
15234 #define WITH_WINBIND 1
15235 EOF
15236
15237
15238         EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/wbinfo\$(EXEEXT)"
15239         EXTRA_SBIN_PROGS="$EXTRA_SBIN_PROGS bin/winbindd\$(EXEEXT)"
15240         if test x"$BLDSHARED" = x"true"; then
15241                 SHLIB_PROGS="$SHLIB_PROGS nsswitch/libnss_winbind.so"
15242                 if test x"$with_pam" = x"yes"; then
15243                         SHLIB_PROGS="$SHLIB_PROGS nsswitch/pam_winbind.so"
15244                 fi
15245         fi
15246 else
15247         echo "$ac_t""no$winbind_no_reason" 1>&6
15248 fi
15249
15250 # Solaris has some extra fields in struct passwd that need to be
15251 # initialised otherwise nscd crashes.  Unfortunately autoconf < 2.50
15252 # doesn't have the AC_CHECK_MEMBER macro which would be handy for checking
15253 # this. 
15254
15255 #AC_CHECK_MEMBER(struct passwd.pw_comment,
15256 #               AC_DEFINE(HAVE_PASSWD_PW_COMMENT, 1, [Defined if struct passwd has pw_comment field]),
15257 #               [#include <pwd.h>])
15258
15259 echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6
15260 echo "configure:15261: checking whether struct passwd has pw_comment" >&5
15261 if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then
15262   echo $ac_n "(cached) $ac_c" 1>&6
15263 else
15264   
15265     cat > conftest.$ac_ext <<EOF
15266 #line 15267 "configure"
15267 #include "confdefs.h"
15268 #include <pwd.h>
15269 int main() {
15270 struct passwd p; p.pw_comment;
15271 ; return 0; }
15272 EOF
15273 if { (eval echo configure:15274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15274   rm -rf conftest*
15275   samba_cv_passwd_pw_comment=yes
15276 else
15277   echo "configure: failed program was:" >&5
15278   cat conftest.$ac_ext >&5
15279   rm -rf conftest*
15280   samba_cv_passwd_pw_comment=no
15281 fi
15282 rm -f conftest*
15283 fi
15284
15285 echo "$ac_t""$samba_cv_passwd_pw_comment" 1>&6
15286 if test x"$samba_cv_passwd_pw_comment" = x"yes"; then
15287    cat >> confdefs.h <<\EOF
15288 #define HAVE_PASSWD_PW_COMMENT 1
15289 EOF
15290
15291 fi
15292
15293 #AC_CHECK_MEMBER(struct passwd.pw_age,
15294 #               AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]),
15295 #               [#include <pwd.h>])
15296
15297 echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6
15298 echo "configure:15299: checking whether struct passwd has pw_age" >&5
15299 if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then
15300   echo $ac_n "(cached) $ac_c" 1>&6
15301 else
15302   
15303     cat > conftest.$ac_ext <<EOF
15304 #line 15305 "configure"
15305 #include "confdefs.h"
15306 #include <pwd.h>
15307 int main() {
15308 struct passwd p; p.pw_age;
15309 ; return 0; }
15310 EOF
15311 if { (eval echo configure:15312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15312   rm -rf conftest*
15313   samba_cv_passwd_pw_age=yes
15314 else
15315   echo "configure: failed program was:" >&5
15316   cat conftest.$ac_ext >&5
15317   rm -rf conftest*
15318   samba_cv_passwd_pw_age=no
15319 fi
15320 rm -f conftest*
15321 fi
15322
15323 echo "$ac_t""$samba_cv_passwd_pw_age" 1>&6
15324 if test x"$samba_cv_passwd_pw_age" = x"yes"; then
15325    cat >> confdefs.h <<\EOF
15326 #define HAVE_PASSWD_PW_AGE 1
15327 EOF
15328
15329 fi
15330
15331 #################################################
15332 # Check to see if we should use the included popt 
15333
15334 # Check whether --with-included-popt or --without-included-popt was given.
15335 if test "${with_included_popt+set}" = set; then
15336   withval="$with_included_popt"
15337    
15338   case "$withval" in
15339         yes)
15340                 INCLUDED_POPT=yes
15341                 ;;
15342         no)
15343                 INCLUDED_POPT=no
15344                 ;;
15345   esac 
15346 fi
15347
15348 if test x"$INCLUDED_POPT" != x"yes"; then
15349     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
15350 echo "configure:15351: checking for poptGetContext in -lpopt" >&5
15351 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
15352 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
15353   echo $ac_n "(cached) $ac_c" 1>&6
15354 else
15355   ac_save_LIBS="$LIBS"
15356 LIBS="-lpopt  $LIBS"
15357 cat > conftest.$ac_ext <<EOF
15358 #line 15359 "configure"
15359 #include "confdefs.h"
15360 /* Override any gcc2 internal prototype to avoid an error.  */
15361 /* We use char because int might match the return type of a gcc2
15362     builtin and then its argument prototype would still apply.  */
15363 char poptGetContext();
15364
15365 int main() {
15366 poptGetContext()
15367 ; return 0; }
15368 EOF
15369 if { (eval echo configure:15370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15370   rm -rf conftest*
15371   eval "ac_cv_lib_$ac_lib_var=yes"
15372 else
15373   echo "configure: failed program was:" >&5
15374   cat conftest.$ac_ext >&5
15375   rm -rf conftest*
15376   eval "ac_cv_lib_$ac_lib_var=no"
15377 fi
15378 rm -f conftest*
15379 LIBS="$ac_save_LIBS"
15380
15381 fi
15382 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15383   echo "$ac_t""yes" 1>&6
15384   INCLUDED_POPT=no
15385 else
15386   echo "$ac_t""no" 1>&6
15387 INCLUDED_POPT=yes
15388 fi
15389
15390 fi
15391
15392 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
15393 echo "configure:15394: checking whether to use included popt" >&5
15394 if test x"$INCLUDED_POPT" = x"yes"; then
15395     echo "$ac_t""yes" 1>&6
15396     BUILD_POPT='$(POPT_OBJS)'
15397     FLAGS1="-I$srcdir/popt"
15398 else
15399     echo "$ac_t""no" 1>&6
15400     LIBS="$LIBS -lpopt"
15401 fi
15402
15403
15404
15405 #################################################
15406 # Check if the user wants Python
15407
15408 # At the moment, you can use this to set which Python binary to link
15409 # against.  (Libraries built for Python2.2 can't be used by 2.1,
15410 # though they can coexist in different directories.)  In the future
15411 # this might make the Python stuff be built by default.
15412
15413 # Defaulting python breaks the clean target if python isn't installed
15414
15415 PYTHON=
15416
15417 # Check whether --with-python or --without-python was given.
15418 if test "${with_python+set}" = set; then
15419   withval="$with_python"
15420    case "${withval-python}" in
15421   yes)
15422         PYTHON=python
15423         EXTRA_ALL_TARGETS="$EXTRA_ALL_TARGETS python_ext"
15424         ;;
15425   no)
15426         PYTHON=
15427         ;;
15428   *)
15429         PYTHON=${withval-python}
15430         ;;
15431   esac 
15432 fi
15433
15434
15435
15436 #################################################
15437 # do extra things if we are running insure
15438
15439 if test "${ac_cv_prog_CC}" = "insure"; then
15440         CPPFLAGS="$CPPFLAGS -D__INSURE__"
15441 fi
15442
15443 #################################################
15444 # final configure stuff
15445
15446 echo $ac_n "checking configure summary""... $ac_c" 1>&6
15447 echo "configure:15448: checking configure summary" >&5
15448 if test "$cross_compiling" = yes; then
15449   echo "configure: warning: cannot run when cross-compiling" 1>&2
15450 else
15451   cat > conftest.$ac_ext <<EOF
15452 #line 15453 "configure"
15453 #include "confdefs.h"
15454 #include "${srcdir-.}/tests/summary.c"
15455 EOF
15456 if { (eval echo configure:15457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15457 then
15458   echo "$ac_t""yes" 1>&6
15459 else
15460   echo "configure: failed program was:" >&5
15461   cat conftest.$ac_ext >&5
15462   rm -fr conftest*
15463   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }; exit 1;
15464 fi
15465 rm -fr conftest*
15466 fi
15467
15468
15469 builddir=`pwd`
15470
15471
15472 trap '' 1 2 15
15473 cat > confcache <<\EOF
15474 # This file is a shell script that caches the results of configure
15475 # tests run on this system so they can be shared between configure
15476 # scripts and configure runs.  It is not useful on other systems.
15477 # If it contains results you don't want to keep, you may remove or edit it.
15478 #
15479 # By default, configure uses ./config.cache as the cache file,
15480 # creating it if it does not exist already.  You can give configure
15481 # the --cache-file=FILE option to use a different cache file; that is
15482 # what configure does when it calls configure scripts in
15483 # subdirectories, so they share the cache.
15484 # Giving --cache-file=/dev/null disables caching, for debugging configure.
15485 # config.status only pays attention to the cache file if you give it the
15486 # --recheck option to rerun configure.
15487 #
15488 EOF
15489 # The following way of writing the cache mishandles newlines in values,
15490 # but we know of no workaround that is simple, portable, and efficient.
15491 # So, don't put newlines in cache variables' values.
15492 # Ultrix sh set writes to stderr and can't be redirected directly,
15493 # and sets the high bit in the cache file unless we assign to the vars.
15494 (set) 2>&1 |
15495   case `(ac_space=' '; set | grep ac_space) 2>&1` in
15496   *ac_space=\ *)
15497     # `set' does not quote correctly, so add quotes (double-quote substitution
15498     # turns \\\\ into \\, and sed turns \\ into \).
15499     sed -n \
15500       -e "s/'/'\\\\''/g" \
15501       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
15502     ;;
15503   *)
15504     # `set' quotes correctly as required by POSIX, so do not add quotes.
15505     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
15506     ;;
15507   esac >> confcache
15508 if cmp -s $cache_file confcache; then
15509   :
15510 else
15511   if test -w $cache_file; then
15512     echo "updating cache $cache_file"
15513     cat confcache > $cache_file
15514   else
15515     echo "not updating unwritable cache $cache_file"
15516   fi
15517 fi
15518 rm -f confcache
15519
15520 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15521
15522 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15523 # Let make expand exec_prefix.
15524 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15525
15526 # Any assignment to VPATH causes Sun make to only execute
15527 # the first set of double-colon rules, so remove it if not needed.
15528 # If there is a colon in the path, we need to keep it.
15529 if test "x$srcdir" = x.; then
15530   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15531 fi
15532
15533 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15534
15535 DEFS=-DHAVE_CONFIG_H
15536
15537 # Without the "./", some shells look in PATH for config.status.
15538 : ${CONFIG_STATUS=./config.status}
15539
15540 echo creating $CONFIG_STATUS
15541 rm -f $CONFIG_STATUS
15542 cat > $CONFIG_STATUS <<EOF
15543 #! /bin/sh
15544 # Generated automatically by configure.
15545 # Run this file to recreate the current configuration.
15546 # This directory was configured as follows,
15547 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15548 #
15549 # $0 $ac_configure_args
15550 #
15551 # Compiler output produced by configure, useful for debugging
15552 # configure, is in ./config.log if it exists.
15553
15554 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15555 for ac_option
15556 do
15557   case "\$ac_option" in
15558   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15559     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15560     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15561   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15562     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15563     exit 0 ;;
15564   -help | --help | --hel | --he | --h)
15565     echo "\$ac_cs_usage"; exit 0 ;;
15566   *) echo "\$ac_cs_usage"; exit 1 ;;
15567   esac
15568 done
15569
15570 ac_given_srcdir=$srcdir
15571 ac_given_INSTALL="$INSTALL"
15572
15573 trap 'rm -fr `echo "include/stamp-h Makefile script/findsmb include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15574 EOF
15575 cat >> $CONFIG_STATUS <<EOF
15576
15577 # Protect against being on the right side of a sed subst in config.status.
15578 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15579  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15580 $ac_vpsub
15581 $extrasub
15582 s%@SHELL@%$SHELL%g
15583 s%@CFLAGS@%$CFLAGS%g
15584 s%@CPPFLAGS@%$CPPFLAGS%g
15585 s%@CXXFLAGS@%$CXXFLAGS%g
15586 s%@FFLAGS@%$FFLAGS%g
15587 s%@DEFS@%$DEFS%g
15588 s%@LDFLAGS@%$LDFLAGS%g
15589 s%@LIBS@%$LIBS%g
15590 s%@exec_prefix@%$exec_prefix%g
15591 s%@prefix@%$prefix%g
15592 s%@program_transform_name@%$program_transform_name%g
15593 s%@bindir@%$bindir%g
15594 s%@sbindir@%$sbindir%g
15595 s%@libexecdir@%$libexecdir%g
15596 s%@datadir@%$datadir%g
15597 s%@sysconfdir@%$sysconfdir%g
15598 s%@sharedstatedir@%$sharedstatedir%g
15599 s%@localstatedir@%$localstatedir%g
15600 s%@libdir@%$libdir%g
15601 s%@includedir@%$includedir%g
15602 s%@oldincludedir@%$oldincludedir%g
15603 s%@infodir@%$infodir%g
15604 s%@mandir@%$mandir%g
15605 s%@configdir@%$configdir%g
15606 s%@lockdir@%$lockdir%g
15607 s%@piddir@%$piddir%g
15608 s%@logfilebase@%$logfilebase%g
15609 s%@privatedir@%$privatedir%g
15610 s%@swatdir@%$swatdir%g
15611 s%@LDSHFLAGS@%$LDSHFLAGS%g
15612 s%@SONAMEFLAG@%$SONAMEFLAG%g
15613 s%@SHLD@%$SHLD%g
15614 s%@HOST_OS@%$HOST_OS%g
15615 s%@PICFLAG@%$PICFLAG%g
15616 s%@PICSUFFIX@%$PICSUFFIX%g
15617 s%@POBAD_CC@%$POBAD_CC%g
15618 s%@SHLIBEXT@%$SHLIBEXT%g
15619 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
15620 s%@LIBSMBCLIENT@%$LIBSMBCLIENT%g
15621 s%@PRINTLIBS@%$PRINTLIBS%g
15622 s%@AUTHLIBS@%$AUTHLIBS%g
15623 s%@SHLIB_PROGS@%$SHLIB_PROGS%g
15624 s%@SMBWRAPPER@%$SMBWRAPPER%g
15625 s%@EXTRA_BIN_PROGS@%$EXTRA_BIN_PROGS%g
15626 s%@EXTRA_SBIN_PROGS@%$EXTRA_SBIN_PROGS%g
15627 s%@EXTRA_ALL_TARGETS@%$EXTRA_ALL_TARGETS%g
15628 s%@CC@%$CC%g
15629 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15630 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15631 s%@INSTALL_DATA@%$INSTALL_DATA%g
15632 s%@AWK@%$AWK%g
15633 s%@EXEEXT@%$EXEEXT%g
15634 s%@BROKEN_CC@%$BROKEN_CC%g
15635 s%@host@%$host%g
15636 s%@host_alias@%$host_alias%g
15637 s%@host_cpu@%$host_cpu%g
15638 s%@host_vendor@%$host_vendor%g
15639 s%@host_os@%$host_os%g
15640 s%@target@%$target%g
15641 s%@target_alias@%$target_alias%g
15642 s%@target_cpu@%$target_cpu%g
15643 s%@target_vendor@%$target_vendor%g
15644 s%@target_os@%$target_os%g
15645 s%@build@%$build%g
15646 s%@build_alias@%$build_alias%g
15647 s%@build_cpu@%$build_cpu%g
15648 s%@build_vendor@%$build_vendor%g
15649 s%@build_os@%$build_os%g
15650 s%@CPP@%$CPP%g
15651 s%@CUPS_CONFIG@%$CUPS_CONFIG%g
15652 s%@LIBOBJS@%$LIBOBJS%g
15653 s%@TERMLIBS@%$TERMLIBS%g
15654 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
15655 s%@ROFF@%$ROFF%g
15656 s%@DYNEXP@%$DYNEXP%g
15657 s%@MYSQL_CONFIG@%$MYSQL_CONFIG%g
15658 s%@MYSQL_CFLAGS@%$MYSQL_CFLAGS%g
15659 s%@MYSQL_LIBS@%$MYSQL_LIBS%g
15660 s%@MODULE_MYSQL@%$MODULE_MYSQL%g
15661 s%@XML2_CONFIG@%$XML2_CONFIG%g
15662 s%@XML_CFLAGS@%$XML_CFLAGS%g
15663 s%@XML_LIBS@%$XML_LIBS%g
15664 s%@MODULE_XML@%$MODULE_XML%g
15665 s%@QUOTAOBJS@%$QUOTAOBJS%g
15666 s%@manlangs@%$manlangs%g
15667 s%@WINBIND_NSS_EXTRA_OBJS@%$WINBIND_NSS_EXTRA_OBJS%g
15668 s%@WINBIND_NSS_EXTRA_LIBS@%$WINBIND_NSS_EXTRA_LIBS%g
15669 s%@BUILD_POPT@%$BUILD_POPT%g
15670 s%@FLAGS1@%$FLAGS1%g
15671 s%@PYTHON@%$PYTHON%g
15672 s%@builddir@%$builddir%g
15673
15674 CEOF
15675 EOF
15676
15677 cat >> $CONFIG_STATUS <<\EOF
15678
15679 # Split the substitutions into bite-sized pieces for seds with
15680 # small command number limits, like on Digital OSF/1 and HP-UX.
15681 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15682 ac_file=1 # Number of current file.
15683 ac_beg=1 # First line for current file.
15684 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15685 ac_more_lines=:
15686 ac_sed_cmds=""
15687 while $ac_more_lines; do
15688   if test $ac_beg -gt 1; then
15689     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15690   else
15691     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15692   fi
15693   if test ! -s conftest.s$ac_file; then
15694     ac_more_lines=false
15695     rm -f conftest.s$ac_file
15696   else
15697     if test -z "$ac_sed_cmds"; then
15698       ac_sed_cmds="sed -f conftest.s$ac_file"
15699     else
15700       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15701     fi
15702     ac_file=`expr $ac_file + 1`
15703     ac_beg=$ac_end
15704     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15705   fi
15706 done
15707 if test -z "$ac_sed_cmds"; then
15708   ac_sed_cmds=cat
15709 fi
15710 EOF
15711
15712 cat >> $CONFIG_STATUS <<EOF
15713
15714 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile script/findsmb"}
15715 EOF
15716 cat >> $CONFIG_STATUS <<\EOF
15717 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15718   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15719   case "$ac_file" in
15720   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15721        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15722   *) ac_file_in="${ac_file}.in" ;;
15723   esac
15724
15725   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15726
15727   # Remove last slash and all that follows it.  Not all systems have dirname.
15728   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15729   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15730     # The file is in a subdirectory.
15731     test ! -d "$ac_dir" && mkdir "$ac_dir"
15732     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15733     # A "../" for each directory in $ac_dir_suffix.
15734     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15735   else
15736     ac_dir_suffix= ac_dots=
15737   fi
15738
15739   case "$ac_given_srcdir" in
15740   .)  srcdir=.
15741       if test -z "$ac_dots"; then top_srcdir=.
15742       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15743   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15744   *) # Relative path.
15745     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15746     top_srcdir="$ac_dots$ac_given_srcdir" ;;
15747   esac
15748
15749   case "$ac_given_INSTALL" in
15750   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15751   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15752   esac
15753
15754   echo creating "$ac_file"
15755   rm -f "$ac_file"
15756   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15757   case "$ac_file" in
15758   *Makefile*) ac_comsub="1i\\
15759 # $configure_input" ;;
15760   *) ac_comsub= ;;
15761   esac
15762
15763   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15764   sed -e "$ac_comsub
15765 s%@configure_input@%$configure_input%g
15766 s%@srcdir@%$srcdir%g
15767 s%@top_srcdir@%$top_srcdir%g
15768 s%@INSTALL@%$INSTALL%g
15769 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15770 fi; done
15771 rm -f conftest.s*
15772
15773 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15774 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15775 #
15776 # ac_d sets the value in "#define NAME VALUE" lines.
15777 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15778 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15779 ac_dC='\3'
15780 ac_dD='%g'
15781 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15782 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15783 ac_uB='\([      ]\)%\1#\2define\3'
15784 ac_uC=' '
15785 ac_uD='\4%g'
15786 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15787 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15788 ac_eB='$%\1#\2define\3'
15789 ac_eC=' '
15790 ac_eD='%g'
15791
15792 if test "${CONFIG_HEADERS+set}" != set; then
15793 EOF
15794 cat >> $CONFIG_STATUS <<EOF
15795   CONFIG_HEADERS="include/config.h"
15796 EOF
15797 cat >> $CONFIG_STATUS <<\EOF
15798 fi
15799 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15800   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15801   case "$ac_file" in
15802   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15803        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15804   *) ac_file_in="${ac_file}.in" ;;
15805   esac
15806
15807   echo creating $ac_file
15808
15809   rm -f conftest.frag conftest.in conftest.out
15810   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15811   cat $ac_file_inputs > conftest.in
15812
15813 EOF
15814
15815 # Transform confdefs.h into a sed script conftest.vals that substitutes
15816 # the proper values into config.h.in to produce config.h.  And first:
15817 # Protect against being on the right side of a sed subst in config.status.
15818 # Protect against being in an unquoted here document in config.status.
15819 rm -f conftest.vals
15820 cat > conftest.hdr <<\EOF
15821 s/[\\&%]/\\&/g
15822 s%[\\$`]%\\&%g
15823 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15824 s%ac_d%ac_u%gp
15825 s%ac_u%ac_e%gp
15826 EOF
15827 sed -n -f conftest.hdr confdefs.h > conftest.vals
15828 rm -f conftest.hdr
15829
15830 # This sed command replaces #undef with comments.  This is necessary, for
15831 # example, in the case of _POSIX_SOURCE, which is predefined and required
15832 # on some systems where configure will not decide to define it.
15833 cat >> conftest.vals <<\EOF
15834 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15835 EOF
15836
15837 # Break up conftest.vals because some shells have a limit on
15838 # the size of here documents, and old seds have small limits too.
15839
15840 rm -f conftest.tail
15841 while :
15842 do
15843   ac_lines=`grep -c . conftest.vals`
15844   # grep -c gives empty output for an empty file on some AIX systems.
15845   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15846   # Write a limited-size here document to conftest.frag.
15847   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15848   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15849   echo 'CEOF
15850   sed -f conftest.frag conftest.in > conftest.out
15851   rm -f conftest.in
15852   mv conftest.out conftest.in
15853 ' >> $CONFIG_STATUS
15854   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15855   rm -f conftest.vals
15856   mv conftest.tail conftest.vals
15857 done
15858 rm -f conftest.vals
15859
15860 cat >> $CONFIG_STATUS <<\EOF
15861   rm -f conftest.frag conftest.h
15862   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15863   cat conftest.in >> conftest.h
15864   rm -f conftest.in
15865   if cmp -s $ac_file conftest.h 2>/dev/null; then
15866     echo "$ac_file is unchanged"
15867     rm -f conftest.h
15868   else
15869     # Remove last slash and all that follows it.  Not all systems have dirname.
15870       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15871       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15872       # The file is in a subdirectory.
15873       test ! -d "$ac_dir" && mkdir "$ac_dir"
15874     fi
15875     rm -f $ac_file
15876     mv conftest.h $ac_file
15877   fi
15878 fi; done
15879
15880 EOF
15881 cat >> $CONFIG_STATUS <<EOF
15882
15883 EOF
15884 cat >> $CONFIG_STATUS <<\EOF
15885
15886 exit 0
15887 EOF
15888 chmod +x $CONFIG_STATUS
15889 rm -fr confdefs* $ac_clean_files
15890 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
15891
15892
15893 #################################################
15894 # Print very concise instructions on building/use
15895 if test "x$enable_dmalloc" = xyes
15896 then
15897         echo "$ac_t""Note: The dmalloc debug library will be included.  To turn it on use" 1>&6
15898         echo "$ac_t""      \$ eval \`dmalloc samba\`." 1>&6
15899 fi