Fix to include -Ipopt in getpass test.
[nivanova/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-codepagedir=DIR  Where to put codepage files (\$libdir/codepages)"
29 ac_help="$ac_help
30   --with-logfilebase=DIR  Where to put log files (\$(VARDIR))"
31 ac_help="$ac_help
32   --enable-debug          Turn on compiler debugging information (default=no)"
33 ac_help="$ac_help
34   --enable-developer      turn on developer warnings and debugging [default=no]"
35 ac_help="$ac_help
36   --enable-krb5developer      turn on developer warnings and debugging, except -Wstrict-prototypes [default=no]"
37 ac_help="$ac_help
38   --enable-dmalloc          enable heap debugging [default=no]"
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-krb5=base-dir    Locate Kerberos 5 support (default=/usr)"
51 ac_help="$ac_help
52   --with-automount        Include AUTOMOUNT support (default=no)"
53 ac_help="$ac_help
54   --with-smbmount         Include SMBMOUNT (Linux only) support (default=no)"
55 ac_help="$ac_help
56   --with-pam              Include PAM support (default=no)"
57 ac_help="$ac_help
58   --with-pam_smbpass      Build a PAM module to allow other applications to use our smbpasswd file (default=no)"
59 ac_help="$ac_help
60   --with-tdbsam           Include experimental TDB SAM support (default=no)"
61 ac_help="$ac_help
62   --with-ldapsam          Include experimental LDAP SAM support (default=no)"
63 ac_help="$ac_help
64   --with-nisplussam       Include NISPLUS SAM support (default=no)"
65 ac_help="$ac_help
66   --with-nisplus-home     Include NISPLUS_HOME support (default=no)"
67 ac_help="$ac_help
68   --with-ssl              Include SSL support (default=no)
69   --with-sslinc=DIR          Where the SSL includes are (defaults to /usr/local/ssl/include)
70   --with-ssllib=DIR          Where the SSL libraries are (defaults to /usr/local/ssl/lib)"
71 ac_help="$ac_help
72   --with-syslog           Include experimental SYSLOG support (default=no)"
73 ac_help="$ac_help
74   --with-profiling-data   Include gathering source code profile information (default=no)"
75 ac_help="$ac_help
76   --with-quotas           Include experimental disk-quota support (default=no)"
77 ac_help="$ac_help
78   --with-utmp             Include experimental utmp accounting (default=no)"
79 ac_help="$ac_help
80   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
81 ac_help="$ac_help
82   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
83 ac_help="$ac_help
84   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
85 ac_help="$ac_help
86   --with-manpages-langs={en,ja,pl}  Choose man pages' language(s). (en)"
87 ac_help="$ac_help
88   --with-spinlocks        Use spin locks instead of fcntl locks (default=no) "
89 ac_help="$ac_help
90   --with-acl-support      Include ACL support (default=no)"
91 ac_help="$ac_help
92   --with-winbind          Build winbind (default, if supported by OS)"
93 ac_help="$ac_help
94   --with-included-popt    use bundled popt library, not from system"
95
96 # Initialize some variables set by options.
97 # The variables have the same names as the options, with
98 # dashes changed to underlines.
99 build=NONE
100 cache_file=./config.cache
101 exec_prefix=NONE
102 host=NONE
103 no_create=
104 nonopt=NONE
105 no_recursion=
106 prefix=NONE
107 program_prefix=NONE
108 program_suffix=NONE
109 program_transform_name=s,x,x,
110 silent=
111 site=
112 srcdir=
113 target=NONE
114 verbose=
115 x_includes=NONE
116 x_libraries=NONE
117 bindir='${exec_prefix}/bin'
118 sbindir='${exec_prefix}/sbin'
119 libexecdir='${exec_prefix}/libexec'
120 datadir='${prefix}/share'
121 sysconfdir='${prefix}/etc'
122 sharedstatedir='${prefix}/com'
123 localstatedir='${prefix}/var'
124 libdir='${exec_prefix}/lib'
125 includedir='${prefix}/include'
126 oldincludedir='/usr/include'
127 infodir='${prefix}/info'
128 mandir='${prefix}/man'
129
130 # Initialize some other variables.
131 subdirs=
132 MFLAGS= MAKEFLAGS=
133 SHELL=${CONFIG_SHELL-/bin/sh}
134 # Maximum number of lines to put in a shell here document.
135 ac_max_here_lines=12
136
137 ac_prev=
138 for ac_option
139 do
140
141   # If the previous option needs an argument, assign it.
142   if test -n "$ac_prev"; then
143     eval "$ac_prev=\$ac_option"
144     ac_prev=
145     continue
146   fi
147
148   case "$ac_option" in
149   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
150   *) ac_optarg= ;;
151   esac
152
153   # Accept the important Cygnus configure options, so we can diagnose typos.
154
155   case "$ac_option" in
156
157   -bindir | --bindir | --bindi | --bind | --bin | --bi)
158     ac_prev=bindir ;;
159   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
160     bindir="$ac_optarg" ;;
161
162   -build | --build | --buil | --bui | --bu)
163     ac_prev=build ;;
164   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
165     build="$ac_optarg" ;;
166
167   -cache-file | --cache-file | --cache-fil | --cache-fi \
168   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
169     ac_prev=cache_file ;;
170   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
171   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
172     cache_file="$ac_optarg" ;;
173
174   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
175     ac_prev=datadir ;;
176   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
177   | --da=*)
178     datadir="$ac_optarg" ;;
179
180   -disable-* | --disable-*)
181     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
182     # Reject names that are not valid shell variable names.
183     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
184       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
185     fi
186     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
187     eval "enable_${ac_feature}=no" ;;
188
189   -enable-* | --enable-*)
190     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
191     # Reject names that are not valid shell variable names.
192     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
193       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
194     fi
195     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
196     case "$ac_option" in
197       *=*) ;;
198       *) ac_optarg=yes ;;
199     esac
200     eval "enable_${ac_feature}='$ac_optarg'" ;;
201
202   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
203   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
204   | --exec | --exe | --ex)
205     ac_prev=exec_prefix ;;
206   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
207   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
208   | --exec=* | --exe=* | --ex=*)
209     exec_prefix="$ac_optarg" ;;
210
211   -gas | --gas | --ga | --g)
212     # Obsolete; use --with-gas.
213     with_gas=yes ;;
214
215   -help | --help | --hel | --he)
216     # Omit some internal or obsolete options to make the list less imposing.
217     # This message is too long to be a string in the A/UX 3.1 sh.
218     cat << EOF
219 Usage: configure [options] [host]
220 Options: [defaults in brackets after descriptions]
221 Configuration:
222   --cache-file=FILE       cache test results in FILE
223   --help                  print this message
224   --no-create             do not create output files
225   --quiet, --silent       do not print \`checking...' messages
226   --version               print the version of autoconf that created configure
227 Directory and file names:
228   --prefix=PREFIX         install architecture-independent files in PREFIX
229                           [$ac_default_prefix]
230   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
231                           [same as prefix]
232   --bindir=DIR            user executables in DIR [EPREFIX/bin]
233   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
234   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
235   --datadir=DIR           read-only architecture-independent data in DIR
236                           [PREFIX/share]
237   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
238   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
239                           [PREFIX/com]
240   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
241   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
242   --includedir=DIR        C header files in DIR [PREFIX/include]
243   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
244   --infodir=DIR           info documentation in DIR [PREFIX/info]
245   --mandir=DIR            man documentation in DIR [PREFIX/man]
246   --srcdir=DIR            find the sources in DIR [configure dir or ..]
247   --program-prefix=PREFIX prepend PREFIX to installed program names
248   --program-suffix=SUFFIX append SUFFIX to installed program names
249   --program-transform-name=PROGRAM
250                           run sed PROGRAM on installed program names
251 EOF
252     cat << EOF
253 Host type:
254   --build=BUILD           configure for building on BUILD [BUILD=HOST]
255   --host=HOST             configure for HOST [guessed]
256   --target=TARGET         configure for TARGET [TARGET=HOST]
257 Features and packages:
258   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
259   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
260   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
261   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
262   --x-includes=DIR        X include files are in DIR
263   --x-libraries=DIR       X library files are in DIR
264 EOF
265     if test -n "$ac_help"; then
266       echo "--enable and --with options recognized:$ac_help"
267     fi
268     exit 0 ;;
269
270   -host | --host | --hos | --ho)
271     ac_prev=host ;;
272   -host=* | --host=* | --hos=* | --ho=*)
273     host="$ac_optarg" ;;
274
275   -includedir | --includedir | --includedi | --included | --include \
276   | --includ | --inclu | --incl | --inc)
277     ac_prev=includedir ;;
278   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
279   | --includ=* | --inclu=* | --incl=* | --inc=*)
280     includedir="$ac_optarg" ;;
281
282   -infodir | --infodir | --infodi | --infod | --info | --inf)
283     ac_prev=infodir ;;
284   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
285     infodir="$ac_optarg" ;;
286
287   -libdir | --libdir | --libdi | --libd)
288     ac_prev=libdir ;;
289   -libdir=* | --libdir=* | --libdi=* | --libd=*)
290     libdir="$ac_optarg" ;;
291
292   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
293   | --libexe | --libex | --libe)
294     ac_prev=libexecdir ;;
295   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
296   | --libexe=* | --libex=* | --libe=*)
297     libexecdir="$ac_optarg" ;;
298
299   -localstatedir | --localstatedir | --localstatedi | --localstated \
300   | --localstate | --localstat | --localsta | --localst \
301   | --locals | --local | --loca | --loc | --lo)
302     ac_prev=localstatedir ;;
303   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
304   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
305   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
306     localstatedir="$ac_optarg" ;;
307
308   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
309     ac_prev=mandir ;;
310   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
311     mandir="$ac_optarg" ;;
312
313   -nfp | --nfp | --nf)
314     # Obsolete; use --without-fp.
315     with_fp=no ;;
316
317   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
318   | --no-cr | --no-c)
319     no_create=yes ;;
320
321   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
322   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
323     no_recursion=yes ;;
324
325   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
326   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
327   | --oldin | --oldi | --old | --ol | --o)
328     ac_prev=oldincludedir ;;
329   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
330   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
331   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
332     oldincludedir="$ac_optarg" ;;
333
334   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
335     ac_prev=prefix ;;
336   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
337     prefix="$ac_optarg" ;;
338
339   -program-prefix | --program-prefix | --program-prefi | --program-pref \
340   | --program-pre | --program-pr | --program-p)
341     ac_prev=program_prefix ;;
342   -program-prefix=* | --program-prefix=* | --program-prefi=* \
343   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
344     program_prefix="$ac_optarg" ;;
345
346   -program-suffix | --program-suffix | --program-suffi | --program-suff \
347   | --program-suf | --program-su | --program-s)
348     ac_prev=program_suffix ;;
349   -program-suffix=* | --program-suffix=* | --program-suffi=* \
350   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
351     program_suffix="$ac_optarg" ;;
352
353   -program-transform-name | --program-transform-name \
354   | --program-transform-nam | --program-transform-na \
355   | --program-transform-n | --program-transform- \
356   | --program-transform | --program-transfor \
357   | --program-transfo | --program-transf \
358   | --program-trans | --program-tran \
359   | --progr-tra | --program-tr | --program-t)
360     ac_prev=program_transform_name ;;
361   -program-transform-name=* | --program-transform-name=* \
362   | --program-transform-nam=* | --program-transform-na=* \
363   | --program-transform-n=* | --program-transform-=* \
364   | --program-transform=* | --program-transfor=* \
365   | --program-transfo=* | --program-transf=* \
366   | --program-trans=* | --program-tran=* \
367   | --progr-tra=* | --program-tr=* | --program-t=*)
368     program_transform_name="$ac_optarg" ;;
369
370   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
371   | -silent | --silent | --silen | --sile | --sil)
372     silent=yes ;;
373
374   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
375     ac_prev=sbindir ;;
376   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
377   | --sbi=* | --sb=*)
378     sbindir="$ac_optarg" ;;
379
380   -sharedstatedir | --sharedstatedir | --sharedstatedi \
381   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
382   | --sharedst | --shareds | --shared | --share | --shar \
383   | --sha | --sh)
384     ac_prev=sharedstatedir ;;
385   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
386   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
387   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
388   | --sha=* | --sh=*)
389     sharedstatedir="$ac_optarg" ;;
390
391   -site | --site | --sit)
392     ac_prev=site ;;
393   -site=* | --site=* | --sit=*)
394     site="$ac_optarg" ;;
395
396   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
397     ac_prev=srcdir ;;
398   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
399     srcdir="$ac_optarg" ;;
400
401   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
402   | --syscon | --sysco | --sysc | --sys | --sy)
403     ac_prev=sysconfdir ;;
404   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
405   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
406     sysconfdir="$ac_optarg" ;;
407
408   -target | --target | --targe | --targ | --tar | --ta | --t)
409     ac_prev=target ;;
410   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
411     target="$ac_optarg" ;;
412
413   -v | -verbose | --verbose | --verbos | --verbo | --verb)
414     verbose=yes ;;
415
416   -version | --version | --versio | --versi | --vers)
417     echo "configure generated by autoconf version 2.13"
418     exit 0 ;;
419
420   -with-* | --with-*)
421     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
422     # Reject names that are not valid shell variable names.
423     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
424       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
425     fi
426     ac_package=`echo $ac_package| sed 's/-/_/g'`
427     case "$ac_option" in
428       *=*) ;;
429       *) ac_optarg=yes ;;
430     esac
431     eval "with_${ac_package}='$ac_optarg'" ;;
432
433   -without-* | --without-*)
434     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
435     # Reject names that are not valid shell variable names.
436     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
437       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
438     fi
439     ac_package=`echo $ac_package| sed 's/-/_/g'`
440     eval "with_${ac_package}=no" ;;
441
442   --x)
443     # Obsolete; use --with-x.
444     with_x=yes ;;
445
446   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
447   | --x-incl | --x-inc | --x-in | --x-i)
448     ac_prev=x_includes ;;
449   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
450   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
451     x_includes="$ac_optarg" ;;
452
453   -x-libraries | --x-libraries | --x-librarie | --x-librari \
454   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
455     ac_prev=x_libraries ;;
456   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
457   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
458     x_libraries="$ac_optarg" ;;
459
460   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
461     ;;
462
463   *)
464     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
465       echo "configure: warning: $ac_option: invalid host type" 1>&2
466     fi
467     if test "x$nonopt" != xNONE; then
468       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
469     fi
470     nonopt="$ac_option"
471     ;;
472
473   esac
474 done
475
476 if test -n "$ac_prev"; then
477   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
478 fi
479
480 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
481
482 # File descriptor usage:
483 # 0 standard input
484 # 1 file creation
485 # 2 errors and warnings
486 # 3 some systems may open it to /dev/tty
487 # 4 used on the Kubota Titan
488 # 6 checking for... messages and results
489 # 5 compiler messages saved in config.log
490 if test "$silent" = yes; then
491   exec 6>/dev/null
492 else
493   exec 6>&1
494 fi
495 exec 5>./config.log
496
497 echo "\
498 This file contains any messages produced by compilers while
499 running configure, to aid debugging if configure makes a mistake.
500 " 1>&5
501
502 # Strip out --no-create and --no-recursion so they do not pile up.
503 # Also quote any args containing shell metacharacters.
504 ac_configure_args=
505 for ac_arg
506 do
507   case "$ac_arg" in
508   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
509   | --no-cr | --no-c) ;;
510   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
511   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
512   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
513   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
514   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
515   esac
516 done
517
518 # NLS nuisances.
519 # Only set these to C if already set.  These must not be set unconditionally
520 # because not all systems understand e.g. LANG=C (notably SCO).
521 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
522 # Non-C LC_CTYPE values break the ctype check.
523 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
524 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
525 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
526 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
527
528 # confdefs.h avoids OS command line length limits that DEFS can exceed.
529 rm -rf conftest* confdefs.h
530 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
531 echo > confdefs.h
532
533 # A filename unique to this package, relative to the directory that
534 # configure is in, which we can look for to find out if srcdir is correct.
535 ac_unique_file=include/includes.h
536
537 # Find the source files, if location was not specified.
538 if test -z "$srcdir"; then
539   ac_srcdir_defaulted=yes
540   # Try the directory containing this script, then its parent.
541   ac_prog=$0
542   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
543   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
544   srcdir=$ac_confdir
545   if test ! -r $srcdir/$ac_unique_file; then
546     srcdir=..
547   fi
548 else
549   ac_srcdir_defaulted=no
550 fi
551 if test ! -r $srcdir/$ac_unique_file; then
552   if test "$ac_srcdir_defaulted" = yes; then
553     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
554   else
555     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
556   fi
557 fi
558 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
559
560 # Prefer explicitly selected file to automatically selected ones.
561 if test -z "$CONFIG_SITE"; then
562   if test "x$prefix" != xNONE; then
563     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
564   else
565     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
566   fi
567 fi
568 for ac_site_file in $CONFIG_SITE; do
569   if test -r "$ac_site_file"; then
570     echo "loading site script $ac_site_file"
571     . "$ac_site_file"
572   fi
573 done
574
575 if test -r "$cache_file"; then
576   echo "loading cache $cache_file"
577   . $cache_file
578 else
579   echo "creating cache $cache_file"
580   > $cache_file
581 fi
582
583 ac_ext=c
584 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
585 ac_cpp='$CPP $CPPFLAGS'
586 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
587 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
588 cross_compiling=$ac_cv_prog_cc_cross
589
590 ac_exeext=
591 ac_objext=o
592 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
593   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
594   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
595     ac_n= ac_c='
596 ' ac_t='        '
597   else
598     ac_n=-n ac_c= ac_t=
599   fi
600 else
601   ac_n= ac_c='\c' ac_t=
602 fi
603
604
605
606
607 #################################################
608 # Directory handling stuff to support both the
609 # legacy SAMBA directories and FHS compliant
610 # ones...
611
612
613 # Check whether --with-fhs or --without-fhs was given.
614 if test "${with_fhs+set}" = set; then
615   withval="$with_fhs"
616   codepagedir="\$(DATADIR)/samba/codepages"
617     configdir="${sysconfdir}/samba"
618     lockdir="\${VARDIR}/cache/samba"
619     piddir="\$(VARDIR)/run/samba"
620     logfilebase="\${VARDIR}/log/samba"
621     privatedir="\${CONFIGDIR}/private"
622     swatdir="\${DATADIR}/samba/swat"
623 else
624   codepagedir="\$(LIBDIR)/codepages"
625     configdir="\$(LIBDIR)"
626     logfilebase="\$(VARDIR)"
627     lockdir="\${VARDIR}/locks"
628     piddir="\$(VARDIR)/locks"
629     privatedir="\${prefix}/private"
630     swatdir="\${prefix}/swat"
631 fi
632
633
634 #################################################
635 # set private directory location
636 # Check whether --with-privatedir or --without-privatedir was given.
637 if test "${with_privatedir+set}" = set; then
638   withval="$with_privatedir"
639    case "$withval" in
640   yes|no)
641   #
642   # Just in case anybody calls it without argument
643   #
644     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
645   ;;
646   * )
647     privatedir="$withval"
648     ;;
649   esac
650 fi
651
652
653 #################################################
654 # set lock directory location
655 # Check whether --with-lockdir or --without-lockdir was given.
656 if test "${with_lockdir+set}" = set; then
657   withval="$with_lockdir"
658    case "$withval" in
659   yes|no)
660   #
661   # Just in case anybody calls it without argument
662   #
663     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
664   ;;
665   * )
666     lockdir="$withval"
667     ;;
668   esac
669 fi
670
671
672 #################################################
673 # set pid directory location
674 # Check whether --with-piddir or --without-piddir was given.
675 if test "${with_piddir+set}" = set; then
676   withval="$with_piddir"
677    case "$withval" in
678   yes|no)
679   #
680   # Just in case anybody calls it without argument
681   #
682     echo "configure: warning: --with-piddir called without argument - will use default" 1>&2
683   ;;
684   * )
685     piddir="$withval"
686     ;;
687   esac
688 fi
689
690
691 #################################################
692 # set SWAT directory location
693 # Check whether --with-swatdir or --without-swatdir was given.
694 if test "${with_swatdir+set}" = set; then
695   withval="$with_swatdir"
696    case "$withval" in
697   yes|no)
698   #
699   # Just in case anybody does it
700   #
701     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
702   ;;
703   * )
704     swatdir="$withval"
705     ;;
706   esac
707 fi
708
709
710 #################################################
711 # set configuration directory location
712 # Check whether --with-configdir or --without-configdir was given.
713 if test "${with_configdir+set}" = set; then
714   withval="$with_configdir"
715    case "$withval" in
716   yes|no)
717   #
718   # Just in case anybody does it
719   #
720     echo "configure: warning: --with-configdir called without argument - will use default" 1>&2
721   ;;
722   * )
723     configdir="$withval"
724     ;;
725   esac
726 fi
727
728
729 #################################################
730 # set codepage directory location
731 # Check whether --with-codepagedir or --without-codepagedir was given.
732 if test "${with_codepagedir+set}" = set; then
733   withval="$with_codepagedir"
734    case "$withval" in
735   yes|no)
736   #
737   # Just in case anybody does it
738   #
739     echo "configure: warning: --with-codepagedir called without argument - will use default" 1>&2
740   ;;
741   * )
742     codepagedir="$withval"
743     ;;
744   esac
745 fi
746
747
748 #################################################
749 # set log directory location
750 # Check whether --with-logfilebase or --without-logfilebase was given.
751 if test "${with_logfilebase+set}" = set; then
752   withval="$with_logfilebase"
753    case "$withval" in
754   yes|no)
755   #
756   # Just in case anybody does it
757   #
758     echo "configure: warning: --with-logfilebase called without argument - will use default" 1>&2
759   ;;
760   * )
761     logfilebase="$withval"
762     ;;
763   esac
764 fi
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
790
791
792 # compile with optimisation and without debugging by default
793 CFLAGS="-O ${CFLAGS}"
794
795 # Check whether --enable-debug or --disable-debug was given.
796 if test "${enable_debug+set}" = set; then
797   enableval="$enable_debug"
798   if eval "test x$enable_debug = xyes"; then
799         CFLAGS="${CFLAGS} -g"
800     fi
801 fi
802
803
804 # Check whether --enable-developer or --disable-developer was given.
805 if test "${enable_developer+set}" = set; then
806   enableval="$enable_developer"
807   if eval "test x$enable_developer = xyes"; then
808         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
809     fi
810 fi
811
812
813 # Check whether --enable-krb5developer or --disable-krb5developer was given.
814 if test "${enable_krb5developer+set}" = set; then
815   enableval="$enable_krb5developer"
816   if eval "test x$enable_krb5developer = xyes"; then
817         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
818     fi
819 fi
820
821
822 # Check whether --enable-dmalloc or --disable-dmalloc was given.
823 if test "${enable_dmalloc+set}" = set; then
824   enableval="$enable_dmalloc"
825   :
826 fi
827
828
829 if test "x$enable_dmalloc" = xyes
830 then
831         cat >> confdefs.h <<\EOF
832 #define ENABLE_DMALLOC 1
833 EOF
834
835         cat >> confdefs.h <<\EOF
836 #define DMALLOC_FUNC_CHECK 1
837 EOF
838
839         LIBS="$LIBS -ldmalloc"  
840 fi
841
842 # Extract the first word of "gcc", so it can be a program name with args.
843 set dummy gcc; ac_word=$2
844 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
845 echo "configure:846: checking for $ac_word" >&5
846 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
847   echo $ac_n "(cached) $ac_c" 1>&6
848 else
849   if test -n "$CC"; then
850   ac_cv_prog_CC="$CC" # Let the user override the test.
851 else
852   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
853   ac_dummy="$PATH"
854   for ac_dir in $ac_dummy; do
855     test -z "$ac_dir" && ac_dir=.
856     if test -f $ac_dir/$ac_word; then
857       ac_cv_prog_CC="gcc"
858       break
859     fi
860   done
861   IFS="$ac_save_ifs"
862 fi
863 fi
864 CC="$ac_cv_prog_CC"
865 if test -n "$CC"; then
866   echo "$ac_t""$CC" 1>&6
867 else
868   echo "$ac_t""no" 1>&6
869 fi
870
871 if test -z "$CC"; then
872   # Extract the first word of "cc", so it can be a program name with args.
873 set dummy cc; ac_word=$2
874 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
875 echo "configure:876: checking for $ac_word" >&5
876 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
877   echo $ac_n "(cached) $ac_c" 1>&6
878 else
879   if test -n "$CC"; then
880   ac_cv_prog_CC="$CC" # Let the user override the test.
881 else
882   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
883   ac_prog_rejected=no
884   ac_dummy="$PATH"
885   for ac_dir in $ac_dummy; do
886     test -z "$ac_dir" && ac_dir=.
887     if test -f $ac_dir/$ac_word; then
888       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
889         ac_prog_rejected=yes
890         continue
891       fi
892       ac_cv_prog_CC="cc"
893       break
894     fi
895   done
896   IFS="$ac_save_ifs"
897 if test $ac_prog_rejected = yes; then
898   # We found a bogon in the path, so make sure we never use it.
899   set dummy $ac_cv_prog_CC
900   shift
901   if test $# -gt 0; then
902     # We chose a different compiler from the bogus one.
903     # However, it has the same basename, so the bogon will be chosen
904     # first if we set CC to just the basename; use the full file name.
905     shift
906     set dummy "$ac_dir/$ac_word" "$@"
907     shift
908     ac_cv_prog_CC="$@"
909   fi
910 fi
911 fi
912 fi
913 CC="$ac_cv_prog_CC"
914 if test -n "$CC"; then
915   echo "$ac_t""$CC" 1>&6
916 else
917   echo "$ac_t""no" 1>&6
918 fi
919
920   if test -z "$CC"; then
921     case "`uname -s`" in
922     *win32* | *WIN32*)
923       # Extract the first word of "cl", so it can be a program name with args.
924 set dummy cl; ac_word=$2
925 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
926 echo "configure:927: checking for $ac_word" >&5
927 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
928   echo $ac_n "(cached) $ac_c" 1>&6
929 else
930   if test -n "$CC"; then
931   ac_cv_prog_CC="$CC" # Let the user override the test.
932 else
933   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
934   ac_dummy="$PATH"
935   for ac_dir in $ac_dummy; do
936     test -z "$ac_dir" && ac_dir=.
937     if test -f $ac_dir/$ac_word; then
938       ac_cv_prog_CC="cl"
939       break
940     fi
941   done
942   IFS="$ac_save_ifs"
943 fi
944 fi
945 CC="$ac_cv_prog_CC"
946 if test -n "$CC"; then
947   echo "$ac_t""$CC" 1>&6
948 else
949   echo "$ac_t""no" 1>&6
950 fi
951  ;;
952     esac
953   fi
954   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
955 fi
956
957 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
958 echo "configure:959: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
959
960 ac_ext=c
961 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
962 ac_cpp='$CPP $CPPFLAGS'
963 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
964 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
965 cross_compiling=$ac_cv_prog_cc_cross
966
967 cat > conftest.$ac_ext << EOF
968
969 #line 970 "configure"
970 #include "confdefs.h"
971
972 main(){return(0);}
973 EOF
974 if { (eval echo configure:975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
975   ac_cv_prog_cc_works=yes
976   # If we can't run a trivial program, we are probably using a cross compiler.
977   if (./conftest; exit) 2>/dev/null; then
978     ac_cv_prog_cc_cross=no
979   else
980     ac_cv_prog_cc_cross=yes
981   fi
982 else
983   echo "configure: failed program was:" >&5
984   cat conftest.$ac_ext >&5
985   ac_cv_prog_cc_works=no
986 fi
987 rm -fr conftest*
988 ac_ext=c
989 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
990 ac_cpp='$CPP $CPPFLAGS'
991 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
992 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
993 cross_compiling=$ac_cv_prog_cc_cross
994
995 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
996 if test $ac_cv_prog_cc_works = no; then
997   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
998 fi
999 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1000 echo "configure:1001: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1001 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1002 cross_compiling=$ac_cv_prog_cc_cross
1003
1004 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1005 echo "configure:1006: checking whether we are using GNU C" >&5
1006 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1007   echo $ac_n "(cached) $ac_c" 1>&6
1008 else
1009   cat > conftest.c <<EOF
1010 #ifdef __GNUC__
1011   yes;
1012 #endif
1013 EOF
1014 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1015   ac_cv_prog_gcc=yes
1016 else
1017   ac_cv_prog_gcc=no
1018 fi
1019 fi
1020
1021 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1022
1023 if test $ac_cv_prog_gcc = yes; then
1024   GCC=yes
1025 else
1026   GCC=
1027 fi
1028
1029 ac_test_CFLAGS="${CFLAGS+set}"
1030 ac_save_CFLAGS="$CFLAGS"
1031 CFLAGS=
1032 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1033 echo "configure:1034: checking whether ${CC-cc} accepts -g" >&5
1034 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1035   echo $ac_n "(cached) $ac_c" 1>&6
1036 else
1037   echo 'void f(){}' > conftest.c
1038 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1039   ac_cv_prog_cc_g=yes
1040 else
1041   ac_cv_prog_cc_g=no
1042 fi
1043 rm -f conftest*
1044
1045 fi
1046
1047 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1048 if test "$ac_test_CFLAGS" = set; then
1049   CFLAGS="$ac_save_CFLAGS"
1050 elif test $ac_cv_prog_cc_g = yes; then
1051   if test "$GCC" = yes; then
1052     CFLAGS="-g -O2"
1053   else
1054     CFLAGS="-g"
1055   fi
1056 else
1057   if test "$GCC" = yes; then
1058     CFLAGS="-O2"
1059   else
1060     CFLAGS=
1061   fi
1062 fi
1063
1064 ac_aux_dir=
1065 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1066   if test -f $ac_dir/install-sh; then
1067     ac_aux_dir=$ac_dir
1068     ac_install_sh="$ac_aux_dir/install-sh -c"
1069     break
1070   elif test -f $ac_dir/install.sh; then
1071     ac_aux_dir=$ac_dir
1072     ac_install_sh="$ac_aux_dir/install.sh -c"
1073     break
1074   fi
1075 done
1076 if test -z "$ac_aux_dir"; then
1077   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1078 fi
1079 ac_config_guess=$ac_aux_dir/config.guess
1080 ac_config_sub=$ac_aux_dir/config.sub
1081 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1082
1083 # Find a good install program.  We prefer a C program (faster),
1084 # so one script is as good as another.  But avoid the broken or
1085 # incompatible versions:
1086 # SysV /etc/install, /usr/sbin/install
1087 # SunOS /usr/etc/install
1088 # IRIX /sbin/install
1089 # AIX /bin/install
1090 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1091 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1092 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1093 # ./install, which can be erroneously created by make from ./install.sh.
1094 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1095 echo "configure:1096: checking for a BSD compatible install" >&5
1096 if test -z "$INSTALL"; then
1097 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1098   echo $ac_n "(cached) $ac_c" 1>&6
1099 else
1100     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1101   for ac_dir in $PATH; do
1102     # Account for people who put trailing slashes in PATH elements.
1103     case "$ac_dir/" in
1104     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1105     *)
1106       # OSF1 and SCO ODT 3.0 have their own names for install.
1107       # Don't use installbsd from OSF since it installs stuff as root
1108       # by default.
1109       for ac_prog in ginstall scoinst install; do
1110         if test -f $ac_dir/$ac_prog; then
1111           if test $ac_prog = install &&
1112             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1113             # AIX install.  It has an incompatible calling convention.
1114             :
1115           else
1116             ac_cv_path_install="$ac_dir/$ac_prog -c"
1117             break 2
1118           fi
1119         fi
1120       done
1121       ;;
1122     esac
1123   done
1124   IFS="$ac_save_IFS"
1125
1126 fi
1127   if test "${ac_cv_path_install+set}" = set; then
1128     INSTALL="$ac_cv_path_install"
1129   else
1130     # As a last resort, use the slow shell script.  We don't cache a
1131     # path for INSTALL within a source directory, because that will
1132     # break other packages using the cache if that directory is
1133     # removed, or if the path is relative.
1134     INSTALL="$ac_install_sh"
1135   fi
1136 fi
1137 echo "$ac_t""$INSTALL" 1>&6
1138
1139 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1140 # It thinks the first close brace ends the variable substitution.
1141 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1142
1143 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1144
1145 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1146
1147 for ac_prog in gawk mawk nawk awk
1148 do
1149 # Extract the first word of "$ac_prog", so it can be a program name with args.
1150 set dummy $ac_prog; ac_word=$2
1151 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1152 echo "configure:1153: checking for $ac_word" >&5
1153 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1154   echo $ac_n "(cached) $ac_c" 1>&6
1155 else
1156   if test -n "$AWK"; then
1157   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1158 else
1159   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1160   ac_dummy="$PATH"
1161   for ac_dir in $ac_dummy; do
1162     test -z "$ac_dir" && ac_dir=.
1163     if test -f $ac_dir/$ac_word; then
1164       ac_cv_prog_AWK="$ac_prog"
1165       break
1166     fi
1167   done
1168   IFS="$ac_save_ifs"
1169 fi
1170 fi
1171 AWK="$ac_cv_prog_AWK"
1172 if test -n "$AWK"; then
1173   echo "$ac_t""$AWK" 1>&6
1174 else
1175   echo "$ac_t""no" 1>&6
1176 fi
1177
1178 test -n "$AWK" && break
1179 done
1180
1181
1182 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1183 echo "configure:1184: checking for POSIXized ISC" >&5
1184 if test -d /etc/conf/kconfig.d &&
1185   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1186 then
1187   echo "$ac_t""yes" 1>&6
1188   ISC=yes # If later tests want to check for ISC.
1189   cat >> confdefs.h <<\EOF
1190 #define _POSIX_SOURCE 1
1191 EOF
1192
1193   if test "$GCC" = yes; then
1194     CC="$CC -posix"
1195   else
1196     CC="$CC -Xp"
1197   fi
1198 else
1199   echo "$ac_t""no" 1>&6
1200   ISC=
1201 fi
1202
1203
1204 if test "x$CC" != xcc; then
1205   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1206 echo "configure:1207: checking whether $CC and cc understand -c and -o together" >&5
1207 else
1208   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1209 echo "configure:1210: checking whether cc understands -c and -o together" >&5
1210 fi
1211 set dummy $CC; ac_cc="`echo $2 |
1212                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1213 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1214   echo $ac_n "(cached) $ac_c" 1>&6
1215 else
1216   echo 'foo(){}' > conftest.c
1217 # Make sure it works both with $CC and with simple cc.
1218 # We do the test twice because some compilers refuse to overwrite an
1219 # existing .o file with -o, though they will create one.
1220 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1221 if { (eval echo configure:1222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1222    test -f conftest.o && { (eval echo configure:1223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1223 then
1224   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1225   if test "x$CC" != xcc; then
1226     # Test first that cc exists at all.
1227     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1228       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1229       if { (eval echo configure:1230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1230          test -f conftest.o && { (eval echo configure:1231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1231       then
1232         # cc works too.
1233         :
1234       else
1235         # cc exists but doesn't like -o.
1236         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1237       fi
1238     fi
1239   fi
1240 else
1241   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1242 fi
1243 rm -f conftest*
1244
1245 fi
1246 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1247   echo "$ac_t""yes" 1>&6
1248 else
1249   echo "$ac_t""no" 1>&6
1250   cat >> confdefs.h <<\EOF
1251 #define NO_MINUS_C_MINUS_O 1
1252 EOF
1253
1254 fi
1255
1256 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1257       BROKEN_CC=
1258 else
1259       BROKEN_CC=#
1260 fi
1261
1262
1263 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1264 echo "configure:1265: checking that the C compiler understands volatile" >&5
1265 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1266   echo $ac_n "(cached) $ac_c" 1>&6
1267 else
1268   
1269     cat > conftest.$ac_ext <<EOF
1270 #line 1271 "configure"
1271 #include "confdefs.h"
1272 #include <sys/types.h>
1273 int main() {
1274 volatile int i = 0
1275 ; return 0; }
1276 EOF
1277 if { (eval echo configure:1278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1278   rm -rf conftest*
1279   samba_cv_volatile=yes
1280 else
1281   echo "configure: failed program was:" >&5
1282   cat conftest.$ac_ext >&5
1283   rm -rf conftest*
1284   samba_cv_volatile=no
1285 fi
1286 rm -f conftest*
1287 fi
1288
1289 echo "$ac_t""$samba_cv_volatile" 1>&6
1290 if test x"$samba_cv_volatile" = x"yes"; then
1291    cat >> confdefs.h <<\EOF
1292 #define HAVE_VOLATILE 1
1293 EOF
1294
1295 fi
1296
1297
1298
1299 # Do some error checking and defaulting for the host and target type.
1300 # The inputs are:
1301 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1302 #
1303 # The rules are:
1304 # 1. You are not allowed to specify --host, --target, and nonopt at the
1305 #    same time.
1306 # 2. Host defaults to nonopt.
1307 # 3. If nonopt is not specified, then host defaults to the current host,
1308 #    as determined by config.guess.
1309 # 4. Target and build default to nonopt.
1310 # 5. If nonopt is not specified, then target and build default to host.
1311
1312 # The aliases save the names the user supplied, while $host etc.
1313 # will get canonicalized.
1314 case $host---$target---$nonopt in
1315 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1316 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1317 esac
1318
1319
1320 # Make sure we can run config.sub.
1321 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1322 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1323 fi
1324
1325 echo $ac_n "checking host system type""... $ac_c" 1>&6
1326 echo "configure:1327: checking host system type" >&5
1327
1328 host_alias=$host
1329 case "$host_alias" in
1330 NONE)
1331   case $nonopt in
1332   NONE)
1333     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1334     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1335     fi ;;
1336   *) host_alias=$nonopt ;;
1337   esac ;;
1338 esac
1339
1340 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1341 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1342 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1343 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1344 echo "$ac_t""$host" 1>&6
1345
1346 echo $ac_n "checking target system type""... $ac_c" 1>&6
1347 echo "configure:1348: checking target system type" >&5
1348
1349 target_alias=$target
1350 case "$target_alias" in
1351 NONE)
1352   case $nonopt in
1353   NONE) target_alias=$host_alias ;;
1354   *) target_alias=$nonopt ;;
1355   esac ;;
1356 esac
1357
1358 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1359 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1360 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1361 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1362 echo "$ac_t""$target" 1>&6
1363
1364 echo $ac_n "checking build system type""... $ac_c" 1>&6
1365 echo "configure:1366: checking build system type" >&5
1366
1367 build_alias=$build
1368 case "$build_alias" in
1369 NONE)
1370   case $nonopt in
1371   NONE) build_alias=$host_alias ;;
1372   *) build_alias=$nonopt ;;
1373   esac ;;
1374 esac
1375
1376 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1377 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1378 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1379 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1380 echo "$ac_t""$build" 1>&6
1381
1382 test "$host_alias" != "$target_alias" &&
1383   test "$program_prefix$program_suffix$program_transform_name" = \
1384     NONENONEs,x,x, &&
1385   program_prefix=${target_alias}-
1386
1387
1388   case "$host_os" in
1389         *irix6*) cat >> confdefs.h <<\EOF
1390 #include <standards.h>
1391 EOF
1392
1393         ;;
1394 esac
1395
1396
1397     
1398     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1399 echo "configure:1400: checking config.cache system type" >&5
1400     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1401          test x"$ac_cv_host_system_type" != x"$host"; } ||
1402        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1403          test x"$ac_cv_build_system_type" != x"$build"; } ||
1404        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1405          test x"$ac_cv_target_system_type" != x"$target"; }; then
1406         echo "$ac_t""different" 1>&6
1407         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1408     else
1409         echo "$ac_t""same" 1>&6
1410     fi
1411     ac_cv_host_system_type="$host"
1412     ac_cv_build_system_type="$build"
1413     ac_cv_target_system_type="$target"
1414
1415
1416 DYNEXP=
1417
1418 #
1419 # Config CPPFLAG settings for strange OS's that must be set
1420 # before other tests.
1421 #
1422 case "$host_os" in
1423 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1424     *hpux*)
1425     
1426       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1427 echo "configure:1428: checking whether ${CC-cc} accepts -Ae" >&5
1428 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1429   echo $ac_n "(cached) $ac_c" 1>&6
1430 else
1431   echo 'void f(){}' > conftest.c
1432 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1433   ac_cv_prog_cc_Ae=yes
1434 else
1435   ac_cv_prog_cc_Ae=no
1436 fi
1437 rm -f conftest*
1438
1439 fi
1440
1441 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1442       # mmap on HPUX is completely broken...
1443       cat >> confdefs.h <<\EOF
1444 #define MMAP_BLACKLIST 1
1445 EOF
1446
1447       if test $ac_cv_prog_cc_Ae = yes; then
1448         CPPFLAGS="$CPPFLAGS -Ae"
1449       fi
1450 #
1451 # Defines needed for HPUX support.
1452 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1453 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1454 #
1455       case `uname -r` in
1456                         *9*|*10*)
1457                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1458                                 cat >> confdefs.h <<\EOF
1459 #define USE_BOTH_CRYPT_CALLS 1
1460 EOF
1461
1462                                 cat >> confdefs.h <<\EOF
1463 #define _HPUX_SOURCE 1
1464 EOF
1465
1466                                 cat >> confdefs.h <<\EOF
1467 #define _POSIX_SOURCE 1
1468 EOF
1469
1470                                 cat >> confdefs.h <<\EOF
1471 #define _ALIGNMENT_REQUIRED 1
1472 EOF
1473
1474                                 cat >> confdefs.h <<\EOF
1475 #define _MAX_ALIGNMENT 4
1476 EOF
1477
1478                                 ;;
1479                         *11*)
1480                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1481                                 cat >> confdefs.h <<\EOF
1482 #define USE_BOTH_CRYPT_CALLS 1
1483 EOF
1484
1485                                 cat >> confdefs.h <<\EOF
1486 #define _HPUX_SOURCE 1
1487 EOF
1488
1489                                 cat >> confdefs.h <<\EOF
1490 #define _POSIX_SOURCE 1
1491 EOF
1492
1493                                 cat >> confdefs.h <<\EOF
1494 #define _LARGEFILE64_SOURCE 1
1495 EOF
1496
1497                                 cat >> confdefs.h <<\EOF
1498 #define _ALIGNMENT_REQUIRED 1
1499 EOF
1500
1501                                 cat >> confdefs.h <<\EOF
1502 #define _MAX_ALIGNMENT 4
1503 EOF
1504
1505                                 ;;
1506       esac
1507       DYNEXP="-Wl,-E"
1508       ;;
1509
1510 #
1511 # CRAY Unicos has broken const handling
1512        *unicos*)
1513           echo "$ac_t""disabling const" 1>&6
1514           CPPFLAGS="$CPPFLAGS -Dconst="
1515           ;;
1516         
1517 #
1518 # AIX4.x doesn't even admit to having large
1519 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1520 #
1521     *aix4*)
1522           echo "$ac_t""enabling large file support" 1>&6
1523       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1524       cat >> confdefs.h <<\EOF
1525 #define _LARGE_FILES 1
1526 EOF
1527
1528       ;;    
1529 #
1530 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1531 # to the existance of large files..
1532 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1533 # recommendations on large file support, however it makes the
1534 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1535 # recommendation makes the compile fail on gcc2.7. JRA.
1536 #
1537         *solaris*)
1538                 case `uname -r` in
1539                         5.0*|5.1*|5.2*|5.3*|5.5*)
1540                                 echo "$ac_t""no large file support" 1>&6
1541                                 ;;
1542                         5.*)
1543                         echo "$ac_t""enabling large file support" 1>&6
1544                         if test "$ac_cv_prog_gcc" = yes; then
1545                                 ${CC-cc} -v >conftest.c 2>&1
1546                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1547                                 rm -fr conftest.c
1548                                 case "$ac_cv_gcc_compiler_version_number" in
1549                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1550                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1551                                                 cat >> confdefs.h <<\EOF
1552 #define _LARGEFILE64_SOURCE 1
1553 EOF
1554
1555                                                 ;;
1556                                         *)
1557                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1558                                                 cat >> confdefs.h <<\EOF
1559 #define _LARGEFILE64_SOURCE 1
1560 EOF
1561
1562                                                 cat >> confdefs.h <<\EOF
1563 #define _FILE_OFFSET_BITS 64
1564 EOF
1565
1566                                                 ;;
1567                                 esac
1568                         else
1569                                 DYNEXP="-dc -dp"
1570                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1571                                 cat >> confdefs.h <<\EOF
1572 #define _LARGEFILE64_SOURCE 1
1573 EOF
1574
1575                                 cat >> confdefs.h <<\EOF
1576 #define _FILE_OFFSET_BITS 64
1577 EOF
1578
1579                         fi
1580                         ;;
1581                 esac
1582                 ;;
1583 #
1584 # Tests needed for SINIX large file support.
1585 #
1586     *sysv4*)
1587       if test $host = mips-sni-sysv4 ; then
1588         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1589 echo "configure:1590: checking for LFS support" >&5
1590         old_CPPFLAGS="$CPPFLAGS"
1591         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1592         if test "$cross_compiling" = yes; then
1593   SINIX_LFS_SUPPORT=cross
1594 else
1595   cat > conftest.$ac_ext <<EOF
1596 #line 1597 "configure"
1597 #include "confdefs.h"
1598
1599 #include <unistd.h>
1600 main () {
1601 #if _LFS64_LARGEFILE == 1
1602 exit(0);
1603 #else
1604 exit(1);
1605 #endif
1606 }
1607 EOF
1608 if { (eval echo configure:1609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1609 then
1610   SINIX_LFS_SUPPORT=yes
1611 else
1612   echo "configure: failed program was:" >&5
1613   cat conftest.$ac_ext >&5
1614   rm -fr conftest*
1615   SINIX_LFS_SUPPORT=no
1616 fi
1617 rm -fr conftest*
1618 fi
1619
1620         CPPFLAGS="$old_CPPFLAGS"
1621         if test x$SINIX_LFS_SUPPORT = xyes ; then
1622           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1623           cat >> confdefs.h <<\EOF
1624 #define _LARGEFILE64_SOURCE 1
1625 EOF
1626
1627           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1628           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1629           LIBS="`getconf LFS64_LIBS` $LIBS"
1630         fi
1631       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1632       fi
1633     ;;
1634
1635 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1636 #
1637     *linux*)
1638         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1639 echo "configure:1640: checking for LFS support" >&5
1640         old_CPPFLAGS="$CPPFLAGS"
1641         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1642        if test "$cross_compiling" = yes; then
1643   LINUX_LFS_SUPPORT=cross
1644 else
1645   cat > conftest.$ac_ext <<EOF
1646 #line 1647 "configure"
1647 #include "confdefs.h"
1648
1649 #include <unistd.h>
1650 #include <sys/utsname.h>
1651 main() {
1652 #if _LFS64_LARGEFILE == 1
1653        struct utsname uts;
1654        char *release;
1655        int major, minor;
1656
1657        /* Ensure this is glibc 2.2 or higher */
1658 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1659        int libc_major = __GLIBC__;
1660        int libc_minor = __GLIBC_MINOR__;
1661
1662        if (libc_major < 2)
1663               exit(1);
1664        if (libc_minor < 2)
1665               exit(1);
1666 #endif
1667
1668        /* Ensure this is kernel 2.4 or higher */
1669
1670        uname(&uts);
1671        release = uts.release;
1672        major = atoi(strsep(&release, "."));
1673        minor = atoi(strsep(&release, "."));
1674
1675        if (major > 2 || (major == 2 && minor > 3))
1676                exit(0);
1677        exit(1);
1678 #else
1679        exit(1);
1680 #endif
1681 }
1682
1683 EOF
1684 if { (eval echo configure:1685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1685 then
1686   LINUX_LFS_SUPPORT=yes
1687 else
1688   echo "configure: failed program was:" >&5
1689   cat conftest.$ac_ext >&5
1690   rm -fr conftest*
1691   LINUX_LFS_SUPPORT=no
1692 fi
1693 rm -fr conftest*
1694 fi
1695
1696         CPPFLAGS="$old_CPPFLAGS"
1697         if test x$LINUX_LFS_SUPPORT = xyes ; then
1698           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1699           cat >> confdefs.h <<\EOF
1700 #define _LARGEFILE64_SOURCE 1
1701 EOF
1702
1703           cat >> confdefs.h <<\EOF
1704 #define _FILE_OFFSET_BITS 64
1705 EOF
1706
1707           cat >> confdefs.h <<\EOF
1708 #define _GNU_SOURCE 1
1709 EOF
1710
1711         fi
1712        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1713                 ;;
1714
1715     *hurd*)
1716         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1717 echo "configure:1718: checking for LFS support" >&5
1718         old_CPPFLAGS="$CPPFLAGS"
1719         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1720         if test "$cross_compiling" = yes; then
1721   GLIBC_LFS_SUPPORT=cross
1722 else
1723   cat > conftest.$ac_ext <<EOF
1724 #line 1725 "configure"
1725 #include "confdefs.h"
1726
1727 #include <unistd.h>
1728 main () {
1729 #if _LFS64_LARGEFILE == 1
1730 exit(0);
1731 #else
1732 exit(1);
1733 #endif
1734 }
1735 EOF
1736 if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1737 then
1738   GLIBC_LFS_SUPPORT=yes
1739 else
1740   echo "configure: failed program was:" >&5
1741   cat conftest.$ac_ext >&5
1742   rm -fr conftest*
1743   GLIBC_LFS_SUPPORT=no
1744 fi
1745 rm -fr conftest*
1746 fi
1747
1748         CPPFLAGS="$old_CPPFLAGS"
1749         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1750           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1751           cat >> confdefs.h <<\EOF
1752 #define _LARGEFILE64_SOURCE 1
1753 EOF
1754
1755           cat >> confdefs.h <<\EOF
1756 #define _GNU_SOURCE 1
1757 EOF
1758
1759         fi
1760       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1761     ;;
1762
1763 esac
1764
1765 echo $ac_n "checking for inline""... $ac_c" 1>&6
1766 echo "configure:1767: checking for inline" >&5
1767 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1768   echo $ac_n "(cached) $ac_c" 1>&6
1769 else
1770   ac_cv_c_inline=no
1771 for ac_kw in inline __inline__ __inline; do
1772   cat > conftest.$ac_ext <<EOF
1773 #line 1774 "configure"
1774 #include "confdefs.h"
1775
1776 int main() {
1777 } $ac_kw foo() {
1778 ; return 0; }
1779 EOF
1780 if { (eval echo configure:1781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1781   rm -rf conftest*
1782   ac_cv_c_inline=$ac_kw; break
1783 else
1784   echo "configure: failed program was:" >&5
1785   cat conftest.$ac_ext >&5
1786 fi
1787 rm -f conftest*
1788 done
1789
1790 fi
1791
1792 echo "$ac_t""$ac_cv_c_inline" 1>&6
1793 case "$ac_cv_c_inline" in
1794   inline | yes) ;;
1795   no) cat >> confdefs.h <<\EOF
1796 #define inline 
1797 EOF
1798  ;;
1799   *)  cat >> confdefs.h <<EOF
1800 #define inline $ac_cv_c_inline
1801 EOF
1802  ;;
1803 esac
1804
1805 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1806 echo "configure:1807: checking how to run the C preprocessor" >&5
1807 # On Suns, sometimes $CPP names a directory.
1808 if test -n "$CPP" && test -d "$CPP"; then
1809   CPP=
1810 fi
1811 if test -z "$CPP"; then
1812 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1813   echo $ac_n "(cached) $ac_c" 1>&6
1814 else
1815     # This must be in double quotes, not single quotes, because CPP may get
1816   # substituted into the Makefile and "${CC-cc}" will confuse make.
1817   CPP="${CC-cc} -E"
1818   # On the NeXT, cc -E runs the code through the compiler's parser,
1819   # not just through cpp.
1820   cat > conftest.$ac_ext <<EOF
1821 #line 1822 "configure"
1822 #include "confdefs.h"
1823 #include <assert.h>
1824 Syntax Error
1825 EOF
1826 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1827 { (eval echo configure:1828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1828 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1829 if test -z "$ac_err"; then
1830   :
1831 else
1832   echo "$ac_err" >&5
1833   echo "configure: failed program was:" >&5
1834   cat conftest.$ac_ext >&5
1835   rm -rf conftest*
1836   CPP="${CC-cc} -E -traditional-cpp"
1837   cat > conftest.$ac_ext <<EOF
1838 #line 1839 "configure"
1839 #include "confdefs.h"
1840 #include <assert.h>
1841 Syntax Error
1842 EOF
1843 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1844 { (eval echo configure:1845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1845 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1846 if test -z "$ac_err"; then
1847   :
1848 else
1849   echo "$ac_err" >&5
1850   echo "configure: failed program was:" >&5
1851   cat conftest.$ac_ext >&5
1852   rm -rf conftest*
1853   CPP="${CC-cc} -nologo -E"
1854   cat > conftest.$ac_ext <<EOF
1855 #line 1856 "configure"
1856 #include "confdefs.h"
1857 #include <assert.h>
1858 Syntax Error
1859 EOF
1860 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1861 { (eval echo configure:1862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1862 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1863 if test -z "$ac_err"; then
1864   :
1865 else
1866   echo "$ac_err" >&5
1867   echo "configure: failed program was:" >&5
1868   cat conftest.$ac_ext >&5
1869   rm -rf conftest*
1870   CPP=/lib/cpp
1871 fi
1872 rm -f conftest*
1873 fi
1874 rm -f conftest*
1875 fi
1876 rm -f conftest*
1877   ac_cv_prog_CPP="$CPP"
1878 fi
1879   CPP="$ac_cv_prog_CPP"
1880 else
1881   ac_cv_prog_CPP="$CPP"
1882 fi
1883 echo "$ac_t""$CPP" 1>&6
1884
1885 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1886 echo "configure:1887: checking for ANSI C header files" >&5
1887 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1888   echo $ac_n "(cached) $ac_c" 1>&6
1889 else
1890   cat > conftest.$ac_ext <<EOF
1891 #line 1892 "configure"
1892 #include "confdefs.h"
1893 #include <stdlib.h>
1894 #include <stdarg.h>
1895 #include <string.h>
1896 #include <float.h>
1897 EOF
1898 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1899 { (eval echo configure:1900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1900 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1901 if test -z "$ac_err"; then
1902   rm -rf conftest*
1903   ac_cv_header_stdc=yes
1904 else
1905   echo "$ac_err" >&5
1906   echo "configure: failed program was:" >&5
1907   cat conftest.$ac_ext >&5
1908   rm -rf conftest*
1909   ac_cv_header_stdc=no
1910 fi
1911 rm -f conftest*
1912
1913 if test $ac_cv_header_stdc = yes; then
1914   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1915 cat > conftest.$ac_ext <<EOF
1916 #line 1917 "configure"
1917 #include "confdefs.h"
1918 #include <string.h>
1919 EOF
1920 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1921   egrep "memchr" >/dev/null 2>&1; then
1922   :
1923 else
1924   rm -rf conftest*
1925   ac_cv_header_stdc=no
1926 fi
1927 rm -f conftest*
1928
1929 fi
1930
1931 if test $ac_cv_header_stdc = yes; then
1932   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1933 cat > conftest.$ac_ext <<EOF
1934 #line 1935 "configure"
1935 #include "confdefs.h"
1936 #include <stdlib.h>
1937 EOF
1938 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1939   egrep "free" >/dev/null 2>&1; then
1940   :
1941 else
1942   rm -rf conftest*
1943   ac_cv_header_stdc=no
1944 fi
1945 rm -f conftest*
1946
1947 fi
1948
1949 if test $ac_cv_header_stdc = yes; then
1950   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1951 if test "$cross_compiling" = yes; then
1952   :
1953 else
1954   cat > conftest.$ac_ext <<EOF
1955 #line 1956 "configure"
1956 #include "confdefs.h"
1957 #include <ctype.h>
1958 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1959 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1960 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1961 int main () { int i; for (i = 0; i < 256; i++)
1962 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1963 exit (0); }
1964
1965 EOF
1966 if { (eval echo configure:1967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1967 then
1968   :
1969 else
1970   echo "configure: failed program was:" >&5
1971   cat conftest.$ac_ext >&5
1972   rm -fr conftest*
1973   ac_cv_header_stdc=no
1974 fi
1975 rm -fr conftest*
1976 fi
1977
1978 fi
1979 fi
1980
1981 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1982 if test $ac_cv_header_stdc = yes; then
1983   cat >> confdefs.h <<\EOF
1984 #define STDC_HEADERS 1
1985 EOF
1986
1987 fi
1988
1989 ac_header_dirent=no
1990 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1991 do
1992 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1993 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1994 echo "configure:1995: checking for $ac_hdr that defines DIR" >&5
1995 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1996   echo $ac_n "(cached) $ac_c" 1>&6
1997 else
1998   cat > conftest.$ac_ext <<EOF
1999 #line 2000 "configure"
2000 #include "confdefs.h"
2001 #include <sys/types.h>
2002 #include <$ac_hdr>
2003 int main() {
2004 DIR *dirp = 0;
2005 ; return 0; }
2006 EOF
2007 if { (eval echo configure:2008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2008   rm -rf conftest*
2009   eval "ac_cv_header_dirent_$ac_safe=yes"
2010 else
2011   echo "configure: failed program was:" >&5
2012   cat conftest.$ac_ext >&5
2013   rm -rf conftest*
2014   eval "ac_cv_header_dirent_$ac_safe=no"
2015 fi
2016 rm -f conftest*
2017 fi
2018 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2019   echo "$ac_t""yes" 1>&6
2020     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2021   cat >> confdefs.h <<EOF
2022 #define $ac_tr_hdr 1
2023 EOF
2024  ac_header_dirent=$ac_hdr; break
2025 else
2026   echo "$ac_t""no" 1>&6
2027 fi
2028 done
2029 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2030 if test $ac_header_dirent = dirent.h; then
2031 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2032 echo "configure:2033: checking for opendir in -ldir" >&5
2033 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2034 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2035   echo $ac_n "(cached) $ac_c" 1>&6
2036 else
2037   ac_save_LIBS="$LIBS"
2038 LIBS="-ldir  $LIBS"
2039 cat > conftest.$ac_ext <<EOF
2040 #line 2041 "configure"
2041 #include "confdefs.h"
2042 /* Override any gcc2 internal prototype to avoid an error.  */
2043 /* We use char because int might match the return type of a gcc2
2044     builtin and then its argument prototype would still apply.  */
2045 char opendir();
2046
2047 int main() {
2048 opendir()
2049 ; return 0; }
2050 EOF
2051 if { (eval echo configure:2052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2052   rm -rf conftest*
2053   eval "ac_cv_lib_$ac_lib_var=yes"
2054 else
2055   echo "configure: failed program was:" >&5
2056   cat conftest.$ac_ext >&5
2057   rm -rf conftest*
2058   eval "ac_cv_lib_$ac_lib_var=no"
2059 fi
2060 rm -f conftest*
2061 LIBS="$ac_save_LIBS"
2062
2063 fi
2064 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2065   echo "$ac_t""yes" 1>&6
2066   LIBS="$LIBS -ldir"
2067 else
2068   echo "$ac_t""no" 1>&6
2069 fi
2070
2071 else
2072 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2073 echo "configure:2074: checking for opendir in -lx" >&5
2074 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2075 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2076   echo $ac_n "(cached) $ac_c" 1>&6
2077 else
2078   ac_save_LIBS="$LIBS"
2079 LIBS="-lx  $LIBS"
2080 cat > conftest.$ac_ext <<EOF
2081 #line 2082 "configure"
2082 #include "confdefs.h"
2083 /* Override any gcc2 internal prototype to avoid an error.  */
2084 /* We use char because int might match the return type of a gcc2
2085     builtin and then its argument prototype would still apply.  */
2086 char opendir();
2087
2088 int main() {
2089 opendir()
2090 ; return 0; }
2091 EOF
2092 if { (eval echo configure:2093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2093   rm -rf conftest*
2094   eval "ac_cv_lib_$ac_lib_var=yes"
2095 else
2096   echo "configure: failed program was:" >&5
2097   cat conftest.$ac_ext >&5
2098   rm -rf conftest*
2099   eval "ac_cv_lib_$ac_lib_var=no"
2100 fi
2101 rm -f conftest*
2102 LIBS="$ac_save_LIBS"
2103
2104 fi
2105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2106   echo "$ac_t""yes" 1>&6
2107   LIBS="$LIBS -lx"
2108 else
2109   echo "$ac_t""no" 1>&6
2110 fi
2111
2112 fi
2113
2114 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2115 echo "configure:2116: checking whether time.h and sys/time.h may both be included" >&5
2116 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2117   echo $ac_n "(cached) $ac_c" 1>&6
2118 else
2119   cat > conftest.$ac_ext <<EOF
2120 #line 2121 "configure"
2121 #include "confdefs.h"
2122 #include <sys/types.h>
2123 #include <sys/time.h>
2124 #include <time.h>
2125 int main() {
2126 struct tm *tp;
2127 ; return 0; }
2128 EOF
2129 if { (eval echo configure:2130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2130   rm -rf conftest*
2131   ac_cv_header_time=yes
2132 else
2133   echo "configure: failed program was:" >&5
2134   cat conftest.$ac_ext >&5
2135   rm -rf conftest*
2136   ac_cv_header_time=no
2137 fi
2138 rm -f conftest*
2139 fi
2140
2141 echo "$ac_t""$ac_cv_header_time" 1>&6
2142 if test $ac_cv_header_time = yes; then
2143   cat >> confdefs.h <<\EOF
2144 #define TIME_WITH_SYS_TIME 1
2145 EOF
2146
2147 fi
2148
2149 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2150 echo "configure:2151: checking for sys/wait.h that is POSIX.1 compatible" >&5
2151 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2152   echo $ac_n "(cached) $ac_c" 1>&6
2153 else
2154   cat > conftest.$ac_ext <<EOF
2155 #line 2156 "configure"
2156 #include "confdefs.h"
2157 #include <sys/types.h>
2158 #include <sys/wait.h>
2159 #ifndef WEXITSTATUS
2160 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2161 #endif
2162 #ifndef WIFEXITED
2163 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2164 #endif
2165 int main() {
2166 int s;
2167 wait (&s);
2168 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2169 ; return 0; }
2170 EOF
2171 if { (eval echo configure:2172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2172   rm -rf conftest*
2173   ac_cv_header_sys_wait_h=yes
2174 else
2175   echo "configure: failed program was:" >&5
2176   cat conftest.$ac_ext >&5
2177   rm -rf conftest*
2178   ac_cv_header_sys_wait_h=no
2179 fi
2180 rm -f conftest*
2181 fi
2182
2183 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2184 if test $ac_cv_header_sys_wait_h = yes; then
2185   cat >> confdefs.h <<\EOF
2186 #define HAVE_SYS_WAIT_H 1
2187 EOF
2188
2189 fi
2190
2191 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
2192 do
2193 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2194 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2195 echo "configure:2196: checking for $ac_hdr" >&5
2196 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2197   echo $ac_n "(cached) $ac_c" 1>&6
2198 else
2199   cat > conftest.$ac_ext <<EOF
2200 #line 2201 "configure"
2201 #include "confdefs.h"
2202 #include <$ac_hdr>
2203 EOF
2204 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2205 { (eval echo configure:2206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2206 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2207 if test -z "$ac_err"; then
2208   rm -rf conftest*
2209   eval "ac_cv_header_$ac_safe=yes"
2210 else
2211   echo "$ac_err" >&5
2212   echo "configure: failed program was:" >&5
2213   cat conftest.$ac_ext >&5
2214   rm -rf conftest*
2215   eval "ac_cv_header_$ac_safe=no"
2216 fi
2217 rm -f conftest*
2218 fi
2219 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2220   echo "$ac_t""yes" 1>&6
2221     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2222   cat >> confdefs.h <<EOF
2223 #define $ac_tr_hdr 1
2224 EOF
2225  
2226 else
2227   echo "$ac_t""no" 1>&6
2228 fi
2229 done
2230
2231 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
2232 do
2233 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2234 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2235 echo "configure:2236: checking for $ac_hdr" >&5
2236 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2237   echo $ac_n "(cached) $ac_c" 1>&6
2238 else
2239   cat > conftest.$ac_ext <<EOF
2240 #line 2241 "configure"
2241 #include "confdefs.h"
2242 #include <$ac_hdr>
2243 EOF
2244 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2245 { (eval echo configure:2246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2246 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2247 if test -z "$ac_err"; then
2248   rm -rf conftest*
2249   eval "ac_cv_header_$ac_safe=yes"
2250 else
2251   echo "$ac_err" >&5
2252   echo "configure: failed program was:" >&5
2253   cat conftest.$ac_ext >&5
2254   rm -rf conftest*
2255   eval "ac_cv_header_$ac_safe=no"
2256 fi
2257 rm -f conftest*
2258 fi
2259 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2260   echo "$ac_t""yes" 1>&6
2261     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2262   cat >> confdefs.h <<EOF
2263 #define $ac_tr_hdr 1
2264 EOF
2265  
2266 else
2267   echo "$ac_t""no" 1>&6
2268 fi
2269 done
2270
2271 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
2272 do
2273 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2274 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2275 echo "configure:2276: checking for $ac_hdr" >&5
2276 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2277   echo $ac_n "(cached) $ac_c" 1>&6
2278 else
2279   cat > conftest.$ac_ext <<EOF
2280 #line 2281 "configure"
2281 #include "confdefs.h"
2282 #include <$ac_hdr>
2283 EOF
2284 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2285 { (eval echo configure:2286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2286 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2287 if test -z "$ac_err"; then
2288   rm -rf conftest*
2289   eval "ac_cv_header_$ac_safe=yes"
2290 else
2291   echo "$ac_err" >&5
2292   echo "configure: failed program was:" >&5
2293   cat conftest.$ac_ext >&5
2294   rm -rf conftest*
2295   eval "ac_cv_header_$ac_safe=no"
2296 fi
2297 rm -f conftest*
2298 fi
2299 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2300   echo "$ac_t""yes" 1>&6
2301     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2302   cat >> confdefs.h <<EOF
2303 #define $ac_tr_hdr 1
2304 EOF
2305  
2306 else
2307   echo "$ac_t""no" 1>&6
2308 fi
2309 done
2310
2311 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
2312 do
2313 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2314 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2315 echo "configure:2316: checking for $ac_hdr" >&5
2316 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2317   echo $ac_n "(cached) $ac_c" 1>&6
2318 else
2319   cat > conftest.$ac_ext <<EOF
2320 #line 2321 "configure"
2321 #include "confdefs.h"
2322 #include <$ac_hdr>
2323 EOF
2324 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2325 { (eval echo configure:2326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2326 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2327 if test -z "$ac_err"; then
2328   rm -rf conftest*
2329   eval "ac_cv_header_$ac_safe=yes"
2330 else
2331   echo "$ac_err" >&5
2332   echo "configure: failed program was:" >&5
2333   cat conftest.$ac_ext >&5
2334   rm -rf conftest*
2335   eval "ac_cv_header_$ac_safe=no"
2336 fi
2337 rm -f conftest*
2338 fi
2339 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2340   echo "$ac_t""yes" 1>&6
2341     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2342   cat >> confdefs.h <<EOF
2343 #define $ac_tr_hdr 1
2344 EOF
2345  
2346 else
2347   echo "$ac_t""no" 1>&6
2348 fi
2349 done
2350
2351 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
2352 do
2353 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2354 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2355 echo "configure:2356: checking for $ac_hdr" >&5
2356 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2357   echo $ac_n "(cached) $ac_c" 1>&6
2358 else
2359   cat > conftest.$ac_ext <<EOF
2360 #line 2361 "configure"
2361 #include "confdefs.h"
2362 #include <$ac_hdr>
2363 EOF
2364 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2365 { (eval echo configure:2366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2366 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2367 if test -z "$ac_err"; then
2368   rm -rf conftest*
2369   eval "ac_cv_header_$ac_safe=yes"
2370 else
2371   echo "$ac_err" >&5
2372   echo "configure: failed program was:" >&5
2373   cat conftest.$ac_ext >&5
2374   rm -rf conftest*
2375   eval "ac_cv_header_$ac_safe=no"
2376 fi
2377 rm -f conftest*
2378 fi
2379 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2380   echo "$ac_t""yes" 1>&6
2381     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2382   cat >> confdefs.h <<EOF
2383 #define $ac_tr_hdr 1
2384 EOF
2385  
2386 else
2387   echo "$ac_t""no" 1>&6
2388 fi
2389 done
2390
2391 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2392 do
2393 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2394 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2395 echo "configure:2396: checking for $ac_hdr" >&5
2396 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2397   echo $ac_n "(cached) $ac_c" 1>&6
2398 else
2399   cat > conftest.$ac_ext <<EOF
2400 #line 2401 "configure"
2401 #include "confdefs.h"
2402 #include <$ac_hdr>
2403 EOF
2404 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2405 { (eval echo configure:2406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2406 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2407 if test -z "$ac_err"; then
2408   rm -rf conftest*
2409   eval "ac_cv_header_$ac_safe=yes"
2410 else
2411   echo "$ac_err" >&5
2412   echo "configure: failed program was:" >&5
2413   cat conftest.$ac_ext >&5
2414   rm -rf conftest*
2415   eval "ac_cv_header_$ac_safe=no"
2416 fi
2417 rm -f conftest*
2418 fi
2419 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2420   echo "$ac_t""yes" 1>&6
2421     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2422   cat >> confdefs.h <<EOF
2423 #define $ac_tr_hdr 1
2424 EOF
2425  
2426 else
2427   echo "$ac_t""no" 1>&6
2428 fi
2429 done
2430
2431 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2432 do
2433 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2434 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2435 echo "configure:2436: checking for $ac_hdr" >&5
2436 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2437   echo $ac_n "(cached) $ac_c" 1>&6
2438 else
2439   cat > conftest.$ac_ext <<EOF
2440 #line 2441 "configure"
2441 #include "confdefs.h"
2442 #include <$ac_hdr>
2443 EOF
2444 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2445 { (eval echo configure:2446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2446 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2447 if test -z "$ac_err"; then
2448   rm -rf conftest*
2449   eval "ac_cv_header_$ac_safe=yes"
2450 else
2451   echo "$ac_err" >&5
2452   echo "configure: failed program was:" >&5
2453   cat conftest.$ac_ext >&5
2454   rm -rf conftest*
2455   eval "ac_cv_header_$ac_safe=no"
2456 fi
2457 rm -f conftest*
2458 fi
2459 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2460   echo "$ac_t""yes" 1>&6
2461     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2462   cat >> confdefs.h <<EOF
2463 #define $ac_tr_hdr 1
2464 EOF
2465  
2466 else
2467   echo "$ac_t""no" 1>&6
2468 fi
2469 done
2470
2471 for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h dlfcn.h
2472 do
2473 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2474 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2475 echo "configure:2476: checking for $ac_hdr" >&5
2476 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2477   echo $ac_n "(cached) $ac_c" 1>&6
2478 else
2479   cat > conftest.$ac_ext <<EOF
2480 #line 2481 "configure"
2481 #include "confdefs.h"
2482 #include <$ac_hdr>
2483 EOF
2484 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2485 { (eval echo configure:2486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2486 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2487 if test -z "$ac_err"; then
2488   rm -rf conftest*
2489   eval "ac_cv_header_$ac_safe=yes"
2490 else
2491   echo "$ac_err" >&5
2492   echo "configure: failed program was:" >&5
2493   cat conftest.$ac_ext >&5
2494   rm -rf conftest*
2495   eval "ac_cv_header_$ac_safe=no"
2496 fi
2497 rm -f conftest*
2498 fi
2499 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2500   echo "$ac_t""yes" 1>&6
2501     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2502   cat >> confdefs.h <<EOF
2503 #define $ac_tr_hdr 1
2504 EOF
2505  
2506 else
2507   echo "$ac_t""no" 1>&6
2508 fi
2509 done
2510
2511
2512 #
2513 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2514 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2515 #
2516 case "$host_os" in
2517     *hpux*)
2518                 cat > conftest.$ac_ext <<EOF
2519 #line 2520 "configure"
2520 #include "confdefs.h"
2521 #include <shadow.h>
2522 int main() {
2523 struct spwd testme
2524 ; return 0; }
2525 EOF
2526 if { (eval echo configure:2527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2527   rm -rf conftest*
2528   ac_cv_header_shadow_h=yes
2529 else
2530   echo "configure: failed program was:" >&5
2531   cat conftest.$ac_ext >&5
2532   rm -rf conftest*
2533   ac_cv_header_shadow_h=no
2534 fi
2535 rm -f conftest*
2536                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2537                    cat >> confdefs.h <<\EOF
2538 #define HAVE_SHADOW_H 1
2539 EOF
2540
2541                 fi
2542         ;;
2543 esac
2544 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2545 do
2546 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2547 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2548 echo "configure:2549: checking for $ac_hdr" >&5
2549 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2550   echo $ac_n "(cached) $ac_c" 1>&6
2551 else
2552   cat > conftest.$ac_ext <<EOF
2553 #line 2554 "configure"
2554 #include "confdefs.h"
2555 #include <$ac_hdr>
2556 EOF
2557 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2558 { (eval echo configure:2559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2559 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2560 if test -z "$ac_err"; then
2561   rm -rf conftest*
2562   eval "ac_cv_header_$ac_safe=yes"
2563 else
2564   echo "$ac_err" >&5
2565   echo "configure: failed program was:" >&5
2566   cat conftest.$ac_ext >&5
2567   rm -rf conftest*
2568   eval "ac_cv_header_$ac_safe=no"
2569 fi
2570 rm -f conftest*
2571 fi
2572 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2573   echo "$ac_t""yes" 1>&6
2574     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2575   cat >> confdefs.h <<EOF
2576 #define $ac_tr_hdr 1
2577 EOF
2578  
2579 else
2580   echo "$ac_t""no" 1>&6
2581 fi
2582 done
2583
2584 for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
2585 do
2586 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2587 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2588 echo "configure:2589: checking for $ac_hdr" >&5
2589 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2590   echo $ac_n "(cached) $ac_c" 1>&6
2591 else
2592   cat > conftest.$ac_ext <<EOF
2593 #line 2594 "configure"
2594 #include "confdefs.h"
2595 #include <$ac_hdr>
2596 EOF
2597 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2598 { (eval echo configure:2599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2599 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2600 if test -z "$ac_err"; then
2601   rm -rf conftest*
2602   eval "ac_cv_header_$ac_safe=yes"
2603 else
2604   echo "$ac_err" >&5
2605   echo "configure: failed program was:" >&5
2606   cat conftest.$ac_ext >&5
2607   rm -rf conftest*
2608   eval "ac_cv_header_$ac_safe=no"
2609 fi
2610 rm -f conftest*
2611 fi
2612 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2613   echo "$ac_t""yes" 1>&6
2614     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2615   cat >> confdefs.h <<EOF
2616 #define $ac_tr_hdr 1
2617 EOF
2618  
2619 else
2620   echo "$ac_t""no" 1>&6
2621 fi
2622 done
2623
2624 for ac_hdr in stropts.h poll.h
2625 do
2626 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2627 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2628 echo "configure:2629: checking for $ac_hdr" >&5
2629 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2630   echo $ac_n "(cached) $ac_c" 1>&6
2631 else
2632   cat > conftest.$ac_ext <<EOF
2633 #line 2634 "configure"
2634 #include "confdefs.h"
2635 #include <$ac_hdr>
2636 EOF
2637 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2638 { (eval echo configure:2639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2639 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2640 if test -z "$ac_err"; then
2641   rm -rf conftest*
2642   eval "ac_cv_header_$ac_safe=yes"
2643 else
2644   echo "$ac_err" >&5
2645   echo "configure: failed program was:" >&5
2646   cat conftest.$ac_ext >&5
2647   rm -rf conftest*
2648   eval "ac_cv_header_$ac_safe=no"
2649 fi
2650 rm -f conftest*
2651 fi
2652 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2653   echo "$ac_t""yes" 1>&6
2654     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2655   cat >> confdefs.h <<EOF
2656 #define $ac_tr_hdr 1
2657 EOF
2658  
2659 else
2660   echo "$ac_t""no" 1>&6
2661 fi
2662 done
2663
2664 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2665 do
2666 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2667 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2668 echo "configure:2669: checking for $ac_hdr" >&5
2669 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2670   echo $ac_n "(cached) $ac_c" 1>&6
2671 else
2672   cat > conftest.$ac_ext <<EOF
2673 #line 2674 "configure"
2674 #include "confdefs.h"
2675 #include <$ac_hdr>
2676 EOF
2677 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2678 { (eval echo configure:2679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2679 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2680 if test -z "$ac_err"; then
2681   rm -rf conftest*
2682   eval "ac_cv_header_$ac_safe=yes"
2683 else
2684   echo "$ac_err" >&5
2685   echo "configure: failed program was:" >&5
2686   cat conftest.$ac_ext >&5
2687   rm -rf conftest*
2688   eval "ac_cv_header_$ac_safe=no"
2689 fi
2690 rm -f conftest*
2691 fi
2692 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2693   echo "$ac_t""yes" 1>&6
2694     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2695   cat >> confdefs.h <<EOF
2696 #define $ac_tr_hdr 1
2697 EOF
2698  
2699 else
2700   echo "$ac_t""no" 1>&6
2701 fi
2702 done
2703
2704 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2705 do
2706 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2707 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2708 echo "configure:2709: checking for $ac_hdr" >&5
2709 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2710   echo $ac_n "(cached) $ac_c" 1>&6
2711 else
2712   cat > conftest.$ac_ext <<EOF
2713 #line 2714 "configure"
2714 #include "confdefs.h"
2715 #include <$ac_hdr>
2716 EOF
2717 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2718 { (eval echo configure:2719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2719 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2720 if test -z "$ac_err"; then
2721   rm -rf conftest*
2722   eval "ac_cv_header_$ac_safe=yes"
2723 else
2724   echo "$ac_err" >&5
2725   echo "configure: failed program was:" >&5
2726   cat conftest.$ac_ext >&5
2727   rm -rf conftest*
2728   eval "ac_cv_header_$ac_safe=no"
2729 fi
2730 rm -f conftest*
2731 fi
2732 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2733   echo "$ac_t""yes" 1>&6
2734     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2735   cat >> confdefs.h <<EOF
2736 #define $ac_tr_hdr 1
2737 EOF
2738  
2739 else
2740   echo "$ac_t""no" 1>&6
2741 fi
2742 done
2743
2744
2745 # For experimental utmp support (lastlog on some BSD-like systems)
2746 for ac_hdr in utmp.h utmpx.h lastlog.h
2747 do
2748 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2749 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2750 echo "configure:2751: checking for $ac_hdr" >&5
2751 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2752   echo $ac_n "(cached) $ac_c" 1>&6
2753 else
2754   cat > conftest.$ac_ext <<EOF
2755 #line 2756 "configure"
2756 #include "confdefs.h"
2757 #include <$ac_hdr>
2758 EOF
2759 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2760 { (eval echo configure:2761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2761 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2762 if test -z "$ac_err"; then
2763   rm -rf conftest*
2764   eval "ac_cv_header_$ac_safe=yes"
2765 else
2766   echo "$ac_err" >&5
2767   echo "configure: failed program was:" >&5
2768   cat conftest.$ac_ext >&5
2769   rm -rf conftest*
2770   eval "ac_cv_header_$ac_safe=no"
2771 fi
2772 rm -f conftest*
2773 fi
2774 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2775   echo "$ac_t""yes" 1>&6
2776     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2777   cat >> confdefs.h <<EOF
2778 #define $ac_tr_hdr 1
2779 EOF
2780  
2781 else
2782   echo "$ac_t""no" 1>&6
2783 fi
2784 done
2785
2786  
2787 # For quotas on Veritas VxFS filesystems
2788 for ac_hdr in sys/fs/vx_quota.h
2789 do
2790 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2791 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2792 echo "configure:2793: checking for $ac_hdr" >&5
2793 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2794   echo $ac_n "(cached) $ac_c" 1>&6
2795 else
2796   cat > conftest.$ac_ext <<EOF
2797 #line 2798 "configure"
2798 #include "confdefs.h"
2799 #include <$ac_hdr>
2800 EOF
2801 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2802 { (eval echo configure:2803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2803 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2804 if test -z "$ac_err"; then
2805   rm -rf conftest*
2806   eval "ac_cv_header_$ac_safe=yes"
2807 else
2808   echo "$ac_err" >&5
2809   echo "configure: failed program was:" >&5
2810   cat conftest.$ac_ext >&5
2811   rm -rf conftest*
2812   eval "ac_cv_header_$ac_safe=no"
2813 fi
2814 rm -f conftest*
2815 fi
2816 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2817   echo "$ac_t""yes" 1>&6
2818     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2819   cat >> confdefs.h <<EOF
2820 #define $ac_tr_hdr 1
2821 EOF
2822  
2823 else
2824   echo "$ac_t""no" 1>&6
2825 fi
2826 done
2827
2828
2829 # For quotas on Linux XFS filesystems
2830 for ac_hdr in linux/xqm.h
2831 do
2832 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2833 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2834 echo "configure:2835: checking for $ac_hdr" >&5
2835 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2836   echo $ac_n "(cached) $ac_c" 1>&6
2837 else
2838   cat > conftest.$ac_ext <<EOF
2839 #line 2840 "configure"
2840 #include "confdefs.h"
2841 #include <$ac_hdr>
2842 EOF
2843 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2844 { (eval echo configure:2845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2845 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2846 if test -z "$ac_err"; then
2847   rm -rf conftest*
2848   eval "ac_cv_header_$ac_safe=yes"
2849 else
2850   echo "$ac_err" >&5
2851   echo "configure: failed program was:" >&5
2852   cat conftest.$ac_ext >&5
2853   rm -rf conftest*
2854   eval "ac_cv_header_$ac_safe=no"
2855 fi
2856 rm -f conftest*
2857 fi
2858 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2859   echo "$ac_t""yes" 1>&6
2860     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2861   cat >> confdefs.h <<EOF
2862 #define $ac_tr_hdr 1
2863 EOF
2864  
2865 else
2866   echo "$ac_t""no" 1>&6
2867 fi
2868 done
2869
2870
2871 echo $ac_n "checking size of int""... $ac_c" 1>&6
2872 echo "configure:2873: checking size of int" >&5
2873 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2874   echo $ac_n "(cached) $ac_c" 1>&6
2875 else
2876   if test "$cross_compiling" = yes; then
2877   ac_cv_sizeof_int=cross
2878 else
2879   cat > conftest.$ac_ext <<EOF
2880 #line 2881 "configure"
2881 #include "confdefs.h"
2882 #include <stdio.h>
2883 int main()
2884 {
2885   FILE *f=fopen("conftestval", "w");
2886   if (!f) return(1);
2887   fprintf(f, "%d\n", sizeof(int));
2888   return(0);
2889 }
2890 EOF
2891 if { (eval echo configure:2892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2892 then
2893   ac_cv_sizeof_int=`cat conftestval`
2894 else
2895   echo "configure: failed program was:" >&5
2896   cat conftest.$ac_ext >&5
2897   rm -fr conftest*
2898   ac_cv_sizeof_int=0
2899 fi
2900 rm -fr conftest*
2901 fi
2902
2903 fi
2904 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2905 cat >> confdefs.h <<EOF
2906 #define SIZEOF_INT $ac_cv_sizeof_int
2907 EOF
2908
2909
2910 echo $ac_n "checking size of long""... $ac_c" 1>&6
2911 echo "configure:2912: checking size of long" >&5
2912 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2913   echo $ac_n "(cached) $ac_c" 1>&6
2914 else
2915   if test "$cross_compiling" = yes; then
2916   ac_cv_sizeof_long=cross
2917 else
2918   cat > conftest.$ac_ext <<EOF
2919 #line 2920 "configure"
2920 #include "confdefs.h"
2921 #include <stdio.h>
2922 int main()
2923 {
2924   FILE *f=fopen("conftestval", "w");
2925   if (!f) return(1);
2926   fprintf(f, "%d\n", sizeof(long));
2927   return(0);
2928 }
2929 EOF
2930 if { (eval echo configure:2931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2931 then
2932   ac_cv_sizeof_long=`cat conftestval`
2933 else
2934   echo "configure: failed program was:" >&5
2935   cat conftest.$ac_ext >&5
2936   rm -fr conftest*
2937   ac_cv_sizeof_long=0
2938 fi
2939 rm -fr conftest*
2940 fi
2941
2942 fi
2943 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2944 cat >> confdefs.h <<EOF
2945 #define SIZEOF_LONG $ac_cv_sizeof_long
2946 EOF
2947
2948
2949 echo $ac_n "checking size of short""... $ac_c" 1>&6
2950 echo "configure:2951: checking size of short" >&5
2951 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2952   echo $ac_n "(cached) $ac_c" 1>&6
2953 else
2954   if test "$cross_compiling" = yes; then
2955   ac_cv_sizeof_short=cross
2956 else
2957   cat > conftest.$ac_ext <<EOF
2958 #line 2959 "configure"
2959 #include "confdefs.h"
2960 #include <stdio.h>
2961 int main()
2962 {
2963   FILE *f=fopen("conftestval", "w");
2964   if (!f) return(1);
2965   fprintf(f, "%d\n", sizeof(short));
2966   return(0);
2967 }
2968 EOF
2969 if { (eval echo configure:2970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2970 then
2971   ac_cv_sizeof_short=`cat conftestval`
2972 else
2973   echo "configure: failed program was:" >&5
2974   cat conftest.$ac_ext >&5
2975   rm -fr conftest*
2976   ac_cv_sizeof_short=0
2977 fi
2978 rm -fr conftest*
2979 fi
2980
2981 fi
2982 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2983 cat >> confdefs.h <<EOF
2984 #define SIZEOF_SHORT $ac_cv_sizeof_short
2985 EOF
2986
2987
2988
2989 echo $ac_n "checking for working const""... $ac_c" 1>&6
2990 echo "configure:2991: checking for working const" >&5
2991 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2992   echo $ac_n "(cached) $ac_c" 1>&6
2993 else
2994   cat > conftest.$ac_ext <<EOF
2995 #line 2996 "configure"
2996 #include "confdefs.h"
2997
2998 int main() {
2999
3000 /* Ultrix mips cc rejects this.  */
3001 typedef int charset[2]; const charset x;
3002 /* SunOS 4.1.1 cc rejects this.  */
3003 char const *const *ccp;
3004 char **p;
3005 /* NEC SVR4.0.2 mips cc rejects this.  */
3006 struct point {int x, y;};
3007 static struct point const zero = {0,0};
3008 /* AIX XL C 1.02.0.0 rejects this.
3009    It does not let you subtract one const X* pointer from another in an arm
3010    of an if-expression whose if-part is not a constant expression */
3011 const char *g = "string";
3012 ccp = &g + (g ? g-g : 0);
3013 /* HPUX 7.0 cc rejects these. */
3014 ++ccp;
3015 p = (char**) ccp;
3016 ccp = (char const *const *) p;
3017 { /* SCO 3.2v4 cc rejects this.  */
3018   char *t;
3019   char const *s = 0 ? (char *) 0 : (char const *) 0;
3020
3021   *t++ = 0;
3022 }
3023 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3024   int x[] = {25, 17};
3025   const int *foo = &x[0];
3026   ++foo;
3027 }
3028 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3029   typedef const int *iptr;
3030   iptr p = 0;
3031   ++p;
3032 }
3033 { /* AIX XL C 1.02.0.0 rejects this saying
3034      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3035   struct s { int j; const int *ap[3]; };
3036   struct s *b; b->j = 5;
3037 }
3038 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3039   const int foo = 10;
3040 }
3041
3042 ; return 0; }
3043 EOF
3044 if { (eval echo configure:3045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3045   rm -rf conftest*
3046   ac_cv_c_const=yes
3047 else
3048   echo "configure: failed program was:" >&5
3049   cat conftest.$ac_ext >&5
3050   rm -rf conftest*
3051   ac_cv_c_const=no
3052 fi
3053 rm -f conftest*
3054 fi
3055
3056 echo "$ac_t""$ac_cv_c_const" 1>&6
3057 if test $ac_cv_c_const = no; then
3058   cat >> confdefs.h <<\EOF
3059 #define const 
3060 EOF
3061
3062 fi
3063
3064 echo $ac_n "checking for inline""... $ac_c" 1>&6
3065 echo "configure:3066: checking for inline" >&5
3066 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3067   echo $ac_n "(cached) $ac_c" 1>&6
3068 else
3069   ac_cv_c_inline=no
3070 for ac_kw in inline __inline__ __inline; do
3071   cat > conftest.$ac_ext <<EOF
3072 #line 3073 "configure"
3073 #include "confdefs.h"
3074
3075 int main() {
3076 } $ac_kw foo() {
3077 ; return 0; }
3078 EOF
3079 if { (eval echo configure:3080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3080   rm -rf conftest*
3081   ac_cv_c_inline=$ac_kw; break
3082 else
3083   echo "configure: failed program was:" >&5
3084   cat conftest.$ac_ext >&5
3085 fi
3086 rm -f conftest*
3087 done
3088
3089 fi
3090
3091 echo "$ac_t""$ac_cv_c_inline" 1>&6
3092 case "$ac_cv_c_inline" in
3093   inline | yes) ;;
3094   no) cat >> confdefs.h <<\EOF
3095 #define inline 
3096 EOF
3097  ;;
3098   *)  cat >> confdefs.h <<EOF
3099 #define inline $ac_cv_c_inline
3100 EOF
3101  ;;
3102 esac
3103
3104 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3105 echo "configure:3106: checking whether byte ordering is bigendian" >&5
3106 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3107   echo $ac_n "(cached) $ac_c" 1>&6
3108 else
3109   ac_cv_c_bigendian=unknown
3110 # See if sys/param.h defines the BYTE_ORDER macro.
3111 cat > conftest.$ac_ext <<EOF
3112 #line 3113 "configure"
3113 #include "confdefs.h"
3114 #include <sys/types.h>
3115 #include <sys/param.h>
3116 int main() {
3117
3118 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3119  bogus endian macros
3120 #endif
3121 ; return 0; }
3122 EOF
3123 if { (eval echo configure:3124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3124   rm -rf conftest*
3125   # It does; now see whether it defined to BIG_ENDIAN or not.
3126 cat > conftest.$ac_ext <<EOF
3127 #line 3128 "configure"
3128 #include "confdefs.h"
3129 #include <sys/types.h>
3130 #include <sys/param.h>
3131 int main() {
3132
3133 #if BYTE_ORDER != BIG_ENDIAN
3134  not big endian
3135 #endif
3136 ; return 0; }
3137 EOF
3138 if { (eval echo configure:3139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3139   rm -rf conftest*
3140   ac_cv_c_bigendian=yes
3141 else
3142   echo "configure: failed program was:" >&5
3143   cat conftest.$ac_ext >&5
3144   rm -rf conftest*
3145   ac_cv_c_bigendian=no
3146 fi
3147 rm -f conftest*
3148 else
3149   echo "configure: failed program was:" >&5
3150   cat conftest.$ac_ext >&5
3151 fi
3152 rm -f conftest*
3153 if test $ac_cv_c_bigendian = unknown; then
3154 if test "$cross_compiling" = yes; then
3155     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3156 else
3157   cat > conftest.$ac_ext <<EOF
3158 #line 3159 "configure"
3159 #include "confdefs.h"
3160 main () {
3161   /* Are we little or big endian?  From Harbison&Steele.  */
3162   union
3163   {
3164     long l;
3165     char c[sizeof (long)];
3166   } u;
3167   u.l = 1;
3168   exit (u.c[sizeof (long) - 1] == 1);
3169 }
3170 EOF
3171 if { (eval echo configure:3172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3172 then
3173   ac_cv_c_bigendian=no
3174 else
3175   echo "configure: failed program was:" >&5
3176   cat conftest.$ac_ext >&5
3177   rm -fr conftest*
3178   ac_cv_c_bigendian=yes
3179 fi
3180 rm -fr conftest*
3181 fi
3182
3183 fi
3184 fi
3185
3186 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3187 if test $ac_cv_c_bigendian = yes; then
3188   cat >> confdefs.h <<\EOF
3189 #define WORDS_BIGENDIAN 1
3190 EOF
3191
3192 fi
3193
3194 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
3195 echo "configure:3196: checking whether char is unsigned" >&5
3196 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3197   echo $ac_n "(cached) $ac_c" 1>&6
3198 else
3199   if test "$GCC" = yes; then
3200   # GCC predefines this symbol on systems where it applies.
3201 cat > conftest.$ac_ext <<EOF
3202 #line 3203 "configure"
3203 #include "confdefs.h"
3204 #ifdef __CHAR_UNSIGNED__
3205   yes
3206 #endif
3207
3208 EOF
3209 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3210   egrep "yes" >/dev/null 2>&1; then
3211   rm -rf conftest*
3212   ac_cv_c_char_unsigned=yes
3213 else
3214   rm -rf conftest*
3215   ac_cv_c_char_unsigned=no
3216 fi
3217 rm -f conftest*
3218
3219 else
3220 if test "$cross_compiling" = yes; then
3221     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3222 else
3223   cat > conftest.$ac_ext <<EOF
3224 #line 3225 "configure"
3225 #include "confdefs.h"
3226 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
3227 #if !defined(__STDC__) || __STDC__ != 1
3228 #define volatile
3229 #endif
3230 main() {
3231   volatile char c = 255; exit(c < 0);
3232 }
3233 EOF
3234 if { (eval echo configure:3235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3235 then
3236   ac_cv_c_char_unsigned=yes
3237 else
3238   echo "configure: failed program was:" >&5
3239   cat conftest.$ac_ext >&5
3240   rm -fr conftest*
3241   ac_cv_c_char_unsigned=no
3242 fi
3243 rm -fr conftest*
3244 fi
3245
3246 fi
3247 fi
3248
3249 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
3250 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3251   cat >> confdefs.h <<\EOF
3252 #define __CHAR_UNSIGNED__ 1
3253 EOF
3254
3255 fi
3256
3257
3258 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3259 echo "configure:3260: checking return type of signal handlers" >&5
3260 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3261   echo $ac_n "(cached) $ac_c" 1>&6
3262 else
3263   cat > conftest.$ac_ext <<EOF
3264 #line 3265 "configure"
3265 #include "confdefs.h"
3266 #include <sys/types.h>
3267 #include <signal.h>
3268 #ifdef signal
3269 #undef signal
3270 #endif
3271 #ifdef __cplusplus
3272 extern "C" void (*signal (int, void (*)(int)))(int);
3273 #else
3274 void (*signal ()) ();
3275 #endif
3276
3277 int main() {
3278 int i;
3279 ; return 0; }
3280 EOF
3281 if { (eval echo configure:3282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3282   rm -rf conftest*
3283   ac_cv_type_signal=void
3284 else
3285   echo "configure: failed program was:" >&5
3286   cat conftest.$ac_ext >&5
3287   rm -rf conftest*
3288   ac_cv_type_signal=int
3289 fi
3290 rm -f conftest*
3291 fi
3292
3293 echo "$ac_t""$ac_cv_type_signal" 1>&6
3294 cat >> confdefs.h <<EOF
3295 #define RETSIGTYPE $ac_cv_type_signal
3296 EOF
3297
3298
3299 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3300 echo "configure:3301: checking for uid_t in sys/types.h" >&5
3301 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3302   echo $ac_n "(cached) $ac_c" 1>&6
3303 else
3304   cat > conftest.$ac_ext <<EOF
3305 #line 3306 "configure"
3306 #include "confdefs.h"
3307 #include <sys/types.h>
3308 EOF
3309 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3310   egrep "uid_t" >/dev/null 2>&1; then
3311   rm -rf conftest*
3312   ac_cv_type_uid_t=yes
3313 else
3314   rm -rf conftest*
3315   ac_cv_type_uid_t=no
3316 fi
3317 rm -f conftest*
3318
3319 fi
3320
3321 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3322 if test $ac_cv_type_uid_t = no; then
3323   cat >> confdefs.h <<\EOF
3324 #define uid_t int
3325 EOF
3326
3327   cat >> confdefs.h <<\EOF
3328 #define gid_t int
3329 EOF
3330
3331 fi
3332
3333 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3334 echo "configure:3335: checking for mode_t" >&5
3335 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3336   echo $ac_n "(cached) $ac_c" 1>&6
3337 else
3338   cat > conftest.$ac_ext <<EOF
3339 #line 3340 "configure"
3340 #include "confdefs.h"
3341 #include <sys/types.h>
3342 #if STDC_HEADERS
3343 #include <stdlib.h>
3344 #include <stddef.h>
3345 #endif
3346 EOF
3347 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3348   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3349   rm -rf conftest*
3350   ac_cv_type_mode_t=yes
3351 else
3352   rm -rf conftest*
3353   ac_cv_type_mode_t=no
3354 fi
3355 rm -f conftest*
3356
3357 fi
3358 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3359 if test $ac_cv_type_mode_t = no; then
3360   cat >> confdefs.h <<\EOF
3361 #define mode_t int
3362 EOF
3363
3364 fi
3365
3366 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3367 echo "configure:3368: checking for off_t" >&5
3368 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3369   echo $ac_n "(cached) $ac_c" 1>&6
3370 else
3371   cat > conftest.$ac_ext <<EOF
3372 #line 3373 "configure"
3373 #include "confdefs.h"
3374 #include <sys/types.h>
3375 #if STDC_HEADERS
3376 #include <stdlib.h>
3377 #include <stddef.h>
3378 #endif
3379 EOF
3380 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3381   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3382   rm -rf conftest*
3383   ac_cv_type_off_t=yes
3384 else
3385   rm -rf conftest*
3386   ac_cv_type_off_t=no
3387 fi
3388 rm -f conftest*
3389
3390 fi
3391 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3392 if test $ac_cv_type_off_t = no; then
3393   cat >> confdefs.h <<\EOF
3394 #define off_t long
3395 EOF
3396
3397 fi
3398
3399 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3400 echo "configure:3401: checking for size_t" >&5
3401 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3402   echo $ac_n "(cached) $ac_c" 1>&6
3403 else
3404   cat > conftest.$ac_ext <<EOF
3405 #line 3406 "configure"
3406 #include "confdefs.h"
3407 #include <sys/types.h>
3408 #if STDC_HEADERS
3409 #include <stdlib.h>
3410 #include <stddef.h>
3411 #endif
3412 EOF
3413 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3414   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3415   rm -rf conftest*
3416   ac_cv_type_size_t=yes
3417 else
3418   rm -rf conftest*
3419   ac_cv_type_size_t=no
3420 fi
3421 rm -f conftest*
3422
3423 fi
3424 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3425 if test $ac_cv_type_size_t = no; then
3426   cat >> confdefs.h <<\EOF
3427 #define size_t unsigned
3428 EOF
3429
3430 fi
3431
3432 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3433 echo "configure:3434: checking for pid_t" >&5
3434 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3435   echo $ac_n "(cached) $ac_c" 1>&6
3436 else
3437   cat > conftest.$ac_ext <<EOF
3438 #line 3439 "configure"
3439 #include "confdefs.h"
3440 #include <sys/types.h>
3441 #if STDC_HEADERS
3442 #include <stdlib.h>
3443 #include <stddef.h>
3444 #endif
3445 EOF
3446 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3447   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3448   rm -rf conftest*
3449   ac_cv_type_pid_t=yes
3450 else
3451   rm -rf conftest*
3452   ac_cv_type_pid_t=no
3453 fi
3454 rm -f conftest*
3455
3456 fi
3457 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3458 if test $ac_cv_type_pid_t = no; then
3459   cat >> confdefs.h <<\EOF
3460 #define pid_t int
3461 EOF
3462
3463 fi
3464
3465 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3466 echo "configure:3467: checking for st_rdev in struct stat" >&5
3467 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3468   echo $ac_n "(cached) $ac_c" 1>&6
3469 else
3470   cat > conftest.$ac_ext <<EOF
3471 #line 3472 "configure"
3472 #include "confdefs.h"
3473 #include <sys/types.h>
3474 #include <sys/stat.h>
3475 int main() {
3476 struct stat s; s.st_rdev;
3477 ; return 0; }
3478 EOF
3479 if { (eval echo configure:3480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3480   rm -rf conftest*
3481   ac_cv_struct_st_rdev=yes
3482 else
3483   echo "configure: failed program was:" >&5
3484   cat conftest.$ac_ext >&5
3485   rm -rf conftest*
3486   ac_cv_struct_st_rdev=no
3487 fi
3488 rm -f conftest*
3489 fi
3490
3491 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3492 if test $ac_cv_struct_st_rdev = yes; then
3493   cat >> confdefs.h <<\EOF
3494 #define HAVE_ST_RDEV 1
3495 EOF
3496
3497 fi
3498
3499 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3500 echo "configure:3501: checking for d_off in dirent" >&5
3501 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3502   echo $ac_n "(cached) $ac_c" 1>&6
3503 else
3504   cat > conftest.$ac_ext <<EOF
3505 #line 3506 "configure"
3506 #include "confdefs.h"
3507
3508 #include <unistd.h>
3509 #include <sys/types.h>
3510 #include <dirent.h>
3511 int main() {
3512 struct dirent d; d.d_off;
3513 ; return 0; }
3514 EOF
3515 if { (eval echo configure:3516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3516   rm -rf conftest*
3517   ac_cv_dirent_d_off=yes
3518 else
3519   echo "configure: failed program was:" >&5
3520   cat conftest.$ac_ext >&5
3521   rm -rf conftest*
3522   ac_cv_dirent_d_off=no
3523 fi
3524 rm -f conftest*
3525 fi
3526
3527 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3528 if test $ac_cv_dirent_d_off = yes; then
3529   cat >> confdefs.h <<\EOF
3530 #define HAVE_DIRENT_D_OFF 1
3531 EOF
3532
3533 fi
3534
3535 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3536 echo "configure:3537: checking for ino_t" >&5
3537 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3538   echo $ac_n "(cached) $ac_c" 1>&6
3539 else
3540   cat > conftest.$ac_ext <<EOF
3541 #line 3542 "configure"
3542 #include "confdefs.h"
3543 #include <sys/types.h>
3544 #if STDC_HEADERS
3545 #include <stdlib.h>
3546 #include <stddef.h>
3547 #endif
3548 EOF
3549 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3550   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3551   rm -rf conftest*
3552   ac_cv_type_ino_t=yes
3553 else
3554   rm -rf conftest*
3555   ac_cv_type_ino_t=no
3556 fi
3557 rm -f conftest*
3558
3559 fi
3560 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3561 if test $ac_cv_type_ino_t = no; then
3562   cat >> confdefs.h <<\EOF
3563 #define ino_t unsigned
3564 EOF
3565
3566 fi
3567
3568 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3569 echo "configure:3570: checking for loff_t" >&5
3570 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3571   echo $ac_n "(cached) $ac_c" 1>&6
3572 else
3573   cat > conftest.$ac_ext <<EOF
3574 #line 3575 "configure"
3575 #include "confdefs.h"
3576 #include <sys/types.h>
3577 #if STDC_HEADERS
3578 #include <stdlib.h>
3579 #include <stddef.h>
3580 #endif
3581 EOF
3582 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3583   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3584   rm -rf conftest*
3585   ac_cv_type_loff_t=yes
3586 else
3587   rm -rf conftest*
3588   ac_cv_type_loff_t=no
3589 fi
3590 rm -f conftest*
3591
3592 fi
3593 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3594 if test $ac_cv_type_loff_t = no; then
3595   cat >> confdefs.h <<\EOF
3596 #define loff_t off_t
3597 EOF
3598
3599 fi
3600
3601 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3602 echo "configure:3603: checking for offset_t" >&5
3603 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3604   echo $ac_n "(cached) $ac_c" 1>&6
3605 else
3606   cat > conftest.$ac_ext <<EOF
3607 #line 3608 "configure"
3608 #include "confdefs.h"
3609 #include <sys/types.h>
3610 #if STDC_HEADERS
3611 #include <stdlib.h>
3612 #include <stddef.h>
3613 #endif
3614 EOF
3615 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3616   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3617   rm -rf conftest*
3618   ac_cv_type_offset_t=yes
3619 else
3620   rm -rf conftest*
3621   ac_cv_type_offset_t=no
3622 fi
3623 rm -f conftest*
3624
3625 fi
3626 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3627 if test $ac_cv_type_offset_t = no; then
3628   cat >> confdefs.h <<\EOF
3629 #define offset_t loff_t
3630 EOF
3631
3632 fi
3633
3634 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3635 echo "configure:3636: checking for ssize_t" >&5
3636 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3637   echo $ac_n "(cached) $ac_c" 1>&6
3638 else
3639   cat > conftest.$ac_ext <<EOF
3640 #line 3641 "configure"
3641 #include "confdefs.h"
3642 #include <sys/types.h>
3643 #if STDC_HEADERS
3644 #include <stdlib.h>
3645 #include <stddef.h>
3646 #endif
3647 EOF
3648 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3649   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3650   rm -rf conftest*
3651   ac_cv_type_ssize_t=yes
3652 else
3653   rm -rf conftest*
3654   ac_cv_type_ssize_t=no
3655 fi
3656 rm -f conftest*
3657
3658 fi
3659 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3660 if test $ac_cv_type_ssize_t = no; then
3661   cat >> confdefs.h <<\EOF
3662 #define ssize_t int
3663 EOF
3664
3665 fi
3666
3667 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3668 echo "configure:3669: checking for wchar_t" >&5
3669 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3670   echo $ac_n "(cached) $ac_c" 1>&6
3671 else
3672   cat > conftest.$ac_ext <<EOF
3673 #line 3674 "configure"
3674 #include "confdefs.h"
3675 #include <sys/types.h>
3676 #if STDC_HEADERS
3677 #include <stdlib.h>
3678 #include <stddef.h>
3679 #endif
3680 EOF
3681 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3682   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3683   rm -rf conftest*
3684   ac_cv_type_wchar_t=yes
3685 else
3686   rm -rf conftest*
3687   ac_cv_type_wchar_t=no
3688 fi
3689 rm -f conftest*
3690
3691 fi
3692 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3693 if test $ac_cv_type_wchar_t = no; then
3694   cat >> confdefs.h <<\EOF
3695 #define wchar_t unsigned short
3696 EOF
3697
3698 fi
3699
3700
3701 ############################################
3702 # for cups support we need libcups, and a handful of header files
3703
3704 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3705 echo "configure:3706: checking for httpConnect in -lcups" >&5
3706 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3707 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3708   echo $ac_n "(cached) $ac_c" 1>&6
3709 else
3710   ac_save_LIBS="$LIBS"
3711 LIBS="-lcups  $LIBS"
3712 cat > conftest.$ac_ext <<EOF
3713 #line 3714 "configure"
3714 #include "confdefs.h"
3715 /* Override any gcc2 internal prototype to avoid an error.  */
3716 /* We use char because int might match the return type of a gcc2
3717     builtin and then its argument prototype would still apply.  */
3718 char httpConnect();
3719
3720 int main() {
3721 httpConnect()
3722 ; return 0; }
3723 EOF
3724 if { (eval echo configure:3725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3725   rm -rf conftest*
3726   eval "ac_cv_lib_$ac_lib_var=yes"
3727 else
3728   echo "configure: failed program was:" >&5
3729   cat conftest.$ac_ext >&5
3730   rm -rf conftest*
3731   eval "ac_cv_lib_$ac_lib_var=no"
3732 fi
3733 rm -f conftest*
3734 LIBS="$ac_save_LIBS"
3735
3736 fi
3737 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3738   echo "$ac_t""yes" 1>&6
3739     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3740     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3741   cat >> confdefs.h <<EOF
3742 #define $ac_tr_lib 1
3743 EOF
3744
3745   LIBS="-lcups $LIBS"
3746
3747 else
3748   echo "$ac_t""no" 1>&6
3749 fi
3750
3751
3752 # I wonder if there is a nicer way of doing this?
3753
3754 if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
3755         for ac_hdr in cups/cups.h cups/language.h
3756 do
3757 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3758 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3759 echo "configure:3760: checking for $ac_hdr" >&5
3760 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3761   echo $ac_n "(cached) $ac_c" 1>&6
3762 else
3763   cat > conftest.$ac_ext <<EOF
3764 #line 3765 "configure"
3765 #include "confdefs.h"
3766 #include <$ac_hdr>
3767 EOF
3768 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3769 { (eval echo configure:3770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3770 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3771 if test -z "$ac_err"; then
3772   rm -rf conftest*
3773   eval "ac_cv_header_$ac_safe=yes"
3774 else
3775   echo "$ac_err" >&5
3776   echo "configure: failed program was:" >&5
3777   cat conftest.$ac_ext >&5
3778   rm -rf conftest*
3779   eval "ac_cv_header_$ac_safe=no"
3780 fi
3781 rm -f conftest*
3782 fi
3783 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3784   echo "$ac_t""yes" 1>&6
3785     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3786   cat >> confdefs.h <<EOF
3787 #define $ac_tr_hdr 1
3788 EOF
3789  
3790 else
3791   echo "$ac_t""no" 1>&6
3792 fi
3793 done
3794
3795         if test x"$ac_cv_header_cups_cups_h" = x"yes"; then
3796                 if test x"$ac_cv_header_cups_language_h" = x"yes"; then
3797                         cat >> confdefs.h <<\EOF
3798 #define HAVE_CUPS 1
3799 EOF
3800
3801                 fi
3802         fi
3803 fi
3804
3805 ############################################
3806 # we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code
3807 for ac_func in dlopen
3808 do
3809 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3810 echo "configure:3811: checking for $ac_func" >&5
3811 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3812   echo $ac_n "(cached) $ac_c" 1>&6
3813 else
3814   cat > conftest.$ac_ext <<EOF
3815 #line 3816 "configure"
3816 #include "confdefs.h"
3817 /* System header to define __stub macros and hopefully few prototypes,
3818     which can conflict with char $ac_func(); below.  */
3819 #include <assert.h>
3820 /* Override any gcc2 internal prototype to avoid an error.  */
3821 /* We use char because int might match the return type of a gcc2
3822     builtin and then its argument prototype would still apply.  */
3823 char $ac_func();
3824
3825 int main() {
3826
3827 /* The GNU C library defines this for functions which it implements
3828     to always fail with ENOSYS.  Some functions are actually named
3829     something starting with __ and the normal name is an alias.  */
3830 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3831 choke me
3832 #else
3833 $ac_func();
3834 #endif
3835
3836 ; return 0; }
3837 EOF
3838 if { (eval echo configure:3839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3839   rm -rf conftest*
3840   eval "ac_cv_func_$ac_func=yes"
3841 else
3842   echo "configure: failed program was:" >&5
3843   cat conftest.$ac_ext >&5
3844   rm -rf conftest*
3845   eval "ac_cv_func_$ac_func=no"
3846 fi
3847 rm -f conftest*
3848 fi
3849
3850 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3851   echo "$ac_t""yes" 1>&6
3852     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3853   cat >> confdefs.h <<EOF
3854 #define $ac_tr_func 1
3855 EOF
3856  
3857 else
3858   echo "$ac_t""no" 1>&6
3859 fi
3860 done
3861
3862 if test x"$ac_cv_func_dlopen" = x"no"; then
3863     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3864 echo "configure:3865: checking for dlopen in -ldl" >&5
3865 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3866 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3867   echo $ac_n "(cached) $ac_c" 1>&6
3868 else
3869   ac_save_LIBS="$LIBS"
3870 LIBS="-ldl  $LIBS"
3871 cat > conftest.$ac_ext <<EOF
3872 #line 3873 "configure"
3873 #include "confdefs.h"
3874 /* Override any gcc2 internal prototype to avoid an error.  */
3875 /* We use char because int might match the return type of a gcc2
3876     builtin and then its argument prototype would still apply.  */
3877 char dlopen();
3878
3879 int main() {
3880 dlopen()
3881 ; return 0; }
3882 EOF
3883 if { (eval echo configure:3884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3884   rm -rf conftest*
3885   eval "ac_cv_lib_$ac_lib_var=yes"
3886 else
3887   echo "configure: failed program was:" >&5
3888   cat conftest.$ac_ext >&5
3889   rm -rf conftest*
3890   eval "ac_cv_lib_$ac_lib_var=no"
3891 fi
3892 rm -f conftest*
3893 LIBS="$ac_save_LIBS"
3894
3895 fi
3896 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3897   echo "$ac_t""yes" 1>&6
3898   LIBS="$LIBS -ldl";
3899         cat >> confdefs.h <<\EOF
3900 #define HAVE_DLOPEN 1
3901 EOF
3902
3903 else
3904   echo "$ac_t""no" 1>&6
3905 fi
3906
3907 fi
3908 # dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
3909
3910 ############################################
3911 # check if the compiler can do immediate structures
3912 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3913 echo "configure:3914: checking for immediate structures" >&5
3914 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3915   echo $ac_n "(cached) $ac_c" 1>&6
3916 else
3917   
3918     cat > conftest.$ac_ext <<EOF
3919 #line 3920 "configure"
3920 #include "confdefs.h"
3921
3922 #include <stdio.h>
3923 int main() {
3924
3925    typedef struct {unsigned x;} FOOBAR;
3926    #define X_FOOBAR(x) ((FOOBAR) { x })
3927    #define FOO_ONE X_FOOBAR(1)
3928    FOOBAR f = FOO_ONE;   
3929    static struct {
3930         FOOBAR y; 
3931         } f2[] = {
3932                 {FOO_ONE}
3933         };   
3934
3935 ; return 0; }
3936 EOF
3937 if { (eval echo configure:3938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3938   rm -rf conftest*
3939   samba_cv_immediate_structures=yes
3940 else
3941   echo "configure: failed program was:" >&5
3942   cat conftest.$ac_ext >&5
3943   rm -rf conftest*
3944   samba_cv_immediate_structures=no
3945 fi
3946 rm -f conftest*
3947 fi
3948
3949 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3950 if test x"$samba_cv_immediate_structures" = x"yes"; then
3951    cat >> confdefs.h <<\EOF
3952 #define HAVE_IMMEDIATE_STRUCTURES 1
3953 EOF
3954
3955 fi
3956
3957 ############################################
3958 # check for unix domain sockets
3959 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3960 echo "configure:3961: checking for unix domain sockets" >&5
3961 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3962   echo $ac_n "(cached) $ac_c" 1>&6
3963 else
3964   
3965     cat > conftest.$ac_ext <<EOF
3966 #line 3967 "configure"
3967 #include "confdefs.h"
3968
3969 #include <sys/types.h>
3970 #include <stdlib.h>
3971 #include <stddef.h>
3972 #include <sys/socket.h>
3973 #include <sys/un.h>
3974 int main() {
3975
3976   struct sockaddr_un sunaddr; 
3977   sunaddr.sun_family = AF_UNIX;
3978
3979 ; return 0; }
3980 EOF
3981 if { (eval echo configure:3982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3982   rm -rf conftest*
3983   samba_cv_unixsocket=yes
3984 else
3985   echo "configure: failed program was:" >&5
3986   cat conftest.$ac_ext >&5
3987   rm -rf conftest*
3988   samba_cv_unixsocket=no
3989 fi
3990 rm -f conftest*
3991 fi
3992
3993 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3994 if test x"$samba_cv_unixsocket" = x"yes"; then
3995    cat >> confdefs.h <<\EOF
3996 #define HAVE_UNIXSOCKET 1
3997 EOF
3998
3999 fi
4000
4001
4002 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
4003 echo "configure:4004: checking for socklen_t type" >&5
4004 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
4005   echo $ac_n "(cached) $ac_c" 1>&6
4006 else
4007   
4008     cat > conftest.$ac_ext <<EOF
4009 #line 4010 "configure"
4010 #include "confdefs.h"
4011
4012 #include <sys/types.h>
4013 #if STDC_HEADERS
4014 #include <stdlib.h>
4015 #include <stddef.h>
4016 #endif
4017 #include <sys/socket.h>
4018 int main() {
4019 socklen_t i = 0
4020 ; return 0; }
4021 EOF
4022 if { (eval echo configure:4023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4023   rm -rf conftest*
4024   samba_cv_socklen_t=yes
4025 else
4026   echo "configure: failed program was:" >&5
4027   cat conftest.$ac_ext >&5
4028   rm -rf conftest*
4029   samba_cv_socklen_t=no
4030 fi
4031 rm -f conftest*
4032 fi
4033
4034 echo "$ac_t""$samba_cv_socklen_t" 1>&6
4035 if test x"$samba_cv_socklen_t" = x"yes"; then
4036    cat >> confdefs.h <<\EOF
4037 #define HAVE_SOCKLEN_T_TYPE 1
4038 EOF
4039
4040 fi
4041
4042 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
4043 echo "configure:4044: checking for sig_atomic_t type" >&5
4044 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
4045   echo $ac_n "(cached) $ac_c" 1>&6
4046 else
4047   
4048     cat > conftest.$ac_ext <<EOF
4049 #line 4050 "configure"
4050 #include "confdefs.h"
4051
4052 #include <sys/types.h>
4053 #if STDC_HEADERS
4054 #include <stdlib.h>
4055 #include <stddef.h>
4056 #endif
4057 #include <signal.h>
4058 int main() {
4059 sig_atomic_t i = 0
4060 ; return 0; }
4061 EOF
4062 if { (eval echo configure:4063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4063   rm -rf conftest*
4064   samba_cv_sig_atomic_t=yes
4065 else
4066   echo "configure: failed program was:" >&5
4067   cat conftest.$ac_ext >&5
4068   rm -rf conftest*
4069   samba_cv_sig_atomic_t=no
4070 fi
4071 rm -f conftest*
4072 fi
4073
4074 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
4075 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
4076    cat >> confdefs.h <<\EOF
4077 #define HAVE_SIG_ATOMIC_T_TYPE 1
4078 EOF
4079
4080 fi
4081
4082 # stupid headers have the functions but no declaration. grrrr.
4083
4084  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
4085 echo "configure:4086: checking for errno declaration" >&5
4086 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
4087   echo $ac_n "(cached) $ac_c" 1>&6
4088 else
4089   
4090     cat > conftest.$ac_ext <<EOF
4091 #line 4092 "configure"
4092 #include "confdefs.h"
4093 #include <errno.h>
4094 int main() {
4095 int i = (int)errno
4096 ; return 0; }
4097 EOF
4098 if { (eval echo configure:4099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4099   rm -rf conftest*
4100   ac_cv_have_errno_decl=yes
4101 else
4102   echo "configure: failed program was:" >&5
4103   cat conftest.$ac_ext >&5
4104   rm -rf conftest*
4105   ac_cv_have_errno_decl=no
4106 fi
4107 rm -f conftest*
4108 fi
4109
4110 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
4111  if test x"$ac_cv_have_errno_decl" = x"yes"; then
4112     cat >> confdefs.h <<\EOF
4113 #define HAVE_ERRNO_DECL 1
4114 EOF
4115
4116  fi
4117
4118
4119  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
4120 echo "configure:4121: checking for setresuid declaration" >&5
4121 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
4122   echo $ac_n "(cached) $ac_c" 1>&6
4123 else
4124   
4125     cat > conftest.$ac_ext <<EOF
4126 #line 4127 "configure"
4127 #include "confdefs.h"
4128 #include <unistd.h>
4129 int main() {
4130 int i = (int)setresuid
4131 ; return 0; }
4132 EOF
4133 if { (eval echo configure:4134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4134   rm -rf conftest*
4135   ac_cv_have_setresuid_decl=yes
4136 else
4137   echo "configure: failed program was:" >&5
4138   cat conftest.$ac_ext >&5
4139   rm -rf conftest*
4140   ac_cv_have_setresuid_decl=no
4141 fi
4142 rm -f conftest*
4143 fi
4144
4145 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
4146  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
4147     cat >> confdefs.h <<\EOF
4148 #define HAVE_SETRESUID_DECL 1
4149 EOF
4150
4151  fi
4152
4153
4154  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
4155 echo "configure:4156: checking for setresgid declaration" >&5
4156 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
4157   echo $ac_n "(cached) $ac_c" 1>&6
4158 else
4159   
4160     cat > conftest.$ac_ext <<EOF
4161 #line 4162 "configure"
4162 #include "confdefs.h"
4163 #include <unistd.h>
4164 int main() {
4165 int i = (int)setresgid
4166 ; return 0; }
4167 EOF
4168 if { (eval echo configure:4169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4169   rm -rf conftest*
4170   ac_cv_have_setresgid_decl=yes
4171 else
4172   echo "configure: failed program was:" >&5
4173   cat conftest.$ac_ext >&5
4174   rm -rf conftest*
4175   ac_cv_have_setresgid_decl=no
4176 fi
4177 rm -f conftest*
4178 fi
4179
4180 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
4181  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
4182     cat >> confdefs.h <<\EOF
4183 #define HAVE_SETRESGID_DECL 1
4184 EOF
4185
4186  fi
4187
4188
4189  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
4190 echo "configure:4191: checking for asprintf declaration" >&5
4191 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
4192   echo $ac_n "(cached) $ac_c" 1>&6
4193 else
4194   
4195     cat > conftest.$ac_ext <<EOF
4196 #line 4197 "configure"
4197 #include "confdefs.h"
4198 #include <stdio.h>
4199 int main() {
4200 int i = (int)asprintf
4201 ; return 0; }
4202 EOF
4203 if { (eval echo configure:4204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4204   rm -rf conftest*
4205   ac_cv_have_asprintf_decl=yes
4206 else
4207   echo "configure: failed program was:" >&5
4208   cat conftest.$ac_ext >&5
4209   rm -rf conftest*
4210   ac_cv_have_asprintf_decl=no
4211 fi
4212 rm -f conftest*
4213 fi
4214
4215 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
4216  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
4217     cat >> confdefs.h <<\EOF
4218 #define HAVE_ASPRINTF_DECL 1
4219 EOF
4220
4221  fi
4222
4223
4224  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
4225 echo "configure:4226: checking for vasprintf declaration" >&5
4226 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
4227   echo $ac_n "(cached) $ac_c" 1>&6
4228 else
4229   
4230     cat > conftest.$ac_ext <<EOF
4231 #line 4232 "configure"
4232 #include "confdefs.h"
4233 #include <stdio.h>
4234 int main() {
4235 int i = (int)vasprintf
4236 ; return 0; }
4237 EOF
4238 if { (eval echo configure:4239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4239   rm -rf conftest*
4240   ac_cv_have_vasprintf_decl=yes
4241 else
4242   echo "configure: failed program was:" >&5
4243   cat conftest.$ac_ext >&5
4244   rm -rf conftest*
4245   ac_cv_have_vasprintf_decl=no
4246 fi
4247 rm -f conftest*
4248 fi
4249
4250 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
4251  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
4252     cat >> confdefs.h <<\EOF
4253 #define HAVE_VASPRINTF_DECL 1
4254 EOF
4255
4256  fi
4257
4258
4259  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
4260 echo "configure:4261: checking for vsnprintf declaration" >&5
4261 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
4262   echo $ac_n "(cached) $ac_c" 1>&6
4263 else
4264   
4265     cat > conftest.$ac_ext <<EOF
4266 #line 4267 "configure"
4267 #include "confdefs.h"
4268 #include <stdio.h>
4269 int main() {
4270 int i = (int)vsnprintf
4271 ; return 0; }
4272 EOF
4273 if { (eval echo configure:4274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4274   rm -rf conftest*
4275   ac_cv_have_vsnprintf_decl=yes
4276 else
4277   echo "configure: failed program was:" >&5
4278   cat conftest.$ac_ext >&5
4279   rm -rf conftest*
4280   ac_cv_have_vsnprintf_decl=no
4281 fi
4282 rm -f conftest*
4283 fi
4284
4285 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
4286  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
4287     cat >> confdefs.h <<\EOF
4288 #define HAVE_VSNPRINTF_DECL 1
4289 EOF
4290
4291  fi
4292
4293
4294  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
4295 echo "configure:4296: checking for snprintf declaration" >&5
4296 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
4297   echo $ac_n "(cached) $ac_c" 1>&6
4298 else
4299   
4300     cat > conftest.$ac_ext <<EOF
4301 #line 4302 "configure"
4302 #include "confdefs.h"
4303 #include <stdio.h>
4304 int main() {
4305 int i = (int)snprintf
4306 ; return 0; }
4307 EOF
4308 if { (eval echo configure:4309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4309   rm -rf conftest*
4310   ac_cv_have_snprintf_decl=yes
4311 else
4312   echo "configure: failed program was:" >&5
4313   cat conftest.$ac_ext >&5
4314   rm -rf conftest*
4315   ac_cv_have_snprintf_decl=no
4316 fi
4317 rm -f conftest*
4318 fi
4319
4320 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
4321  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
4322     cat >> confdefs.h <<\EOF
4323 #define HAVE_SNPRINTF_DECL 1
4324 EOF
4325
4326  fi
4327
4328
4329 # and glibc has setresuid under linux but the function does
4330 # nothing until kernel 2.1.44! very dumb.
4331 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
4332 echo "configure:4333: checking for real setresuid" >&5
4333 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
4334   echo $ac_n "(cached) $ac_c" 1>&6
4335 else
4336   
4337     if test "$cross_compiling" = yes; then
4338   samba_cv_have_setresuid=cross
4339 else
4340   cat > conftest.$ac_ext <<EOF
4341 #line 4342 "configure"
4342 #include "confdefs.h"
4343 #include <errno.h>
4344 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4345 EOF
4346 if { (eval echo configure:4347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4347 then
4348   samba_cv_have_setresuid=yes
4349 else
4350   echo "configure: failed program was:" >&5
4351   cat conftest.$ac_ext >&5
4352   rm -fr conftest*
4353   samba_cv_have_setresuid=no
4354 fi
4355 rm -fr conftest*
4356 fi
4357
4358 fi
4359
4360 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4361 if test x"$samba_cv_have_setresuid" = x"yes"; then
4362     cat >> confdefs.h <<\EOF
4363 #define HAVE_SETRESUID 1
4364 EOF
4365
4366 fi
4367
4368 # Do the same check for setresguid...
4369 #
4370 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4371 echo "configure:4372: checking for real setresgid" >&5
4372 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4373   echo $ac_n "(cached) $ac_c" 1>&6
4374 else
4375   
4376     if test "$cross_compiling" = yes; then
4377   samba_cv_have_setresgid=cross
4378 else
4379   cat > conftest.$ac_ext <<EOF
4380 #line 4381 "configure"
4381 #include "confdefs.h"
4382 #include <unistd.h>
4383 #include <errno.h>
4384 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4385 EOF
4386 if { (eval echo configure:4387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4387 then
4388   samba_cv_have_setresgid=yes
4389 else
4390   echo "configure: failed program was:" >&5
4391   cat conftest.$ac_ext >&5
4392   rm -fr conftest*
4393   samba_cv_have_setresgid=no
4394 fi
4395 rm -fr conftest*
4396 fi
4397
4398 fi
4399
4400 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4401 if test x"$samba_cv_have_setresgid" = x"yes"; then
4402     cat >> confdefs.h <<\EOF
4403 #define HAVE_SETRESGID 1
4404 EOF
4405
4406 fi
4407
4408 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4409 echo "configure:4410: checking for 8-bit clean memcmp" >&5
4410 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4411   echo $ac_n "(cached) $ac_c" 1>&6
4412 else
4413   if test "$cross_compiling" = yes; then
4414   ac_cv_func_memcmp_clean=no
4415 else
4416   cat > conftest.$ac_ext <<EOF
4417 #line 4418 "configure"
4418 #include "confdefs.h"
4419
4420 main()
4421 {
4422   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4423   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4424 }
4425
4426 EOF
4427 if { (eval echo configure:4428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4428 then
4429   ac_cv_func_memcmp_clean=yes
4430 else
4431   echo "configure: failed program was:" >&5
4432   cat conftest.$ac_ext >&5
4433   rm -fr conftest*
4434   ac_cv_func_memcmp_clean=no
4435 fi
4436 rm -fr conftest*
4437 fi
4438
4439 fi
4440
4441 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4442 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4443
4444
4445 ###############################################
4446 # test for where we get crypt() from
4447 for ac_func in crypt
4448 do
4449 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4450 echo "configure:4451: checking for $ac_func" >&5
4451 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4452   echo $ac_n "(cached) $ac_c" 1>&6
4453 else
4454   cat > conftest.$ac_ext <<EOF
4455 #line 4456 "configure"
4456 #include "confdefs.h"
4457 /* System header to define __stub macros and hopefully few prototypes,
4458     which can conflict with char $ac_func(); below.  */
4459 #include <assert.h>
4460 /* Override any gcc2 internal prototype to avoid an error.  */
4461 /* We use char because int might match the return type of a gcc2
4462     builtin and then its argument prototype would still apply.  */
4463 char $ac_func();
4464
4465 int main() {
4466
4467 /* The GNU C library defines this for functions which it implements
4468     to always fail with ENOSYS.  Some functions are actually named
4469     something starting with __ and the normal name is an alias.  */
4470 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4471 choke me
4472 #else
4473 $ac_func();
4474 #endif
4475
4476 ; return 0; }
4477 EOF
4478 if { (eval echo configure:4479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4479   rm -rf conftest*
4480   eval "ac_cv_func_$ac_func=yes"
4481 else
4482   echo "configure: failed program was:" >&5
4483   cat conftest.$ac_ext >&5
4484   rm -rf conftest*
4485   eval "ac_cv_func_$ac_func=no"
4486 fi
4487 rm -f conftest*
4488 fi
4489
4490 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4491   echo "$ac_t""yes" 1>&6
4492     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4493   cat >> confdefs.h <<EOF
4494 #define $ac_tr_func 1
4495 EOF
4496  
4497 else
4498   echo "$ac_t""no" 1>&6
4499 fi
4500 done
4501
4502 if test x"$ac_cv_func_crypt" = x"no"; then
4503     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4504 echo "configure:4505: checking for crypt in -lcrypt" >&5
4505 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4506 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4507   echo $ac_n "(cached) $ac_c" 1>&6
4508 else
4509   ac_save_LIBS="$LIBS"
4510 LIBS="-lcrypt  $LIBS"
4511 cat > conftest.$ac_ext <<EOF
4512 #line 4513 "configure"
4513 #include "confdefs.h"
4514 /* Override any gcc2 internal prototype to avoid an error.  */
4515 /* We use char because int might match the return type of a gcc2
4516     builtin and then its argument prototype would still apply.  */
4517 char crypt();
4518
4519 int main() {
4520 crypt()
4521 ; return 0; }
4522 EOF
4523 if { (eval echo configure:4524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4524   rm -rf conftest*
4525   eval "ac_cv_lib_$ac_lib_var=yes"
4526 else
4527   echo "configure: failed program was:" >&5
4528   cat conftest.$ac_ext >&5
4529   rm -rf conftest*
4530   eval "ac_cv_lib_$ac_lib_var=no"
4531 fi
4532 rm -f conftest*
4533 LIBS="$ac_save_LIBS"
4534
4535 fi
4536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4537   echo "$ac_t""yes" 1>&6
4538   LIBS="$LIBS -lcrypt";
4539         cat >> confdefs.h <<\EOF
4540 #define HAVE_CRYPT 1
4541 EOF
4542
4543 else
4544   echo "$ac_t""no" 1>&6
4545 fi
4546
4547 fi
4548
4549
4550 ###############################################
4551 # Readline included by default unless explicitly asked not to
4552 test "${with_readline+set}" != "set" && with_readline=yes
4553
4554 # test for where we get readline() from
4555 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4556 echo "configure:4557: checking whether to use readline" >&5
4557 # Check whether --with-readline or --without-readline was given.
4558 if test "${with_readline+set}" = set; then
4559   withval="$with_readline"
4560     case "$with_readline" in
4561   yes)
4562     echo "$ac_t""yes" 1>&6
4563
4564     for ac_hdr in readline.h history.h readline/readline.h
4565 do
4566 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4567 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4568 echo "configure:4569: checking for $ac_hdr" >&5
4569 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4570   echo $ac_n "(cached) $ac_c" 1>&6
4571 else
4572   cat > conftest.$ac_ext <<EOF
4573 #line 4574 "configure"
4574 #include "confdefs.h"
4575 #include <$ac_hdr>
4576 EOF
4577 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4578 { (eval echo configure:4579: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4579 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4580 if test -z "$ac_err"; then
4581   rm -rf conftest*
4582   eval "ac_cv_header_$ac_safe=yes"
4583 else
4584   echo "$ac_err" >&5
4585   echo "configure: failed program was:" >&5
4586   cat conftest.$ac_ext >&5
4587   rm -rf conftest*
4588   eval "ac_cv_header_$ac_safe=no"
4589 fi
4590 rm -f conftest*
4591 fi
4592 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4593   echo "$ac_t""yes" 1>&6
4594     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4595   cat >> confdefs.h <<EOF
4596 #define $ac_tr_hdr 1
4597 EOF
4598  
4599 else
4600   echo "$ac_t""no" 1>&6
4601 fi
4602 done
4603
4604     for ac_hdr in readline/history.h
4605 do
4606 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4607 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4608 echo "configure:4609: checking for $ac_hdr" >&5
4609 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4610   echo $ac_n "(cached) $ac_c" 1>&6
4611 else
4612   cat > conftest.$ac_ext <<EOF
4613 #line 4614 "configure"
4614 #include "confdefs.h"
4615 #include <$ac_hdr>
4616 EOF
4617 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4618 { (eval echo configure:4619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4619 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4620 if test -z "$ac_err"; then
4621   rm -rf conftest*
4622   eval "ac_cv_header_$ac_safe=yes"
4623 else
4624   echo "$ac_err" >&5
4625   echo "configure: failed program was:" >&5
4626   cat conftest.$ac_ext >&5
4627   rm -rf conftest*
4628   eval "ac_cv_header_$ac_safe=no"
4629 fi
4630 rm -f conftest*
4631 fi
4632 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4633   echo "$ac_t""yes" 1>&6
4634     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4635   cat >> confdefs.h <<EOF
4636 #define $ac_tr_hdr 1
4637 EOF
4638  
4639 else
4640   echo "$ac_t""no" 1>&6
4641 fi
4642 done
4643
4644
4645     for ac_hdr in readline.h readline/readline.h
4646 do
4647 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4648 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4649 echo "configure:4650: checking for $ac_hdr" >&5
4650 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4651   echo $ac_n "(cached) $ac_c" 1>&6
4652 else
4653   cat > conftest.$ac_ext <<EOF
4654 #line 4655 "configure"
4655 #include "confdefs.h"
4656 #include <$ac_hdr>
4657 EOF
4658 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4659 { (eval echo configure:4660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4660 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4661 if test -z "$ac_err"; then
4662   rm -rf conftest*
4663   eval "ac_cv_header_$ac_safe=yes"
4664 else
4665   echo "$ac_err" >&5
4666   echo "configure: failed program was:" >&5
4667   cat conftest.$ac_ext >&5
4668   rm -rf conftest*
4669   eval "ac_cv_header_$ac_safe=no"
4670 fi
4671 rm -f conftest*
4672 fi
4673 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4674   echo "$ac_t""yes" 1>&6
4675     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4676   cat >> confdefs.h <<EOF
4677 #define $ac_tr_hdr 1
4678 EOF
4679  
4680       for termlib in ncurses curses termcap terminfo termlib; do
4681        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4682 echo "configure:4683: checking for tgetent in -l${termlib}" >&5
4683 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4684 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4685   echo $ac_n "(cached) $ac_c" 1>&6
4686 else
4687   ac_save_LIBS="$LIBS"
4688 LIBS="-l${termlib}  $LIBS"
4689 cat > conftest.$ac_ext <<EOF
4690 #line 4691 "configure"
4691 #include "confdefs.h"
4692 /* Override any gcc2 internal prototype to avoid an error.  */
4693 /* We use char because int might match the return type of a gcc2
4694     builtin and then its argument prototype would still apply.  */
4695 char tgetent();
4696
4697 int main() {
4698 tgetent()
4699 ; return 0; }
4700 EOF
4701 if { (eval echo configure:4702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4702   rm -rf conftest*
4703   eval "ac_cv_lib_$ac_lib_var=yes"
4704 else
4705   echo "configure: failed program was:" >&5
4706   cat conftest.$ac_ext >&5
4707   rm -rf conftest*
4708   eval "ac_cv_lib_$ac_lib_var=no"
4709 fi
4710 rm -f conftest*
4711 LIBS="$ac_save_LIBS"
4712
4713 fi
4714 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4715   echo "$ac_t""yes" 1>&6
4716   TERMLIBS="-l${termlib}"; break
4717 else
4718   echo "$ac_t""no" 1>&6
4719 fi
4720
4721       done
4722       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4723 echo "configure:4724: checking for rl_callback_handler_install in -lreadline" >&5
4724 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4725 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4726   echo $ac_n "(cached) $ac_c" 1>&6
4727 else
4728   ac_save_LIBS="$LIBS"
4729 LIBS="-lreadline $TERMLIBS $LIBS"
4730 cat > conftest.$ac_ext <<EOF
4731 #line 4732 "configure"
4732 #include "confdefs.h"
4733 /* Override any gcc2 internal prototype to avoid an error.  */
4734 /* We use char because int might match the return type of a gcc2
4735     builtin and then its argument prototype would still apply.  */
4736 char rl_callback_handler_install();
4737
4738 int main() {
4739 rl_callback_handler_install()
4740 ; return 0; }
4741 EOF
4742 if { (eval echo configure:4743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4743   rm -rf conftest*
4744   eval "ac_cv_lib_$ac_lib_var=yes"
4745 else
4746   echo "configure: failed program was:" >&5
4747   cat conftest.$ac_ext >&5
4748   rm -rf conftest*
4749   eval "ac_cv_lib_$ac_lib_var=no"
4750 fi
4751 rm -f conftest*
4752 LIBS="$ac_save_LIBS"
4753
4754 fi
4755 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4756   echo "$ac_t""yes" 1>&6
4757   TERMLIBS="-lreadline $TERMLIBS"
4758        cat >> confdefs.h <<\EOF
4759 #define HAVE_LIBREADLINE 1
4760 EOF
4761
4762        break
4763 else
4764   echo "$ac_t""no" 1>&6
4765 TERMLIBS=
4766 fi
4767
4768 else
4769   echo "$ac_t""no" 1>&6
4770 fi
4771 done
4772
4773     ;;
4774   no)
4775     echo "$ac_t""no" 1>&6
4776     ;;
4777   *)
4778     echo "$ac_t""yes" 1>&6
4779
4780     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4781     # alternate readline path
4782     _ldflags=${LDFLAGS}
4783     _cppflags=${CPPFLAGS}
4784
4785     # Add additional search path
4786     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4787     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4788
4789     for ac_hdr in readline.h history.h readline/readline.h
4790 do
4791 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4792 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4793 echo "configure:4794: checking for $ac_hdr" >&5
4794 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4795   echo $ac_n "(cached) $ac_c" 1>&6
4796 else
4797   cat > conftest.$ac_ext <<EOF
4798 #line 4799 "configure"
4799 #include "confdefs.h"
4800 #include <$ac_hdr>
4801 EOF
4802 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4803 { (eval echo configure:4804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4804 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4805 if test -z "$ac_err"; then
4806   rm -rf conftest*
4807   eval "ac_cv_header_$ac_safe=yes"
4808 else
4809   echo "$ac_err" >&5
4810   echo "configure: failed program was:" >&5
4811   cat conftest.$ac_ext >&5
4812   rm -rf conftest*
4813   eval "ac_cv_header_$ac_safe=no"
4814 fi
4815 rm -f conftest*
4816 fi
4817 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4818   echo "$ac_t""yes" 1>&6
4819     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4820   cat >> confdefs.h <<EOF
4821 #define $ac_tr_hdr 1
4822 EOF
4823  
4824 else
4825   echo "$ac_t""no" 1>&6
4826 fi
4827 done
4828
4829     for ac_hdr in readline/history.h
4830 do
4831 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4832 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4833 echo "configure:4834: checking for $ac_hdr" >&5
4834 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4835   echo $ac_n "(cached) $ac_c" 1>&6
4836 else
4837   cat > conftest.$ac_ext <<EOF
4838 #line 4839 "configure"
4839 #include "confdefs.h"
4840 #include <$ac_hdr>
4841 EOF
4842 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4843 { (eval echo configure:4844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4844 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4845 if test -z "$ac_err"; then
4846   rm -rf conftest*
4847   eval "ac_cv_header_$ac_safe=yes"
4848 else
4849   echo "$ac_err" >&5
4850   echo "configure: failed program was:" >&5
4851   cat conftest.$ac_ext >&5
4852   rm -rf conftest*
4853   eval "ac_cv_header_$ac_safe=no"
4854 fi
4855 rm -f conftest*
4856 fi
4857 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4858   echo "$ac_t""yes" 1>&6
4859     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4860   cat >> confdefs.h <<EOF
4861 #define $ac_tr_hdr 1
4862 EOF
4863  
4864 else
4865   echo "$ac_t""no" 1>&6
4866 fi
4867 done
4868
4869
4870     for ac_hdr in readline.h readline/readline.h
4871 do
4872 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4873 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4874 echo "configure:4875: checking for $ac_hdr" >&5
4875 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4876   echo $ac_n "(cached) $ac_c" 1>&6
4877 else
4878   cat > conftest.$ac_ext <<EOF
4879 #line 4880 "configure"
4880 #include "confdefs.h"
4881 #include <$ac_hdr>
4882 EOF
4883 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4884 { (eval echo configure:4885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4885 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4886 if test -z "$ac_err"; then
4887   rm -rf conftest*
4888   eval "ac_cv_header_$ac_safe=yes"
4889 else
4890   echo "$ac_err" >&5
4891   echo "configure: failed program was:" >&5
4892   cat conftest.$ac_ext >&5
4893   rm -rf conftest*
4894   eval "ac_cv_header_$ac_safe=no"
4895 fi
4896 rm -f conftest*
4897 fi
4898 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4899   echo "$ac_t""yes" 1>&6
4900     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4901   cat >> confdefs.h <<EOF
4902 #define $ac_tr_hdr 1
4903 EOF
4904  
4905       for termlib in ncurses curses termcap terminfo termlib; do
4906        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4907 echo "configure:4908: checking for tgetent in -l${termlib}" >&5
4908 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4909 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4910   echo $ac_n "(cached) $ac_c" 1>&6
4911 else
4912   ac_save_LIBS="$LIBS"
4913 LIBS="-l${termlib}  $LIBS"
4914 cat > conftest.$ac_ext <<EOF
4915 #line 4916 "configure"
4916 #include "confdefs.h"
4917 /* Override any gcc2 internal prototype to avoid an error.  */
4918 /* We use char because int might match the return type of a gcc2
4919     builtin and then its argument prototype would still apply.  */
4920 char tgetent();
4921
4922 int main() {
4923 tgetent()
4924 ; return 0; }
4925 EOF
4926 if { (eval echo configure:4927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4927   rm -rf conftest*
4928   eval "ac_cv_lib_$ac_lib_var=yes"
4929 else
4930   echo "configure: failed program was:" >&5
4931   cat conftest.$ac_ext >&5
4932   rm -rf conftest*
4933   eval "ac_cv_lib_$ac_lib_var=no"
4934 fi
4935 rm -f conftest*
4936 LIBS="$ac_save_LIBS"
4937
4938 fi
4939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4940   echo "$ac_t""yes" 1>&6
4941   TERMLIBS="-l${termlib}"; break
4942 else
4943   echo "$ac_t""no" 1>&6
4944 fi
4945
4946       done
4947       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4948 echo "configure:4949: checking for rl_callback_handler_install in -lreadline" >&5
4949 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4950 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4951   echo $ac_n "(cached) $ac_c" 1>&6
4952 else
4953   ac_save_LIBS="$LIBS"
4954 LIBS="-lreadline $TERMLIBS $LIBS"
4955 cat > conftest.$ac_ext <<EOF
4956 #line 4957 "configure"
4957 #include "confdefs.h"
4958 /* Override any gcc2 internal prototype to avoid an error.  */
4959 /* We use char because int might match the return type of a gcc2
4960     builtin and then its argument prototype would still apply.  */
4961 char rl_callback_handler_install();
4962
4963 int main() {
4964 rl_callback_handler_install()
4965 ; return 0; }
4966 EOF
4967 if { (eval echo configure:4968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4968   rm -rf conftest*
4969   eval "ac_cv_lib_$ac_lib_var=yes"
4970 else
4971   echo "configure: failed program was:" >&5
4972   cat conftest.$ac_ext >&5
4973   rm -rf conftest*
4974   eval "ac_cv_lib_$ac_lib_var=no"
4975 fi
4976 rm -f conftest*
4977 LIBS="$ac_save_LIBS"
4978
4979 fi
4980 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4981   echo "$ac_t""yes" 1>&6
4982   TERMLDFLAGS="-L$with_readline/lib"
4983        TERMCPPFLAGS="-I$with_readline/include"
4984        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4985        TERMLIBS="-lreadline $TERMLIBS"
4986        cat >> confdefs.h <<\EOF
4987 #define HAVE_LIBREADLINE 1
4988 EOF
4989
4990        break
4991 else
4992   echo "$ac_t""no" 1>&6
4993 TERMLIBS= CPPFLAGS=$_cppflags
4994 fi
4995
4996 else
4997   echo "$ac_t""no" 1>&6
4998 fi
4999 done
5000
5001
5002     LDFLAGS=$_ldflags
5003     ;;
5004   esac
5005 else
5006   echo "$ac_t""no" 1>&6
5007
5008 fi
5009
5010
5011
5012
5013 # The readline API changed slightly from readline3 to readline4, so
5014 # code will generate warnings on one of them unless we have a few
5015 # special cases.
5016 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
5017 echo "configure:5018: checking for rl_completion_matches in -lreadline" >&5
5018 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
5019 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5020   echo $ac_n "(cached) $ac_c" 1>&6
5021 else
5022   ac_save_LIBS="$LIBS"
5023 LIBS="-lreadline $TERMLIBS $LIBS"
5024 cat > conftest.$ac_ext <<EOF
5025 #line 5026 "configure"
5026 #include "confdefs.h"
5027 /* Override any gcc2 internal prototype to avoid an error.  */
5028 /* We use char because int might match the return type of a gcc2
5029     builtin and then its argument prototype would still apply.  */
5030 char rl_completion_matches();
5031
5032 int main() {
5033 rl_completion_matches()
5034 ; return 0; }
5035 EOF
5036 if { (eval echo configure:5037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5037   rm -rf conftest*
5038   eval "ac_cv_lib_$ac_lib_var=yes"
5039 else
5040   echo "configure: failed program was:" >&5
5041   cat conftest.$ac_ext >&5
5042   rm -rf conftest*
5043   eval "ac_cv_lib_$ac_lib_var=no"
5044 fi
5045 rm -f conftest*
5046 LIBS="$ac_save_LIBS"
5047
5048 fi
5049 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5050   echo "$ac_t""yes" 1>&6
5051   cat >> confdefs.h <<\EOF
5052 #define HAVE_NEW_LIBREADLINE 1
5053 EOF
5054
5055 else
5056   echo "$ac_t""no" 1>&6
5057 fi
5058
5059
5060 # The following test taken from the cvs sources
5061 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
5062 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
5063 # libsocket.so which has a bad implementation of gethostbyname (it
5064 # only looks in /etc/hosts), so we only look for -lsocket if we need
5065 # it.
5066 for ac_func in connect
5067 do
5068 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5069 echo "configure:5070: checking for $ac_func" >&5
5070 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5071   echo $ac_n "(cached) $ac_c" 1>&6
5072 else
5073   cat > conftest.$ac_ext <<EOF
5074 #line 5075 "configure"
5075 #include "confdefs.h"
5076 /* System header to define __stub macros and hopefully few prototypes,
5077     which can conflict with char $ac_func(); below.  */
5078 #include <assert.h>
5079 /* Override any gcc2 internal prototype to avoid an error.  */
5080 /* We use char because int might match the return type of a gcc2
5081     builtin and then its argument prototype would still apply.  */
5082 char $ac_func();
5083
5084 int main() {
5085
5086 /* The GNU C library defines this for functions which it implements
5087     to always fail with ENOSYS.  Some functions are actually named
5088     something starting with __ and the normal name is an alias.  */
5089 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5090 choke me
5091 #else
5092 $ac_func();
5093 #endif
5094
5095 ; return 0; }
5096 EOF
5097 if { (eval echo configure:5098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5098   rm -rf conftest*
5099   eval "ac_cv_func_$ac_func=yes"
5100 else
5101   echo "configure: failed program was:" >&5
5102   cat conftest.$ac_ext >&5
5103   rm -rf conftest*
5104   eval "ac_cv_func_$ac_func=no"
5105 fi
5106 rm -f conftest*
5107 fi
5108
5109 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5110   echo "$ac_t""yes" 1>&6
5111     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5112   cat >> confdefs.h <<EOF
5113 #define $ac_tr_func 1
5114 EOF
5115  
5116 else
5117   echo "$ac_t""no" 1>&6
5118 fi
5119 done
5120
5121 if test x"$ac_cv_func_connect" = x"no"; then
5122     case "$LIBS" in
5123     *-lnsl*) ;;
5124     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
5125 echo "configure:5126: checking for printf in -lnsl_s" >&5
5126 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
5127 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5128   echo $ac_n "(cached) $ac_c" 1>&6
5129 else
5130   ac_save_LIBS="$LIBS"
5131 LIBS="-lnsl_s  $LIBS"
5132 cat > conftest.$ac_ext <<EOF
5133 #line 5134 "configure"
5134 #include "confdefs.h"
5135 /* Override any gcc2 internal prototype to avoid an error.  */
5136 /* We use char because int might match the return type of a gcc2
5137     builtin and then its argument prototype would still apply.  */
5138 char printf();
5139
5140 int main() {
5141 printf()
5142 ; return 0; }
5143 EOF
5144 if { (eval echo configure:5145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5145   rm -rf conftest*
5146   eval "ac_cv_lib_$ac_lib_var=yes"
5147 else
5148   echo "configure: failed program was:" >&5
5149   cat conftest.$ac_ext >&5
5150   rm -rf conftest*
5151   eval "ac_cv_lib_$ac_lib_var=no"
5152 fi
5153 rm -f conftest*
5154 LIBS="$ac_save_LIBS"
5155
5156 fi
5157 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5158   echo "$ac_t""yes" 1>&6
5159     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5160     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5161   cat >> confdefs.h <<EOF
5162 #define $ac_tr_lib 1
5163 EOF
5164
5165   LIBS="-lnsl_s $LIBS"
5166
5167 else
5168   echo "$ac_t""no" 1>&6
5169 fi
5170  ;;
5171     esac
5172     case "$LIBS" in
5173     *-lnsl*) ;;
5174     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
5175 echo "configure:5176: checking for printf in -lnsl" >&5
5176 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
5177 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5178   echo $ac_n "(cached) $ac_c" 1>&6
5179 else
5180   ac_save_LIBS="$LIBS"
5181 LIBS="-lnsl  $LIBS"
5182 cat > conftest.$ac_ext <<EOF
5183 #line 5184 "configure"
5184 #include "confdefs.h"
5185 /* Override any gcc2 internal prototype to avoid an error.  */
5186 /* We use char because int might match the return type of a gcc2
5187     builtin and then its argument prototype would still apply.  */
5188 char printf();
5189
5190 int main() {
5191 printf()
5192 ; return 0; }
5193 EOF
5194 if { (eval echo configure:5195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5195   rm -rf conftest*
5196   eval "ac_cv_lib_$ac_lib_var=yes"
5197 else
5198   echo "configure: failed program was:" >&5
5199   cat conftest.$ac_ext >&5
5200   rm -rf conftest*
5201   eval "ac_cv_lib_$ac_lib_var=no"
5202 fi
5203 rm -f conftest*
5204 LIBS="$ac_save_LIBS"
5205
5206 fi
5207 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5208   echo "$ac_t""yes" 1>&6
5209     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5210     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5211   cat >> confdefs.h <<EOF
5212 #define $ac_tr_lib 1
5213 EOF
5214
5215   LIBS="-lnsl $LIBS"
5216
5217 else
5218   echo "$ac_t""no" 1>&6
5219 fi
5220  ;;
5221     esac
5222     case "$LIBS" in
5223     *-lsocket*) ;;
5224     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5225 echo "configure:5226: checking for connect in -lsocket" >&5
5226 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5227 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5228   echo $ac_n "(cached) $ac_c" 1>&6
5229 else
5230   ac_save_LIBS="$LIBS"
5231 LIBS="-lsocket  $LIBS"
5232 cat > conftest.$ac_ext <<EOF
5233 #line 5234 "configure"
5234 #include "confdefs.h"
5235 /* Override any gcc2 internal prototype to avoid an error.  */
5236 /* We use char because int might match the return type of a gcc2
5237     builtin and then its argument prototype would still apply.  */
5238 char connect();
5239
5240 int main() {
5241 connect()
5242 ; return 0; }
5243 EOF
5244 if { (eval echo configure:5245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5245   rm -rf conftest*
5246   eval "ac_cv_lib_$ac_lib_var=yes"
5247 else
5248   echo "configure: failed program was:" >&5
5249   cat conftest.$ac_ext >&5
5250   rm -rf conftest*
5251   eval "ac_cv_lib_$ac_lib_var=no"
5252 fi
5253 rm -f conftest*
5254 LIBS="$ac_save_LIBS"
5255
5256 fi
5257 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5258   echo "$ac_t""yes" 1>&6
5259     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5260     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5261   cat >> confdefs.h <<EOF
5262 #define $ac_tr_lib 1
5263 EOF
5264
5265   LIBS="-lsocket $LIBS"
5266
5267 else
5268   echo "$ac_t""no" 1>&6
5269 fi
5270  ;;
5271     esac
5272     case "$LIBS" in
5273     *-linet*) ;;
5274     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
5275 echo "configure:5276: checking for connect in -linet" >&5
5276 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
5277 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5278   echo $ac_n "(cached) $ac_c" 1>&6
5279 else
5280   ac_save_LIBS="$LIBS"
5281 LIBS="-linet  $LIBS"
5282 cat > conftest.$ac_ext <<EOF
5283 #line 5284 "configure"
5284 #include "confdefs.h"
5285 /* Override any gcc2 internal prototype to avoid an error.  */
5286 /* We use char because int might match the return type of a gcc2
5287     builtin and then its argument prototype would still apply.  */
5288 char connect();
5289
5290 int main() {
5291 connect()
5292 ; return 0; }
5293 EOF
5294 if { (eval echo configure:5295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5295   rm -rf conftest*
5296   eval "ac_cv_lib_$ac_lib_var=yes"
5297 else
5298   echo "configure: failed program was:" >&5
5299   cat conftest.$ac_ext >&5
5300   rm -rf conftest*
5301   eval "ac_cv_lib_$ac_lib_var=no"
5302 fi
5303 rm -f conftest*
5304 LIBS="$ac_save_LIBS"
5305
5306 fi
5307 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5308   echo "$ac_t""yes" 1>&6
5309     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5310     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5311   cat >> confdefs.h <<EOF
5312 #define $ac_tr_lib 1
5313 EOF
5314
5315   LIBS="-linet $LIBS"
5316
5317 else
5318   echo "$ac_t""no" 1>&6
5319 fi
5320  ;;
5321     esac
5322             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
5323        test x"$ac_cv_lib_inet_connect" = x"yes"; then
5324         # ac_cv_func_connect=yes
5325         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
5326         cat >> confdefs.h <<\EOF
5327 #define HAVE_CONNECT 1
5328 EOF
5329
5330     fi
5331 fi
5332
5333 ###############################################
5334 # test for where we get get_yp_default_domain() from
5335 for ac_func in yp_get_default_domain
5336 do
5337 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5338 echo "configure:5339: checking for $ac_func" >&5
5339 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5340   echo $ac_n "(cached) $ac_c" 1>&6
5341 else
5342   cat > conftest.$ac_ext <<EOF
5343 #line 5344 "configure"
5344 #include "confdefs.h"
5345 /* System header to define __stub macros and hopefully few prototypes,
5346     which can conflict with char $ac_func(); below.  */
5347 #include <assert.h>
5348 /* Override any gcc2 internal prototype to avoid an error.  */
5349 /* We use char because int might match the return type of a gcc2
5350     builtin and then its argument prototype would still apply.  */
5351 char $ac_func();
5352
5353 int main() {
5354
5355 /* The GNU C library defines this for functions which it implements
5356     to always fail with ENOSYS.  Some functions are actually named
5357     something starting with __ and the normal name is an alias.  */
5358 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5359 choke me
5360 #else
5361 $ac_func();
5362 #endif
5363
5364 ; return 0; }
5365 EOF
5366 if { (eval echo configure:5367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5367   rm -rf conftest*
5368   eval "ac_cv_func_$ac_func=yes"
5369 else
5370   echo "configure: failed program was:" >&5
5371   cat conftest.$ac_ext >&5
5372   rm -rf conftest*
5373   eval "ac_cv_func_$ac_func=no"
5374 fi
5375 rm -f conftest*
5376 fi
5377
5378 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5379   echo "$ac_t""yes" 1>&6
5380     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5381   cat >> confdefs.h <<EOF
5382 #define $ac_tr_func 1
5383 EOF
5384  
5385 else
5386   echo "$ac_t""no" 1>&6
5387 fi
5388 done
5389
5390 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5391         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5392 echo "configure:5393: checking for yp_get_default_domain in -lnsl" >&5
5393 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5394 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5395   echo $ac_n "(cached) $ac_c" 1>&6
5396 else
5397   ac_save_LIBS="$LIBS"
5398 LIBS="-lnsl  $LIBS"
5399 cat > conftest.$ac_ext <<EOF
5400 #line 5401 "configure"
5401 #include "confdefs.h"
5402 /* Override any gcc2 internal prototype to avoid an error.  */
5403 /* We use char because int might match the return type of a gcc2
5404     builtin and then its argument prototype would still apply.  */
5405 char yp_get_default_domain();
5406
5407 int main() {
5408 yp_get_default_domain()
5409 ; return 0; }
5410 EOF
5411 if { (eval echo configure:5412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5412   rm -rf conftest*
5413   eval "ac_cv_lib_$ac_lib_var=yes"
5414 else
5415   echo "configure: failed program was:" >&5
5416   cat conftest.$ac_ext >&5
5417   rm -rf conftest*
5418   eval "ac_cv_lib_$ac_lib_var=no"
5419 fi
5420 rm -f conftest*
5421 LIBS="$ac_save_LIBS"
5422
5423 fi
5424 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5425   echo "$ac_t""yes" 1>&6
5426   LIBS="$LIBS -lnsl";
5427         cat >> confdefs.h <<\EOF
5428 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5429 EOF
5430
5431 else
5432   echo "$ac_t""no" 1>&6
5433 fi
5434  
5435 fi
5436
5437 # Check if we have execl, if not we need to compile smbrun.
5438 for ac_func in execl
5439 do
5440 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5441 echo "configure:5442: checking for $ac_func" >&5
5442 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5443   echo $ac_n "(cached) $ac_c" 1>&6
5444 else
5445   cat > conftest.$ac_ext <<EOF
5446 #line 5447 "configure"
5447 #include "confdefs.h"
5448 /* System header to define __stub macros and hopefully few prototypes,
5449     which can conflict with char $ac_func(); below.  */
5450 #include <assert.h>
5451 /* Override any gcc2 internal prototype to avoid an error.  */
5452 /* We use char because int might match the return type of a gcc2
5453     builtin and then its argument prototype would still apply.  */
5454 char $ac_func();
5455
5456 int main() {
5457
5458 /* The GNU C library defines this for functions which it implements
5459     to always fail with ENOSYS.  Some functions are actually named
5460     something starting with __ and the normal name is an alias.  */
5461 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5462 choke me
5463 #else
5464 $ac_func();
5465 #endif
5466
5467 ; return 0; }
5468 EOF
5469 if { (eval echo configure:5470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5470   rm -rf conftest*
5471   eval "ac_cv_func_$ac_func=yes"
5472 else
5473   echo "configure: failed program was:" >&5
5474   cat conftest.$ac_ext >&5
5475   rm -rf conftest*
5476   eval "ac_cv_func_$ac_func=no"
5477 fi
5478 rm -f conftest*
5479 fi
5480
5481 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5482   echo "$ac_t""yes" 1>&6
5483     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5484   cat >> confdefs.h <<EOF
5485 #define $ac_tr_func 1
5486 EOF
5487  
5488 else
5489   echo "$ac_t""no" 1>&6
5490 fi
5491 done
5492
5493 if test x"$ac_cv_func_execl" = x"no"; then
5494     RUNPROG="bin/smbrun"
5495 else
5496     RUNPROG=""
5497 fi
5498
5499 for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64
5500 do
5501 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5502 echo "configure:5503: checking for $ac_func" >&5
5503 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5504   echo $ac_n "(cached) $ac_c" 1>&6
5505 else
5506   cat > conftest.$ac_ext <<EOF
5507 #line 5508 "configure"
5508 #include "confdefs.h"
5509 /* System header to define __stub macros and hopefully few prototypes,
5510     which can conflict with char $ac_func(); below.  */
5511 #include <assert.h>
5512 /* Override any gcc2 internal prototype to avoid an error.  */
5513 /* We use char because int might match the return type of a gcc2
5514     builtin and then its argument prototype would still apply.  */
5515 char $ac_func();
5516
5517 int main() {
5518
5519 /* The GNU C library defines this for functions which it implements
5520     to always fail with ENOSYS.  Some functions are actually named
5521     something starting with __ and the normal name is an alias.  */
5522 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5523 choke me
5524 #else
5525 $ac_func();
5526 #endif
5527
5528 ; return 0; }
5529 EOF
5530 if { (eval echo configure:5531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5531   rm -rf conftest*
5532   eval "ac_cv_func_$ac_func=yes"
5533 else
5534   echo "configure: failed program was:" >&5
5535   cat conftest.$ac_ext >&5
5536   rm -rf conftest*
5537   eval "ac_cv_func_$ac_func=no"
5538 fi
5539 rm -f conftest*
5540 fi
5541
5542 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5543   echo "$ac_t""yes" 1>&6
5544     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5545   cat >> confdefs.h <<EOF
5546 #define $ac_tr_func 1
5547 EOF
5548  
5549 else
5550   echo "$ac_t""no" 1>&6
5551 fi
5552 done
5553
5554 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid
5555 do
5556 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5557 echo "configure:5558: checking for $ac_func" >&5
5558 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5559   echo $ac_n "(cached) $ac_c" 1>&6
5560 else
5561   cat > conftest.$ac_ext <<EOF
5562 #line 5563 "configure"
5563 #include "confdefs.h"
5564 /* System header to define __stub macros and hopefully few prototypes,
5565     which can conflict with char $ac_func(); below.  */
5566 #include <assert.h>
5567 /* Override any gcc2 internal prototype to avoid an error.  */
5568 /* We use char because int might match the return type of a gcc2
5569     builtin and then its argument prototype would still apply.  */
5570 char $ac_func();
5571
5572 int main() {
5573
5574 /* The GNU C library defines this for functions which it implements
5575     to always fail with ENOSYS.  Some functions are actually named
5576     something starting with __ and the normal name is an alias.  */
5577 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5578 choke me
5579 #else
5580 $ac_func();
5581 #endif
5582
5583 ; return 0; }
5584 EOF
5585 if { (eval echo configure:5586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5586   rm -rf conftest*
5587   eval "ac_cv_func_$ac_func=yes"
5588 else
5589   echo "configure: failed program was:" >&5
5590   cat conftest.$ac_ext >&5
5591   rm -rf conftest*
5592   eval "ac_cv_func_$ac_func=no"
5593 fi
5594 rm -f conftest*
5595 fi
5596
5597 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5598   echo "$ac_t""yes" 1>&6
5599     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5600   cat >> confdefs.h <<EOF
5601 #define $ac_tr_func 1
5602 EOF
5603  
5604 else
5605   echo "$ac_t""no" 1>&6
5606 fi
5607 done
5608
5609 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5610 do
5611 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5612 echo "configure:5613: checking for $ac_func" >&5
5613 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5614   echo $ac_n "(cached) $ac_c" 1>&6
5615 else
5616   cat > conftest.$ac_ext <<EOF
5617 #line 5618 "configure"
5618 #include "confdefs.h"
5619 /* System header to define __stub macros and hopefully few prototypes,
5620     which can conflict with char $ac_func(); below.  */
5621 #include <assert.h>
5622 /* Override any gcc2 internal prototype to avoid an error.  */
5623 /* We use char because int might match the return type of a gcc2
5624     builtin and then its argument prototype would still apply.  */
5625 char $ac_func();
5626
5627 int main() {
5628
5629 /* The GNU C library defines this for functions which it implements
5630     to always fail with ENOSYS.  Some functions are actually named
5631     something starting with __ and the normal name is an alias.  */
5632 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5633 choke me
5634 #else
5635 $ac_func();
5636 #endif
5637
5638 ; return 0; }
5639 EOF
5640 if { (eval echo configure:5641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5641   rm -rf conftest*
5642   eval "ac_cv_func_$ac_func=yes"
5643 else
5644   echo "configure: failed program was:" >&5
5645   cat conftest.$ac_ext >&5
5646   rm -rf conftest*
5647   eval "ac_cv_func_$ac_func=no"
5648 fi
5649 rm -f conftest*
5650 fi
5651
5652 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5653   echo "$ac_t""yes" 1>&6
5654     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5655   cat >> confdefs.h <<EOF
5656 #define $ac_tr_func 1
5657 EOF
5658  
5659 else
5660   echo "$ac_t""no" 1>&6
5661 fi
5662 done
5663
5664 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5665 do
5666 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5667 echo "configure:5668: checking for $ac_func" >&5
5668 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5669   echo $ac_n "(cached) $ac_c" 1>&6
5670 else
5671   cat > conftest.$ac_ext <<EOF
5672 #line 5673 "configure"
5673 #include "confdefs.h"
5674 /* System header to define __stub macros and hopefully few prototypes,
5675     which can conflict with char $ac_func(); below.  */
5676 #include <assert.h>
5677 /* Override any gcc2 internal prototype to avoid an error.  */
5678 /* We use char because int might match the return type of a gcc2
5679     builtin and then its argument prototype would still apply.  */
5680 char $ac_func();
5681
5682 int main() {
5683
5684 /* The GNU C library defines this for functions which it implements
5685     to always fail with ENOSYS.  Some functions are actually named
5686     something starting with __ and the normal name is an alias.  */
5687 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5688 choke me
5689 #else
5690 $ac_func();
5691 #endif
5692
5693 ; return 0; }
5694 EOF
5695 if { (eval echo configure:5696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5696   rm -rf conftest*
5697   eval "ac_cv_func_$ac_func=yes"
5698 else
5699   echo "configure: failed program was:" >&5
5700   cat conftest.$ac_ext >&5
5701   rm -rf conftest*
5702   eval "ac_cv_func_$ac_func=no"
5703 fi
5704 rm -f conftest*
5705 fi
5706
5707 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5708   echo "$ac_t""yes" 1>&6
5709     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5710   cat >> confdefs.h <<EOF
5711 #define $ac_tr_func 1
5712 EOF
5713  
5714 else
5715   echo "$ac_t""no" 1>&6
5716 fi
5717 done
5718
5719 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath
5720 do
5721 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5722 echo "configure:5723: checking for $ac_func" >&5
5723 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5724   echo $ac_n "(cached) $ac_c" 1>&6
5725 else
5726   cat > conftest.$ac_ext <<EOF
5727 #line 5728 "configure"
5728 #include "confdefs.h"
5729 /* System header to define __stub macros and hopefully few prototypes,
5730     which can conflict with char $ac_func(); below.  */
5731 #include <assert.h>
5732 /* Override any gcc2 internal prototype to avoid an error.  */
5733 /* We use char because int might match the return type of a gcc2
5734     builtin and then its argument prototype would still apply.  */
5735 char $ac_func();
5736
5737 int main() {
5738
5739 /* The GNU C library defines this for functions which it implements
5740     to always fail with ENOSYS.  Some functions are actually named
5741     something starting with __ and the normal name is an alias.  */
5742 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5743 choke me
5744 #else
5745 $ac_func();
5746 #endif
5747
5748 ; return 0; }
5749 EOF
5750 if { (eval echo configure:5751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5751   rm -rf conftest*
5752   eval "ac_cv_func_$ac_func=yes"
5753 else
5754   echo "configure: failed program was:" >&5
5755   cat conftest.$ac_ext >&5
5756   rm -rf conftest*
5757   eval "ac_cv_func_$ac_func=no"
5758 fi
5759 rm -f conftest*
5760 fi
5761
5762 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5763   echo "$ac_t""yes" 1>&6
5764     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5765   cat >> confdefs.h <<EOF
5766 #define $ac_tr_func 1
5767 EOF
5768  
5769 else
5770   echo "$ac_t""no" 1>&6
5771 fi
5772 done
5773
5774 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5775 do
5776 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5777 echo "configure:5778: checking for $ac_func" >&5
5778 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5779   echo $ac_n "(cached) $ac_c" 1>&6
5780 else
5781   cat > conftest.$ac_ext <<EOF
5782 #line 5783 "configure"
5783 #include "confdefs.h"
5784 /* System header to define __stub macros and hopefully few prototypes,
5785     which can conflict with char $ac_func(); below.  */
5786 #include <assert.h>
5787 /* Override any gcc2 internal prototype to avoid an error.  */
5788 /* We use char because int might match the return type of a gcc2
5789     builtin and then its argument prototype would still apply.  */
5790 char $ac_func();
5791
5792 int main() {
5793
5794 /* The GNU C library defines this for functions which it implements
5795     to always fail with ENOSYS.  Some functions are actually named
5796     something starting with __ and the normal name is an alias.  */
5797 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5798 choke me
5799 #else
5800 $ac_func();
5801 #endif
5802
5803 ; return 0; }
5804 EOF
5805 if { (eval echo configure:5806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5806   rm -rf conftest*
5807   eval "ac_cv_func_$ac_func=yes"
5808 else
5809   echo "configure: failed program was:" >&5
5810   cat conftest.$ac_ext >&5
5811   rm -rf conftest*
5812   eval "ac_cv_func_$ac_func=no"
5813 fi
5814 rm -f conftest*
5815 fi
5816
5817 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5818   echo "$ac_t""yes" 1>&6
5819     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5820   cat >> confdefs.h <<EOF
5821 #define $ac_tr_func 1
5822 EOF
5823  
5824 else
5825   echo "$ac_t""no" 1>&6
5826 fi
5827 done
5828
5829 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5830 do
5831 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5832 echo "configure:5833: checking for $ac_func" >&5
5833 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5834   echo $ac_n "(cached) $ac_c" 1>&6
5835 else
5836   cat > conftest.$ac_ext <<EOF
5837 #line 5838 "configure"
5838 #include "confdefs.h"
5839 /* System header to define __stub macros and hopefully few prototypes,
5840     which can conflict with char $ac_func(); below.  */
5841 #include <assert.h>
5842 /* Override any gcc2 internal prototype to avoid an error.  */
5843 /* We use char because int might match the return type of a gcc2
5844     builtin and then its argument prototype would still apply.  */
5845 char $ac_func();
5846
5847 int main() {
5848
5849 /* The GNU C library defines this for functions which it implements
5850     to always fail with ENOSYS.  Some functions are actually named
5851     something starting with __ and the normal name is an alias.  */
5852 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5853 choke me
5854 #else
5855 $ac_func();
5856 #endif
5857
5858 ; return 0; }
5859 EOF
5860 if { (eval echo configure:5861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5861   rm -rf conftest*
5862   eval "ac_cv_func_$ac_func=yes"
5863 else
5864   echo "configure: failed program was:" >&5
5865   cat conftest.$ac_ext >&5
5866   rm -rf conftest*
5867   eval "ac_cv_func_$ac_func=no"
5868 fi
5869 rm -f conftest*
5870 fi
5871
5872 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5873   echo "$ac_t""yes" 1>&6
5874     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5875   cat >> confdefs.h <<EOF
5876 #define $ac_tr_func 1
5877 EOF
5878  
5879 else
5880   echo "$ac_t""no" 1>&6
5881 fi
5882 done
5883
5884 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5885 do
5886 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5887 echo "configure:5888: checking for $ac_func" >&5
5888 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5889   echo $ac_n "(cached) $ac_c" 1>&6
5890 else
5891   cat > conftest.$ac_ext <<EOF
5892 #line 5893 "configure"
5893 #include "confdefs.h"
5894 /* System header to define __stub macros and hopefully few prototypes,
5895     which can conflict with char $ac_func(); below.  */
5896 #include <assert.h>
5897 /* Override any gcc2 internal prototype to avoid an error.  */
5898 /* We use char because int might match the return type of a gcc2
5899     builtin and then its argument prototype would still apply.  */
5900 char $ac_func();
5901
5902 int main() {
5903
5904 /* The GNU C library defines this for functions which it implements
5905     to always fail with ENOSYS.  Some functions are actually named
5906     something starting with __ and the normal name is an alias.  */
5907 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5908 choke me
5909 #else
5910 $ac_func();
5911 #endif
5912
5913 ; return 0; }
5914 EOF
5915 if { (eval echo configure:5916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5916   rm -rf conftest*
5917   eval "ac_cv_func_$ac_func=yes"
5918 else
5919   echo "configure: failed program was:" >&5
5920   cat conftest.$ac_ext >&5
5921   rm -rf conftest*
5922   eval "ac_cv_func_$ac_func=no"
5923 fi
5924 rm -f conftest*
5925 fi
5926
5927 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5928   echo "$ac_t""yes" 1>&6
5929     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5930   cat >> confdefs.h <<EOF
5931 #define $ac_tr_func 1
5932 EOF
5933  
5934 else
5935   echo "$ac_t""no" 1>&6
5936 fi
5937 done
5938
5939 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5940 do
5941 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5942 echo "configure:5943: checking for $ac_func" >&5
5943 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5944   echo $ac_n "(cached) $ac_c" 1>&6
5945 else
5946   cat > conftest.$ac_ext <<EOF
5947 #line 5948 "configure"
5948 #include "confdefs.h"
5949 /* System header to define __stub macros and hopefully few prototypes,
5950     which can conflict with char $ac_func(); below.  */
5951 #include <assert.h>
5952 /* Override any gcc2 internal prototype to avoid an error.  */
5953 /* We use char because int might match the return type of a gcc2
5954     builtin and then its argument prototype would still apply.  */
5955 char $ac_func();
5956
5957 int main() {
5958
5959 /* The GNU C library defines this for functions which it implements
5960     to always fail with ENOSYS.  Some functions are actually named
5961     something starting with __ and the normal name is an alias.  */
5962 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5963 choke me
5964 #else
5965 $ac_func();
5966 #endif
5967
5968 ; return 0; }
5969 EOF
5970 if { (eval echo configure:5971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5971   rm -rf conftest*
5972   eval "ac_cv_func_$ac_func=yes"
5973 else
5974   echo "configure: failed program was:" >&5
5975   cat conftest.$ac_ext >&5
5976   rm -rf conftest*
5977   eval "ac_cv_func_$ac_func=no"
5978 fi
5979 rm -f conftest*
5980 fi
5981
5982 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5983   echo "$ac_t""yes" 1>&6
5984     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5985   cat >> confdefs.h <<EOF
5986 #define $ac_tr_func 1
5987 EOF
5988  
5989 else
5990   echo "$ac_t""no" 1>&6
5991 fi
5992 done
5993
5994 for ac_func in syslog vsyslog
5995 do
5996 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5997 echo "configure:5998: checking for $ac_func" >&5
5998 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5999   echo $ac_n "(cached) $ac_c" 1>&6
6000 else
6001   cat > conftest.$ac_ext <<EOF
6002 #line 6003 "configure"
6003 #include "confdefs.h"
6004 /* System header to define __stub macros and hopefully few prototypes,
6005     which can conflict with char $ac_func(); below.  */
6006 #include <assert.h>
6007 /* Override any gcc2 internal prototype to avoid an error.  */
6008 /* We use char because int might match the return type of a gcc2
6009     builtin and then its argument prototype would still apply.  */
6010 char $ac_func();
6011
6012 int main() {
6013
6014 /* The GNU C library defines this for functions which it implements
6015     to always fail with ENOSYS.  Some functions are actually named
6016     something starting with __ and the normal name is an alias.  */
6017 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6018 choke me
6019 #else
6020 $ac_func();
6021 #endif
6022
6023 ; return 0; }
6024 EOF
6025 if { (eval echo configure:6026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6026   rm -rf conftest*
6027   eval "ac_cv_func_$ac_func=yes"
6028 else
6029   echo "configure: failed program was:" >&5
6030   cat conftest.$ac_ext >&5
6031   rm -rf conftest*
6032   eval "ac_cv_func_$ac_func=no"
6033 fi
6034 rm -f conftest*
6035 fi
6036
6037 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6038   echo "$ac_t""yes" 1>&6
6039     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6040   cat >> confdefs.h <<EOF
6041 #define $ac_tr_func 1
6042 EOF
6043  
6044 else
6045   echo "$ac_t""no" 1>&6
6046 fi
6047 done
6048
6049 # setbuffer is needed for smbtorture
6050 for ac_func in setbuffer
6051 do
6052 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6053 echo "configure:6054: checking for $ac_func" >&5
6054 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6055   echo $ac_n "(cached) $ac_c" 1>&6
6056 else
6057   cat > conftest.$ac_ext <<EOF
6058 #line 6059 "configure"
6059 #include "confdefs.h"
6060 /* System header to define __stub macros and hopefully few prototypes,
6061     which can conflict with char $ac_func(); below.  */
6062 #include <assert.h>
6063 /* Override any gcc2 internal prototype to avoid an error.  */
6064 /* We use char because int might match the return type of a gcc2
6065     builtin and then its argument prototype would still apply.  */
6066 char $ac_func();
6067
6068 int main() {
6069
6070 /* The GNU C library defines this for functions which it implements
6071     to always fail with ENOSYS.  Some functions are actually named
6072     something starting with __ and the normal name is an alias.  */
6073 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6074 choke me
6075 #else
6076 $ac_func();
6077 #endif
6078
6079 ; return 0; }
6080 EOF
6081 if { (eval echo configure:6082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6082   rm -rf conftest*
6083   eval "ac_cv_func_$ac_func=yes"
6084 else
6085   echo "configure: failed program was:" >&5
6086   cat conftest.$ac_ext >&5
6087   rm -rf conftest*
6088   eval "ac_cv_func_$ac_func=no"
6089 fi
6090 rm -f conftest*
6091 fi
6092
6093 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6094   echo "$ac_t""yes" 1>&6
6095     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6096   cat >> confdefs.h <<EOF
6097 #define $ac_tr_func 1
6098 EOF
6099  
6100 else
6101   echo "$ac_t""no" 1>&6
6102 fi
6103 done
6104
6105
6106 # syscall() is needed for smbwrapper.
6107 for ac_func in syscall
6108 do
6109 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6110 echo "configure:6111: checking for $ac_func" >&5
6111 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6112   echo $ac_n "(cached) $ac_c" 1>&6
6113 else
6114   cat > conftest.$ac_ext <<EOF
6115 #line 6116 "configure"
6116 #include "confdefs.h"
6117 /* System header to define __stub macros and hopefully few prototypes,
6118     which can conflict with char $ac_func(); below.  */
6119 #include <assert.h>
6120 /* Override any gcc2 internal prototype to avoid an error.  */
6121 /* We use char because int might match the return type of a gcc2
6122     builtin and then its argument prototype would still apply.  */
6123 char $ac_func();
6124
6125 int main() {
6126
6127 /* The GNU C library defines this for functions which it implements
6128     to always fail with ENOSYS.  Some functions are actually named
6129     something starting with __ and the normal name is an alias.  */
6130 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6131 choke me
6132 #else
6133 $ac_func();
6134 #endif
6135
6136 ; return 0; }
6137 EOF
6138 if { (eval echo configure:6139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6139   rm -rf conftest*
6140   eval "ac_cv_func_$ac_func=yes"
6141 else
6142   echo "configure: failed program was:" >&5
6143   cat conftest.$ac_ext >&5
6144   rm -rf conftest*
6145   eval "ac_cv_func_$ac_func=no"
6146 fi
6147 rm -f conftest*
6148 fi
6149
6150 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6151   echo "$ac_t""yes" 1>&6
6152     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6153   cat >> confdefs.h <<EOF
6154 #define $ac_tr_func 1
6155 EOF
6156  
6157 else
6158   echo "$ac_t""no" 1>&6
6159 fi
6160 done
6161
6162
6163 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
6164 do
6165 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6166 echo "configure:6167: checking for $ac_func" >&5
6167 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6168   echo $ac_n "(cached) $ac_c" 1>&6
6169 else
6170   cat > conftest.$ac_ext <<EOF
6171 #line 6172 "configure"
6172 #include "confdefs.h"
6173 /* System header to define __stub macros and hopefully few prototypes,
6174     which can conflict with char $ac_func(); below.  */
6175 #include <assert.h>
6176 /* Override any gcc2 internal prototype to avoid an error.  */
6177 /* We use char because int might match the return type of a gcc2
6178     builtin and then its argument prototype would still apply.  */
6179 char $ac_func();
6180
6181 int main() {
6182
6183 /* The GNU C library defines this for functions which it implements
6184     to always fail with ENOSYS.  Some functions are actually named
6185     something starting with __ and the normal name is an alias.  */
6186 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6187 choke me
6188 #else
6189 $ac_func();
6190 #endif
6191
6192 ; return 0; }
6193 EOF
6194 if { (eval echo configure:6195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6195   rm -rf conftest*
6196   eval "ac_cv_func_$ac_func=yes"
6197 else
6198   echo "configure: failed program was:" >&5
6199   cat conftest.$ac_ext >&5
6200   rm -rf conftest*
6201   eval "ac_cv_func_$ac_func=no"
6202 fi
6203 rm -f conftest*
6204 fi
6205
6206 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6207   echo "$ac_t""yes" 1>&6
6208     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6209   cat >> confdefs.h <<EOF
6210 #define $ac_tr_func 1
6211 EOF
6212  
6213 else
6214   echo "$ac_t""no" 1>&6
6215 fi
6216 done
6217
6218 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
6219 do
6220 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6221 echo "configure:6222: checking for $ac_func" >&5
6222 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6223   echo $ac_n "(cached) $ac_c" 1>&6
6224 else
6225   cat > conftest.$ac_ext <<EOF
6226 #line 6227 "configure"
6227 #include "confdefs.h"
6228 /* System header to define __stub macros and hopefully few prototypes,
6229     which can conflict with char $ac_func(); below.  */
6230 #include <assert.h>
6231 /* Override any gcc2 internal prototype to avoid an error.  */
6232 /* We use char because int might match the return type of a gcc2
6233     builtin and then its argument prototype would still apply.  */
6234 char $ac_func();
6235
6236 int main() {
6237
6238 /* The GNU C library defines this for functions which it implements
6239     to always fail with ENOSYS.  Some functions are actually named
6240     something starting with __ and the normal name is an alias.  */
6241 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6242 choke me
6243 #else
6244 $ac_func();
6245 #endif
6246
6247 ; return 0; }
6248 EOF
6249 if { (eval echo configure:6250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6250   rm -rf conftest*
6251   eval "ac_cv_func_$ac_func=yes"
6252 else
6253   echo "configure: failed program was:" >&5
6254   cat conftest.$ac_ext >&5
6255   rm -rf conftest*
6256   eval "ac_cv_func_$ac_func=no"
6257 fi
6258 rm -f conftest*
6259 fi
6260
6261 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6262   echo "$ac_t""yes" 1>&6
6263     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6264   cat >> confdefs.h <<EOF
6265 #define $ac_tr_func 1
6266 EOF
6267  
6268 else
6269   echo "$ac_t""no" 1>&6
6270 fi
6271 done
6272
6273 for ac_func in __getcwd _getcwd
6274 do
6275 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6276 echo "configure:6277: checking for $ac_func" >&5
6277 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6278   echo $ac_n "(cached) $ac_c" 1>&6
6279 else
6280   cat > conftest.$ac_ext <<EOF
6281 #line 6282 "configure"
6282 #include "confdefs.h"
6283 /* System header to define __stub macros and hopefully few prototypes,
6284     which can conflict with char $ac_func(); below.  */
6285 #include <assert.h>
6286 /* Override any gcc2 internal prototype to avoid an error.  */
6287 /* We use char because int might match the return type of a gcc2
6288     builtin and then its argument prototype would still apply.  */
6289 char $ac_func();
6290
6291 int main() {
6292
6293 /* The GNU C library defines this for functions which it implements
6294     to always fail with ENOSYS.  Some functions are actually named
6295     something starting with __ and the normal name is an alias.  */
6296 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6297 choke me
6298 #else
6299 $ac_func();
6300 #endif
6301
6302 ; return 0; }
6303 EOF
6304 if { (eval echo configure:6305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6305   rm -rf conftest*
6306   eval "ac_cv_func_$ac_func=yes"
6307 else
6308   echo "configure: failed program was:" >&5
6309   cat conftest.$ac_ext >&5
6310   rm -rf conftest*
6311   eval "ac_cv_func_$ac_func=no"
6312 fi
6313 rm -f conftest*
6314 fi
6315
6316 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6317   echo "$ac_t""yes" 1>&6
6318     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6319   cat >> confdefs.h <<EOF
6320 #define $ac_tr_func 1
6321 EOF
6322  
6323 else
6324   echo "$ac_t""no" 1>&6
6325 fi
6326 done
6327
6328 for ac_func in __xstat __fxstat __lxstat
6329 do
6330 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6331 echo "configure:6332: checking for $ac_func" >&5
6332 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6333   echo $ac_n "(cached) $ac_c" 1>&6
6334 else
6335   cat > conftest.$ac_ext <<EOF
6336 #line 6337 "configure"
6337 #include "confdefs.h"
6338 /* System header to define __stub macros and hopefully few prototypes,
6339     which can conflict with char $ac_func(); below.  */
6340 #include <assert.h>
6341 /* Override any gcc2 internal prototype to avoid an error.  */
6342 /* We use char because int might match the return type of a gcc2
6343     builtin and then its argument prototype would still apply.  */
6344 char $ac_func();
6345
6346 int main() {
6347
6348 /* The GNU C library defines this for functions which it implements
6349     to always fail with ENOSYS.  Some functions are actually named
6350     something starting with __ and the normal name is an alias.  */
6351 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6352 choke me
6353 #else
6354 $ac_func();
6355 #endif
6356
6357 ; return 0; }
6358 EOF
6359 if { (eval echo configure:6360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6360   rm -rf conftest*
6361   eval "ac_cv_func_$ac_func=yes"
6362 else
6363   echo "configure: failed program was:" >&5
6364   cat conftest.$ac_ext >&5
6365   rm -rf conftest*
6366   eval "ac_cv_func_$ac_func=no"
6367 fi
6368 rm -f conftest*
6369 fi
6370
6371 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6372   echo "$ac_t""yes" 1>&6
6373     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6374   cat >> confdefs.h <<EOF
6375 #define $ac_tr_func 1
6376 EOF
6377  
6378 else
6379   echo "$ac_t""no" 1>&6
6380 fi
6381 done
6382
6383 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6384 do
6385 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6386 echo "configure:6387: checking for $ac_func" >&5
6387 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6388   echo $ac_n "(cached) $ac_c" 1>&6
6389 else
6390   cat > conftest.$ac_ext <<EOF
6391 #line 6392 "configure"
6392 #include "confdefs.h"
6393 /* System header to define __stub macros and hopefully few prototypes,
6394     which can conflict with char $ac_func(); below.  */
6395 #include <assert.h>
6396 /* Override any gcc2 internal prototype to avoid an error.  */
6397 /* We use char because int might match the return type of a gcc2
6398     builtin and then its argument prototype would still apply.  */
6399 char $ac_func();
6400
6401 int main() {
6402
6403 /* The GNU C library defines this for functions which it implements
6404     to always fail with ENOSYS.  Some functions are actually named
6405     something starting with __ and the normal name is an alias.  */
6406 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6407 choke me
6408 #else
6409 $ac_func();
6410 #endif
6411
6412 ; return 0; }
6413 EOF
6414 if { (eval echo configure:6415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6415   rm -rf conftest*
6416   eval "ac_cv_func_$ac_func=yes"
6417 else
6418   echo "configure: failed program was:" >&5
6419   cat conftest.$ac_ext >&5
6420   rm -rf conftest*
6421   eval "ac_cv_func_$ac_func=no"
6422 fi
6423 rm -f conftest*
6424 fi
6425
6426 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6427   echo "$ac_t""yes" 1>&6
6428     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6429   cat >> confdefs.h <<EOF
6430 #define $ac_tr_func 1
6431 EOF
6432  
6433 else
6434   echo "$ac_t""no" 1>&6
6435 fi
6436 done
6437
6438 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6439 do
6440 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6441 echo "configure:6442: checking for $ac_func" >&5
6442 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6443   echo $ac_n "(cached) $ac_c" 1>&6
6444 else
6445   cat > conftest.$ac_ext <<EOF
6446 #line 6447 "configure"
6447 #include "confdefs.h"
6448 /* System header to define __stub macros and hopefully few prototypes,
6449     which can conflict with char $ac_func(); below.  */
6450 #include <assert.h>
6451 /* Override any gcc2 internal prototype to avoid an error.  */
6452 /* We use char because int might match the return type of a gcc2
6453     builtin and then its argument prototype would still apply.  */
6454 char $ac_func();
6455
6456 int main() {
6457
6458 /* The GNU C library defines this for functions which it implements
6459     to always fail with ENOSYS.  Some functions are actually named
6460     something starting with __ and the normal name is an alias.  */
6461 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6462 choke me
6463 #else
6464 $ac_func();
6465 #endif
6466
6467 ; return 0; }
6468 EOF
6469 if { (eval echo configure:6470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6470   rm -rf conftest*
6471   eval "ac_cv_func_$ac_func=yes"
6472 else
6473   echo "configure: failed program was:" >&5
6474   cat conftest.$ac_ext >&5
6475   rm -rf conftest*
6476   eval "ac_cv_func_$ac_func=no"
6477 fi
6478 rm -f conftest*
6479 fi
6480
6481 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6482   echo "$ac_t""yes" 1>&6
6483     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6484   cat >> confdefs.h <<EOF
6485 #define $ac_tr_func 1
6486 EOF
6487  
6488 else
6489   echo "$ac_t""no" 1>&6
6490 fi
6491 done
6492
6493 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6494 do
6495 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6496 echo "configure:6497: checking for $ac_func" >&5
6497 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6498   echo $ac_n "(cached) $ac_c" 1>&6
6499 else
6500   cat > conftest.$ac_ext <<EOF
6501 #line 6502 "configure"
6502 #include "confdefs.h"
6503 /* System header to define __stub macros and hopefully few prototypes,
6504     which can conflict with char $ac_func(); below.  */
6505 #include <assert.h>
6506 /* Override any gcc2 internal prototype to avoid an error.  */
6507 /* We use char because int might match the return type of a gcc2
6508     builtin and then its argument prototype would still apply.  */
6509 char $ac_func();
6510
6511 int main() {
6512
6513 /* The GNU C library defines this for functions which it implements
6514     to always fail with ENOSYS.  Some functions are actually named
6515     something starting with __ and the normal name is an alias.  */
6516 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6517 choke me
6518 #else
6519 $ac_func();
6520 #endif
6521
6522 ; return 0; }
6523 EOF
6524 if { (eval echo configure:6525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6525   rm -rf conftest*
6526   eval "ac_cv_func_$ac_func=yes"
6527 else
6528   echo "configure: failed program was:" >&5
6529   cat conftest.$ac_ext >&5
6530   rm -rf conftest*
6531   eval "ac_cv_func_$ac_func=no"
6532 fi
6533 rm -f conftest*
6534 fi
6535
6536 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6537   echo "$ac_t""yes" 1>&6
6538     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6539   cat >> confdefs.h <<EOF
6540 #define $ac_tr_func 1
6541 EOF
6542  
6543 else
6544   echo "$ac_t""no" 1>&6
6545 fi
6546 done
6547
6548 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6549 do
6550 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6551 echo "configure:6552: checking for $ac_func" >&5
6552 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6553   echo $ac_n "(cached) $ac_c" 1>&6
6554 else
6555   cat > conftest.$ac_ext <<EOF
6556 #line 6557 "configure"
6557 #include "confdefs.h"
6558 /* System header to define __stub macros and hopefully few prototypes,
6559     which can conflict with char $ac_func(); below.  */
6560 #include <assert.h>
6561 /* Override any gcc2 internal prototype to avoid an error.  */
6562 /* We use char because int might match the return type of a gcc2
6563     builtin and then its argument prototype would still apply.  */
6564 char $ac_func();
6565
6566 int main() {
6567
6568 /* The GNU C library defines this for functions which it implements
6569     to always fail with ENOSYS.  Some functions are actually named
6570     something starting with __ and the normal name is an alias.  */
6571 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6572 choke me
6573 #else
6574 $ac_func();
6575 #endif
6576
6577 ; return 0; }
6578 EOF
6579 if { (eval echo configure:6580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6580   rm -rf conftest*
6581   eval "ac_cv_func_$ac_func=yes"
6582 else
6583   echo "configure: failed program was:" >&5
6584   cat conftest.$ac_ext >&5
6585   rm -rf conftest*
6586   eval "ac_cv_func_$ac_func=no"
6587 fi
6588 rm -f conftest*
6589 fi
6590
6591 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6592   echo "$ac_t""yes" 1>&6
6593     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6594   cat >> confdefs.h <<EOF
6595 #define $ac_tr_func 1
6596 EOF
6597  
6598 else
6599   echo "$ac_t""no" 1>&6
6600 fi
6601 done
6602
6603 for ac_func in _write __write _fork __fork
6604 do
6605 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6606 echo "configure:6607: checking for $ac_func" >&5
6607 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6608   echo $ac_n "(cached) $ac_c" 1>&6
6609 else
6610   cat > conftest.$ac_ext <<EOF
6611 #line 6612 "configure"
6612 #include "confdefs.h"
6613 /* System header to define __stub macros and hopefully few prototypes,
6614     which can conflict with char $ac_func(); below.  */
6615 #include <assert.h>
6616 /* Override any gcc2 internal prototype to avoid an error.  */
6617 /* We use char because int might match the return type of a gcc2
6618     builtin and then its argument prototype would still apply.  */
6619 char $ac_func();
6620
6621 int main() {
6622
6623 /* The GNU C library defines this for functions which it implements
6624     to always fail with ENOSYS.  Some functions are actually named
6625     something starting with __ and the normal name is an alias.  */
6626 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6627 choke me
6628 #else
6629 $ac_func();
6630 #endif
6631
6632 ; return 0; }
6633 EOF
6634 if { (eval echo configure:6635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6635   rm -rf conftest*
6636   eval "ac_cv_func_$ac_func=yes"
6637 else
6638   echo "configure: failed program was:" >&5
6639   cat conftest.$ac_ext >&5
6640   rm -rf conftest*
6641   eval "ac_cv_func_$ac_func=no"
6642 fi
6643 rm -f conftest*
6644 fi
6645
6646 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6647   echo "$ac_t""yes" 1>&6
6648     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6649   cat >> confdefs.h <<EOF
6650 #define $ac_tr_func 1
6651 EOF
6652  
6653 else
6654   echo "$ac_t""no" 1>&6
6655 fi
6656 done
6657
6658 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6659 do
6660 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6661 echo "configure:6662: checking for $ac_func" >&5
6662 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6663   echo $ac_n "(cached) $ac_c" 1>&6
6664 else
6665   cat > conftest.$ac_ext <<EOF
6666 #line 6667 "configure"
6667 #include "confdefs.h"
6668 /* System header to define __stub macros and hopefully few prototypes,
6669     which can conflict with char $ac_func(); below.  */
6670 #include <assert.h>
6671 /* Override any gcc2 internal prototype to avoid an error.  */
6672 /* We use char because int might match the return type of a gcc2
6673     builtin and then its argument prototype would still apply.  */
6674 char $ac_func();
6675
6676 int main() {
6677
6678 /* The GNU C library defines this for functions which it implements
6679     to always fail with ENOSYS.  Some functions are actually named
6680     something starting with __ and the normal name is an alias.  */
6681 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6682 choke me
6683 #else
6684 $ac_func();
6685 #endif
6686
6687 ; return 0; }
6688 EOF
6689 if { (eval echo configure:6690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6690   rm -rf conftest*
6691   eval "ac_cv_func_$ac_func=yes"
6692 else
6693   echo "configure: failed program was:" >&5
6694   cat conftest.$ac_ext >&5
6695   rm -rf conftest*
6696   eval "ac_cv_func_$ac_func=no"
6697 fi
6698 rm -f conftest*
6699 fi
6700
6701 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6702   echo "$ac_t""yes" 1>&6
6703     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6704   cat >> confdefs.h <<EOF
6705 #define $ac_tr_func 1
6706 EOF
6707  
6708 else
6709   echo "$ac_t""no" 1>&6
6710 fi
6711 done
6712
6713 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6714 do
6715 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6716 echo "configure:6717: checking for $ac_func" >&5
6717 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6718   echo $ac_n "(cached) $ac_c" 1>&6
6719 else
6720   cat > conftest.$ac_ext <<EOF
6721 #line 6722 "configure"
6722 #include "confdefs.h"
6723 /* System header to define __stub macros and hopefully few prototypes,
6724     which can conflict with char $ac_func(); below.  */
6725 #include <assert.h>
6726 /* Override any gcc2 internal prototype to avoid an error.  */
6727 /* We use char because int might match the return type of a gcc2
6728     builtin and then its argument prototype would still apply.  */
6729 char $ac_func();
6730
6731 int main() {
6732
6733 /* The GNU C library defines this for functions which it implements
6734     to always fail with ENOSYS.  Some functions are actually named
6735     something starting with __ and the normal name is an alias.  */
6736 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6737 choke me
6738 #else
6739 $ac_func();
6740 #endif
6741
6742 ; return 0; }
6743 EOF
6744 if { (eval echo configure:6745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6745   rm -rf conftest*
6746   eval "ac_cv_func_$ac_func=yes"
6747 else
6748   echo "configure: failed program was:" >&5
6749   cat conftest.$ac_ext >&5
6750   rm -rf conftest*
6751   eval "ac_cv_func_$ac_func=no"
6752 fi
6753 rm -f conftest*
6754 fi
6755
6756 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6757   echo "$ac_t""yes" 1>&6
6758     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6759   cat >> confdefs.h <<EOF
6760 #define $ac_tr_func 1
6761 EOF
6762  
6763 else
6764   echo "$ac_t""no" 1>&6
6765 fi
6766 done
6767
6768 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6769 do
6770 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6771 echo "configure:6772: checking for $ac_func" >&5
6772 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6773   echo $ac_n "(cached) $ac_c" 1>&6
6774 else
6775   cat > conftest.$ac_ext <<EOF
6776 #line 6777 "configure"
6777 #include "confdefs.h"
6778 /* System header to define __stub macros and hopefully few prototypes,
6779     which can conflict with char $ac_func(); below.  */
6780 #include <assert.h>
6781 /* Override any gcc2 internal prototype to avoid an error.  */
6782 /* We use char because int might match the return type of a gcc2
6783     builtin and then its argument prototype would still apply.  */
6784 char $ac_func();
6785
6786 int main() {
6787
6788 /* The GNU C library defines this for functions which it implements
6789     to always fail with ENOSYS.  Some functions are actually named
6790     something starting with __ and the normal name is an alias.  */
6791 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6792 choke me
6793 #else
6794 $ac_func();
6795 #endif
6796
6797 ; return 0; }
6798 EOF
6799 if { (eval echo configure:6800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6800   rm -rf conftest*
6801   eval "ac_cv_func_$ac_func=yes"
6802 else
6803   echo "configure: failed program was:" >&5
6804   cat conftest.$ac_ext >&5
6805   rm -rf conftest*
6806   eval "ac_cv_func_$ac_func=no"
6807 fi
6808 rm -f conftest*
6809 fi
6810
6811 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6812   echo "$ac_t""yes" 1>&6
6813     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6814   cat >> confdefs.h <<EOF
6815 #define $ac_tr_func 1
6816 EOF
6817  
6818 else
6819   echo "$ac_t""no" 1>&6
6820 fi
6821 done
6822
6823 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6824 do
6825 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6826 echo "configure:6827: checking for $ac_func" >&5
6827 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6828   echo $ac_n "(cached) $ac_c" 1>&6
6829 else
6830   cat > conftest.$ac_ext <<EOF
6831 #line 6832 "configure"
6832 #include "confdefs.h"
6833 /* System header to define __stub macros and hopefully few prototypes,
6834     which can conflict with char $ac_func(); below.  */
6835 #include <assert.h>
6836 /* Override any gcc2 internal prototype to avoid an error.  */
6837 /* We use char because int might match the return type of a gcc2
6838     builtin and then its argument prototype would still apply.  */
6839 char $ac_func();
6840
6841 int main() {
6842
6843 /* The GNU C library defines this for functions which it implements
6844     to always fail with ENOSYS.  Some functions are actually named
6845     something starting with __ and the normal name is an alias.  */
6846 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6847 choke me
6848 #else
6849 $ac_func();
6850 #endif
6851
6852 ; return 0; }
6853 EOF
6854 if { (eval echo configure:6855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6855   rm -rf conftest*
6856   eval "ac_cv_func_$ac_func=yes"
6857 else
6858   echo "configure: failed program was:" >&5
6859   cat conftest.$ac_ext >&5
6860   rm -rf conftest*
6861   eval "ac_cv_func_$ac_func=no"
6862 fi
6863 rm -f conftest*
6864 fi
6865
6866 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6867   echo "$ac_t""yes" 1>&6
6868     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6869   cat >> confdefs.h <<EOF
6870 #define $ac_tr_func 1
6871 EOF
6872  
6873 else
6874   echo "$ac_t""no" 1>&6
6875 fi
6876 done
6877
6878 for ac_func in open64 _open64 __open64 creat64
6879 do
6880 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6881 echo "configure:6882: checking for $ac_func" >&5
6882 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6883   echo $ac_n "(cached) $ac_c" 1>&6
6884 else
6885   cat > conftest.$ac_ext <<EOF
6886 #line 6887 "configure"
6887 #include "confdefs.h"
6888 /* System header to define __stub macros and hopefully few prototypes,
6889     which can conflict with char $ac_func(); below.  */
6890 #include <assert.h>
6891 /* Override any gcc2 internal prototype to avoid an error.  */
6892 /* We use char because int might match the return type of a gcc2
6893     builtin and then its argument prototype would still apply.  */
6894 char $ac_func();
6895
6896 int main() {
6897
6898 /* The GNU C library defines this for functions which it implements
6899     to always fail with ENOSYS.  Some functions are actually named
6900     something starting with __ and the normal name is an alias.  */
6901 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6902 choke me
6903 #else
6904 $ac_func();
6905 #endif
6906
6907 ; return 0; }
6908 EOF
6909 if { (eval echo configure:6910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6910   rm -rf conftest*
6911   eval "ac_cv_func_$ac_func=yes"
6912 else
6913   echo "configure: failed program was:" >&5
6914   cat conftest.$ac_ext >&5
6915   rm -rf conftest*
6916   eval "ac_cv_func_$ac_func=no"
6917 fi
6918 rm -f conftest*
6919 fi
6920
6921 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6922   echo "$ac_t""yes" 1>&6
6923     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6924   cat >> confdefs.h <<EOF
6925 #define $ac_tr_func 1
6926 EOF
6927  
6928 else
6929   echo "$ac_t""no" 1>&6
6930 fi
6931 done
6932
6933
6934 #
6935 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6936 #
6937
6938 if test x$ac_cv_func_stat64 = xno ; then
6939   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6940 echo "configure:6941: checking for stat64 in <sys/stat.h>" >&5
6941   cat > conftest.$ac_ext <<EOF
6942 #line 6943 "configure"
6943 #include "confdefs.h"
6944
6945 #if defined(HAVE_UNISTD_H)
6946 #include <unistd.h>
6947 #endif
6948 #include <sys/stat.h>
6949
6950 int main() {
6951 struct stat64 st64; exit(stat64(".",&st64));
6952 ; return 0; }
6953 EOF
6954 if { (eval echo configure:6955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6955   rm -rf conftest*
6956   ac_cv_func_stat64=yes
6957 else
6958   echo "configure: failed program was:" >&5
6959   cat conftest.$ac_ext >&5
6960 fi
6961 rm -f conftest*
6962   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6963   if test x$ac_cv_func_stat64 = xyes ; then
6964     cat >> confdefs.h <<\EOF
6965 #define HAVE_STAT64 1
6966 EOF
6967
6968   fi
6969 fi
6970
6971 if test x$ac_cv_func_lstat64 = xno ; then
6972   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6973 echo "configure:6974: checking for lstat64 in <sys/stat.h>" >&5
6974   cat > conftest.$ac_ext <<EOF
6975 #line 6976 "configure"
6976 #include "confdefs.h"
6977
6978 #if defined(HAVE_UNISTD_H)
6979 #include <unistd.h>
6980 #endif
6981 #include <sys/stat.h>
6982
6983 int main() {
6984 struct stat64 st64; exit(lstat64(".",&st64));
6985 ; return 0; }
6986 EOF
6987 if { (eval echo configure:6988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6988   rm -rf conftest*
6989   ac_cv_func_lstat64=yes
6990 else
6991   echo "configure: failed program was:" >&5
6992   cat conftest.$ac_ext >&5
6993 fi
6994 rm -f conftest*
6995   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6996   if test x$ac_cv_func_lstat64 = xyes ; then
6997     cat >> confdefs.h <<\EOF
6998 #define HAVE_LSTAT64 1
6999 EOF
7000
7001   fi
7002 fi
7003
7004 if test x$ac_cv_func_fstat64 = xno ; then
7005   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
7006 echo "configure:7007: checking for fstat64 in <sys/stat.h>" >&5
7007   cat > conftest.$ac_ext <<EOF
7008 #line 7009 "configure"
7009 #include "confdefs.h"
7010
7011 #if defined(HAVE_UNISTD_H)
7012 #include <unistd.h>
7013 #endif
7014 #include <sys/stat.h>
7015
7016 int main() {
7017 struct stat64 st64; exit(fstat64(0,&st64));
7018 ; return 0; }
7019 EOF
7020 if { (eval echo configure:7021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7021   rm -rf conftest*
7022   ac_cv_func_fstat64=yes
7023 else
7024   echo "configure: failed program was:" >&5
7025   cat conftest.$ac_ext >&5
7026 fi
7027 rm -f conftest*
7028   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
7029   if test x$ac_cv_func_fstat64 = xyes ; then
7030     cat >> confdefs.h <<\EOF
7031 #define HAVE_FSTAT64 1
7032 EOF
7033
7034   fi
7035 fi
7036
7037 #####################################
7038 # we might need the resolv library on some systems
7039 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
7040 echo "configure:7041: checking for dn_expand in -lresolv" >&5
7041 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
7042 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7043   echo $ac_n "(cached) $ac_c" 1>&6
7044 else
7045   ac_save_LIBS="$LIBS"
7046 LIBS="-lresolv  $LIBS"
7047 cat > conftest.$ac_ext <<EOF
7048 #line 7049 "configure"
7049 #include "confdefs.h"
7050 /* Override any gcc2 internal prototype to avoid an error.  */
7051 /* We use char because int might match the return type of a gcc2
7052     builtin and then its argument prototype would still apply.  */
7053 char dn_expand();
7054
7055 int main() {
7056 dn_expand()
7057 ; return 0; }
7058 EOF
7059 if { (eval echo configure:7060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7060   rm -rf conftest*
7061   eval "ac_cv_lib_$ac_lib_var=yes"
7062 else
7063   echo "configure: failed program was:" >&5
7064   cat conftest.$ac_ext >&5
7065   rm -rf conftest*
7066   eval "ac_cv_lib_$ac_lib_var=no"
7067 fi
7068 rm -f conftest*
7069 LIBS="$ac_save_LIBS"
7070
7071 fi
7072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7073   echo "$ac_t""yes" 1>&6
7074     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7075     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7076   cat >> confdefs.h <<EOF
7077 #define $ac_tr_lib 1
7078 EOF
7079
7080   LIBS="-lresolv $LIBS"
7081
7082 else
7083   echo "$ac_t""no" 1>&6
7084 fi
7085
7086
7087 #
7088 # Check for the functions putprpwnam, set_auth_parameters,
7089 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
7090 # Needed for OSF1 and HPUX.
7091 #
7092
7093 case "$LIBS" in
7094   *-lsecurity*) for ac_func in putprpwnam
7095 do
7096 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7097 echo "configure:7098: checking for $ac_func" >&5
7098 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7099   echo $ac_n "(cached) $ac_c" 1>&6
7100 else
7101   cat > conftest.$ac_ext <<EOF
7102 #line 7103 "configure"
7103 #include "confdefs.h"
7104 /* System header to define __stub macros and hopefully few prototypes,
7105     which can conflict with char $ac_func(); below.  */
7106 #include <assert.h>
7107 /* Override any gcc2 internal prototype to avoid an error.  */
7108 /* We use char because int might match the return type of a gcc2
7109     builtin and then its argument prototype would still apply.  */
7110 char $ac_func();
7111
7112 int main() {
7113
7114 /* The GNU C library defines this for functions which it implements
7115     to always fail with ENOSYS.  Some functions are actually named
7116     something starting with __ and the normal name is an alias.  */
7117 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7118 choke me
7119 #else
7120 $ac_func();
7121 #endif
7122
7123 ; return 0; }
7124 EOF
7125 if { (eval echo configure:7126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7126   rm -rf conftest*
7127   eval "ac_cv_func_$ac_func=yes"
7128 else
7129   echo "configure: failed program was:" >&5
7130   cat conftest.$ac_ext >&5
7131   rm -rf conftest*
7132   eval "ac_cv_func_$ac_func=no"
7133 fi
7134 rm -f conftest*
7135 fi
7136
7137 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7138   echo "$ac_t""yes" 1>&6
7139     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7140   cat >> confdefs.h <<EOF
7141 #define $ac_tr_func 1
7142 EOF
7143  
7144 else
7145   echo "$ac_t""no" 1>&6
7146 fi
7147 done
7148  ;;
7149   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
7150 echo "configure:7151: checking for putprpwnam in -lsecurity" >&5
7151 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
7152 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7153   echo $ac_n "(cached) $ac_c" 1>&6
7154 else
7155   ac_save_LIBS="$LIBS"
7156 LIBS="-lsecurity  $LIBS"
7157 cat > conftest.$ac_ext <<EOF
7158 #line 7159 "configure"
7159 #include "confdefs.h"
7160 /* Override any gcc2 internal prototype to avoid an error.  */
7161 /* We use char because int might match the return type of a gcc2
7162     builtin and then its argument prototype would still apply.  */
7163 char putprpwnam();
7164
7165 int main() {
7166 putprpwnam()
7167 ; return 0; }
7168 EOF
7169 if { (eval echo configure:7170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7170   rm -rf conftest*
7171   eval "ac_cv_lib_$ac_lib_var=yes"
7172 else
7173   echo "configure: failed program was:" >&5
7174   cat conftest.$ac_ext >&5
7175   rm -rf conftest*
7176   eval "ac_cv_lib_$ac_lib_var=no"
7177 fi
7178 rm -f conftest*
7179 LIBS="$ac_save_LIBS"
7180
7181 fi
7182 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7183   echo "$ac_t""yes" 1>&6
7184     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7185     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7186   cat >> confdefs.h <<EOF
7187 #define $ac_tr_lib 1
7188 EOF
7189
7190   LIBS="-lsecurity $LIBS"
7191
7192 else
7193   echo "$ac_t""no" 1>&6
7194 fi
7195  
7196      for ac_func in putprpwnam
7197 do
7198 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7199 echo "configure:7200: checking for $ac_func" >&5
7200 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7201   echo $ac_n "(cached) $ac_c" 1>&6
7202 else
7203   cat > conftest.$ac_ext <<EOF
7204 #line 7205 "configure"
7205 #include "confdefs.h"
7206 /* System header to define __stub macros and hopefully few prototypes,
7207     which can conflict with char $ac_func(); below.  */
7208 #include <assert.h>
7209 /* Override any gcc2 internal prototype to avoid an error.  */
7210 /* We use char because int might match the return type of a gcc2
7211     builtin and then its argument prototype would still apply.  */
7212 char $ac_func();
7213
7214 int main() {
7215
7216 /* The GNU C library defines this for functions which it implements
7217     to always fail with ENOSYS.  Some functions are actually named
7218     something starting with __ and the normal name is an alias.  */
7219 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7220 choke me
7221 #else
7222 $ac_func();
7223 #endif
7224
7225 ; return 0; }
7226 EOF
7227 if { (eval echo configure:7228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7228   rm -rf conftest*
7229   eval "ac_cv_func_$ac_func=yes"
7230 else
7231   echo "configure: failed program was:" >&5
7232   cat conftest.$ac_ext >&5
7233   rm -rf conftest*
7234   eval "ac_cv_func_$ac_func=no"
7235 fi
7236 rm -f conftest*
7237 fi
7238
7239 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7240   echo "$ac_t""yes" 1>&6
7241     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7242   cat >> confdefs.h <<EOF
7243 #define $ac_tr_func 1
7244 EOF
7245  
7246 else
7247   echo "$ac_t""no" 1>&6
7248 fi
7249 done
7250
7251   ;;
7252   esac
7253
7254 case "$LIBS" in
7255   *-lsec*) for ac_func in putprpwnam
7256 do
7257 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7258 echo "configure:7259: checking for $ac_func" >&5
7259 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7260   echo $ac_n "(cached) $ac_c" 1>&6
7261 else
7262   cat > conftest.$ac_ext <<EOF
7263 #line 7264 "configure"
7264 #include "confdefs.h"
7265 /* System header to define __stub macros and hopefully few prototypes,
7266     which can conflict with char $ac_func(); below.  */
7267 #include <assert.h>
7268 /* Override any gcc2 internal prototype to avoid an error.  */
7269 /* We use char because int might match the return type of a gcc2
7270     builtin and then its argument prototype would still apply.  */
7271 char $ac_func();
7272
7273 int main() {
7274
7275 /* The GNU C library defines this for functions which it implements
7276     to always fail with ENOSYS.  Some functions are actually named
7277     something starting with __ and the normal name is an alias.  */
7278 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7279 choke me
7280 #else
7281 $ac_func();
7282 #endif
7283
7284 ; return 0; }
7285 EOF
7286 if { (eval echo configure:7287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7287   rm -rf conftest*
7288   eval "ac_cv_func_$ac_func=yes"
7289 else
7290   echo "configure: failed program was:" >&5
7291   cat conftest.$ac_ext >&5
7292   rm -rf conftest*
7293   eval "ac_cv_func_$ac_func=no"
7294 fi
7295 rm -f conftest*
7296 fi
7297
7298 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7299   echo "$ac_t""yes" 1>&6
7300     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7301   cat >> confdefs.h <<EOF
7302 #define $ac_tr_func 1
7303 EOF
7304  
7305 else
7306   echo "$ac_t""no" 1>&6
7307 fi
7308 done
7309  ;;
7310   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
7311 echo "configure:7312: checking for putprpwnam in -lsec" >&5
7312 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
7313 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7314   echo $ac_n "(cached) $ac_c" 1>&6
7315 else
7316   ac_save_LIBS="$LIBS"
7317 LIBS="-lsec  $LIBS"
7318 cat > conftest.$ac_ext <<EOF
7319 #line 7320 "configure"
7320 #include "confdefs.h"
7321 /* Override any gcc2 internal prototype to avoid an error.  */
7322 /* We use char because int might match the return type of a gcc2
7323     builtin and then its argument prototype would still apply.  */
7324 char putprpwnam();
7325
7326 int main() {
7327 putprpwnam()
7328 ; return 0; }
7329 EOF
7330 if { (eval echo configure:7331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7331   rm -rf conftest*
7332   eval "ac_cv_lib_$ac_lib_var=yes"
7333 else
7334   echo "configure: failed program was:" >&5
7335   cat conftest.$ac_ext >&5
7336   rm -rf conftest*
7337   eval "ac_cv_lib_$ac_lib_var=no"
7338 fi
7339 rm -f conftest*
7340 LIBS="$ac_save_LIBS"
7341
7342 fi
7343 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7344   echo "$ac_t""yes" 1>&6
7345     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7346     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7347   cat >> confdefs.h <<EOF
7348 #define $ac_tr_lib 1
7349 EOF
7350
7351   LIBS="-lsec $LIBS"
7352
7353 else
7354   echo "$ac_t""no" 1>&6
7355 fi
7356  
7357      for ac_func in putprpwnam
7358 do
7359 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7360 echo "configure:7361: checking for $ac_func" >&5
7361 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7362   echo $ac_n "(cached) $ac_c" 1>&6
7363 else
7364   cat > conftest.$ac_ext <<EOF
7365 #line 7366 "configure"
7366 #include "confdefs.h"
7367 /* System header to define __stub macros and hopefully few prototypes,
7368     which can conflict with char $ac_func(); below.  */
7369 #include <assert.h>
7370 /* Override any gcc2 internal prototype to avoid an error.  */
7371 /* We use char because int might match the return type of a gcc2
7372     builtin and then its argument prototype would still apply.  */
7373 char $ac_func();
7374
7375 int main() {
7376
7377 /* The GNU C library defines this for functions which it implements
7378     to always fail with ENOSYS.  Some functions are actually named
7379     something starting with __ and the normal name is an alias.  */
7380 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7381 choke me
7382 #else
7383 $ac_func();
7384 #endif
7385
7386 ; return 0; }
7387 EOF
7388 if { (eval echo configure:7389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7389   rm -rf conftest*
7390   eval "ac_cv_func_$ac_func=yes"
7391 else
7392   echo "configure: failed program was:" >&5
7393   cat conftest.$ac_ext >&5
7394   rm -rf conftest*
7395   eval "ac_cv_func_$ac_func=no"
7396 fi
7397 rm -f conftest*
7398 fi
7399
7400 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7401   echo "$ac_t""yes" 1>&6
7402     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7403   cat >> confdefs.h <<EOF
7404 #define $ac_tr_func 1
7405 EOF
7406  
7407 else
7408   echo "$ac_t""no" 1>&6
7409 fi
7410 done
7411
7412   ;;
7413   esac
7414
7415
7416 case "$LIBS" in
7417   *-lsecurity*) for ac_func in set_auth_parameters
7418 do
7419 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7420 echo "configure:7421: checking for $ac_func" >&5
7421 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7422   echo $ac_n "(cached) $ac_c" 1>&6
7423 else
7424   cat > conftest.$ac_ext <<EOF
7425 #line 7426 "configure"
7426 #include "confdefs.h"
7427 /* System header to define __stub macros and hopefully few prototypes,
7428     which can conflict with char $ac_func(); below.  */
7429 #include <assert.h>
7430 /* Override any gcc2 internal prototype to avoid an error.  */
7431 /* We use char because int might match the return type of a gcc2
7432     builtin and then its argument prototype would still apply.  */
7433 char $ac_func();
7434
7435 int main() {
7436
7437 /* The GNU C library defines this for functions which it implements
7438     to always fail with ENOSYS.  Some functions are actually named
7439     something starting with __ and the normal name is an alias.  */
7440 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7441 choke me
7442 #else
7443 $ac_func();
7444 #endif
7445
7446 ; return 0; }
7447 EOF
7448 if { (eval echo configure:7449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7449   rm -rf conftest*
7450   eval "ac_cv_func_$ac_func=yes"
7451 else
7452   echo "configure: failed program was:" >&5
7453   cat conftest.$ac_ext >&5
7454   rm -rf conftest*
7455   eval "ac_cv_func_$ac_func=no"
7456 fi
7457 rm -f conftest*
7458 fi
7459
7460 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7461   echo "$ac_t""yes" 1>&6
7462     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7463   cat >> confdefs.h <<EOF
7464 #define $ac_tr_func 1
7465 EOF
7466  
7467 else
7468   echo "$ac_t""no" 1>&6
7469 fi
7470 done
7471  ;;
7472   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7473 echo "configure:7474: checking for set_auth_parameters in -lsecurity" >&5
7474 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7475 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7476   echo $ac_n "(cached) $ac_c" 1>&6
7477 else
7478   ac_save_LIBS="$LIBS"
7479 LIBS="-lsecurity  $LIBS"
7480 cat > conftest.$ac_ext <<EOF
7481 #line 7482 "configure"
7482 #include "confdefs.h"
7483 /* Override any gcc2 internal prototype to avoid an error.  */
7484 /* We use char because int might match the return type of a gcc2
7485     builtin and then its argument prototype would still apply.  */
7486 char set_auth_parameters();
7487
7488 int main() {
7489 set_auth_parameters()
7490 ; return 0; }
7491 EOF
7492 if { (eval echo configure:7493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7493   rm -rf conftest*
7494   eval "ac_cv_lib_$ac_lib_var=yes"
7495 else
7496   echo "configure: failed program was:" >&5
7497   cat conftest.$ac_ext >&5
7498   rm -rf conftest*
7499   eval "ac_cv_lib_$ac_lib_var=no"
7500 fi
7501 rm -f conftest*
7502 LIBS="$ac_save_LIBS"
7503
7504 fi
7505 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7506   echo "$ac_t""yes" 1>&6
7507     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7508     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7509   cat >> confdefs.h <<EOF
7510 #define $ac_tr_lib 1
7511 EOF
7512
7513   LIBS="-lsecurity $LIBS"
7514
7515 else
7516   echo "$ac_t""no" 1>&6
7517 fi
7518  
7519      for ac_func in set_auth_parameters
7520 do
7521 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7522 echo "configure:7523: checking for $ac_func" >&5
7523 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7524   echo $ac_n "(cached) $ac_c" 1>&6
7525 else
7526   cat > conftest.$ac_ext <<EOF
7527 #line 7528 "configure"
7528 #include "confdefs.h"
7529 /* System header to define __stub macros and hopefully few prototypes,
7530     which can conflict with char $ac_func(); below.  */
7531 #include <assert.h>
7532 /* Override any gcc2 internal prototype to avoid an error.  */
7533 /* We use char because int might match the return type of a gcc2
7534     builtin and then its argument prototype would still apply.  */
7535 char $ac_func();
7536
7537 int main() {
7538
7539 /* The GNU C library defines this for functions which it implements
7540     to always fail with ENOSYS.  Some functions are actually named
7541     something starting with __ and the normal name is an alias.  */
7542 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7543 choke me
7544 #else
7545 $ac_func();
7546 #endif
7547
7548 ; return 0; }
7549 EOF
7550 if { (eval echo configure:7551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7551   rm -rf conftest*
7552   eval "ac_cv_func_$ac_func=yes"
7553 else
7554   echo "configure: failed program was:" >&5
7555   cat conftest.$ac_ext >&5
7556   rm -rf conftest*
7557   eval "ac_cv_func_$ac_func=no"
7558 fi
7559 rm -f conftest*
7560 fi
7561
7562 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7563   echo "$ac_t""yes" 1>&6
7564     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7565   cat >> confdefs.h <<EOF
7566 #define $ac_tr_func 1
7567 EOF
7568  
7569 else
7570   echo "$ac_t""no" 1>&6
7571 fi
7572 done
7573
7574   ;;
7575   esac
7576
7577 case "$LIBS" in
7578   *-lsec*) for ac_func in set_auth_parameters
7579 do
7580 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7581 echo "configure:7582: checking for $ac_func" >&5
7582 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7583   echo $ac_n "(cached) $ac_c" 1>&6
7584 else
7585   cat > conftest.$ac_ext <<EOF
7586 #line 7587 "configure"
7587 #include "confdefs.h"
7588 /* System header to define __stub macros and hopefully few prototypes,
7589     which can conflict with char $ac_func(); below.  */
7590 #include <assert.h>
7591 /* Override any gcc2 internal prototype to avoid an error.  */
7592 /* We use char because int might match the return type of a gcc2
7593     builtin and then its argument prototype would still apply.  */
7594 char $ac_func();
7595
7596 int main() {
7597
7598 /* The GNU C library defines this for functions which it implements
7599     to always fail with ENOSYS.  Some functions are actually named
7600     something starting with __ and the normal name is an alias.  */
7601 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7602 choke me
7603 #else
7604 $ac_func();
7605 #endif
7606
7607 ; return 0; }
7608 EOF
7609 if { (eval echo configure:7610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7610   rm -rf conftest*
7611   eval "ac_cv_func_$ac_func=yes"
7612 else
7613   echo "configure: failed program was:" >&5
7614   cat conftest.$ac_ext >&5
7615   rm -rf conftest*
7616   eval "ac_cv_func_$ac_func=no"
7617 fi
7618 rm -f conftest*
7619 fi
7620
7621 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7622   echo "$ac_t""yes" 1>&6
7623     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7624   cat >> confdefs.h <<EOF
7625 #define $ac_tr_func 1
7626 EOF
7627  
7628 else
7629   echo "$ac_t""no" 1>&6
7630 fi
7631 done
7632  ;;
7633   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7634 echo "configure:7635: checking for set_auth_parameters in -lsec" >&5
7635 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7636 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7637   echo $ac_n "(cached) $ac_c" 1>&6
7638 else
7639   ac_save_LIBS="$LIBS"
7640 LIBS="-lsec  $LIBS"
7641 cat > conftest.$ac_ext <<EOF
7642 #line 7643 "configure"
7643 #include "confdefs.h"
7644 /* Override any gcc2 internal prototype to avoid an error.  */
7645 /* We use char because int might match the return type of a gcc2
7646     builtin and then its argument prototype would still apply.  */
7647 char set_auth_parameters();
7648
7649 int main() {
7650 set_auth_parameters()
7651 ; return 0; }
7652 EOF
7653 if { (eval echo configure:7654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7654   rm -rf conftest*
7655   eval "ac_cv_lib_$ac_lib_var=yes"
7656 else
7657   echo "configure: failed program was:" >&5
7658   cat conftest.$ac_ext >&5
7659   rm -rf conftest*
7660   eval "ac_cv_lib_$ac_lib_var=no"
7661 fi
7662 rm -f conftest*
7663 LIBS="$ac_save_LIBS"
7664
7665 fi
7666 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7667   echo "$ac_t""yes" 1>&6
7668     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7669     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7670   cat >> confdefs.h <<EOF
7671 #define $ac_tr_lib 1
7672 EOF
7673
7674   LIBS="-lsec $LIBS"
7675
7676 else
7677   echo "$ac_t""no" 1>&6
7678 fi
7679  
7680      for ac_func in set_auth_parameters
7681 do
7682 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7683 echo "configure:7684: checking for $ac_func" >&5
7684 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7685   echo $ac_n "(cached) $ac_c" 1>&6
7686 else
7687   cat > conftest.$ac_ext <<EOF
7688 #line 7689 "configure"
7689 #include "confdefs.h"
7690 /* System header to define __stub macros and hopefully few prototypes,
7691     which can conflict with char $ac_func(); below.  */
7692 #include <assert.h>
7693 /* Override any gcc2 internal prototype to avoid an error.  */
7694 /* We use char because int might match the return type of a gcc2
7695     builtin and then its argument prototype would still apply.  */
7696 char $ac_func();
7697
7698 int main() {
7699
7700 /* The GNU C library defines this for functions which it implements
7701     to always fail with ENOSYS.  Some functions are actually named
7702     something starting with __ and the normal name is an alias.  */
7703 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7704 choke me
7705 #else
7706 $ac_func();
7707 #endif
7708
7709 ; return 0; }
7710 EOF
7711 if { (eval echo configure:7712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7712   rm -rf conftest*
7713   eval "ac_cv_func_$ac_func=yes"
7714 else
7715   echo "configure: failed program was:" >&5
7716   cat conftest.$ac_ext >&5
7717   rm -rf conftest*
7718   eval "ac_cv_func_$ac_func=no"
7719 fi
7720 rm -f conftest*
7721 fi
7722
7723 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7724   echo "$ac_t""yes" 1>&6
7725     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7726   cat >> confdefs.h <<EOF
7727 #define $ac_tr_func 1
7728 EOF
7729  
7730 else
7731   echo "$ac_t""no" 1>&6
7732 fi
7733 done
7734
7735   ;;
7736   esac
7737
7738
7739 # UnixWare 7.x has its getspnam in -lgen
7740 case "$LIBS" in
7741   *-lgen*) for ac_func in getspnam
7742 do
7743 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7744 echo "configure:7745: checking for $ac_func" >&5
7745 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7746   echo $ac_n "(cached) $ac_c" 1>&6
7747 else
7748   cat > conftest.$ac_ext <<EOF
7749 #line 7750 "configure"
7750 #include "confdefs.h"
7751 /* System header to define __stub macros and hopefully few prototypes,
7752     which can conflict with char $ac_func(); below.  */
7753 #include <assert.h>
7754 /* Override any gcc2 internal prototype to avoid an error.  */
7755 /* We use char because int might match the return type of a gcc2
7756     builtin and then its argument prototype would still apply.  */
7757 char $ac_func();
7758
7759 int main() {
7760
7761 /* The GNU C library defines this for functions which it implements
7762     to always fail with ENOSYS.  Some functions are actually named
7763     something starting with __ and the normal name is an alias.  */
7764 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7765 choke me
7766 #else
7767 $ac_func();
7768 #endif
7769
7770 ; return 0; }
7771 EOF
7772 if { (eval echo configure:7773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7773   rm -rf conftest*
7774   eval "ac_cv_func_$ac_func=yes"
7775 else
7776   echo "configure: failed program was:" >&5
7777   cat conftest.$ac_ext >&5
7778   rm -rf conftest*
7779   eval "ac_cv_func_$ac_func=no"
7780 fi
7781 rm -f conftest*
7782 fi
7783
7784 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7785   echo "$ac_t""yes" 1>&6
7786     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7787   cat >> confdefs.h <<EOF
7788 #define $ac_tr_func 1
7789 EOF
7790  
7791 else
7792   echo "$ac_t""no" 1>&6
7793 fi
7794 done
7795  ;;
7796   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7797 echo "configure:7798: checking for getspnam in -lgen" >&5
7798 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7799 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7800   echo $ac_n "(cached) $ac_c" 1>&6
7801 else
7802   ac_save_LIBS="$LIBS"
7803 LIBS="-lgen  $LIBS"
7804 cat > conftest.$ac_ext <<EOF
7805 #line 7806 "configure"
7806 #include "confdefs.h"
7807 /* Override any gcc2 internal prototype to avoid an error.  */
7808 /* We use char because int might match the return type of a gcc2
7809     builtin and then its argument prototype would still apply.  */
7810 char getspnam();
7811
7812 int main() {
7813 getspnam()
7814 ; return 0; }
7815 EOF
7816 if { (eval echo configure:7817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7817   rm -rf conftest*
7818   eval "ac_cv_lib_$ac_lib_var=yes"
7819 else
7820   echo "configure: failed program was:" >&5
7821   cat conftest.$ac_ext >&5
7822   rm -rf conftest*
7823   eval "ac_cv_lib_$ac_lib_var=no"
7824 fi
7825 rm -f conftest*
7826 LIBS="$ac_save_LIBS"
7827
7828 fi
7829 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7830   echo "$ac_t""yes" 1>&6
7831     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7832     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7833   cat >> confdefs.h <<EOF
7834 #define $ac_tr_lib 1
7835 EOF
7836
7837   LIBS="-lgen $LIBS"
7838
7839 else
7840   echo "$ac_t""no" 1>&6
7841 fi
7842  
7843      for ac_func in getspnam
7844 do
7845 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7846 echo "configure:7847: checking for $ac_func" >&5
7847 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7848   echo $ac_n "(cached) $ac_c" 1>&6
7849 else
7850   cat > conftest.$ac_ext <<EOF
7851 #line 7852 "configure"
7852 #include "confdefs.h"
7853 /* System header to define __stub macros and hopefully few prototypes,
7854     which can conflict with char $ac_func(); below.  */
7855 #include <assert.h>
7856 /* Override any gcc2 internal prototype to avoid an error.  */
7857 /* We use char because int might match the return type of a gcc2
7858     builtin and then its argument prototype would still apply.  */
7859 char $ac_func();
7860
7861 int main() {
7862
7863 /* The GNU C library defines this for functions which it implements
7864     to always fail with ENOSYS.  Some functions are actually named
7865     something starting with __ and the normal name is an alias.  */
7866 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7867 choke me
7868 #else
7869 $ac_func();
7870 #endif
7871
7872 ; return 0; }
7873 EOF
7874 if { (eval echo configure:7875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7875   rm -rf conftest*
7876   eval "ac_cv_func_$ac_func=yes"
7877 else
7878   echo "configure: failed program was:" >&5
7879   cat conftest.$ac_ext >&5
7880   rm -rf conftest*
7881   eval "ac_cv_func_$ac_func=no"
7882 fi
7883 rm -f conftest*
7884 fi
7885
7886 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7887   echo "$ac_t""yes" 1>&6
7888     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7889   cat >> confdefs.h <<EOF
7890 #define $ac_tr_func 1
7891 EOF
7892  
7893 else
7894   echo "$ac_t""no" 1>&6
7895 fi
7896 done
7897
7898   ;;
7899   esac
7900
7901
7902 case "$LIBS" in
7903   *-lsecurity*) for ac_func in getspnam
7904 do
7905 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7906 echo "configure:7907: checking for $ac_func" >&5
7907 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7908   echo $ac_n "(cached) $ac_c" 1>&6
7909 else
7910   cat > conftest.$ac_ext <<EOF
7911 #line 7912 "configure"
7912 #include "confdefs.h"
7913 /* System header to define __stub macros and hopefully few prototypes,
7914     which can conflict with char $ac_func(); below.  */
7915 #include <assert.h>
7916 /* Override any gcc2 internal prototype to avoid an error.  */
7917 /* We use char because int might match the return type of a gcc2
7918     builtin and then its argument prototype would still apply.  */
7919 char $ac_func();
7920
7921 int main() {
7922
7923 /* The GNU C library defines this for functions which it implements
7924     to always fail with ENOSYS.  Some functions are actually named
7925     something starting with __ and the normal name is an alias.  */
7926 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7927 choke me
7928 #else
7929 $ac_func();
7930 #endif
7931
7932 ; return 0; }
7933 EOF
7934 if { (eval echo configure:7935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7935   rm -rf conftest*
7936   eval "ac_cv_func_$ac_func=yes"
7937 else
7938   echo "configure: failed program was:" >&5
7939   cat conftest.$ac_ext >&5
7940   rm -rf conftest*
7941   eval "ac_cv_func_$ac_func=no"
7942 fi
7943 rm -f conftest*
7944 fi
7945
7946 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7947   echo "$ac_t""yes" 1>&6
7948     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7949   cat >> confdefs.h <<EOF
7950 #define $ac_tr_func 1
7951 EOF
7952  
7953 else
7954   echo "$ac_t""no" 1>&6
7955 fi
7956 done
7957  ;;
7958   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7959 echo "configure:7960: checking for getspnam in -lsecurity" >&5
7960 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7961 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7962   echo $ac_n "(cached) $ac_c" 1>&6
7963 else
7964   ac_save_LIBS="$LIBS"
7965 LIBS="-lsecurity  $LIBS"
7966 cat > conftest.$ac_ext <<EOF
7967 #line 7968 "configure"
7968 #include "confdefs.h"
7969 /* Override any gcc2 internal prototype to avoid an error.  */
7970 /* We use char because int might match the return type of a gcc2
7971     builtin and then its argument prototype would still apply.  */
7972 char getspnam();
7973
7974 int main() {
7975 getspnam()
7976 ; return 0; }
7977 EOF
7978 if { (eval echo configure:7979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7979   rm -rf conftest*
7980   eval "ac_cv_lib_$ac_lib_var=yes"
7981 else
7982   echo "configure: failed program was:" >&5
7983   cat conftest.$ac_ext >&5
7984   rm -rf conftest*
7985   eval "ac_cv_lib_$ac_lib_var=no"
7986 fi
7987 rm -f conftest*
7988 LIBS="$ac_save_LIBS"
7989
7990 fi
7991 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7992   echo "$ac_t""yes" 1>&6
7993     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7994     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7995   cat >> confdefs.h <<EOF
7996 #define $ac_tr_lib 1
7997 EOF
7998
7999   LIBS="-lsecurity $LIBS"
8000
8001 else
8002   echo "$ac_t""no" 1>&6
8003 fi
8004  
8005      for ac_func in getspnam
8006 do
8007 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8008 echo "configure:8009: checking for $ac_func" >&5
8009 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8010   echo $ac_n "(cached) $ac_c" 1>&6
8011 else
8012   cat > conftest.$ac_ext <<EOF
8013 #line 8014 "configure"
8014 #include "confdefs.h"
8015 /* System header to define __stub macros and hopefully few prototypes,
8016     which can conflict with char $ac_func(); below.  */
8017 #include <assert.h>
8018 /* Override any gcc2 internal prototype to avoid an error.  */
8019 /* We use char because int might match the return type of a gcc2
8020     builtin and then its argument prototype would still apply.  */
8021 char $ac_func();
8022
8023 int main() {
8024
8025 /* The GNU C library defines this for functions which it implements
8026     to always fail with ENOSYS.  Some functions are actually named
8027     something starting with __ and the normal name is an alias.  */
8028 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8029 choke me
8030 #else
8031 $ac_func();
8032 #endif
8033
8034 ; return 0; }
8035 EOF
8036 if { (eval echo configure:8037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8037   rm -rf conftest*
8038   eval "ac_cv_func_$ac_func=yes"
8039 else
8040   echo "configure: failed program was:" >&5
8041   cat conftest.$ac_ext >&5
8042   rm -rf conftest*
8043   eval "ac_cv_func_$ac_func=no"
8044 fi
8045 rm -f conftest*
8046 fi
8047
8048 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8049   echo "$ac_t""yes" 1>&6
8050     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8051   cat >> confdefs.h <<EOF
8052 #define $ac_tr_func 1
8053 EOF
8054  
8055 else
8056   echo "$ac_t""no" 1>&6
8057 fi
8058 done
8059
8060   ;;
8061   esac
8062
8063 case "$LIBS" in
8064   *-lsec*) for ac_func in getspnam
8065 do
8066 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8067 echo "configure:8068: checking for $ac_func" >&5
8068 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8069   echo $ac_n "(cached) $ac_c" 1>&6
8070 else
8071   cat > conftest.$ac_ext <<EOF
8072 #line 8073 "configure"
8073 #include "confdefs.h"
8074 /* System header to define __stub macros and hopefully few prototypes,
8075     which can conflict with char $ac_func(); below.  */
8076 #include <assert.h>
8077 /* Override any gcc2 internal prototype to avoid an error.  */
8078 /* We use char because int might match the return type of a gcc2
8079     builtin and then its argument prototype would still apply.  */
8080 char $ac_func();
8081
8082 int main() {
8083
8084 /* The GNU C library defines this for functions which it implements
8085     to always fail with ENOSYS.  Some functions are actually named
8086     something starting with __ and the normal name is an alias.  */
8087 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8088 choke me
8089 #else
8090 $ac_func();
8091 #endif
8092
8093 ; return 0; }
8094 EOF
8095 if { (eval echo configure:8096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8096   rm -rf conftest*
8097   eval "ac_cv_func_$ac_func=yes"
8098 else
8099   echo "configure: failed program was:" >&5
8100   cat conftest.$ac_ext >&5
8101   rm -rf conftest*
8102   eval "ac_cv_func_$ac_func=no"
8103 fi
8104 rm -f conftest*
8105 fi
8106
8107 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8108   echo "$ac_t""yes" 1>&6
8109     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8110   cat >> confdefs.h <<EOF
8111 #define $ac_tr_func 1
8112 EOF
8113  
8114 else
8115   echo "$ac_t""no" 1>&6
8116 fi
8117 done
8118  ;;
8119   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
8120 echo "configure:8121: checking for getspnam in -lsec" >&5
8121 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
8122 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8123   echo $ac_n "(cached) $ac_c" 1>&6
8124 else
8125   ac_save_LIBS="$LIBS"
8126 LIBS="-lsec  $LIBS"
8127 cat > conftest.$ac_ext <<EOF
8128 #line 8129 "configure"
8129 #include "confdefs.h"
8130 /* Override any gcc2 internal prototype to avoid an error.  */
8131 /* We use char because int might match the return type of a gcc2
8132     builtin and then its argument prototype would still apply.  */
8133 char getspnam();
8134
8135 int main() {
8136 getspnam()
8137 ; return 0; }
8138 EOF
8139 if { (eval echo configure:8140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8140   rm -rf conftest*
8141   eval "ac_cv_lib_$ac_lib_var=yes"
8142 else
8143   echo "configure: failed program was:" >&5
8144   cat conftest.$ac_ext >&5
8145   rm -rf conftest*
8146   eval "ac_cv_lib_$ac_lib_var=no"
8147 fi
8148 rm -f conftest*
8149 LIBS="$ac_save_LIBS"
8150
8151 fi
8152 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8153   echo "$ac_t""yes" 1>&6
8154     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8155     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8156   cat >> confdefs.h <<EOF
8157 #define $ac_tr_lib 1
8158 EOF
8159
8160   LIBS="-lsec $LIBS"
8161
8162 else
8163   echo "$ac_t""no" 1>&6
8164 fi
8165  
8166      for ac_func in getspnam
8167 do
8168 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8169 echo "configure:8170: checking for $ac_func" >&5
8170 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8171   echo $ac_n "(cached) $ac_c" 1>&6
8172 else
8173   cat > conftest.$ac_ext <<EOF
8174 #line 8175 "configure"
8175 #include "confdefs.h"
8176 /* System header to define __stub macros and hopefully few prototypes,
8177     which can conflict with char $ac_func(); below.  */
8178 #include <assert.h>
8179 /* Override any gcc2 internal prototype to avoid an error.  */
8180 /* We use char because int might match the return type of a gcc2
8181     builtin and then its argument prototype would still apply.  */
8182 char $ac_func();
8183
8184 int main() {
8185
8186 /* The GNU C library defines this for functions which it implements
8187     to always fail with ENOSYS.  Some functions are actually named
8188     something starting with __ and the normal name is an alias.  */
8189 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8190 choke me
8191 #else
8192 $ac_func();
8193 #endif
8194
8195 ; return 0; }
8196 EOF
8197 if { (eval echo configure:8198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8198   rm -rf conftest*
8199   eval "ac_cv_func_$ac_func=yes"
8200 else
8201   echo "configure: failed program was:" >&5
8202   cat conftest.$ac_ext >&5
8203   rm -rf conftest*
8204   eval "ac_cv_func_$ac_func=no"
8205 fi
8206 rm -f conftest*
8207 fi
8208
8209 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8210   echo "$ac_t""yes" 1>&6
8211     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8212   cat >> confdefs.h <<EOF
8213 #define $ac_tr_func 1
8214 EOF
8215  
8216 else
8217   echo "$ac_t""no" 1>&6
8218 fi
8219 done
8220
8221   ;;
8222   esac
8223
8224
8225 case "$LIBS" in
8226   *-lsecurity*) for ac_func in bigcrypt
8227 do
8228 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8229 echo "configure:8230: checking for $ac_func" >&5
8230 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8231   echo $ac_n "(cached) $ac_c" 1>&6
8232 else
8233   cat > conftest.$ac_ext <<EOF
8234 #line 8235 "configure"
8235 #include "confdefs.h"
8236 /* System header to define __stub macros and hopefully few prototypes,
8237     which can conflict with char $ac_func(); below.  */
8238 #include <assert.h>
8239 /* Override any gcc2 internal prototype to avoid an error.  */
8240 /* We use char because int might match the return type of a gcc2
8241     builtin and then its argument prototype would still apply.  */
8242 char $ac_func();
8243
8244 int main() {
8245
8246 /* The GNU C library defines this for functions which it implements
8247     to always fail with ENOSYS.  Some functions are actually named
8248     something starting with __ and the normal name is an alias.  */
8249 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8250 choke me
8251 #else
8252 $ac_func();
8253 #endif
8254
8255 ; return 0; }
8256 EOF
8257 if { (eval echo configure:8258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8258   rm -rf conftest*
8259   eval "ac_cv_func_$ac_func=yes"
8260 else
8261   echo "configure: failed program was:" >&5
8262   cat conftest.$ac_ext >&5
8263   rm -rf conftest*
8264   eval "ac_cv_func_$ac_func=no"
8265 fi
8266 rm -f conftest*
8267 fi
8268
8269 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8270   echo "$ac_t""yes" 1>&6
8271     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8272   cat >> confdefs.h <<EOF
8273 #define $ac_tr_func 1
8274 EOF
8275  
8276 else
8277   echo "$ac_t""no" 1>&6
8278 fi
8279 done
8280  ;;
8281   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
8282 echo "configure:8283: checking for bigcrypt in -lsecurity" >&5
8283 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
8284 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8285   echo $ac_n "(cached) $ac_c" 1>&6
8286 else
8287   ac_save_LIBS="$LIBS"
8288 LIBS="-lsecurity  $LIBS"
8289 cat > conftest.$ac_ext <<EOF
8290 #line 8291 "configure"
8291 #include "confdefs.h"
8292 /* Override any gcc2 internal prototype to avoid an error.  */
8293 /* We use char because int might match the return type of a gcc2
8294     builtin and then its argument prototype would still apply.  */
8295 char bigcrypt();
8296
8297 int main() {
8298 bigcrypt()
8299 ; return 0; }
8300 EOF
8301 if { (eval echo configure:8302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8302   rm -rf conftest*
8303   eval "ac_cv_lib_$ac_lib_var=yes"
8304 else
8305   echo "configure: failed program was:" >&5
8306   cat conftest.$ac_ext >&5
8307   rm -rf conftest*
8308   eval "ac_cv_lib_$ac_lib_var=no"
8309 fi
8310 rm -f conftest*
8311 LIBS="$ac_save_LIBS"
8312
8313 fi
8314 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8315   echo "$ac_t""yes" 1>&6
8316     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8317     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8318   cat >> confdefs.h <<EOF
8319 #define $ac_tr_lib 1
8320 EOF
8321
8322   LIBS="-lsecurity $LIBS"
8323
8324 else
8325   echo "$ac_t""no" 1>&6
8326 fi
8327  
8328      for ac_func in bigcrypt
8329 do
8330 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8331 echo "configure:8332: checking for $ac_func" >&5
8332 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8333   echo $ac_n "(cached) $ac_c" 1>&6
8334 else
8335   cat > conftest.$ac_ext <<EOF
8336 #line 8337 "configure"
8337 #include "confdefs.h"
8338 /* System header to define __stub macros and hopefully few prototypes,
8339     which can conflict with char $ac_func(); below.  */
8340 #include <assert.h>
8341 /* Override any gcc2 internal prototype to avoid an error.  */
8342 /* We use char because int might match the return type of a gcc2
8343     builtin and then its argument prototype would still apply.  */
8344 char $ac_func();
8345
8346 int main() {
8347
8348 /* The GNU C library defines this for functions which it implements
8349     to always fail with ENOSYS.  Some functions are actually named
8350     something starting with __ and the normal name is an alias.  */
8351 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8352 choke me
8353 #else
8354 $ac_func();
8355 #endif
8356
8357 ; return 0; }
8358 EOF
8359 if { (eval echo configure:8360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8360   rm -rf conftest*
8361   eval "ac_cv_func_$ac_func=yes"
8362 else
8363   echo "configure: failed program was:" >&5
8364   cat conftest.$ac_ext >&5
8365   rm -rf conftest*
8366   eval "ac_cv_func_$ac_func=no"
8367 fi
8368 rm -f conftest*
8369 fi
8370
8371 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8372   echo "$ac_t""yes" 1>&6
8373     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8374   cat >> confdefs.h <<EOF
8375 #define $ac_tr_func 1
8376 EOF
8377  
8378 else
8379   echo "$ac_t""no" 1>&6
8380 fi
8381 done
8382
8383   ;;
8384   esac
8385
8386 case "$LIBS" in
8387   *-lsec*) for ac_func in bigcrypt
8388 do
8389 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8390 echo "configure:8391: checking for $ac_func" >&5
8391 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8392   echo $ac_n "(cached) $ac_c" 1>&6
8393 else
8394   cat > conftest.$ac_ext <<EOF
8395 #line 8396 "configure"
8396 #include "confdefs.h"
8397 /* System header to define __stub macros and hopefully few prototypes,
8398     which can conflict with char $ac_func(); below.  */
8399 #include <assert.h>
8400 /* Override any gcc2 internal prototype to avoid an error.  */
8401 /* We use char because int might match the return type of a gcc2
8402     builtin and then its argument prototype would still apply.  */
8403 char $ac_func();
8404
8405 int main() {
8406
8407 /* The GNU C library defines this for functions which it implements
8408     to always fail with ENOSYS.  Some functions are actually named
8409     something starting with __ and the normal name is an alias.  */
8410 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8411 choke me
8412 #else
8413 $ac_func();
8414 #endif
8415
8416 ; return 0; }
8417 EOF
8418 if { (eval echo configure:8419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8419   rm -rf conftest*
8420   eval "ac_cv_func_$ac_func=yes"
8421 else
8422   echo "configure: failed program was:" >&5
8423   cat conftest.$ac_ext >&5
8424   rm -rf conftest*
8425   eval "ac_cv_func_$ac_func=no"
8426 fi
8427 rm -f conftest*
8428 fi
8429
8430 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8431   echo "$ac_t""yes" 1>&6
8432     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8433   cat >> confdefs.h <<EOF
8434 #define $ac_tr_func 1
8435 EOF
8436  
8437 else
8438   echo "$ac_t""no" 1>&6
8439 fi
8440 done
8441  ;;
8442   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8443 echo "configure:8444: checking for bigcrypt in -lsec" >&5
8444 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8445 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8446   echo $ac_n "(cached) $ac_c" 1>&6
8447 else
8448   ac_save_LIBS="$LIBS"
8449 LIBS="-lsec  $LIBS"
8450 cat > conftest.$ac_ext <<EOF
8451 #line 8452 "configure"
8452 #include "confdefs.h"
8453 /* Override any gcc2 internal prototype to avoid an error.  */
8454 /* We use char because int might match the return type of a gcc2
8455     builtin and then its argument prototype would still apply.  */
8456 char bigcrypt();
8457
8458 int main() {
8459 bigcrypt()
8460 ; return 0; }
8461 EOF
8462 if { (eval echo configure:8463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8463   rm -rf conftest*
8464   eval "ac_cv_lib_$ac_lib_var=yes"
8465 else
8466   echo "configure: failed program was:" >&5
8467   cat conftest.$ac_ext >&5
8468   rm -rf conftest*
8469   eval "ac_cv_lib_$ac_lib_var=no"
8470 fi
8471 rm -f conftest*
8472 LIBS="$ac_save_LIBS"
8473
8474 fi
8475 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8476   echo "$ac_t""yes" 1>&6
8477     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8478     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8479   cat >> confdefs.h <<EOF
8480 #define $ac_tr_lib 1
8481 EOF
8482
8483   LIBS="-lsec $LIBS"
8484
8485 else
8486   echo "$ac_t""no" 1>&6
8487 fi
8488  
8489      for ac_func in bigcrypt
8490 do
8491 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8492 echo "configure:8493: checking for $ac_func" >&5
8493 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8494   echo $ac_n "(cached) $ac_c" 1>&6
8495 else
8496   cat > conftest.$ac_ext <<EOF
8497 #line 8498 "configure"
8498 #include "confdefs.h"
8499 /* System header to define __stub macros and hopefully few prototypes,
8500     which can conflict with char $ac_func(); below.  */
8501 #include <assert.h>
8502 /* Override any gcc2 internal prototype to avoid an error.  */
8503 /* We use char because int might match the return type of a gcc2
8504     builtin and then its argument prototype would still apply.  */
8505 char $ac_func();
8506
8507 int main() {
8508
8509 /* The GNU C library defines this for functions which it implements
8510     to always fail with ENOSYS.  Some functions are actually named
8511     something starting with __ and the normal name is an alias.  */
8512 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8513 choke me
8514 #else
8515 $ac_func();
8516 #endif
8517
8518 ; return 0; }
8519 EOF
8520 if { (eval echo configure:8521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8521   rm -rf conftest*
8522   eval "ac_cv_func_$ac_func=yes"
8523 else
8524   echo "configure: failed program was:" >&5
8525   cat conftest.$ac_ext >&5
8526   rm -rf conftest*
8527   eval "ac_cv_func_$ac_func=no"
8528 fi
8529 rm -f conftest*
8530 fi
8531
8532 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8533   echo "$ac_t""yes" 1>&6
8534     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8535   cat >> confdefs.h <<EOF
8536 #define $ac_tr_func 1
8537 EOF
8538  
8539 else
8540   echo "$ac_t""no" 1>&6
8541 fi
8542 done
8543
8544   ;;
8545   esac
8546
8547
8548 case "$LIBS" in
8549   *-lsecurity*) for ac_func in getprpwnam
8550 do
8551 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8552 echo "configure:8553: checking for $ac_func" >&5
8553 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8554   echo $ac_n "(cached) $ac_c" 1>&6
8555 else
8556   cat > conftest.$ac_ext <<EOF
8557 #line 8558 "configure"
8558 #include "confdefs.h"
8559 /* System header to define __stub macros and hopefully few prototypes,
8560     which can conflict with char $ac_func(); below.  */
8561 #include <assert.h>
8562 /* Override any gcc2 internal prototype to avoid an error.  */
8563 /* We use char because int might match the return type of a gcc2
8564     builtin and then its argument prototype would still apply.  */
8565 char $ac_func();
8566
8567 int main() {
8568
8569 /* The GNU C library defines this for functions which it implements
8570     to always fail with ENOSYS.  Some functions are actually named
8571     something starting with __ and the normal name is an alias.  */
8572 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8573 choke me
8574 #else
8575 $ac_func();
8576 #endif
8577
8578 ; return 0; }
8579 EOF
8580 if { (eval echo configure:8581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8581   rm -rf conftest*
8582   eval "ac_cv_func_$ac_func=yes"
8583 else
8584   echo "configure: failed program was:" >&5
8585   cat conftest.$ac_ext >&5
8586   rm -rf conftest*
8587   eval "ac_cv_func_$ac_func=no"
8588 fi
8589 rm -f conftest*
8590 fi
8591
8592 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8593   echo "$ac_t""yes" 1>&6
8594     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8595   cat >> confdefs.h <<EOF
8596 #define $ac_tr_func 1
8597 EOF
8598  
8599 else
8600   echo "$ac_t""no" 1>&6
8601 fi
8602 done
8603  ;;
8604   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8605 echo "configure:8606: checking for getprpwnam in -lsecurity" >&5
8606 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8607 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8608   echo $ac_n "(cached) $ac_c" 1>&6
8609 else
8610   ac_save_LIBS="$LIBS"
8611 LIBS="-lsecurity  $LIBS"
8612 cat > conftest.$ac_ext <<EOF
8613 #line 8614 "configure"
8614 #include "confdefs.h"
8615 /* Override any gcc2 internal prototype to avoid an error.  */
8616 /* We use char because int might match the return type of a gcc2
8617     builtin and then its argument prototype would still apply.  */
8618 char getprpwnam();
8619
8620 int main() {
8621 getprpwnam()
8622 ; return 0; }
8623 EOF
8624 if { (eval echo configure:8625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8625   rm -rf conftest*
8626   eval "ac_cv_lib_$ac_lib_var=yes"
8627 else
8628   echo "configure: failed program was:" >&5
8629   cat conftest.$ac_ext >&5
8630   rm -rf conftest*
8631   eval "ac_cv_lib_$ac_lib_var=no"
8632 fi
8633 rm -f conftest*
8634 LIBS="$ac_save_LIBS"
8635
8636 fi
8637 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8638   echo "$ac_t""yes" 1>&6
8639     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8640     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8641   cat >> confdefs.h <<EOF
8642 #define $ac_tr_lib 1
8643 EOF
8644
8645   LIBS="-lsecurity $LIBS"
8646
8647 else
8648   echo "$ac_t""no" 1>&6
8649 fi
8650  
8651      for ac_func in getprpwnam
8652 do
8653 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8654 echo "configure:8655: checking for $ac_func" >&5
8655 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8656   echo $ac_n "(cached) $ac_c" 1>&6
8657 else
8658   cat > conftest.$ac_ext <<EOF
8659 #line 8660 "configure"
8660 #include "confdefs.h"
8661 /* System header to define __stub macros and hopefully few prototypes,
8662     which can conflict with char $ac_func(); below.  */
8663 #include <assert.h>
8664 /* Override any gcc2 internal prototype to avoid an error.  */
8665 /* We use char because int might match the return type of a gcc2
8666     builtin and then its argument prototype would still apply.  */
8667 char $ac_func();
8668
8669 int main() {
8670
8671 /* The GNU C library defines this for functions which it implements
8672     to always fail with ENOSYS.  Some functions are actually named
8673     something starting with __ and the normal name is an alias.  */
8674 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8675 choke me
8676 #else
8677 $ac_func();
8678 #endif
8679
8680 ; return 0; }
8681 EOF
8682 if { (eval echo configure:8683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8683   rm -rf conftest*
8684   eval "ac_cv_func_$ac_func=yes"
8685 else
8686   echo "configure: failed program was:" >&5
8687   cat conftest.$ac_ext >&5
8688   rm -rf conftest*
8689   eval "ac_cv_func_$ac_func=no"
8690 fi
8691 rm -f conftest*
8692 fi
8693
8694 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8695   echo "$ac_t""yes" 1>&6
8696     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8697   cat >> confdefs.h <<EOF
8698 #define $ac_tr_func 1
8699 EOF
8700  
8701 else
8702   echo "$ac_t""no" 1>&6
8703 fi
8704 done
8705
8706   ;;
8707   esac
8708
8709 case "$LIBS" in
8710   *-lsec*) for ac_func in getprpwnam
8711 do
8712 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8713 echo "configure:8714: checking for $ac_func" >&5
8714 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8715   echo $ac_n "(cached) $ac_c" 1>&6
8716 else
8717   cat > conftest.$ac_ext <<EOF
8718 #line 8719 "configure"
8719 #include "confdefs.h"
8720 /* System header to define __stub macros and hopefully few prototypes,
8721     which can conflict with char $ac_func(); below.  */
8722 #include <assert.h>
8723 /* Override any gcc2 internal prototype to avoid an error.  */
8724 /* We use char because int might match the return type of a gcc2
8725     builtin and then its argument prototype would still apply.  */
8726 char $ac_func();
8727
8728 int main() {
8729
8730 /* The GNU C library defines this for functions which it implements
8731     to always fail with ENOSYS.  Some functions are actually named
8732     something starting with __ and the normal name is an alias.  */
8733 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8734 choke me
8735 #else
8736 $ac_func();
8737 #endif
8738
8739 ; return 0; }
8740 EOF
8741 if { (eval echo configure:8742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8742   rm -rf conftest*
8743   eval "ac_cv_func_$ac_func=yes"
8744 else
8745   echo "configure: failed program was:" >&5
8746   cat conftest.$ac_ext >&5
8747   rm -rf conftest*
8748   eval "ac_cv_func_$ac_func=no"
8749 fi
8750 rm -f conftest*
8751 fi
8752
8753 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8754   echo "$ac_t""yes" 1>&6
8755     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8756   cat >> confdefs.h <<EOF
8757 #define $ac_tr_func 1
8758 EOF
8759  
8760 else
8761   echo "$ac_t""no" 1>&6
8762 fi
8763 done
8764  ;;
8765   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8766 echo "configure:8767: checking for getprpwnam in -lsec" >&5
8767 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8768 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8769   echo $ac_n "(cached) $ac_c" 1>&6
8770 else
8771   ac_save_LIBS="$LIBS"
8772 LIBS="-lsec  $LIBS"
8773 cat > conftest.$ac_ext <<EOF
8774 #line 8775 "configure"
8775 #include "confdefs.h"
8776 /* Override any gcc2 internal prototype to avoid an error.  */
8777 /* We use char because int might match the return type of a gcc2
8778     builtin and then its argument prototype would still apply.  */
8779 char getprpwnam();
8780
8781 int main() {
8782 getprpwnam()
8783 ; return 0; }
8784 EOF
8785 if { (eval echo configure:8786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8786   rm -rf conftest*
8787   eval "ac_cv_lib_$ac_lib_var=yes"
8788 else
8789   echo "configure: failed program was:" >&5
8790   cat conftest.$ac_ext >&5
8791   rm -rf conftest*
8792   eval "ac_cv_lib_$ac_lib_var=no"
8793 fi
8794 rm -f conftest*
8795 LIBS="$ac_save_LIBS"
8796
8797 fi
8798 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8799   echo "$ac_t""yes" 1>&6
8800     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8801     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8802   cat >> confdefs.h <<EOF
8803 #define $ac_tr_lib 1
8804 EOF
8805
8806   LIBS="-lsec $LIBS"
8807
8808 else
8809   echo "$ac_t""no" 1>&6
8810 fi
8811  
8812      for ac_func in getprpwnam
8813 do
8814 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8815 echo "configure:8816: checking for $ac_func" >&5
8816 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8817   echo $ac_n "(cached) $ac_c" 1>&6
8818 else
8819   cat > conftest.$ac_ext <<EOF
8820 #line 8821 "configure"
8821 #include "confdefs.h"
8822 /* System header to define __stub macros and hopefully few prototypes,
8823     which can conflict with char $ac_func(); below.  */
8824 #include <assert.h>
8825 /* Override any gcc2 internal prototype to avoid an error.  */
8826 /* We use char because int might match the return type of a gcc2
8827     builtin and then its argument prototype would still apply.  */
8828 char $ac_func();
8829
8830 int main() {
8831
8832 /* The GNU C library defines this for functions which it implements
8833     to always fail with ENOSYS.  Some functions are actually named
8834     something starting with __ and the normal name is an alias.  */
8835 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8836 choke me
8837 #else
8838 $ac_func();
8839 #endif
8840
8841 ; return 0; }
8842 EOF
8843 if { (eval echo configure:8844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8844   rm -rf conftest*
8845   eval "ac_cv_func_$ac_func=yes"
8846 else
8847   echo "configure: failed program was:" >&5
8848   cat conftest.$ac_ext >&5
8849   rm -rf conftest*
8850   eval "ac_cv_func_$ac_func=no"
8851 fi
8852 rm -f conftest*
8853 fi
8854
8855 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8856   echo "$ac_t""yes" 1>&6
8857     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8858   cat >> confdefs.h <<EOF
8859 #define $ac_tr_func 1
8860 EOF
8861  
8862 else
8863   echo "$ac_t""no" 1>&6
8864 fi
8865 done
8866
8867   ;;
8868   esac
8869
8870
8871 # this bit needs to be modified for each OS that is suported by
8872 # smbwrapper. You need to specify how to created a shared library and
8873 # how to compile C code to produce PIC object files
8874
8875 # these are the defaults, good for lots of systems
8876 HOST_OS="$host_os"
8877 LDSHFLAGS="-shared"
8878 SHLD="\${CC}"
8879 PICFLAG=""
8880 PICSUFFIX="po"
8881 POBAD_CC="#"
8882 SHLIBEXT="so"
8883 # Assume non-shared by default and override below
8884 BLDSHARED="false"
8885 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8886 echo "configure:8887: checking ability to build shared libraries" >&5
8887
8888 # and these are for particular systems
8889 case "$host_os" in
8890                 *linux*)   cat >> confdefs.h <<\EOF
8891 #define LINUX 1
8892 EOF
8893
8894                         BLDSHARED="true"
8895                         LDSHFLAGS="-shared" 
8896                         DYNEXP="-Wl,--export-dynamic"
8897                         PICFLAG="-fPIC"
8898                         cat >> confdefs.h <<\EOF
8899 #define STAT_ST_BLOCKSIZE 512
8900 EOF
8901
8902                 ;;
8903                 *solaris*) 
8904                         cat >> confdefs.h <<\EOF
8905 #define SUNOS5 1
8906 EOF
8907
8908                         BLDSHARED="true"
8909                         LDSHFLAGS="-h \$@ -G"
8910                         if test "${GCC}" = "yes"; then
8911                                 PICFLAG="-fPIC"
8912                         else
8913                                 PICFLAG="-KPIC"
8914                                 POBAD_CC=""
8915                                 PICSUFFIX="po.o"
8916                         fi
8917                         cat >> confdefs.h <<\EOF
8918 #define STAT_ST_BLOCKSIZE 512
8919 EOF
8920
8921                 ;;
8922                 *sunos*) cat >> confdefs.h <<\EOF
8923 #define SUNOS4 1
8924 EOF
8925
8926                         BLDSHARED="true"
8927                         LDSHFLAGS="-Wl,-h,\$@ -G"
8928                         PICFLAG="-KPIC"   # Is this correct for SunOS
8929                 ;;
8930                 *bsd*)  BLDSHARED="true"
8931                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8932                         PICFLAG="-fPIC"
8933                         cat >> confdefs.h <<\EOF
8934 #define STAT_ST_BLOCKSIZE 512
8935 EOF
8936
8937                 ;;
8938                 *irix*) cat >> confdefs.h <<\EOF
8939 #define IRIX 1
8940 EOF
8941
8942                         case "$host_os" in
8943                         *irix6*) cat >> confdefs.h <<\EOF
8944 #define IRIX6 1
8945 EOF
8946
8947                         ;;
8948                         esac
8949                         ATTEMPT_WRAP32_BUILD=yes
8950                         BLDSHARED="true"
8951                         LDSHFLAGS="-soname \$@ -shared"
8952                         SHLD="\${LD}"
8953                         if test "${GCC}" = "yes"; then
8954                                 PICFLAG="-fPIC"
8955                         else 
8956                                 PICFLAG="-KPIC"
8957                         fi
8958                         cat >> confdefs.h <<\EOF
8959 #define STAT_ST_BLOCKSIZE 512
8960 EOF
8961
8962                 ;;
8963                 *aix*) cat >> confdefs.h <<\EOF
8964 #define AIX 1
8965 EOF
8966
8967                         BLDSHARED="true"
8968                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8969                         PICFLAG="-O2 -qmaxmem=6000"
8970                         cat >> confdefs.h <<\EOF
8971 #define STAT_ST_BLOCKSIZE DEV_BSIZE
8972 EOF
8973
8974                 ;;
8975                 *hpux*) cat >> confdefs.h <<\EOF
8976 #define HPUX 1
8977 EOF
8978
8979                         SHLIBEXT="sl"
8980                         # Use special PIC flags for the native HP-UX compiler.
8981                         if test $ac_cv_prog_cc_Ae = yes; then
8982                                 SHLD="/usr/bin/ld"
8983                                 BLDSHARED="true"
8984                                 LDSHFLAGS="-B symbolic -b -z +h \$@"
8985                                 PICFLAG="+z"
8986                         fi
8987                         DYNEXP="-Wl,-E"
8988                         cat >> confdefs.h <<\EOF
8989 #define STAT_ST_BLOCKSIZE 8192
8990 EOF
8991
8992                 ;;
8993                 *qnx*) cat >> confdefs.h <<\EOF
8994 #define QNX 1
8995 EOF
8996 ;;
8997                 *osf*) cat >> confdefs.h <<\EOF
8998 #define OSF1 1
8999 EOF
9000
9001                         BLDSHARED="true"
9002                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
9003                         PICFLAG="-fPIC"
9004                 ;;
9005                 *sco*) 
9006                         cat >> confdefs.h <<\EOF
9007 #define SCO 1
9008 EOF
9009
9010                 ;;
9011                 *unixware*) cat >> confdefs.h <<\EOF
9012 #define UNIXWARE 1
9013 EOF
9014
9015                         BLDSHARED="true"
9016                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
9017                         PICFLAG="-KPIC"
9018                 ;;
9019                 *next2*) cat >> confdefs.h <<\EOF
9020 #define NEXT2 1
9021 EOF
9022 ;;
9023                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
9024 set dummy groff; ac_word=$2
9025 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9026 echo "configure:9027: checking for $ac_word" >&5
9027 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
9028   echo $ac_n "(cached) $ac_c" 1>&6
9029 else
9030   if test -n "$ROFF"; then
9031   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
9032 else
9033   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
9034   ac_dummy="$PATH"
9035   for ac_dir in $ac_dummy; do
9036     test -z "$ac_dir" && ac_dir=.
9037     if test -f $ac_dir/$ac_word; then
9038       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
9039       break
9040     fi
9041   done
9042   IFS="$ac_save_ifs"
9043 fi
9044 fi
9045 ROFF="$ac_cv_prog_ROFF"
9046 if test -n "$ROFF"; then
9047   echo "$ac_t""$ROFF" 1>&6
9048 else
9049   echo "$ac_t""no" 1>&6
9050 fi
9051 ;;
9052                 *sysv4*)
9053                         case "$host" in
9054                                 *-univel-*)
9055                                         if  test "$GCC" != yes ; then
9056                                                 cat >> confdefs.h <<\EOF
9057 #define HAVE_MEMSET 1
9058 EOF
9059
9060                                         fi
9061                                         LDSHFLAGS="-G"
9062                                         DYNEXP="-Bexport"
9063                                 ;;
9064                                 *mips-sni-sysv4*)
9065                                         cat >> confdefs.h <<\EOF
9066 #define RELIANTUNIX 1
9067 EOF
9068
9069                                 ;;
9070                         esac
9071                 ;;
9072
9073                 *sysv5*)
9074                         if  test "$GCC" != yes ; then
9075                                 cat >> confdefs.h <<\EOF
9076 #define HAVE_MEMSET 1
9077 EOF
9078
9079                         fi
9080                         LDSHFLAGS="-G"
9081                 ;;
9082 esac
9083
9084 echo "$ac_t""$BLDSHARED" 1>&6
9085 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
9086 echo "configure:9087: checking linker flags for shared libraries" >&5
9087 echo "$ac_t""$LDSHFLAGS" 1>&6
9088 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
9089 echo "configure:9090: checking compiler flags for position-independent code" >&5
9090 echo "$ac_t""$PICFLAGS" 1>&6
9091
9092 #######################################################
9093 # test whether building a shared library actually works
9094 if test $BLDSHARED = true; then
9095 echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6
9096 echo "configure:9097: checking whether building shared libraries actually works" >&5
9097 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then
9098   echo $ac_n "(cached) $ac_c" 1>&6
9099 else
9100   
9101    ac_cv_shlib_works=no
9102    # try building a trivial shared library
9103    $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
9104      $CC $CPPFLAGS $CFLAGS $LDSHFLAGS -o shlib.so shlib.po &&
9105      ac_cv_shlib_works=yes
9106    rm -f shlib.so shlib.po
9107
9108 fi
9109
9110 echo "$ac_t""$ac_cv_shlib_works" 1>&6
9111 if test $ac_cv_shlib_works = no; then
9112    BLDSHARED=false
9113 fi
9114 fi
9115
9116
9117 # this updates our target list if we can build shared libs
9118 if test $BLDSHARED = true; then
9119    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
9120 else
9121    LIBSMBCLIENT_SHARED=
9122 fi
9123
9124 ################
9125
9126 echo $ac_n "checking for long long""... $ac_c" 1>&6
9127 echo "configure:9128: checking for long long" >&5
9128 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
9129   echo $ac_n "(cached) $ac_c" 1>&6
9130 else
9131   
9132 if test "$cross_compiling" = yes; then
9133   samba_cv_have_longlong=cross
9134 else
9135   cat > conftest.$ac_ext <<EOF
9136 #line 9137 "configure"
9137 #include "confdefs.h"
9138 #include <stdio.h>
9139 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
9140 EOF
9141 if { (eval echo configure:9142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9142 then
9143   samba_cv_have_longlong=yes
9144 else
9145   echo "configure: failed program was:" >&5
9146   cat conftest.$ac_ext >&5
9147   rm -fr conftest*
9148   samba_cv_have_longlong=no
9149 fi
9150 rm -fr conftest*
9151 fi
9152
9153 fi
9154
9155 echo "$ac_t""$samba_cv_have_longlong" 1>&6
9156 if test x"$samba_cv_have_longlong" = x"yes"; then
9157     cat >> confdefs.h <<\EOF
9158 #define HAVE_LONGLONG 1
9159 EOF
9160
9161 fi
9162
9163 #
9164 # Check if the compiler supports the LL prefix on long long integers.
9165 # AIX needs this.
9166
9167 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
9168 echo "configure:9169: checking for LL suffix on long long integers" >&5
9169 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
9170   echo $ac_n "(cached) $ac_c" 1>&6
9171 else
9172   
9173     cat > conftest.$ac_ext <<EOF
9174 #line 9175 "configure"
9175 #include "confdefs.h"
9176 #include <stdio.h>
9177 int main() {
9178 long long i = 0x8000000000LL
9179 ; return 0; }
9180 EOF
9181 if { (eval echo configure:9182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9182   rm -rf conftest*
9183   samba_cv_compiler_supports_ll=yes
9184 else
9185   echo "configure: failed program was:" >&5
9186   cat conftest.$ac_ext >&5
9187   rm -rf conftest*
9188   samba_cv_compiler_supports_ll=no
9189 fi
9190 rm -f conftest*
9191 fi
9192
9193 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
9194 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
9195    cat >> confdefs.h <<\EOF
9196 #define COMPILER_SUPPORTS_LL 1
9197 EOF
9198
9199 fi
9200
9201   
9202 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
9203 echo "configure:9204: checking for 64 bit off_t" >&5
9204 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
9205   echo $ac_n "(cached) $ac_c" 1>&6
9206 else
9207   
9208 if test "$cross_compiling" = yes; then
9209   samba_cv_SIZEOF_OFF_T=cross
9210 else
9211   cat > conftest.$ac_ext <<EOF
9212 #line 9213 "configure"
9213 #include "confdefs.h"
9214 #include <stdio.h>
9215 #include <sys/stat.h>
9216 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
9217 EOF
9218 if { (eval echo configure:9219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9219 then
9220   samba_cv_SIZEOF_OFF_T=yes
9221 else
9222   echo "configure: failed program was:" >&5
9223   cat conftest.$ac_ext >&5
9224   rm -fr conftest*
9225   samba_cv_SIZEOF_OFF_T=no
9226 fi
9227 rm -fr conftest*
9228 fi
9229
9230 fi
9231
9232 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
9233 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
9234     cat >> confdefs.h <<\EOF
9235 #define SIZEOF_OFF_T 8
9236 EOF
9237
9238 fi
9239
9240 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
9241 echo "configure:9242: checking for off64_t" >&5
9242 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
9243   echo $ac_n "(cached) $ac_c" 1>&6
9244 else
9245   
9246 if test "$cross_compiling" = yes; then
9247   samba_cv_HAVE_OFF64_T=cross
9248 else
9249   cat > conftest.$ac_ext <<EOF
9250 #line 9251 "configure"
9251 #include "confdefs.h"
9252
9253 #if defined(HAVE_UNISTD_H)
9254 #include <unistd.h>
9255 #endif
9256 #include <stdio.h>
9257 #include <sys/stat.h>
9258 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9259 EOF
9260 if { (eval echo configure:9261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9261 then
9262   samba_cv_HAVE_OFF64_T=yes
9263 else
9264   echo "configure: failed program was:" >&5
9265   cat conftest.$ac_ext >&5
9266   rm -fr conftest*
9267   samba_cv_HAVE_OFF64_T=no
9268 fi
9269 rm -fr conftest*
9270 fi
9271
9272 fi
9273
9274 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
9275 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
9276     cat >> confdefs.h <<\EOF
9277 #define HAVE_OFF64_T 1
9278 EOF
9279
9280 fi
9281
9282 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
9283 echo "configure:9284: checking for 64 bit ino_t" >&5
9284 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
9285   echo $ac_n "(cached) $ac_c" 1>&6
9286 else
9287   
9288 if test "$cross_compiling" = yes; then
9289   samba_cv_SIZEOF_INO_T=cross
9290 else
9291   cat > conftest.$ac_ext <<EOF
9292 #line 9293 "configure"
9293 #include "confdefs.h"
9294 #include <stdio.h>
9295 #include <sys/stat.h>
9296 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
9297 EOF
9298 if { (eval echo configure:9299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9299 then
9300   samba_cv_SIZEOF_INO_T=yes
9301 else
9302   echo "configure: failed program was:" >&5
9303   cat conftest.$ac_ext >&5
9304   rm -fr conftest*
9305   samba_cv_SIZEOF_INO_T=no
9306 fi
9307 rm -fr conftest*
9308 fi
9309
9310 fi
9311
9312 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
9313 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
9314     cat >> confdefs.h <<\EOF
9315 #define SIZEOF_INO_T 8
9316 EOF
9317
9318 fi
9319
9320 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
9321 echo "configure:9322: checking for ino64_t" >&5
9322 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
9323   echo $ac_n "(cached) $ac_c" 1>&6
9324 else
9325   
9326 if test "$cross_compiling" = yes; then
9327   samba_cv_HAVE_INO64_T=cross
9328 else
9329   cat > conftest.$ac_ext <<EOF
9330 #line 9331 "configure"
9331 #include "confdefs.h"
9332
9333 #if defined(HAVE_UNISTD_H)
9334 #include <unistd.h>
9335 #endif
9336 #include <stdio.h>
9337 #include <sys/stat.h>
9338 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9339 EOF
9340 if { (eval echo configure:9341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9341 then
9342   samba_cv_HAVE_INO64_T=yes
9343 else
9344   echo "configure: failed program was:" >&5
9345   cat conftest.$ac_ext >&5
9346   rm -fr conftest*
9347   samba_cv_HAVE_INO64_T=no
9348 fi
9349 rm -fr conftest*
9350 fi
9351
9352 fi
9353
9354 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9355 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9356     cat >> confdefs.h <<\EOF
9357 #define HAVE_INO64_T 1
9358 EOF
9359
9360 fi
9361
9362 echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
9363 echo "configure:9364: checking for dev64_t" >&5
9364 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then
9365   echo $ac_n "(cached) $ac_c" 1>&6
9366 else
9367   
9368 if test "$cross_compiling" = yes; then
9369   samba_cv_HAVE_DEV64_T=cross
9370 else
9371   cat > conftest.$ac_ext <<EOF
9372 #line 9373 "configure"
9373 #include "confdefs.h"
9374
9375 #if defined(HAVE_UNISTD_H)
9376 #include <unistd.h>
9377 #endif
9378 #include <stdio.h>
9379 #include <sys/stat.h>
9380 main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9381 EOF
9382 if { (eval echo configure:9383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9383 then
9384   samba_cv_HAVE_DEV64_T=yes
9385 else
9386   echo "configure: failed program was:" >&5
9387   cat conftest.$ac_ext >&5
9388   rm -fr conftest*
9389   samba_cv_HAVE_DEV64_T=no
9390 fi
9391 rm -fr conftest*
9392 fi
9393
9394 fi
9395
9396 echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6
9397 if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
9398     cat >> confdefs.h <<\EOF
9399 #define HAVE_DEV64_T 1
9400 EOF
9401
9402 fi
9403
9404 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9405 echo "configure:9406: checking for struct dirent64" >&5
9406 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9407   echo $ac_n "(cached) $ac_c" 1>&6
9408 else
9409   
9410 cat > conftest.$ac_ext <<EOF
9411 #line 9412 "configure"
9412 #include "confdefs.h"
9413
9414 #if defined(HAVE_UNISTD_H)
9415 #include <unistd.h>
9416 #endif
9417 #include <sys/types.h>
9418 #include <dirent.h>
9419 int main() {
9420 struct dirent64 de;
9421 ; return 0; }
9422 EOF
9423 if { (eval echo configure:9424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9424   rm -rf conftest*
9425   samba_cv_HAVE_STRUCT_DIRENT64=yes
9426 else
9427   echo "configure: failed program was:" >&5
9428   cat conftest.$ac_ext >&5
9429   rm -rf conftest*
9430   samba_cv_HAVE_STRUCT_DIRENT64=no
9431 fi
9432 rm -f conftest*
9433 fi
9434
9435 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9436 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
9437     cat >> confdefs.h <<\EOF
9438 #define HAVE_STRUCT_DIRENT64 1
9439 EOF
9440
9441 fi
9442
9443 echo $ac_n "checking for major macro""... $ac_c" 1>&6
9444 echo "configure:9445: checking for major macro" >&5
9445 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then
9446   echo $ac_n "(cached) $ac_c" 1>&6
9447 else
9448   
9449 if test "$cross_compiling" = yes; then
9450   samba_cv_HAVE_DEVICE_MAJOR_FN=cross
9451 else
9452   cat > conftest.$ac_ext <<EOF
9453 #line 9454 "configure"
9454 #include "confdefs.h"
9455
9456 #if defined(HAVE_UNISTD_H)
9457 #include <unistd.h>
9458 #endif
9459 #include <sys/types.h>
9460 main() { dev_t dev; int i = major(dev); return 0; }
9461 EOF
9462 if { (eval echo configure:9463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9463 then
9464   samba_cv_HAVE_DEVICE_MAJOR_FN=yes
9465 else
9466   echo "configure: failed program was:" >&5
9467   cat conftest.$ac_ext >&5
9468   rm -fr conftest*
9469   samba_cv_HAVE_DEVICE_MAJOR_FN=no
9470 fi
9471 rm -fr conftest*
9472 fi
9473
9474 fi
9475
9476 echo "$ac_t""$samba_cv_HAVE_DEVICE_MAJOR_FN" 1>&6
9477 if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then
9478     cat >> confdefs.h <<\EOF
9479 #define HAVE_DEVICE_MAJOR_FN 1
9480 EOF
9481
9482 fi
9483
9484 echo $ac_n "checking for minor macro""... $ac_c" 1>&6
9485 echo "configure:9486: checking for minor macro" >&5
9486 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then
9487   echo $ac_n "(cached) $ac_c" 1>&6
9488 else
9489   
9490 if test "$cross_compiling" = yes; then
9491   samba_cv_HAVE_DEVICE_MINOR_FN=cross
9492 else
9493   cat > conftest.$ac_ext <<EOF
9494 #line 9495 "configure"
9495 #include "confdefs.h"
9496
9497 #if defined(HAVE_UNISTD_H)
9498 #include <unistd.h>
9499 #endif
9500 #include <sys/types.h>
9501 main() { dev_t dev; int i = minor(dev); return 0; }
9502 EOF
9503 if { (eval echo configure:9504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9504 then
9505   samba_cv_HAVE_DEVICE_MINOR_FN=yes
9506 else
9507   echo "configure: failed program was:" >&5
9508   cat conftest.$ac_ext >&5
9509   rm -fr conftest*
9510   samba_cv_HAVE_DEVICE_MINOR_FN=no
9511 fi
9512 rm -fr conftest*
9513 fi
9514
9515 fi
9516
9517 echo "$ac_t""$samba_cv_HAVE_DEVICE_MINOR_FN" 1>&6
9518 if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then
9519     cat >> confdefs.h <<\EOF
9520 #define HAVE_DEVICE_MINOR_FN 1
9521 EOF
9522
9523 fi
9524
9525 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9526 echo "configure:9527: checking for unsigned char" >&5
9527 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9528   echo $ac_n "(cached) $ac_c" 1>&6
9529 else
9530   
9531 if test "$cross_compiling" = yes; then
9532   samba_cv_HAVE_UNSIGNED_CHAR=cross
9533 else
9534   cat > conftest.$ac_ext <<EOF
9535 #line 9536 "configure"
9536 #include "confdefs.h"
9537 #include <stdio.h>
9538 main() { char c; c=250; exit((c > 0)?0:1); }
9539 EOF
9540 if { (eval echo configure:9541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9541 then
9542   samba_cv_HAVE_UNSIGNED_CHAR=yes
9543 else
9544   echo "configure: failed program was:" >&5
9545   cat conftest.$ac_ext >&5
9546   rm -fr conftest*
9547   samba_cv_HAVE_UNSIGNED_CHAR=no
9548 fi
9549 rm -fr conftest*
9550 fi
9551
9552 fi
9553
9554 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9555 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9556     cat >> confdefs.h <<\EOF
9557 #define HAVE_UNSIGNED_CHAR 1
9558 EOF
9559
9560 fi
9561
9562 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9563 echo "configure:9564: checking for sin_len in sock" >&5
9564 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9565   echo $ac_n "(cached) $ac_c" 1>&6
9566 else
9567   
9568 cat > conftest.$ac_ext <<EOF
9569 #line 9570 "configure"
9570 #include "confdefs.h"
9571 #include <sys/types.h>
9572 #include <sys/socket.h>
9573 #include <netinet/in.h>
9574 int main() {
9575 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9576 ; return 0; }
9577 EOF
9578 if { (eval echo configure:9579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9579   rm -rf conftest*
9580   samba_cv_HAVE_SOCK_SIN_LEN=yes
9581 else
9582   echo "configure: failed program was:" >&5
9583   cat conftest.$ac_ext >&5
9584   rm -rf conftest*
9585   samba_cv_HAVE_SOCK_SIN_LEN=no
9586 fi
9587 rm -f conftest*
9588 fi
9589
9590 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9591 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9592     cat >> confdefs.h <<\EOF
9593 #define HAVE_SOCK_SIN_LEN 1
9594 EOF
9595
9596 fi
9597
9598 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9599 echo "configure:9600: checking whether seekdir returns void" >&5
9600 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9601   echo $ac_n "(cached) $ac_c" 1>&6
9602 else
9603   
9604 cat > conftest.$ac_ext <<EOF
9605 #line 9606 "configure"
9606 #include "confdefs.h"
9607 #include <sys/types.h>
9608 #include <dirent.h>
9609 void seekdir(DIR *d, long loc) { return; }
9610 int main() {
9611 return 0;
9612 ; return 0; }
9613 EOF
9614 if { (eval echo configure:9615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9615   rm -rf conftest*
9616   samba_cv_SEEKDIR_RETURNS_VOID=yes
9617 else
9618   echo "configure: failed program was:" >&5
9619   cat conftest.$ac_ext >&5
9620   rm -rf conftest*
9621   samba_cv_SEEKDIR_RETURNS_VOID=no
9622 fi
9623 rm -f conftest*
9624 fi
9625
9626 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9627 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9628     cat >> confdefs.h <<\EOF
9629 #define SEEKDIR_RETURNS_VOID 1
9630 EOF
9631
9632 fi
9633
9634 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9635 echo "configure:9636: checking for __FILE__ macro" >&5
9636 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9637   echo $ac_n "(cached) $ac_c" 1>&6
9638 else
9639   
9640 cat > conftest.$ac_ext <<EOF
9641 #line 9642 "configure"
9642 #include "confdefs.h"
9643 #include <stdio.h>
9644 int main() {
9645 printf("%s\n", __FILE__);
9646 ; return 0; }
9647 EOF
9648 if { (eval echo configure:9649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9649   rm -rf conftest*
9650   samba_cv_HAVE_FILE_MACRO=yes
9651 else
9652   echo "configure: failed program was:" >&5
9653   cat conftest.$ac_ext >&5
9654   rm -rf conftest*
9655   samba_cv_HAVE_FILE_MACRO=no
9656 fi
9657 rm -f conftest*
9658 fi
9659
9660 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9661 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9662     cat >> confdefs.h <<\EOF
9663 #define HAVE_FILE_MACRO 1
9664 EOF
9665
9666 fi
9667
9668 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9669 echo "configure:9670: checking for __FUNCTION__ macro" >&5
9670 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9671   echo $ac_n "(cached) $ac_c" 1>&6
9672 else
9673   
9674 cat > conftest.$ac_ext <<EOF
9675 #line 9676 "configure"
9676 #include "confdefs.h"
9677 #include <stdio.h>
9678 int main() {
9679 printf("%s\n", __FUNCTION__);
9680 ; return 0; }
9681 EOF
9682 if { (eval echo configure:9683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9683   rm -rf conftest*
9684   samba_cv_HAVE_FUNCTION_MACRO=yes
9685 else
9686   echo "configure: failed program was:" >&5
9687   cat conftest.$ac_ext >&5
9688   rm -rf conftest*
9689   samba_cv_HAVE_FUNCTION_MACRO=no
9690 fi
9691 rm -f conftest*
9692 fi
9693
9694 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9695 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9696     cat >> confdefs.h <<\EOF
9697 #define HAVE_FUNCTION_MACRO 1
9698 EOF
9699
9700 fi
9701
9702 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9703 echo "configure:9704: checking if gettimeofday takes tz argument" >&5
9704 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9705   echo $ac_n "(cached) $ac_c" 1>&6
9706 else
9707   
9708 if test "$cross_compiling" = yes; then
9709   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9710 else
9711   cat > conftest.$ac_ext <<EOF
9712 #line 9713 "configure"
9713 #include "confdefs.h"
9714
9715 #include <sys/time.h>
9716 #include <unistd.h>
9717 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9718 EOF
9719 if { (eval echo configure:9720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9720 then
9721   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9722 else
9723   echo "configure: failed program was:" >&5
9724   cat conftest.$ac_ext >&5
9725   rm -fr conftest*
9726   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9727 fi
9728 rm -fr conftest*
9729 fi
9730
9731 fi
9732
9733 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9734 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9735     cat >> confdefs.h <<\EOF
9736 #define HAVE_GETTIMEOFDAY_TZ 1
9737 EOF
9738
9739 fi
9740
9741 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9742 echo "configure:9743: checking for C99 vsnprintf" >&5
9743 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9744   echo $ac_n "(cached) $ac_c" 1>&6
9745 else
9746   
9747 if test "$cross_compiling" = yes; then
9748   samba_cv_HAVE_C99_VSNPRINTF=cross
9749 else
9750   cat > conftest.$ac_ext <<EOF
9751 #line 9752 "configure"
9752 #include "confdefs.h"
9753
9754 #include <sys/types.h>
9755 #include <stdarg.h>
9756 void foo(const char *format, ...) { 
9757        va_list ap;
9758        int len;
9759        char buf[5];
9760
9761        va_start(ap, format);
9762        len = vsnprintf(buf, 0, format, ap);
9763        va_end(ap);
9764        if (len != 5) exit(1);
9765
9766        va_start(ap, format);
9767        len = vsnprintf(0, 0, format, ap);
9768        va_end(ap);
9769        if (len != 5) exit(1);
9770
9771        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9772
9773        exit(0);
9774 }
9775 main() { foo("hello"); }
9776
9777 EOF
9778 if { (eval echo configure:9779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9779 then
9780   samba_cv_HAVE_C99_VSNPRINTF=yes
9781 else
9782   echo "configure: failed program was:" >&5
9783   cat conftest.$ac_ext >&5
9784   rm -fr conftest*
9785   samba_cv_HAVE_C99_VSNPRINTF=no
9786 fi
9787 rm -fr conftest*
9788 fi
9789
9790 fi
9791
9792 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9793 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9794     cat >> confdefs.h <<\EOF
9795 #define HAVE_C99_VSNPRINTF 1
9796 EOF
9797
9798 fi
9799
9800 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9801 echo "configure:9802: checking for broken readdir" >&5
9802 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9803   echo $ac_n "(cached) $ac_c" 1>&6
9804 else
9805   
9806 if test "$cross_compiling" = yes; then
9807   samba_cv_HAVE_BROKEN_READDIR=cross
9808 else
9809   cat > conftest.$ac_ext <<EOF
9810 #line 9811 "configure"
9811 #include "confdefs.h"
9812 #include <sys/types.h>
9813 #include <dirent.h>
9814 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9815 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9816 di->d_name[0] == 0) exit(0); exit(1);} 
9817 EOF
9818 if { (eval echo configure:9819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9819 then
9820   samba_cv_HAVE_BROKEN_READDIR=yes
9821 else
9822   echo "configure: failed program was:" >&5
9823   cat conftest.$ac_ext >&5
9824   rm -fr conftest*
9825   samba_cv_HAVE_BROKEN_READDIR=no
9826 fi
9827 rm -fr conftest*
9828 fi
9829
9830 fi
9831
9832 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9833 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9834     cat >> confdefs.h <<\EOF
9835 #define HAVE_BROKEN_READDIR 1
9836 EOF
9837
9838 fi
9839
9840 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9841 echo "configure:9842: checking for utimbuf" >&5
9842 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9843   echo $ac_n "(cached) $ac_c" 1>&6
9844 else
9845   
9846 cat > conftest.$ac_ext <<EOF
9847 #line 9848 "configure"
9848 #include "confdefs.h"
9849 #include <sys/types.h>
9850 #include <utime.h>
9851 int main() {
9852 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9853 ; return 0; }
9854 EOF
9855 if { (eval echo configure:9856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9856   rm -rf conftest*
9857   samba_cv_HAVE_UTIMBUF=yes
9858 else
9859   echo "configure: failed program was:" >&5
9860   cat conftest.$ac_ext >&5
9861   rm -rf conftest*
9862   samba_cv_HAVE_UTIMBUF=no
9863 fi
9864 rm -f conftest*
9865 fi
9866
9867 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9868 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9869     cat >> confdefs.h <<\EOF
9870 #define HAVE_UTIMBUF 1
9871 EOF
9872
9873 fi
9874
9875
9876 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9877 do
9878 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9879 echo "configure:9880: checking for $ac_func" >&5
9880 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9881   echo $ac_n "(cached) $ac_c" 1>&6
9882 else
9883   cat > conftest.$ac_ext <<EOF
9884 #line 9885 "configure"
9885 #include "confdefs.h"
9886 /* System header to define __stub macros and hopefully few prototypes,
9887     which can conflict with char $ac_func(); below.  */
9888 #include <assert.h>
9889 /* Override any gcc2 internal prototype to avoid an error.  */
9890 /* We use char because int might match the return type of a gcc2
9891     builtin and then its argument prototype would still apply.  */
9892 char $ac_func();
9893
9894 int main() {
9895
9896 /* The GNU C library defines this for functions which it implements
9897     to always fail with ENOSYS.  Some functions are actually named
9898     something starting with __ and the normal name is an alias.  */
9899 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9900 choke me
9901 #else
9902 $ac_func();
9903 #endif
9904
9905 ; return 0; }
9906 EOF
9907 if { (eval echo configure:9908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9908   rm -rf conftest*
9909   eval "ac_cv_func_$ac_func=yes"
9910 else
9911   echo "configure: failed program was:" >&5
9912   cat conftest.$ac_ext >&5
9913   rm -rf conftest*
9914   eval "ac_cv_func_$ac_func=no"
9915 fi
9916 rm -f conftest*
9917 fi
9918
9919 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9920   echo "$ac_t""yes" 1>&6
9921     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9922   cat >> confdefs.h <<EOF
9923 #define $ac_tr_func 1
9924 EOF
9925  
9926 else
9927   echo "$ac_t""no" 1>&6
9928 fi
9929 done
9930
9931
9932 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9933 echo "configure:9934: checking for ut_name in utmp" >&5
9934 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9935   echo $ac_n "(cached) $ac_c" 1>&6
9936 else
9937   
9938 cat > conftest.$ac_ext <<EOF
9939 #line 9940 "configure"
9940 #include "confdefs.h"
9941 #include <sys/types.h>
9942 #include <utmp.h>
9943 int main() {
9944 struct utmp ut;  ut.ut_name[0] = 'a';
9945 ; return 0; }
9946 EOF
9947 if { (eval echo configure:9948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9948   rm -rf conftest*
9949   samba_cv_HAVE_UT_UT_NAME=yes
9950 else
9951   echo "configure: failed program was:" >&5
9952   cat conftest.$ac_ext >&5
9953   rm -rf conftest*
9954   samba_cv_HAVE_UT_UT_NAME=no
9955 fi
9956 rm -f conftest*
9957 fi
9958
9959 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9960 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9961     cat >> confdefs.h <<\EOF
9962 #define HAVE_UT_UT_NAME 1
9963 EOF
9964
9965 fi 
9966
9967 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9968 echo "configure:9969: checking for ut_user in utmp" >&5
9969 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+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 <sys/types.h>
9977 #include <utmp.h>
9978 int main() {
9979 struct utmp ut;  ut.ut_user[0] = 'a';
9980 ; return 0; }
9981 EOF
9982 if { (eval echo configure:9983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9983   rm -rf conftest*
9984   samba_cv_HAVE_UT_UT_USER=yes
9985 else
9986   echo "configure: failed program was:" >&5
9987   cat conftest.$ac_ext >&5
9988   rm -rf conftest*
9989   samba_cv_HAVE_UT_UT_USER=no
9990 fi
9991 rm -f conftest*
9992 fi
9993
9994 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9995 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9996     cat >> confdefs.h <<\EOF
9997 #define HAVE_UT_UT_USER 1
9998 EOF
9999
10000 fi 
10001
10002 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
10003 echo "configure:10004: checking for ut_id in utmp" >&5
10004 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
10005   echo $ac_n "(cached) $ac_c" 1>&6
10006 else
10007   
10008 cat > conftest.$ac_ext <<EOF
10009 #line 10010 "configure"
10010 #include "confdefs.h"
10011 #include <sys/types.h>
10012 #include <utmp.h>
10013 int main() {
10014 struct utmp ut;  ut.ut_id[0] = 'a';
10015 ; return 0; }
10016 EOF
10017 if { (eval echo configure:10018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10018   rm -rf conftest*
10019   samba_cv_HAVE_UT_UT_ID=yes
10020 else
10021   echo "configure: failed program was:" >&5
10022   cat conftest.$ac_ext >&5
10023   rm -rf conftest*
10024   samba_cv_HAVE_UT_UT_ID=no
10025 fi
10026 rm -f conftest*
10027 fi
10028
10029 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
10030 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
10031     cat >> confdefs.h <<\EOF
10032 #define HAVE_UT_UT_ID 1
10033 EOF
10034
10035 fi 
10036
10037 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
10038 echo "configure:10039: checking for ut_host in utmp" >&5
10039 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
10040   echo $ac_n "(cached) $ac_c" 1>&6
10041 else
10042   
10043 cat > conftest.$ac_ext <<EOF
10044 #line 10045 "configure"
10045 #include "confdefs.h"
10046 #include <sys/types.h>
10047 #include <utmp.h>
10048 int main() {
10049 struct utmp ut;  ut.ut_host[0] = 'a';
10050 ; return 0; }
10051 EOF
10052 if { (eval echo configure:10053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10053   rm -rf conftest*
10054   samba_cv_HAVE_UT_UT_HOST=yes
10055 else
10056   echo "configure: failed program was:" >&5
10057   cat conftest.$ac_ext >&5
10058   rm -rf conftest*
10059   samba_cv_HAVE_UT_UT_HOST=no
10060 fi
10061 rm -f conftest*
10062 fi
10063
10064 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
10065 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
10066     cat >> confdefs.h <<\EOF
10067 #define HAVE_UT_UT_HOST 1
10068 EOF
10069
10070 fi 
10071
10072 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
10073 echo "configure:10074: checking for ut_time in utmp" >&5
10074 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
10075   echo $ac_n "(cached) $ac_c" 1>&6
10076 else
10077   
10078 cat > conftest.$ac_ext <<EOF
10079 #line 10080 "configure"
10080 #include "confdefs.h"
10081 #include <sys/types.h>
10082 #include <utmp.h>
10083 int main() {
10084 struct utmp ut;  time_t t; ut.ut_time = t;
10085 ; return 0; }
10086 EOF
10087 if { (eval echo configure:10088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10088   rm -rf conftest*
10089   samba_cv_HAVE_UT_UT_TIME=yes
10090 else
10091   echo "configure: failed program was:" >&5
10092   cat conftest.$ac_ext >&5
10093   rm -rf conftest*
10094   samba_cv_HAVE_UT_UT_TIME=no
10095 fi
10096 rm -f conftest*
10097 fi
10098
10099 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
10100 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
10101     cat >> confdefs.h <<\EOF
10102 #define HAVE_UT_UT_TIME 1
10103 EOF
10104
10105 fi 
10106
10107 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
10108 echo "configure:10109: checking for ut_tv in utmp" >&5
10109 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
10110   echo $ac_n "(cached) $ac_c" 1>&6
10111 else
10112   
10113 cat > conftest.$ac_ext <<EOF
10114 #line 10115 "configure"
10115 #include "confdefs.h"
10116 #include <sys/types.h>
10117 #include <utmp.h>
10118 int main() {
10119 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
10120 ; return 0; }
10121 EOF
10122 if { (eval echo configure:10123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10123   rm -rf conftest*
10124   samba_cv_HAVE_UT_UT_TV=yes
10125 else
10126   echo "configure: failed program was:" >&5
10127   cat conftest.$ac_ext >&5
10128   rm -rf conftest*
10129   samba_cv_HAVE_UT_UT_TV=no
10130 fi
10131 rm -f conftest*
10132 fi
10133
10134 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
10135 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
10136     cat >> confdefs.h <<\EOF
10137 #define HAVE_UT_UT_TV 1
10138 EOF
10139
10140 fi 
10141
10142 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
10143 echo "configure:10144: checking for ut_type in utmp" >&5
10144 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
10145   echo $ac_n "(cached) $ac_c" 1>&6
10146 else
10147   
10148 cat > conftest.$ac_ext <<EOF
10149 #line 10150 "configure"
10150 #include "confdefs.h"
10151 #include <sys/types.h>
10152 #include <utmp.h>
10153 int main() {
10154 struct utmp ut;  ut.ut_type = 0;
10155 ; return 0; }
10156 EOF
10157 if { (eval echo configure:10158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10158   rm -rf conftest*
10159   samba_cv_HAVE_UT_UT_TYPE=yes
10160 else
10161   echo "configure: failed program was:" >&5
10162   cat conftest.$ac_ext >&5
10163   rm -rf conftest*
10164   samba_cv_HAVE_UT_UT_TYPE=no
10165 fi
10166 rm -f conftest*
10167 fi
10168
10169 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
10170 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
10171     cat >> confdefs.h <<\EOF
10172 #define HAVE_UT_UT_TYPE 1
10173 EOF
10174
10175 fi 
10176
10177 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
10178 echo "configure:10179: checking for ut_pid in utmp" >&5
10179 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
10180   echo $ac_n "(cached) $ac_c" 1>&6
10181 else
10182   
10183 cat > conftest.$ac_ext <<EOF
10184 #line 10185 "configure"
10185 #include "confdefs.h"
10186 #include <sys/types.h>
10187 #include <utmp.h>
10188 int main() {
10189 struct utmp ut;  ut.ut_pid = 0;
10190 ; return 0; }
10191 EOF
10192 if { (eval echo configure:10193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10193   rm -rf conftest*
10194   samba_cv_HAVE_UT_UT_PID=yes
10195 else
10196   echo "configure: failed program was:" >&5
10197   cat conftest.$ac_ext >&5
10198   rm -rf conftest*
10199   samba_cv_HAVE_UT_UT_PID=no
10200 fi
10201 rm -f conftest*
10202 fi
10203
10204 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
10205 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
10206     cat >> confdefs.h <<\EOF
10207 #define HAVE_UT_UT_PID 1
10208 EOF
10209
10210 fi 
10211
10212 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
10213 echo "configure:10214: checking for ut_exit in utmp" >&5
10214 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
10215   echo $ac_n "(cached) $ac_c" 1>&6
10216 else
10217   
10218 cat > conftest.$ac_ext <<EOF
10219 #line 10220 "configure"
10220 #include "confdefs.h"
10221 #include <sys/types.h>
10222 #include <utmp.h>
10223 int main() {
10224 struct utmp ut;  ut.ut_exit.e_exit = 0;
10225 ; return 0; }
10226 EOF
10227 if { (eval echo configure:10228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10228   rm -rf conftest*
10229   samba_cv_HAVE_UT_UT_EXIT=yes
10230 else
10231   echo "configure: failed program was:" >&5
10232   cat conftest.$ac_ext >&5
10233   rm -rf conftest*
10234   samba_cv_HAVE_UT_UT_EXIT=no
10235 fi
10236 rm -f conftest*
10237 fi
10238
10239 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
10240 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
10241     cat >> confdefs.h <<\EOF
10242 #define HAVE_UT_UT_EXIT 1
10243 EOF
10244
10245 fi 
10246
10247 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
10248 echo "configure:10249: checking for ut_addr in utmp" >&5
10249 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
10250   echo $ac_n "(cached) $ac_c" 1>&6
10251 else
10252   
10253 cat > conftest.$ac_ext <<EOF
10254 #line 10255 "configure"
10255 #include "confdefs.h"
10256 #include <sys/types.h>
10257 #include <utmp.h>
10258 int main() {
10259 struct utmp ut;  ut.ut_addr = 0;
10260 ; return 0; }
10261 EOF
10262 if { (eval echo configure:10263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10263   rm -rf conftest*
10264   samba_cv_HAVE_UT_UT_ADDR=yes
10265 else
10266   echo "configure: failed program was:" >&5
10267   cat conftest.$ac_ext >&5
10268   rm -rf conftest*
10269   samba_cv_HAVE_UT_UT_ADDR=no
10270 fi
10271 rm -f conftest*
10272 fi
10273
10274 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
10275 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
10276     cat >> confdefs.h <<\EOF
10277 #define HAVE_UT_UT_ADDR 1
10278 EOF
10279
10280 fi 
10281
10282 if test x$ac_cv_func_pututline = xyes ; then
10283   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
10284 echo "configure:10285: checking whether pututline returns pointer" >&5
10285 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
10286   echo $ac_n "(cached) $ac_c" 1>&6
10287 else
10288   
10289   cat > conftest.$ac_ext <<EOF
10290 #line 10291 "configure"
10291 #include "confdefs.h"
10292 #include <sys/types.h>
10293 #include <utmp.h>
10294 int main() {
10295 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
10296 ; return 0; }
10297 EOF
10298 if { (eval echo configure:10299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10299   rm -rf conftest*
10300   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
10301 else
10302   echo "configure: failed program was:" >&5
10303   cat conftest.$ac_ext >&5
10304   rm -rf conftest*
10305   samba_cv_PUTUTLINE_RETURNS_UTMP=no
10306 fi
10307 rm -f conftest*
10308 fi
10309
10310 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
10311   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
10312       cat >> confdefs.h <<\EOF
10313 #define PUTUTLINE_RETURNS_UTMP 1
10314 EOF
10315
10316   fi
10317 fi
10318
10319 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
10320 echo "configure:10321: checking for ut_syslen in utmpx" >&5
10321 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
10322   echo $ac_n "(cached) $ac_c" 1>&6
10323 else
10324   
10325 cat > conftest.$ac_ext <<EOF
10326 #line 10327 "configure"
10327 #include "confdefs.h"
10328 #include <sys/types.h>
10329 #include <utmpx.h>
10330 int main() {
10331 struct utmpx ux;  ux.ut_syslen = 0;
10332 ; return 0; }
10333 EOF
10334 if { (eval echo configure:10335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10335   rm -rf conftest*
10336   samba_cv_HAVE_UX_UT_SYSLEN=yes
10337 else
10338   echo "configure: failed program was:" >&5
10339   cat conftest.$ac_ext >&5
10340   rm -rf conftest*
10341   samba_cv_HAVE_UX_UT_SYSLEN=no
10342 fi
10343 rm -f conftest*
10344 fi
10345
10346 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
10347 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
10348     cat >> confdefs.h <<\EOF
10349 #define HAVE_UX_UT_SYSLEN 1
10350 EOF
10351
10352 fi 
10353
10354
10355 #################################################
10356 # check for libiconv support
10357 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
10358 echo "configure:10359: checking whether to use libiconv" >&5
10359 # Check whether --with-libiconv or --without-libiconv was given.
10360 if test "${with_libiconv+set}" = set; then
10361   withval="$with_libiconv"
10362    case "$withval" in
10363   no)
10364     echo "$ac_t""no" 1>&6
10365     ;;
10366   *)
10367     echo "$ac_t""yes" 1>&6
10368     CFLAGS="$CFLAGS -I$withval/include"
10369     LDFLAGS="$LDFLAGS -L$withval/lib"
10370     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
10371 echo "configure:10372: checking for iconv_open in -liconv" >&5
10372 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
10373 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10374   echo $ac_n "(cached) $ac_c" 1>&6
10375 else
10376   ac_save_LIBS="$LIBS"
10377 LIBS="-liconv  $LIBS"
10378 cat > conftest.$ac_ext <<EOF
10379 #line 10380 "configure"
10380 #include "confdefs.h"
10381 /* Override any gcc2 internal prototype to avoid an error.  */
10382 /* We use char because int might match the return type of a gcc2
10383     builtin and then its argument prototype would still apply.  */
10384 char iconv_open();
10385
10386 int main() {
10387 iconv_open()
10388 ; return 0; }
10389 EOF
10390 if { (eval echo configure:10391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10391   rm -rf conftest*
10392   eval "ac_cv_lib_$ac_lib_var=yes"
10393 else
10394   echo "configure: failed program was:" >&5
10395   cat conftest.$ac_ext >&5
10396   rm -rf conftest*
10397   eval "ac_cv_lib_$ac_lib_var=no"
10398 fi
10399 rm -f conftest*
10400 LIBS="$ac_save_LIBS"
10401
10402 fi
10403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10404   echo "$ac_t""yes" 1>&6
10405     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10406     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10407   cat >> confdefs.h <<EOF
10408 #define $ac_tr_lib 1
10409 EOF
10410
10411   LIBS="-liconv $LIBS"
10412
10413 else
10414   echo "$ac_t""no" 1>&6
10415 fi
10416
10417     cat >> confdefs.h <<EOF
10418 #define WITH_LIBICONV "${withval}"
10419 EOF
10420
10421     ;;
10422   esac 
10423 else
10424   echo "$ac_t""no" 1>&6
10425
10426 fi
10427
10428
10429
10430 ############
10431 # check for iconv in libc
10432 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
10433 echo "configure:10434: checking for working iconv" >&5
10434 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
10435   echo $ac_n "(cached) $ac_c" 1>&6
10436 else
10437   
10438 if test "$cross_compiling" = yes; then
10439   samba_cv_HAVE_NATIVE_ICONV=cross
10440 else
10441   cat > conftest.$ac_ext <<EOF
10442 #line 10443 "configure"
10443 #include "confdefs.h"
10444
10445 #include <iconv.h>
10446 main() {
10447        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
10448        if (cd == 0 || cd == (iconv_t)-1) return -1;
10449        return 0;
10450 }
10451
10452 EOF
10453 if { (eval echo configure:10454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10454 then
10455   samba_cv_HAVE_NATIVE_ICONV=yes
10456 else
10457   echo "configure: failed program was:" >&5
10458   cat conftest.$ac_ext >&5
10459   rm -fr conftest*
10460   samba_cv_HAVE_NATIVE_ICONV=no
10461 fi
10462 rm -fr conftest*
10463 fi
10464
10465 fi
10466
10467 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
10468 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
10469     cat >> confdefs.h <<\EOF
10470 #define HAVE_NATIVE_ICONV 1
10471 EOF
10472
10473 fi
10474
10475
10476 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
10477 echo "configure:10478: checking for Linux kernel oplocks" >&5
10478 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
10479   echo $ac_n "(cached) $ac_c" 1>&6
10480 else
10481   
10482 if test "$cross_compiling" = yes; then
10483   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
10484 else
10485   cat > conftest.$ac_ext <<EOF
10486 #line 10487 "configure"
10487 #include "confdefs.h"
10488
10489 #include <sys/types.h>
10490 #include <fcntl.h>
10491 #ifndef F_GETLEASE
10492 #define F_GETLEASE      1025
10493 #endif
10494 main() {
10495        int fd = open("/dev/null", O_RDONLY);
10496        return fcntl(fd, F_GETLEASE, 0) == -1;
10497 }
10498
10499 EOF
10500 if { (eval echo configure:10501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10501 then
10502   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10503 else
10504   echo "configure: failed program was:" >&5
10505   cat conftest.$ac_ext >&5
10506   rm -fr conftest*
10507   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10508 fi
10509 rm -fr conftest*
10510 fi
10511
10512 fi
10513
10514 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10515 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10516     cat >> confdefs.h <<\EOF
10517 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10518 EOF
10519
10520 fi
10521
10522 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10523 echo "configure:10524: checking for kernel change notify support" >&5
10524 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10525   echo $ac_n "(cached) $ac_c" 1>&6
10526 else
10527   
10528 if test "$cross_compiling" = yes; then
10529   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10530 else
10531   cat > conftest.$ac_ext <<EOF
10532 #line 10533 "configure"
10533 #include "confdefs.h"
10534
10535 #include <sys/types.h>
10536 #include <fcntl.h>
10537 #include <signal.h>
10538 #ifndef F_NOTIFY
10539 #define F_NOTIFY 1026
10540 #endif
10541 main() {
10542         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10543 }
10544
10545 EOF
10546 if { (eval echo configure:10547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10547 then
10548   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10549 else
10550   echo "configure: failed program was:" >&5
10551   cat conftest.$ac_ext >&5
10552   rm -fr conftest*
10553   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10554 fi
10555 rm -fr conftest*
10556 fi
10557
10558 fi
10559
10560 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10561 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10562     cat >> confdefs.h <<\EOF
10563 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10564 EOF
10565
10566 fi
10567
10568 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10569 echo "configure:10570: checking for kernel share modes" >&5
10570 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10571   echo $ac_n "(cached) $ac_c" 1>&6
10572 else
10573   
10574 if test "$cross_compiling" = yes; then
10575   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10576 else
10577   cat > conftest.$ac_ext <<EOF
10578 #line 10579 "configure"
10579 #include "confdefs.h"
10580
10581 #include <sys/types.h>
10582 #include <fcntl.h>
10583 #include <signal.h>
10584 #include <sys/file.h>
10585 #ifndef LOCK_MAND
10586 #define LOCK_MAND       32
10587 #define LOCK_READ       64
10588 #endif
10589 main() {
10590         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10591 }
10592
10593 EOF
10594 if { (eval echo configure:10595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10595 then
10596   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10597 else
10598   echo "configure: failed program was:" >&5
10599   cat conftest.$ac_ext >&5
10600   rm -fr conftest*
10601   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10602 fi
10603 rm -fr conftest*
10604 fi
10605
10606 fi
10607
10608 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10609 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10610     cat >> confdefs.h <<\EOF
10611 #define HAVE_KERNEL_SHARE_MODES 1
10612 EOF
10613
10614 fi
10615
10616
10617
10618
10619 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10620 echo "configure:10621: checking for IRIX kernel oplock type definitions" >&5
10621 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10622   echo $ac_n "(cached) $ac_c" 1>&6
10623 else
10624   
10625 cat > conftest.$ac_ext <<EOF
10626 #line 10627 "configure"
10627 #include "confdefs.h"
10628 #include <sys/types.h>
10629 #include <fcntl.h>
10630 int main() {
10631 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10632 ; return 0; }
10633 EOF
10634 if { (eval echo configure:10635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10635   rm -rf conftest*
10636   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10637 else
10638   echo "configure: failed program was:" >&5
10639   cat conftest.$ac_ext >&5
10640   rm -rf conftest*
10641   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10642 fi
10643 rm -f conftest*
10644 fi
10645
10646 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10647 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10648     cat >> confdefs.h <<\EOF
10649 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10650 EOF
10651
10652 fi
10653
10654 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10655 echo "configure:10656: checking for irix specific capabilities" >&5
10656 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10657   echo $ac_n "(cached) $ac_c" 1>&6
10658 else
10659   
10660 if test "$cross_compiling" = yes; then
10661   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10662 else
10663   cat > conftest.$ac_ext <<EOF
10664 #line 10665 "configure"
10665 #include "confdefs.h"
10666 #include <sys/types.h>
10667 #include <sys/capability.h>
10668 main() {
10669  cap_t cap;
10670  if ((cap = cap_get_proc()) == NULL)
10671    exit(1);
10672  cap->cap_effective |= CAP_NETWORK_MGT;
10673  cap->cap_inheritable |= CAP_NETWORK_MGT;
10674  cap_set_proc(cap);
10675  exit(0);
10676 }
10677
10678 EOF
10679 if { (eval echo configure:10680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10680 then
10681   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10682 else
10683   echo "configure: failed program was:" >&5
10684   cat conftest.$ac_ext >&5
10685   rm -fr conftest*
10686   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10687 fi
10688 rm -fr conftest*
10689 fi
10690
10691 fi
10692
10693 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10694 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10695     cat >> confdefs.h <<\EOF
10696 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10697 EOF
10698
10699 fi
10700
10701 #
10702 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10703 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10704 #
10705
10706 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10707 echo "configure:10708: checking for int16 typedef included by rpc/rpc.h" >&5
10708 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10709   echo $ac_n "(cached) $ac_c" 1>&6
10710 else
10711   
10712 cat > conftest.$ac_ext <<EOF
10713 #line 10714 "configure"
10714 #include "confdefs.h"
10715 #include <sys/types.h>
10716 #if defined(HAVE_RPC_RPC_H)
10717 #include <rpc/rpc.h>
10718 #endif
10719 int main() {
10720 int16 testvar;
10721 ; return 0; }
10722 EOF
10723 if { (eval echo configure:10724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10724   rm -rf conftest*
10725   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10726 else
10727   echo "configure: failed program was:" >&5
10728   cat conftest.$ac_ext >&5
10729   rm -rf conftest*
10730   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10731 fi
10732 rm -f conftest*
10733 fi
10734
10735 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10736 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10737     cat >> confdefs.h <<\EOF
10738 #define HAVE_INT16_FROM_RPC_RPC_H 1
10739 EOF
10740
10741 fi
10742
10743 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10744 echo "configure:10745: checking for uint16 typedef included by rpc/rpc.h" >&5
10745 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10746   echo $ac_n "(cached) $ac_c" 1>&6
10747 else
10748   
10749 cat > conftest.$ac_ext <<EOF
10750 #line 10751 "configure"
10751 #include "confdefs.h"
10752 #include <sys/types.h>
10753 #if defined(HAVE_RPC_RPC_H)
10754 #include <rpc/rpc.h>
10755 #endif
10756 int main() {
10757 uint16 testvar;
10758 ; return 0; }
10759 EOF
10760 if { (eval echo configure:10761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10761   rm -rf conftest*
10762   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10763 else
10764   echo "configure: failed program was:" >&5
10765   cat conftest.$ac_ext >&5
10766   rm -rf conftest*
10767   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10768 fi
10769 rm -f conftest*
10770 fi
10771
10772 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10773 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10774     cat >> confdefs.h <<\EOF
10775 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10776 EOF
10777
10778 fi
10779
10780 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10781 echo "configure:10782: checking for int32 typedef included by rpc/rpc.h" >&5
10782 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10783   echo $ac_n "(cached) $ac_c" 1>&6
10784 else
10785   
10786 cat > conftest.$ac_ext <<EOF
10787 #line 10788 "configure"
10788 #include "confdefs.h"
10789 #include <sys/types.h>
10790 #if defined(HAVE_RPC_RPC_H)
10791 #include <rpc/rpc.h>
10792 #endif
10793 int main() {
10794 int32 testvar;
10795 ; return 0; }
10796 EOF
10797 if { (eval echo configure:10798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10798   rm -rf conftest*
10799   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10800 else
10801   echo "configure: failed program was:" >&5
10802   cat conftest.$ac_ext >&5
10803   rm -rf conftest*
10804   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10805 fi
10806 rm -f conftest*
10807 fi
10808
10809 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10810 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10811     cat >> confdefs.h <<\EOF
10812 #define HAVE_INT32_FROM_RPC_RPC_H 1
10813 EOF
10814
10815 fi
10816
10817 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10818 echo "configure:10819: checking for uint32 typedef included by rpc/rpc.h" >&5
10819 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10820   echo $ac_n "(cached) $ac_c" 1>&6
10821 else
10822   
10823 cat > conftest.$ac_ext <<EOF
10824 #line 10825 "configure"
10825 #include "confdefs.h"
10826 #include <sys/types.h>
10827 #if defined(HAVE_RPC_RPC_H)
10828 #include <rpc/rpc.h>
10829 #endif
10830 int main() {
10831 uint32 testvar;
10832 ; return 0; }
10833 EOF
10834 if { (eval echo configure:10835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10835   rm -rf conftest*
10836   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10837 else
10838   echo "configure: failed program was:" >&5
10839   cat conftest.$ac_ext >&5
10840   rm -rf conftest*
10841   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10842 fi
10843 rm -f conftest*
10844 fi
10845
10846 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10847 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10848     cat >> confdefs.h <<\EOF
10849 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10850 EOF
10851
10852 fi
10853
10854
10855 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10856 echo "configure:10857: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10857 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10858   echo $ac_n "(cached) $ac_c" 1>&6
10859 else
10860   
10861 cat > conftest.$ac_ext <<EOF
10862 #line 10863 "configure"
10863 #include "confdefs.h"
10864 #include <sys/types.h>
10865 #ifdef HAVE_SYS_SECURITY_H
10866 #include <sys/security.h>
10867 #include <prot.h>
10868 #endif  /* HAVE_SYS_SECURITY_H */
10869 #if defined(HAVE_RPC_RPC_H)
10870 #include <rpc/rpc.h>
10871 #endif
10872 int main() {
10873 int testvar;
10874 ; return 0; }
10875 EOF
10876 if { (eval echo configure:10877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10877   rm -rf conftest*
10878   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10879 else
10880   echo "configure: failed program was:" >&5
10881   cat conftest.$ac_ext >&5
10882   rm -rf conftest*
10883   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10884 fi
10885 rm -f conftest*
10886 fi
10887
10888 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10889 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10890     cat >> confdefs.h <<\EOF
10891 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10892 EOF
10893
10894 fi
10895
10896 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10897 echo "configure:10898: checking for test routines" >&5
10898 if test "$cross_compiling" = yes; then
10899   echo "configure: warning: cannot run when cross-compiling" 1>&2
10900 else
10901   cat > conftest.$ac_ext <<EOF
10902 #line 10903 "configure"
10903 #include "confdefs.h"
10904 #include "${srcdir-.}/tests/trivial.c"
10905 EOF
10906 if { (eval echo configure:10907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10907 then
10908   echo "$ac_t""yes" 1>&6
10909 else
10910   echo "configure: failed program was:" >&5
10911   cat conftest.$ac_ext >&5
10912   rm -fr conftest*
10913   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10914 fi
10915 rm -fr conftest*
10916 fi
10917
10918
10919 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10920 echo "configure:10921: checking for ftruncate extend" >&5
10921 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10922   echo $ac_n "(cached) $ac_c" 1>&6
10923 else
10924   
10925 if test "$cross_compiling" = yes; then
10926   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10927 else
10928   cat > conftest.$ac_ext <<EOF
10929 #line 10930 "configure"
10930 #include "confdefs.h"
10931 #include "${srcdir-.}/tests/ftruncate.c"
10932 EOF
10933 if { (eval echo configure:10934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10934 then
10935   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10936 else
10937   echo "configure: failed program was:" >&5
10938   cat conftest.$ac_ext >&5
10939   rm -fr conftest*
10940   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10941 fi
10942 rm -fr conftest*
10943 fi
10944
10945 fi
10946
10947 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10948 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10949     cat >> confdefs.h <<\EOF
10950 #define HAVE_FTRUNCATE_EXTEND 1
10951 EOF
10952
10953 fi
10954
10955 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10956 echo "configure:10957: checking for AF_LOCAL socket support" >&5
10957 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10958   echo $ac_n "(cached) $ac_c" 1>&6
10959 else
10960   
10961 if test "$cross_compiling" = yes; then
10962   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10963 else
10964   cat > conftest.$ac_ext <<EOF
10965 #line 10966 "configure"
10966 #include "confdefs.h"
10967 #include "${srcdir-.}/tests/unixsock.c"
10968 EOF
10969 if { (eval echo configure:10970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10970 then
10971   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10972 else
10973   echo "configure: failed program was:" >&5
10974   cat conftest.$ac_ext >&5
10975   rm -fr conftest*
10976   samba_cv_HAVE_WORKING_AF_LOCAL=no
10977 fi
10978 rm -fr conftest*
10979 fi
10980
10981 fi
10982
10983 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10984 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10985 then
10986     cat >> confdefs.h <<\EOF
10987 #define HAVE_WORKING_AF_LOCAL 1
10988 EOF
10989
10990 fi
10991
10992 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10993 echo "configure:10994: checking for broken getgroups" >&5
10994 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10995   echo $ac_n "(cached) $ac_c" 1>&6
10996 else
10997   
10998 if test "$cross_compiling" = yes; then
10999   samba_cv_HAVE_BROKEN_GETGROUPS=cross
11000 else
11001   cat > conftest.$ac_ext <<EOF
11002 #line 11003 "configure"
11003 #include "confdefs.h"
11004 #include "${srcdir-.}/tests/getgroups.c"
11005 EOF
11006 if { (eval echo configure:11007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11007 then
11008   samba_cv_HAVE_BROKEN_GETGROUPS=yes
11009 else
11010   echo "configure: failed program was:" >&5
11011   cat conftest.$ac_ext >&5
11012   rm -fr conftest*
11013   samba_cv_HAVE_BROKEN_GETGROUPS=no
11014 fi
11015 rm -fr conftest*
11016 fi
11017
11018 fi
11019
11020 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
11021 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
11022     cat >> confdefs.h <<\EOF
11023 #define HAVE_BROKEN_GETGROUPS 1
11024 EOF
11025
11026 fi
11027
11028 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
11029 echo "configure:11030: checking whether getpass should be replaced" >&5
11030 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
11031   echo $ac_n "(cached) $ac_c" 1>&6
11032 else
11033   
11034 SAVE_CPPFLAGS="$CPPFLAGS"
11035 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/popt -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
11036 cat > conftest.$ac_ext <<EOF
11037 #line 11038 "configure"
11038 #include "confdefs.h"
11039
11040 #define REPLACE_GETPASS 1
11041 #define NO_CONFIG_H 1
11042 #define main dont_declare_main
11043 #include "${srcdir-.}/lib/getsmbpass.c"
11044 #undef main
11045
11046 int main() {
11047
11048 ; return 0; }
11049 EOF
11050 if { (eval echo configure:11051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11051   rm -rf conftest*
11052   samba_cv_REPLACE_GETPASS=yes
11053 else
11054   echo "configure: failed program was:" >&5
11055   cat conftest.$ac_ext >&5
11056   rm -rf conftest*
11057   samba_cv_REPLACE_GETPASS=no
11058 fi
11059 rm -f conftest*
11060 CPPFLAGS="$SAVE_CPPFLAGS"
11061
11062 fi
11063
11064 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
11065 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
11066         cat >> confdefs.h <<\EOF
11067 #define REPLACE_GETPASS 1
11068 EOF
11069
11070 fi
11071
11072 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
11073 echo "configure:11074: checking for broken inet_ntoa" >&5
11074 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
11075   echo $ac_n "(cached) $ac_c" 1>&6
11076 else
11077   
11078 if test "$cross_compiling" = yes; then
11079   samba_cv_REPLACE_INET_NTOA=cross
11080 else
11081   cat > conftest.$ac_ext <<EOF
11082 #line 11083 "configure"
11083 #include "confdefs.h"
11084
11085 #include <stdio.h>
11086 #include <sys/types.h>
11087 #include <netinet/in.h>
11088 #ifdef HAVE_ARPA_INET_H
11089 #include <arpa/inet.h>
11090 #endif
11091 main() { struct in_addr ip; ip.s_addr = 0x12345678;
11092 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
11093     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
11094 exit(1);}
11095 EOF
11096 if { (eval echo configure:11097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11097 then
11098   samba_cv_REPLACE_INET_NTOA=yes
11099 else
11100   echo "configure: failed program was:" >&5
11101   cat conftest.$ac_ext >&5
11102   rm -fr conftest*
11103   samba_cv_REPLACE_INET_NTOA=no
11104 fi
11105 rm -fr conftest*
11106 fi
11107
11108 fi
11109
11110 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
11111 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
11112     cat >> confdefs.h <<\EOF
11113 #define REPLACE_INET_NTOA 1
11114 EOF
11115
11116 fi
11117
11118 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
11119 echo "configure:11120: checking for secure mkstemp" >&5
11120 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
11121   echo $ac_n "(cached) $ac_c" 1>&6
11122 else
11123   
11124 if test "$cross_compiling" = yes; then
11125   samba_cv_HAVE_SECURE_MKSTEMP=cross
11126 else
11127   cat > conftest.$ac_ext <<EOF
11128 #line 11129 "configure"
11129 #include "confdefs.h"
11130 #include <stdlib.h>
11131 #include <sys/types.h>
11132 #include <sys/stat.h>
11133 #include <unistd.h>
11134 main() { 
11135   struct stat st;
11136   char tpl[20]="/tmp/test.XXXXXX"; 
11137   int fd = mkstemp(tpl); 
11138   if (fd == -1) exit(1);
11139   unlink(tpl);
11140   if (fstat(fd, &st) != 0) exit(1);
11141   if ((st.st_mode & 0777) != 0600) exit(1);
11142   exit(0);
11143 }
11144 EOF
11145 if { (eval echo configure:11146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11146 then
11147   samba_cv_HAVE_SECURE_MKSTEMP=yes
11148 else
11149   echo "configure: failed program was:" >&5
11150   cat conftest.$ac_ext >&5
11151   rm -fr conftest*
11152   samba_cv_HAVE_SECURE_MKSTEMP=no
11153 fi
11154 rm -fr conftest*
11155 fi
11156
11157 fi
11158
11159 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
11160 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
11161     cat >> confdefs.h <<\EOF
11162 #define HAVE_SECURE_MKSTEMP 1
11163 EOF
11164
11165 fi
11166
11167 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
11168 echo "configure:11169: checking for sysconf(_SC_NGROUPS_MAX)" >&5
11169 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
11170   echo $ac_n "(cached) $ac_c" 1>&6
11171 else
11172   
11173 if test "$cross_compiling" = yes; then
11174   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
11175 else
11176   cat > conftest.$ac_ext <<EOF
11177 #line 11178 "configure"
11178 #include "confdefs.h"
11179 #include <unistd.h>
11180 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
11181 EOF
11182 if { (eval echo configure:11183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11183 then
11184   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
11185 else
11186   echo "configure: failed program was:" >&5
11187   cat conftest.$ac_ext >&5
11188   rm -fr conftest*
11189   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
11190 fi
11191 rm -fr conftest*
11192 fi
11193
11194 fi
11195
11196 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
11197 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
11198     cat >> confdefs.h <<\EOF
11199 #define SYSCONF_SC_NGROUPS_MAX 1
11200 EOF
11201
11202 fi
11203
11204 echo $ac_n "checking for root""... $ac_c" 1>&6
11205 echo "configure:11206: checking for root" >&5
11206 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
11207   echo $ac_n "(cached) $ac_c" 1>&6
11208 else
11209   
11210 if test "$cross_compiling" = yes; then
11211   samba_cv_HAVE_ROOT=cross
11212 else
11213   cat > conftest.$ac_ext <<EOF
11214 #line 11215 "configure"
11215 #include "confdefs.h"
11216 main() { exit(getuid() != 0); }
11217 EOF
11218 if { (eval echo configure:11219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11219 then
11220   samba_cv_HAVE_ROOT=yes
11221 else
11222   echo "configure: failed program was:" >&5
11223   cat conftest.$ac_ext >&5
11224   rm -fr conftest*
11225   samba_cv_HAVE_ROOT=no
11226 fi
11227 rm -fr conftest*
11228 fi
11229
11230 fi
11231
11232 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
11233 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
11234     cat >> confdefs.h <<\EOF
11235 #define HAVE_ROOT 1
11236 EOF
11237
11238 else
11239     echo "configure: warning: running as non-root will disable some tests" 1>&2
11240 fi
11241
11242 ##################
11243 # look for a method of finding the list of network interfaces
11244 iface=no;
11245 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
11246 echo "configure:11247: checking for iface AIX" >&5
11247 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
11248   echo $ac_n "(cached) $ac_c" 1>&6
11249 else
11250   
11251 if test "$cross_compiling" = yes; then
11252   samba_cv_HAVE_IFACE_AIX=cross
11253 else
11254   cat > conftest.$ac_ext <<EOF
11255 #line 11256 "configure"
11256 #include "confdefs.h"
11257
11258 #define HAVE_IFACE_AIX 1
11259 #define AUTOCONF_TEST 1
11260 #include "confdefs.h"
11261 #include "${srcdir-.}/lib/interfaces.c"
11262 EOF
11263 if { (eval echo configure:11264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11264 then
11265   samba_cv_HAVE_IFACE_AIX=yes
11266 else
11267   echo "configure: failed program was:" >&5
11268   cat conftest.$ac_ext >&5
11269   rm -fr conftest*
11270   samba_cv_HAVE_IFACE_AIX=no
11271 fi
11272 rm -fr conftest*
11273 fi
11274
11275 fi
11276
11277 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
11278 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
11279     iface=yes;cat >> confdefs.h <<\EOF
11280 #define HAVE_IFACE_AIX 1
11281 EOF
11282
11283 fi
11284
11285 if test $iface = no; then
11286 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
11287 echo "configure:11288: checking for iface ifconf" >&5
11288 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
11289   echo $ac_n "(cached) $ac_c" 1>&6
11290 else
11291   
11292 if test "$cross_compiling" = yes; then
11293   samba_cv_HAVE_IFACE_IFCONF=cross
11294 else
11295   cat > conftest.$ac_ext <<EOF
11296 #line 11297 "configure"
11297 #include "confdefs.h"
11298
11299 #define HAVE_IFACE_IFCONF 1
11300 #define AUTOCONF_TEST 1
11301 #include "confdefs.h"
11302 #include "${srcdir-.}/lib/interfaces.c"
11303 EOF
11304 if { (eval echo configure:11305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11305 then
11306   samba_cv_HAVE_IFACE_IFCONF=yes
11307 else
11308   echo "configure: failed program was:" >&5
11309   cat conftest.$ac_ext >&5
11310   rm -fr conftest*
11311   samba_cv_HAVE_IFACE_IFCONF=no
11312 fi
11313 rm -fr conftest*
11314 fi
11315
11316 fi
11317
11318 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
11319 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
11320     iface=yes;cat >> confdefs.h <<\EOF
11321 #define HAVE_IFACE_IFCONF 1
11322 EOF
11323
11324 fi
11325 fi
11326
11327 if test $iface = no; then
11328 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
11329 echo "configure:11330: checking for iface ifreq" >&5
11330 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
11331   echo $ac_n "(cached) $ac_c" 1>&6
11332 else
11333   
11334 if test "$cross_compiling" = yes; then
11335   samba_cv_HAVE_IFACE_IFREQ=cross
11336 else
11337   cat > conftest.$ac_ext <<EOF
11338 #line 11339 "configure"
11339 #include "confdefs.h"
11340
11341 #define HAVE_IFACE_IFREQ 1
11342 #define AUTOCONF_TEST 1
11343 #include "confdefs.h"
11344 #include "${srcdir-.}/lib/interfaces.c"
11345 EOF
11346 if { (eval echo configure:11347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11347 then
11348   samba_cv_HAVE_IFACE_IFREQ=yes
11349 else
11350   echo "configure: failed program was:" >&5
11351   cat conftest.$ac_ext >&5
11352   rm -fr conftest*
11353   samba_cv_HAVE_IFACE_IFREQ=no
11354 fi
11355 rm -fr conftest*
11356 fi
11357
11358 fi
11359
11360 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
11361 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
11362     iface=yes;cat >> confdefs.h <<\EOF
11363 #define HAVE_IFACE_IFREQ 1
11364 EOF
11365
11366 fi
11367 fi
11368
11369
11370 ################################################
11371 # look for a method of setting the effective uid
11372 seteuid=no;
11373 if test $seteuid = no; then
11374 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
11375 echo "configure:11376: checking for setresuid" >&5
11376 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
11377   echo $ac_n "(cached) $ac_c" 1>&6
11378 else
11379   
11380 if test "$cross_compiling" = yes; then
11381   samba_cv_USE_SETRESUID=cross
11382 else
11383   cat > conftest.$ac_ext <<EOF
11384 #line 11385 "configure"
11385 #include "confdefs.h"
11386
11387 #define AUTOCONF_TEST 1
11388 #define USE_SETRESUID 1
11389 #include "confdefs.h"
11390 #include "${srcdir-.}/lib/util_sec.c"
11391 EOF
11392 if { (eval echo configure:11393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11393 then
11394   samba_cv_USE_SETRESUID=yes
11395 else
11396   echo "configure: failed program was:" >&5
11397   cat conftest.$ac_ext >&5
11398   rm -fr conftest*
11399   samba_cv_USE_SETRESUID=no
11400 fi
11401 rm -fr conftest*
11402 fi
11403
11404 fi
11405
11406 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
11407 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
11408     seteuid=yes;cat >> confdefs.h <<\EOF
11409 #define USE_SETRESUID 1
11410 EOF
11411
11412 fi
11413 fi
11414
11415
11416 if test $seteuid = no; then
11417 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
11418 echo "configure:11419: checking for setreuid" >&5
11419 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
11420   echo $ac_n "(cached) $ac_c" 1>&6
11421 else
11422   
11423 if test "$cross_compiling" = yes; then
11424   samba_cv_USE_SETREUID=cross
11425 else
11426   cat > conftest.$ac_ext <<EOF
11427 #line 11428 "configure"
11428 #include "confdefs.h"
11429
11430 #define AUTOCONF_TEST 1
11431 #define USE_SETREUID 1
11432 #include "confdefs.h"
11433 #include "${srcdir-.}/lib/util_sec.c"
11434 EOF
11435 if { (eval echo configure:11436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11436 then
11437   samba_cv_USE_SETREUID=yes
11438 else
11439   echo "configure: failed program was:" >&5
11440   cat conftest.$ac_ext >&5
11441   rm -fr conftest*
11442   samba_cv_USE_SETREUID=no
11443 fi
11444 rm -fr conftest*
11445 fi
11446
11447 fi
11448
11449 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
11450 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
11451     seteuid=yes;cat >> confdefs.h <<\EOF
11452 #define USE_SETREUID 1
11453 EOF
11454
11455 fi
11456 fi
11457
11458 if test $seteuid = no; then
11459 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
11460 echo "configure:11461: checking for seteuid" >&5
11461 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
11462   echo $ac_n "(cached) $ac_c" 1>&6
11463 else
11464   
11465 if test "$cross_compiling" = yes; then
11466   samba_cv_USE_SETEUID=cross
11467 else
11468   cat > conftest.$ac_ext <<EOF
11469 #line 11470 "configure"
11470 #include "confdefs.h"
11471
11472 #define AUTOCONF_TEST 1
11473 #define USE_SETEUID 1
11474 #include "confdefs.h"
11475 #include "${srcdir-.}/lib/util_sec.c"
11476 EOF
11477 if { (eval echo configure:11478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11478 then
11479   samba_cv_USE_SETEUID=yes
11480 else
11481   echo "configure: failed program was:" >&5
11482   cat conftest.$ac_ext >&5
11483   rm -fr conftest*
11484   samba_cv_USE_SETEUID=no
11485 fi
11486 rm -fr conftest*
11487 fi
11488
11489 fi
11490
11491 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
11492 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
11493     seteuid=yes;cat >> confdefs.h <<\EOF
11494 #define USE_SETEUID 1
11495 EOF
11496
11497 fi
11498 fi
11499
11500 if test $seteuid = no; then
11501 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11502 echo "configure:11503: checking for setuidx" >&5
11503 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
11504   echo $ac_n "(cached) $ac_c" 1>&6
11505 else
11506   
11507 if test "$cross_compiling" = yes; then
11508   samba_cv_USE_SETUIDX=cross
11509 else
11510   cat > conftest.$ac_ext <<EOF
11511 #line 11512 "configure"
11512 #include "confdefs.h"
11513
11514 #define AUTOCONF_TEST 1
11515 #define USE_SETUIDX 1
11516 #include "confdefs.h"
11517 #include "${srcdir-.}/lib/util_sec.c"
11518 EOF
11519 if { (eval echo configure:11520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11520 then
11521   samba_cv_USE_SETUIDX=yes
11522 else
11523   echo "configure: failed program was:" >&5
11524   cat conftest.$ac_ext >&5
11525   rm -fr conftest*
11526   samba_cv_USE_SETUIDX=no
11527 fi
11528 rm -fr conftest*
11529 fi
11530
11531 fi
11532
11533 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11534 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11535     seteuid=yes;cat >> confdefs.h <<\EOF
11536 #define USE_SETUIDX 1
11537 EOF
11538
11539 fi
11540 fi
11541
11542
11543 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11544 echo "configure:11545: checking for working mmap" >&5
11545 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11546   echo $ac_n "(cached) $ac_c" 1>&6
11547 else
11548   
11549 if test "$cross_compiling" = yes; then
11550   samba_cv_HAVE_MMAP=cross
11551 else
11552   cat > conftest.$ac_ext <<EOF
11553 #line 11554 "configure"
11554 #include "confdefs.h"
11555 #include "${srcdir-.}/tests/shared_mmap.c"
11556 EOF
11557 if { (eval echo configure:11558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11558 then
11559   samba_cv_HAVE_MMAP=yes
11560 else
11561   echo "configure: failed program was:" >&5
11562   cat conftest.$ac_ext >&5
11563   rm -fr conftest*
11564   samba_cv_HAVE_MMAP=no
11565 fi
11566 rm -fr conftest*
11567 fi
11568
11569 fi
11570
11571 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11572 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11573     cat >> confdefs.h <<\EOF
11574 #define HAVE_MMAP 1
11575 EOF
11576
11577 fi
11578
11579 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11580 echo "configure:11581: checking for ftruncate needs root" >&5
11581 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11582   echo $ac_n "(cached) $ac_c" 1>&6
11583 else
11584   
11585 if test "$cross_compiling" = yes; then
11586   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11587 else
11588   cat > conftest.$ac_ext <<EOF
11589 #line 11590 "configure"
11590 #include "confdefs.h"
11591 #include "${srcdir-.}/tests/ftruncroot.c"
11592 EOF
11593 if { (eval echo configure:11594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11594 then
11595   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11596 else
11597   echo "configure: failed program was:" >&5
11598   cat conftest.$ac_ext >&5
11599   rm -fr conftest*
11600   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11601 fi
11602 rm -fr conftest*
11603 fi
11604
11605 fi
11606
11607 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11608 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11609     cat >> confdefs.h <<\EOF
11610 #define FTRUNCATE_NEEDS_ROOT 1
11611 EOF
11612
11613 fi
11614
11615 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11616 echo "configure:11617: checking for fcntl locking" >&5
11617 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11618   echo $ac_n "(cached) $ac_c" 1>&6
11619 else
11620   
11621 if test "$cross_compiling" = yes; then
11622   samba_cv_HAVE_FCNTL_LOCK=cross
11623 else
11624   cat > conftest.$ac_ext <<EOF
11625 #line 11626 "configure"
11626 #include "confdefs.h"
11627 #include "${srcdir-.}/tests/fcntl_lock.c"
11628 EOF
11629 if { (eval echo configure:11630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11630 then
11631   samba_cv_HAVE_FCNTL_LOCK=yes
11632 else
11633   echo "configure: failed program was:" >&5
11634   cat conftest.$ac_ext >&5
11635   rm -fr conftest*
11636   samba_cv_HAVE_FCNTL_LOCK=no
11637 fi
11638 rm -fr conftest*
11639 fi
11640
11641 fi
11642
11643 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11644 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11645     cat >> confdefs.h <<\EOF
11646 #define HAVE_FCNTL_LOCK 1
11647 EOF
11648
11649 fi
11650
11651 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11652 echo "configure:11653: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11653 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11654   echo $ac_n "(cached) $ac_c" 1>&6
11655 else
11656   
11657 if test "$cross_compiling" = yes; then
11658   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11659 else
11660   cat > conftest.$ac_ext <<EOF
11661 #line 11662 "configure"
11662 #include "confdefs.h"
11663 #include "${srcdir-.}/tests/fcntl_lock64.c"
11664 EOF
11665 if { (eval echo configure:11666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11666 then
11667   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11668 else
11669   echo "configure: failed program was:" >&5
11670   cat conftest.$ac_ext >&5
11671   rm -fr conftest*
11672   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11673 fi
11674 rm -fr conftest*
11675 fi
11676
11677 fi
11678
11679 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11680 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11681     cat >> confdefs.h <<\EOF
11682 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11683 EOF
11684
11685
11686 else
11687
11688
11689   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11690 echo "configure:11691: checking for 64 bit fcntl locking" >&5
11691 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11692   echo $ac_n "(cached) $ac_c" 1>&6
11693 else
11694   
11695   if test "$cross_compiling" = yes; then
11696   samba_cv_HAVE_STRUCT_FLOCK64=cross
11697 else
11698   cat > conftest.$ac_ext <<EOF
11699 #line 11700 "configure"
11700 #include "confdefs.h"
11701
11702 #if defined(HAVE_UNISTD_H)
11703 #include <unistd.h>
11704 #endif
11705 #include <stdio.h>
11706 #include <stdlib.h>
11707
11708 #ifdef HAVE_FCNTL_H
11709 #include <fcntl.h>
11710 #endif
11711
11712 #ifdef HAVE_SYS_FCNTL_H
11713 #include <sys/fcntl.h>
11714 #endif
11715 main() { struct flock64 fl64;
11716 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11717 exit(0);
11718 #else
11719 exit(1);
11720 #endif
11721 }
11722 EOF
11723 if { (eval echo configure:11724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11724 then
11725   samba_cv_HAVE_STRUCT_FLOCK64=yes
11726 else
11727   echo "configure: failed program was:" >&5
11728   cat conftest.$ac_ext >&5
11729   rm -fr conftest*
11730   samba_cv_HAVE_STRUCT_FLOCK64=no
11731 fi
11732 rm -fr conftest*
11733 fi
11734
11735 fi
11736
11737 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11738
11739   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11740       cat >> confdefs.h <<\EOF
11741 #define HAVE_STRUCT_FLOCK64 1
11742 EOF
11743
11744   fi
11745 fi
11746
11747 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
11748 echo "configure:11749: checking for st_blocks in struct stat" >&5
11749 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then
11750   echo $ac_n "(cached) $ac_c" 1>&6
11751 else
11752   
11753 cat > conftest.$ac_ext <<EOF
11754 #line 11755 "configure"
11755 #include "confdefs.h"
11756 #include <sys/types.h>
11757 #include <sys/stat.h>
11758 #include <unistd.h>
11759 int main() {
11760 struct stat st;  st.st_blocks = 0;
11761 ; return 0; }
11762 EOF
11763 if { (eval echo configure:11764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11764   rm -rf conftest*
11765   samba_cv_HAVE_STAT_ST_BLOCKS=yes
11766 else
11767   echo "configure: failed program was:" >&5
11768   cat conftest.$ac_ext >&5
11769   rm -rf conftest*
11770   samba_cv_HAVE_STAT_ST_BLOCKS=no
11771 fi
11772 rm -f conftest*
11773 fi
11774
11775 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6
11776 if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
11777     cat >> confdefs.h <<\EOF
11778 #define HAVE_STAT_ST_BLOCKS 1
11779 EOF
11780
11781 fi 
11782
11783 case "$host_os" in
11784 *linux*)
11785 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11786 echo "configure:11787: checking for broken RedHat 7.2 system header files" >&5
11787 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11788   echo $ac_n "(cached) $ac_c" 1>&6
11789 else
11790   
11791 cat > conftest.$ac_ext <<EOF
11792 #line 11793 "configure"
11793 #include "confdefs.h"
11794
11795 #ifdef HAVE_SYS_VFS_H
11796 #include <sys/vfs.h>
11797 #endif
11798 #ifdef HAVE_SYS_CAPABILITY_H
11799 #include <sys/capability.h>
11800 #endif
11801
11802 int main() {
11803 int i;
11804 ; return 0; }
11805 EOF
11806 if { (eval echo configure:11807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11807   rm -rf conftest*
11808   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11809 else
11810   echo "configure: failed program was:" >&5
11811   cat conftest.$ac_ext >&5
11812   rm -rf conftest*
11813   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11814 fi
11815 rm -f conftest*
11816 fi
11817
11818 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11819 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11820    cat >> confdefs.h <<\EOF
11821 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11822 EOF
11823
11824 fi
11825 ;;
11826 esac
11827
11828 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11829 echo "configure:11830: checking for broken nisplus include files" >&5
11830 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11831   echo $ac_n "(cached) $ac_c" 1>&6
11832 else
11833   
11834 cat > conftest.$ac_ext <<EOF
11835 #line 11836 "configure"
11836 #include "confdefs.h"
11837 #include <sys/acl.h>
11838 #if defined(HAVE_RPCSVC_NIS_H)
11839 #include <rpcsvc/nis.h>
11840 #endif
11841 int main() {
11842 int i;
11843 ; return 0; }
11844 EOF
11845 if { (eval echo configure:11846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11846   rm -rf conftest*
11847   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11848 else
11849   echo "configure: failed program was:" >&5
11850   cat conftest.$ac_ext >&5
11851   rm -rf conftest*
11852   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11853 fi
11854 rm -f conftest*
11855 fi
11856
11857 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11858 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11859     cat >> confdefs.h <<\EOF
11860 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11861 EOF
11862
11863 fi
11864
11865
11866 #################################################
11867 # check for smbwrapper support
11868 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11869 echo "configure:11870: checking whether to use smbwrapper" >&5
11870 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11871 if test "${with_smbwrapper+set}" = set; then
11872   withval="$with_smbwrapper"
11873    case "$withval" in
11874   yes)
11875     echo "$ac_t""yes" 1>&6
11876     cat >> confdefs.h <<\EOF
11877 #define WITH_SMBWRAPPER 1
11878 EOF
11879
11880         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11881
11882         if test x$ATTEMPT_WRAP32_BUILD = x; then
11883                 WRAP32=""
11884         else
11885                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11886         fi
11887
11888 # Conditions under which smbwrapper should not be built.
11889
11890         if test x$PICFLAG = x; then
11891            echo No support for PIC code - disabling smbwrapper and smbsh
11892            WRAP=""
11893            WRAP32=""
11894         elif test x$ac_cv_func_syscall = xno; then
11895            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11896            WRAP=""
11897            WRAP32=""
11898         fi
11899     ;;
11900   *)
11901     echo "$ac_t""no" 1>&6
11902     ;;
11903   esac 
11904 else
11905   echo "$ac_t""no" 1>&6
11906
11907 fi
11908
11909
11910 #################################################
11911 # check for AFS clear-text auth support
11912 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11913 echo "configure:11914: checking whether to use AFS clear-text auth" >&5
11914 # Check whether --with-afs or --without-afs was given.
11915 if test "${with_afs+set}" = set; then
11916   withval="$with_afs"
11917    case "$withval" in
11918   yes)
11919     echo "$ac_t""yes" 1>&6
11920     cat >> confdefs.h <<\EOF
11921 #define WITH_AFS 1
11922 EOF
11923
11924     ;;
11925   *)
11926     echo "$ac_t""no" 1>&6
11927     ;;
11928   esac 
11929 else
11930   echo "$ac_t""no" 1>&6
11931
11932 fi
11933
11934
11935
11936 #################################################
11937 # check for the DFS clear-text auth system
11938 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
11939 echo "configure:11940: checking whether to use DFS clear-text auth" >&5
11940 # Check whether --with-dfs or --without-dfs was given.
11941 if test "${with_dfs+set}" = set; then
11942   withval="$with_dfs"
11943    case "$withval" in
11944   yes)
11945     echo "$ac_t""yes" 1>&6
11946     cat >> confdefs.h <<\EOF
11947 #define WITH_DFS 1
11948 EOF
11949
11950     ;;
11951   *)
11952     echo "$ac_t""no" 1>&6
11953     ;;
11954   esac 
11955 else
11956   echo "$ac_t""no" 1>&6
11957
11958 fi
11959
11960
11961
11962 #################################################
11963 # see if this box has the RedHat location for kerberos
11964 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
11965 echo "configure:11966: checking for /usr/kerberos" >&5
11966 if test -d /usr/kerberos; then
11967     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
11968     CFLAGS="$CFLAGS -I/usr/kerberos/include"
11969     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
11970     echo "$ac_t""yes" 1>&6
11971 else
11972     echo "$ac_t""no" 1>&6
11973 fi
11974
11975 #################################################
11976 # check for location of Kerberos 5 install
11977 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
11978 echo "configure:11979: checking for kerberos 5 install path" >&5
11979 # Check whether --with-krb5 or --without-krb5 was given.
11980 if test "${with_krb5+set}" = set; then
11981   withval="$with_krb5"
11982    case "$withval" in
11983   no)
11984     echo "$ac_t""no" 1>&6
11985     ;;
11986   *)
11987     echo "$ac_t""yes" 1>&6
11988     LIBS="$LIBS -lkrb5"
11989     CFLAGS="$CFLAGS -I$withval/include"
11990     CPPFLAGS="$CPPFLAGS -I$withval/include"
11991     LDFLAGS="$LDFLAGS -L$withval/lib"
11992     ;;
11993   esac 
11994 else
11995   echo "$ac_t""no" 1>&6
11996
11997 fi
11998
11999
12000 # now check for krb5.h. Some systems have the libraries without the headers!
12001 # note that this check is done here to allow for different kerberos
12002 # include paths
12003 for ac_hdr in krb5.h
12004 do
12005 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12006 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12007 echo "configure:12008: checking for $ac_hdr" >&5
12008 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12009   echo $ac_n "(cached) $ac_c" 1>&6
12010 else
12011   cat > conftest.$ac_ext <<EOF
12012 #line 12013 "configure"
12013 #include "confdefs.h"
12014 #include <$ac_hdr>
12015 EOF
12016 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12017 { (eval echo configure:12018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12018 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12019 if test -z "$ac_err"; then
12020   rm -rf conftest*
12021   eval "ac_cv_header_$ac_safe=yes"
12022 else
12023   echo "$ac_err" >&5
12024   echo "configure: failed program was:" >&5
12025   cat conftest.$ac_ext >&5
12026   rm -rf conftest*
12027   eval "ac_cv_header_$ac_safe=no"
12028 fi
12029 rm -f conftest*
12030 fi
12031 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12032   echo "$ac_t""yes" 1>&6
12033     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12034   cat >> confdefs.h <<EOF
12035 #define $ac_tr_hdr 1
12036 EOF
12037  
12038 else
12039   echo "$ac_t""no" 1>&6
12040 fi
12041 done
12042
12043
12044 # now check for gssapi headers.  This is also done here to allow for
12045 # different kerberos include paths
12046 for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
12047 do
12048 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12049 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12050 echo "configure:12051: checking for $ac_hdr" >&5
12051 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12052   echo $ac_n "(cached) $ac_c" 1>&6
12053 else
12054   cat > conftest.$ac_ext <<EOF
12055 #line 12056 "configure"
12056 #include "confdefs.h"
12057 #include <$ac_hdr>
12058 EOF
12059 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12060 { (eval echo configure:12061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12061 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12062 if test -z "$ac_err"; then
12063   rm -rf conftest*
12064   eval "ac_cv_header_$ac_safe=yes"
12065 else
12066   echo "$ac_err" >&5
12067   echo "configure: failed program was:" >&5
12068   cat conftest.$ac_ext >&5
12069   rm -rf conftest*
12070   eval "ac_cv_header_$ac_safe=no"
12071 fi
12072 rm -f conftest*
12073 fi
12074 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12075   echo "$ac_t""yes" 1>&6
12076     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12077   cat >> confdefs.h <<EOF
12078 #define $ac_tr_hdr 1
12079 EOF
12080  
12081 else
12082   echo "$ac_t""no" 1>&6
12083 fi
12084 done
12085
12086
12087 ##################################################################
12088 # we might need the k5crypto and com_err libraries on some systems
12089 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
12090 echo "configure:12091: checking for _et_list in -lcom_err" >&5
12091 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
12092 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12093   echo $ac_n "(cached) $ac_c" 1>&6
12094 else
12095   ac_save_LIBS="$LIBS"
12096 LIBS="-lcom_err  $LIBS"
12097 cat > conftest.$ac_ext <<EOF
12098 #line 12099 "configure"
12099 #include "confdefs.h"
12100 /* Override any gcc2 internal prototype to avoid an error.  */
12101 /* We use char because int might match the return type of a gcc2
12102     builtin and then its argument prototype would still apply.  */
12103 char _et_list();
12104
12105 int main() {
12106 _et_list()
12107 ; return 0; }
12108 EOF
12109 if { (eval echo configure:12110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12110   rm -rf conftest*
12111   eval "ac_cv_lib_$ac_lib_var=yes"
12112 else
12113   echo "configure: failed program was:" >&5
12114   cat conftest.$ac_ext >&5
12115   rm -rf conftest*
12116   eval "ac_cv_lib_$ac_lib_var=no"
12117 fi
12118 rm -f conftest*
12119 LIBS="$ac_save_LIBS"
12120
12121 fi
12122 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12123   echo "$ac_t""yes" 1>&6
12124   LIBS="$LIBS -lcom_err"
12125 else
12126   echo "$ac_t""no" 1>&6
12127 fi
12128
12129 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
12130 echo "configure:12131: checking for krb5_encrypt_data in -lk5crypto" >&5
12131 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
12132 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12133   echo $ac_n "(cached) $ac_c" 1>&6
12134 else
12135   ac_save_LIBS="$LIBS"
12136 LIBS="-lk5crypto  $LIBS"
12137 cat > conftest.$ac_ext <<EOF
12138 #line 12139 "configure"
12139 #include "confdefs.h"
12140 /* Override any gcc2 internal prototype to avoid an error.  */
12141 /* We use char because int might match the return type of a gcc2
12142     builtin and then its argument prototype would still apply.  */
12143 char krb5_encrypt_data();
12144
12145 int main() {
12146 krb5_encrypt_data()
12147 ; return 0; }
12148 EOF
12149 if { (eval echo configure:12150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12150   rm -rf conftest*
12151   eval "ac_cv_lib_$ac_lib_var=yes"
12152 else
12153   echo "configure: failed program was:" >&5
12154   cat conftest.$ac_ext >&5
12155   rm -rf conftest*
12156   eval "ac_cv_lib_$ac_lib_var=no"
12157 fi
12158 rm -f conftest*
12159 LIBS="$ac_save_LIBS"
12160
12161 fi
12162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12163   echo "$ac_t""yes" 1>&6
12164   LIBS="$LIBS -lk5crypto"
12165 else
12166   echo "$ac_t""no" 1>&6
12167 fi
12168
12169
12170 ########################################################
12171 # now see if we can find the krb5 libs in standard paths
12172 # or as specified above
12173 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
12174 echo "configure:12175: checking for krb5_mk_req_extended in -lkrb5" >&5
12175 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
12176 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12177   echo $ac_n "(cached) $ac_c" 1>&6
12178 else
12179   ac_save_LIBS="$LIBS"
12180 LIBS="-lkrb5  $LIBS"
12181 cat > conftest.$ac_ext <<EOF
12182 #line 12183 "configure"
12183 #include "confdefs.h"
12184 /* Override any gcc2 internal prototype to avoid an error.  */
12185 /* We use char because int might match the return type of a gcc2
12186     builtin and then its argument prototype would still apply.  */
12187 char krb5_mk_req_extended();
12188
12189 int main() {
12190 krb5_mk_req_extended()
12191 ; return 0; }
12192 EOF
12193 if { (eval echo configure:12194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12194   rm -rf conftest*
12195   eval "ac_cv_lib_$ac_lib_var=yes"
12196 else
12197   echo "configure: failed program was:" >&5
12198   cat conftest.$ac_ext >&5
12199   rm -rf conftest*
12200   eval "ac_cv_lib_$ac_lib_var=no"
12201 fi
12202 rm -f conftest*
12203 LIBS="$ac_save_LIBS"
12204
12205 fi
12206 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12207   echo "$ac_t""yes" 1>&6
12208   LIBS="$LIBS -lkrb5";
12209         cat >> confdefs.h <<\EOF
12210 #define HAVE_KRB5 1
12211 EOF
12212
12213 else
12214   echo "$ac_t""no" 1>&6
12215 fi
12216
12217
12218 ########################################################
12219 # now see if we can find the gssapi libs in standard paths
12220 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
12221 echo "configure:12222: checking for gss_display_status in -lgssapi_krb5" >&5
12222 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
12223 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12224   echo $ac_n "(cached) $ac_c" 1>&6
12225 else
12226   ac_save_LIBS="$LIBS"
12227 LIBS="-lgssapi_krb5  $LIBS"
12228 cat > conftest.$ac_ext <<EOF
12229 #line 12230 "configure"
12230 #include "confdefs.h"
12231 /* Override any gcc2 internal prototype to avoid an error.  */
12232 /* We use char because int might match the return type of a gcc2
12233     builtin and then its argument prototype would still apply.  */
12234 char gss_display_status();
12235
12236 int main() {
12237 gss_display_status()
12238 ; return 0; }
12239 EOF
12240 if { (eval echo configure:12241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12241   rm -rf conftest*
12242   eval "ac_cv_lib_$ac_lib_var=yes"
12243 else
12244   echo "configure: failed program was:" >&5
12245   cat conftest.$ac_ext >&5
12246   rm -rf conftest*
12247   eval "ac_cv_lib_$ac_lib_var=no"
12248 fi
12249 rm -f conftest*
12250 LIBS="$ac_save_LIBS"
12251
12252 fi
12253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12254   echo "$ac_t""yes" 1>&6
12255   LIBS="$LIBS -lgssapi_krb5";
12256         cat >> confdefs.h <<\EOF
12257 #define HAVE_GSSAPI 1
12258 EOF
12259
12260 else
12261   echo "$ac_t""no" 1>&6
12262 fi
12263
12264
12265 ##################################################################
12266 # we might need the lber lib on some systems. To avoid link errors
12267 # this test must be before the libldap test
12268 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
12269 echo "configure:12270: checking for ber_scanf in -llber" >&5
12270 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
12271 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12272   echo $ac_n "(cached) $ac_c" 1>&6
12273 else
12274   ac_save_LIBS="$LIBS"
12275 LIBS="-llber  $LIBS"
12276 cat > conftest.$ac_ext <<EOF
12277 #line 12278 "configure"
12278 #include "confdefs.h"
12279 /* Override any gcc2 internal prototype to avoid an error.  */
12280 /* We use char because int might match the return type of a gcc2
12281     builtin and then its argument prototype would still apply.  */
12282 char ber_scanf();
12283
12284 int main() {
12285 ber_scanf()
12286 ; return 0; }
12287 EOF
12288 if { (eval echo configure:12289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12289   rm -rf conftest*
12290   eval "ac_cv_lib_$ac_lib_var=yes"
12291 else
12292   echo "configure: failed program was:" >&5
12293   cat conftest.$ac_ext >&5
12294   rm -rf conftest*
12295   eval "ac_cv_lib_$ac_lib_var=no"
12296 fi
12297 rm -f conftest*
12298 LIBS="$ac_save_LIBS"
12299
12300 fi
12301 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12302   echo "$ac_t""yes" 1>&6
12303   LIBS="$LIBS -llber"
12304 else
12305   echo "$ac_t""no" 1>&6
12306 fi
12307
12308
12309 ########################################################
12310 # now see if we can find the ldap libs in standard paths
12311 if test x$have_ldap != xyes; then
12312 echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
12313 echo "configure:12314: checking for ldap_domain2hostlist in -lldap" >&5
12314 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
12315 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12316   echo $ac_n "(cached) $ac_c" 1>&6
12317 else
12318   ac_save_LIBS="$LIBS"
12319 LIBS="-lldap  $LIBS"
12320 cat > conftest.$ac_ext <<EOF
12321 #line 12322 "configure"
12322 #include "confdefs.h"
12323 /* Override any gcc2 internal prototype to avoid an error.  */
12324 /* We use char because int might match the return type of a gcc2
12325     builtin and then its argument prototype would still apply.  */
12326 char ldap_domain2hostlist();
12327
12328 int main() {
12329 ldap_domain2hostlist()
12330 ; return 0; }
12331 EOF
12332 if { (eval echo configure:12333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12333   rm -rf conftest*
12334   eval "ac_cv_lib_$ac_lib_var=yes"
12335 else
12336   echo "configure: failed program was:" >&5
12337   cat conftest.$ac_ext >&5
12338   rm -rf conftest*
12339   eval "ac_cv_lib_$ac_lib_var=no"
12340 fi
12341 rm -f conftest*
12342 LIBS="$ac_save_LIBS"
12343
12344 fi
12345 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12346   echo "$ac_t""yes" 1>&6
12347   LIBS="$LIBS -lldap";
12348         cat >> confdefs.h <<\EOF
12349 #define HAVE_LDAP 1
12350 EOF
12351
12352 else
12353   echo "$ac_t""no" 1>&6
12354 fi
12355
12356 fi
12357
12358 #################################################
12359 # check for automount support
12360 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
12361 echo "configure:12362: checking whether to use AUTOMOUNT" >&5
12362 # Check whether --with-automount or --without-automount was given.
12363 if test "${with_automount+set}" = set; then
12364   withval="$with_automount"
12365    case "$withval" in
12366   yes)
12367     echo "$ac_t""yes" 1>&6
12368     cat >> confdefs.h <<\EOF
12369 #define WITH_AUTOMOUNT 1
12370 EOF
12371
12372     ;;
12373   *)
12374     echo "$ac_t""no" 1>&6
12375     ;;
12376   esac 
12377 else
12378   echo "$ac_t""no" 1>&6
12379
12380 fi
12381
12382
12383 #################################################
12384 # check for smbmount support
12385 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
12386 echo "configure:12387: checking whether to use SMBMOUNT" >&5
12387 # Check whether --with-smbmount or --without-smbmount was given.
12388 if test "${with_smbmount+set}" = set; then
12389   withval="$with_smbmount"
12390    case "$withval" in
12391   yes)
12392         case "$host_os" in
12393         *linux*)
12394                 echo "$ac_t""yes" 1>&6
12395                 cat >> confdefs.h <<\EOF
12396 #define WITH_SMBMOUNT 1
12397 EOF
12398
12399                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
12400                 ;;
12401         *)
12402                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
12403                 ;;
12404         esac
12405     ;;
12406   *)
12407     echo "$ac_t""no" 1>&6
12408     MPROGS=
12409     ;;
12410   esac 
12411 else
12412   echo "$ac_t""no" 1>&6
12413   MPROGS=
12414
12415 fi
12416
12417
12418
12419 #################################################
12420 # check for a PAM clear-text auth, accounts, password and session support
12421 with_pam_for_crypt=no
12422 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
12423 echo "configure:12424: checking whether to use PAM" >&5
12424 # Check whether --with-pam or --without-pam was given.
12425 if test "${with_pam+set}" = set; then
12426   withval="$with_pam"
12427    case "$withval" in
12428   yes)
12429     echo "$ac_t""yes" 1>&6
12430     cat >> confdefs.h <<\EOF
12431 #define WITH_PAM 1
12432 EOF
12433
12434     LIBS="$LIBS -lpam"
12435     with_pam_for_crypt=yes
12436     ;;
12437   *)
12438     echo "$ac_t""no" 1>&6
12439     ;;
12440   esac 
12441 else
12442   echo "$ac_t""no" 1>&6
12443
12444 fi
12445
12446
12447 # we can't build a pam module if we don't have pam.
12448 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
12449 echo "configure:12450: checking for pam_get_data in -lpam" >&5
12450 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
12451 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12452   echo $ac_n "(cached) $ac_c" 1>&6
12453 else
12454   ac_save_LIBS="$LIBS"
12455 LIBS="-lpam  $LIBS"
12456 cat > conftest.$ac_ext <<EOF
12457 #line 12458 "configure"
12458 #include "confdefs.h"
12459 /* Override any gcc2 internal prototype to avoid an error.  */
12460 /* We use char because int might match the return type of a gcc2
12461     builtin and then its argument prototype would still apply.  */
12462 char pam_get_data();
12463
12464 int main() {
12465 pam_get_data()
12466 ; return 0; }
12467 EOF
12468 if { (eval echo configure:12469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12469   rm -rf conftest*
12470   eval "ac_cv_lib_$ac_lib_var=yes"
12471 else
12472   echo "configure: failed program was:" >&5
12473   cat conftest.$ac_ext >&5
12474   rm -rf conftest*
12475   eval "ac_cv_lib_$ac_lib_var=no"
12476 fi
12477 rm -f conftest*
12478 LIBS="$ac_save_LIBS"
12479
12480 fi
12481 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12482   echo "$ac_t""yes" 1>&6
12483   cat >> confdefs.h <<\EOF
12484 #define HAVE_LIBPAM 1
12485 EOF
12486
12487 else
12488   echo "$ac_t""no" 1>&6
12489 fi
12490
12491
12492 #################################################
12493 # check for pam_smbpass support
12494 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
12495 echo "configure:12496: checking whether to use pam_smbpass" >&5
12496 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
12497 if test "${with_pam_smbpass+set}" = set; then
12498   withval="$with_pam_smbpass"
12499    case "$withval" in
12500   yes)
12501     echo "$ac_t""yes" 1>&6
12502
12503 # Conditions under which pam_smbpass should not be built.
12504
12505        if test x$PICFLAG = x; then
12506           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
12507           PAM_MOD=""
12508        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
12509           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
12510           PAM_MOD=""
12511        else
12512           PAM_MOD="bin/pam_smbpass.so"
12513        fi
12514     ;;
12515   *)
12516     echo "$ac_t""no" 1>&6
12517     ;;
12518   esac 
12519 else
12520   echo "$ac_t""no" 1>&6
12521
12522 fi
12523
12524
12525
12526 ###############################################
12527 # test for where we get crypt() from, but only
12528 # if not using PAM
12529 if test $with_pam_for_crypt = no; then
12530 for ac_func in crypt
12531 do
12532 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12533 echo "configure:12534: checking for $ac_func" >&5
12534 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12535   echo $ac_n "(cached) $ac_c" 1>&6
12536 else
12537   cat > conftest.$ac_ext <<EOF
12538 #line 12539 "configure"
12539 #include "confdefs.h"
12540 /* System header to define __stub macros and hopefully few prototypes,
12541     which can conflict with char $ac_func(); below.  */
12542 #include <assert.h>
12543 /* Override any gcc2 internal prototype to avoid an error.  */
12544 /* We use char because int might match the return type of a gcc2
12545     builtin and then its argument prototype would still apply.  */
12546 char $ac_func();
12547
12548 int main() {
12549
12550 /* The GNU C library defines this for functions which it implements
12551     to always fail with ENOSYS.  Some functions are actually named
12552     something starting with __ and the normal name is an alias.  */
12553 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12554 choke me
12555 #else
12556 $ac_func();
12557 #endif
12558
12559 ; return 0; }
12560 EOF
12561 if { (eval echo configure:12562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12562   rm -rf conftest*
12563   eval "ac_cv_func_$ac_func=yes"
12564 else
12565   echo "configure: failed program was:" >&5
12566   cat conftest.$ac_ext >&5
12567   rm -rf conftest*
12568   eval "ac_cv_func_$ac_func=no"
12569 fi
12570 rm -f conftest*
12571 fi
12572
12573 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12574   echo "$ac_t""yes" 1>&6
12575     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12576   cat >> confdefs.h <<EOF
12577 #define $ac_tr_func 1
12578 EOF
12579  
12580 else
12581   echo "$ac_t""no" 1>&6
12582 fi
12583 done
12584
12585 if test x"$ac_cv_func_crypt" = x"no"; then
12586     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12587 echo "configure:12588: checking for crypt in -lcrypt" >&5
12588 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
12589 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12590   echo $ac_n "(cached) $ac_c" 1>&6
12591 else
12592   ac_save_LIBS="$LIBS"
12593 LIBS="-lcrypt  $LIBS"
12594 cat > conftest.$ac_ext <<EOF
12595 #line 12596 "configure"
12596 #include "confdefs.h"
12597 /* Override any gcc2 internal prototype to avoid an error.  */
12598 /* We use char because int might match the return type of a gcc2
12599     builtin and then its argument prototype would still apply.  */
12600 char crypt();
12601
12602 int main() {
12603 crypt()
12604 ; return 0; }
12605 EOF
12606 if { (eval echo configure:12607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12607   rm -rf conftest*
12608   eval "ac_cv_lib_$ac_lib_var=yes"
12609 else
12610   echo "configure: failed program was:" >&5
12611   cat conftest.$ac_ext >&5
12612   rm -rf conftest*
12613   eval "ac_cv_lib_$ac_lib_var=no"
12614 fi
12615 rm -f conftest*
12616 LIBS="$ac_save_LIBS"
12617
12618 fi
12619 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12620   echo "$ac_t""yes" 1>&6
12621   LIBS="$LIBS -lcrypt";
12622         cat >> confdefs.h <<\EOF
12623 #define HAVE_CRYPT 1
12624 EOF
12625
12626 else
12627   echo "$ac_t""no" 1>&6
12628 fi
12629
12630 fi
12631 fi
12632
12633 ##
12634 ## moved after the check for -lcrypt in order to
12635 ## ensure that the necessary libraries are included
12636 ## check checking for truncated salt.  Wrapped by the
12637 ## $with_pam_for_crypt variable as above   --jerry
12638 ##
12639 if test $with_pam_for_crypt = no; then
12640 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
12641 echo "configure:12642: checking for a crypt that needs truncated salt" >&5
12642 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
12643   echo $ac_n "(cached) $ac_c" 1>&6
12644 else
12645   
12646 if test "$cross_compiling" = yes; then
12647   samba_cv_HAVE_TRUNCATED_SALT=cross
12648 else
12649   cat > conftest.$ac_ext <<EOF
12650 #line 12651 "configure"
12651 #include "confdefs.h"
12652 #include "${srcdir-.}/tests/crypttest.c"
12653 EOF
12654 if { (eval echo configure:12655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12655 then
12656   samba_cv_HAVE_TRUNCATED_SALT=no
12657 else
12658   echo "configure: failed program was:" >&5
12659   cat conftest.$ac_ext >&5
12660   rm -fr conftest*
12661   samba_cv_HAVE_TRUNCATED_SALT=yes
12662 fi
12663 rm -fr conftest*
12664 fi
12665
12666 fi
12667
12668 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12669 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12670         cat >> confdefs.h <<\EOF
12671 #define HAVE_TRUNCATED_SALT 1
12672 EOF
12673
12674 fi
12675 fi
12676
12677
12678
12679 ########################################################################################
12680 ##
12681 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12682 ##
12683 ########################################################################################
12684
12685 #################################################
12686 # check for a TDB password database
12687 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12688 echo "configure:12689: checking whether to use TDB SAM database" >&5
12689 # Check whether --with-tdbsam or --without-tdbsam was given.
12690 if test "${with_tdbsam+set}" = set; then
12691   withval="$with_tdbsam"
12692    case "$withval" in
12693   yes)
12694     echo "$ac_t""yes" 1>&6
12695     cat >> confdefs.h <<\EOF
12696 #define WITH_TDB_SAM 1
12697 EOF
12698
12699     ;;
12700   *)
12701     echo "$ac_t""no" 1>&6
12702     ;;
12703   esac 
12704 else
12705   echo "$ac_t""no" 1>&6
12706
12707 fi
12708
12709
12710 #################################################
12711 # check for a LDAP password database
12712 echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6
12713 echo "configure:12714: checking whether to use LDAP SAM database" >&5
12714 # Check whether --with-ldapsam or --without-ldapsam was given.
12715 if test "${with_ldapsam+set}" = set; then
12716   withval="$with_ldapsam"
12717    case "$withval" in
12718   yes)
12719     echo "$ac_t""yes" 1>&6
12720     cat >> confdefs.h <<\EOF
12721 #define WITH_LDAP_SAM 1
12722 EOF
12723
12724     LIBS="-lldap -llber $LIBS"
12725     ;;
12726   *)
12727     echo "$ac_t""no" 1>&6
12728     ;;
12729   esac 
12730 else
12731   echo "$ac_t""no" 1>&6
12732
12733 fi
12734
12735
12736 #################################################
12737 # check for a NISPLUS password database
12738 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
12739 echo "configure:12740: checking whether to use NISPLUS SAM database" >&5
12740 # Check whether --with-nisplussam or --without-nisplussam was given.
12741 if test "${with_nisplussam+set}" = set; then
12742   withval="$with_nisplussam"
12743    case "$withval" in
12744   yes)
12745     echo "$ac_t""yes" 1>&6
12746     cat >> confdefs.h <<\EOF
12747 #define WITH_NISPLUS_SAM 1
12748 EOF
12749
12750     ;;
12751   *)
12752     echo "$ac_t""no" 1>&6
12753     ;;
12754   esac 
12755 else
12756   echo "$ac_t""no" 1>&6
12757
12758 fi
12759
12760
12761 ########################################################################################
12762 ##
12763 ## END OF TESTS FOR SAM BACKENDS.  
12764 ##
12765 ########################################################################################
12766
12767 #################################################
12768 # check for a NISPLUS_HOME support 
12769 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
12770 echo "configure:12771: checking whether to use NISPLUS_HOME" >&5
12771 # Check whether --with-nisplus-home or --without-nisplus-home was given.
12772 if test "${with_nisplus_home+set}" = set; then
12773   withval="$with_nisplus_home"
12774    case "$withval" in
12775   yes)
12776     echo "$ac_t""yes" 1>&6
12777     cat >> confdefs.h <<\EOF
12778 #define WITH_NISPLUS_HOME 1
12779 EOF
12780
12781     ;;
12782   *)
12783     echo "$ac_t""no" 1>&6
12784     ;;
12785   esac 
12786 else
12787   echo "$ac_t""no" 1>&6
12788
12789 fi
12790
12791
12792 #################################################
12793 # check for the secure socket layer
12794 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
12795 echo "configure:12796: checking whether to use SSL" >&5
12796 # Check whether --with-ssl or --without-ssl was given.
12797 if test "${with_ssl+set}" = set; then
12798   withval="$with_ssl"
12799    case "$withval" in
12800   yes)
12801     echo "$ac_t""yes" 1>&6
12802     cat >> confdefs.h <<\EOF
12803 #define WITH_SSL 1
12804 EOF
12805
12806     withval="/usr/local/ssl"     # default
12807
12808     if test "${with_sslinc+set}" = set; then
12809
12810         withval="$with_sslinc"
12811         case "$withval" in
12812         yes|no)
12813           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
12814           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
12815         ;;
12816         * )
12817           CFLAGS="-I${withval} $CFLAGS"
12818         ;;
12819         esac
12820
12821     else
12822
12823         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
12824
12825     fi
12826
12827     if test "${with_ssllib+set}" = set; then
12828
12829         withval="$with_ssllib"
12830         case "$withval" in
12831         yes|no)
12832           echo "configure: warning: --with-ssllib called without argument - will use default" 1>&w
12833           LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12834         ;;
12835         * )
12836           LDFLAGS="-L${withval}/lib $LDFLAGS"
12837         ;;
12838         esac
12839
12840     else
12841
12842         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12843
12844     fi
12845
12846     LIBS="-lssl -lcrypto $LIBS"
12847
12848 #    if test ! -d ${withval}; then
12849 #      echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
12850 #      exit 1
12851 #    fi 
12852
12853     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
12854
12855     ;;
12856   *)
12857     echo "$ac_t""no" 1>&6
12858     ;;
12859   esac 
12860 else
12861   echo "$ac_t""no" 1>&6
12862
12863 fi
12864
12865
12866 #################################################
12867 # check for syslog logging
12868 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12869 echo "configure:12870: checking whether to use syslog logging" >&5
12870 # Check whether --with-syslog or --without-syslog was given.
12871 if test "${with_syslog+set}" = set; then
12872   withval="$with_syslog"
12873    case "$withval" in
12874   yes)
12875     echo "$ac_t""yes" 1>&6
12876     cat >> confdefs.h <<\EOF
12877 #define WITH_SYSLOG 1
12878 EOF
12879
12880     ;;
12881   *)
12882     echo "$ac_t""no" 1>&6
12883     ;;
12884   esac 
12885 else
12886   echo "$ac_t""no" 1>&6
12887
12888 fi
12889
12890
12891 #################################################
12892 # check for a shared memory profiling support
12893 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12894 echo "configure:12895: checking whether to use profiling" >&5
12895 # Check whether --with-profiling-data or --without-profiling-data was given.
12896 if test "${with_profiling_data+set}" = set; then
12897   withval="$with_profiling_data"
12898    case "$withval" in
12899   yes)
12900     echo "$ac_t""yes" 1>&6
12901     cat >> confdefs.h <<\EOF
12902 #define WITH_PROFILE 1
12903 EOF
12904
12905     ;;
12906   *)
12907     echo "$ac_t""no" 1>&6
12908     ;;
12909   esac 
12910 else
12911   echo "$ac_t""no" 1>&6
12912
12913 fi
12914
12915
12916
12917 #################################################
12918 # check for experimental disk-quotas support
12919 QUOTAOBJS=smbd/noquotas.o
12920
12921 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12922 echo "configure:12923: checking whether to support disk-quotas" >&5
12923 # Check whether --with-quotas or --without-quotas was given.
12924 if test "${with_quotas+set}" = set; then
12925   withval="$with_quotas"
12926    case "$withval" in
12927   yes)
12928     echo "$ac_t""yes" 1>&6
12929     case "$host_os" in
12930       *linux*)
12931         # Check for kernel 2.4.x quota braindamage...
12932         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
12933 echo "configure:12934: checking for linux 2.4.x quota braindamage.." >&5
12934 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
12935   echo $ac_n "(cached) $ac_c" 1>&6
12936 else
12937   
12938         cat > conftest.$ac_ext <<EOF
12939 #line 12940 "configure"
12940 #include "confdefs.h"
12941 #include <stdio.h>
12942 #include <sys/types.h>
12943 #include <asm/types.h>
12944 #include <linux/quota.h>
12945 #include <mntent.h>
12946 #include <linux/unistd.h>
12947 int main() {
12948 struct mem_dqblk D;
12949 ; return 0; }
12950 EOF
12951 if { (eval echo configure:12952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12952   rm -rf conftest*
12953   samba_cv_linux_2_4_quota_braindamage=yes
12954 else
12955   echo "configure: failed program was:" >&5
12956   cat conftest.$ac_ext >&5
12957   rm -rf conftest*
12958   samba_cv_linux_2_4_quota_braindamage=no
12959 fi
12960 rm -f conftest*
12961 fi
12962
12963 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
12964 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
12965         cat >> confdefs.h <<\EOF
12966 #define LINUX_QUOTAS_2 1
12967 EOF
12968
12969 else
12970         cat >> confdefs.h <<\EOF
12971 #define LINUX_QUOTAS_1 1
12972 EOF
12973
12974 fi
12975         ;;
12976       *)
12977         ;;
12978     esac
12979     QUOTAOBJS=smbd/quotas.o
12980     cat >> confdefs.h <<\EOF
12981 #define WITH_QUOTAS 1
12982 EOF
12983
12984     ;;
12985   *)
12986     echo "$ac_t""no" 1>&6
12987     ;;
12988   esac 
12989 else
12990   echo "$ac_t""no" 1>&6
12991
12992 fi
12993
12994
12995
12996 #################################################
12997 # check for experimental utmp accounting
12998
12999 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
13000 echo "configure:13001: checking whether to support utmp accounting" >&5
13001 # Check whether --with-utmp or --without-utmp was given.
13002 if test "${with_utmp+set}" = set; then
13003   withval="$with_utmp"
13004    case "$withval" in
13005   yes)
13006     echo "$ac_t""yes" 1>&6
13007     cat >> confdefs.h <<\EOF
13008 #define WITH_UTMP 1
13009 EOF
13010
13011     ;;
13012   *)
13013     echo "$ac_t""no" 1>&6
13014     ;;
13015   esac 
13016 else
13017   echo "$ac_t""no" 1>&6
13018
13019 fi
13020
13021
13022 #################################################
13023 # set private directory location
13024 # Check whether --with-privatedir or --without-privatedir was given.
13025 if test "${with_privatedir+set}" = set; then
13026   withval="$with_privatedir"
13027    case "$withval" in
13028   yes|no)
13029   #
13030   # Just in case anybody calls it without argument
13031   #
13032     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
13033     privatedir='${prefix}/private'
13034   ;;
13035   * )
13036     privatedir="$withval"
13037     ;;
13038   esac
13039   
13040 else
13041   privatedir='${prefix}/private'
13042    
13043
13044 fi
13045
13046
13047 #################################################
13048 # set lock directory location
13049 # Check whether --with-lockdir or --without-lockdir was given.
13050 if test "${with_lockdir+set}" = set; then
13051   withval="$with_lockdir"
13052    case "$withval" in
13053   yes|no)
13054   #
13055   # Just in case anybody calls it without argument
13056   #
13057     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
13058     lockdir='$(VARDIR)/locks'
13059   ;;
13060   * )
13061     lockdir="$withval"
13062     ;;
13063   esac
13064   
13065 else
13066   lockdir='$(VARDIR)/locks'
13067    
13068
13069 fi
13070
13071
13072 #################################################
13073 # set SWAT directory location
13074 # Check whether --with-swatdir or --without-swatdir was given.
13075 if test "${with_swatdir+set}" = set; then
13076   withval="$with_swatdir"
13077    case "$withval" in
13078   yes|no)
13079   #
13080   # Just in case anybody does it
13081   #
13082     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
13083     swatdir='${prefix}/swat'
13084   ;;
13085   * )
13086     swatdir="$withval"
13087     ;;
13088   esac
13089   
13090 else
13091   swatdir='${prefix}/swat'
13092    
13093
13094 fi
13095
13096
13097 #################################################
13098 # choose native language(s) of man pages
13099 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
13100 echo "configure:13101: checking chosen man pages' language(s)" >&5
13101 # Check whether --with-manpages-langs or --without-manpages-langs was given.
13102 if test "${with_manpages_langs+set}" = set; then
13103   withval="$with_manpages_langs"
13104    case "$withval" in
13105   yes|no)
13106     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
13107     manlangs="en"
13108   ;;
13109   *)
13110     manlangs="$withval"
13111   ;;
13112   esac
13113
13114   echo "$ac_t""$manlangs" 1>&6
13115   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
13116   
13117 else
13118   manlangs="en"
13119   echo "$ac_t""$manlangs" 1>&6
13120   
13121
13122 fi
13123
13124
13125 #################################################
13126 # these tests are taken from the GNU fileutils package
13127 echo "checking how to get filesystem space usage" 1>&6
13128 echo "configure:13129: checking how to get filesystem space usage" >&5
13129 space=no
13130
13131 # Test for statvfs64.
13132 if test $space = no; then
13133   # SVR4
13134   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
13135 echo "configure:13136: checking statvfs64 function (SVR4)" >&5
13136 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
13137   echo $ac_n "(cached) $ac_c" 1>&6
13138 else
13139   if test "$cross_compiling" = yes; then
13140   fu_cv_sys_stat_statvfs64=cross
13141 else
13142   cat > conftest.$ac_ext <<EOF
13143 #line 13144 "configure"
13144 #include "confdefs.h"
13145
13146 #if defined(HAVE_UNISTD_H)
13147 #include <unistd.h>
13148 #endif
13149 #include <sys/types.h>
13150 #include <sys/statvfs.h>
13151   main ()
13152   {
13153     struct statvfs64 fsd;
13154     exit (statvfs64 (".", &fsd));
13155   }
13156 EOF
13157 if { (eval echo configure:13158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13158 then
13159   fu_cv_sys_stat_statvfs64=yes
13160 else
13161   echo "configure: failed program was:" >&5
13162   cat conftest.$ac_ext >&5
13163   rm -fr conftest*
13164   fu_cv_sys_stat_statvfs64=no
13165 fi
13166 rm -fr conftest*
13167 fi
13168
13169 fi
13170
13171 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
13172   if test $fu_cv_sys_stat_statvfs64 = yes; then
13173     space=yes
13174     cat >> confdefs.h <<\EOF
13175 #define STAT_STATVFS64 1
13176 EOF
13177
13178   fi
13179 fi
13180
13181 # Perform only the link test since it seems there are no variants of the
13182 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
13183 # because that got a false positive on SCO OSR5.  Adding the declaration
13184 # of a `struct statvfs' causes this test to fail (as it should) on such
13185 # systems.  That system is reported to work fine with STAT_STATFS4 which
13186 # is what it gets when this test fails.
13187 if test $space = no; then
13188   # SVR4
13189   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
13190 echo "configure:13191: checking statvfs function (SVR4)" >&5
13191 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
13192   echo $ac_n "(cached) $ac_c" 1>&6
13193 else
13194   cat > conftest.$ac_ext <<EOF
13195 #line 13196 "configure"
13196 #include "confdefs.h"
13197 #include <sys/types.h>
13198 #include <sys/statvfs.h>
13199 int main() {
13200 struct statvfs fsd; statvfs (0, &fsd);
13201 ; return 0; }
13202 EOF
13203 if { (eval echo configure:13204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13204   rm -rf conftest*
13205   fu_cv_sys_stat_statvfs=yes
13206 else
13207   echo "configure: failed program was:" >&5
13208   cat conftest.$ac_ext >&5
13209   rm -rf conftest*
13210   fu_cv_sys_stat_statvfs=no
13211 fi
13212 rm -f conftest*
13213 fi
13214
13215 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
13216   if test $fu_cv_sys_stat_statvfs = yes; then
13217     space=yes
13218     cat >> confdefs.h <<\EOF
13219 #define STAT_STATVFS 1
13220 EOF
13221
13222   fi
13223 fi
13224
13225 if test $space = no; then
13226   # DEC Alpha running OSF/1
13227   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
13228 echo "configure:13229: checking for 3-argument statfs function (DEC OSF/1)" >&5
13229   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
13230   echo $ac_n "(cached) $ac_c" 1>&6
13231 else
13232   if test "$cross_compiling" = yes; then
13233   fu_cv_sys_stat_statfs3_osf1=no
13234 else
13235   cat > conftest.$ac_ext <<EOF
13236 #line 13237 "configure"
13237 #include "confdefs.h"
13238
13239 #include <sys/param.h>
13240 #include <sys/types.h>
13241 #include <sys/mount.h>
13242   main ()
13243   {
13244     struct statfs fsd;
13245     fsd.f_fsize = 0;
13246     exit (statfs (".", &fsd, sizeof (struct statfs)));
13247   }
13248 EOF
13249 if { (eval echo configure:13250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13250 then
13251   fu_cv_sys_stat_statfs3_osf1=yes
13252 else
13253   echo "configure: failed program was:" >&5
13254   cat conftest.$ac_ext >&5
13255   rm -fr conftest*
13256   fu_cv_sys_stat_statfs3_osf1=no
13257 fi
13258 rm -fr conftest*
13259 fi
13260
13261 fi
13262
13263   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
13264   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
13265     space=yes
13266     cat >> confdefs.h <<\EOF
13267 #define STAT_STATFS3_OSF1 1
13268 EOF
13269
13270   fi
13271 fi
13272
13273 if test $space = no; then
13274 # AIX
13275   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
13276 echo "configure:13277: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
13277   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
13278   echo $ac_n "(cached) $ac_c" 1>&6
13279 else
13280   if test "$cross_compiling" = yes; then
13281   fu_cv_sys_stat_statfs2_bsize=no
13282 else
13283   cat > conftest.$ac_ext <<EOF
13284 #line 13285 "configure"
13285 #include "confdefs.h"
13286
13287 #ifdef HAVE_SYS_PARAM_H
13288 #include <sys/param.h>
13289 #endif
13290 #ifdef HAVE_SYS_MOUNT_H
13291 #include <sys/mount.h>
13292 #endif
13293 #ifdef HAVE_SYS_VFS_H
13294 #include <sys/vfs.h>
13295 #endif
13296   main ()
13297   {
13298   struct statfs fsd;
13299   fsd.f_bsize = 0;
13300   exit (statfs (".", &fsd));
13301   }
13302 EOF
13303 if { (eval echo configure:13304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13304 then
13305   fu_cv_sys_stat_statfs2_bsize=yes
13306 else
13307   echo "configure: failed program was:" >&5
13308   cat conftest.$ac_ext >&5
13309   rm -fr conftest*
13310   fu_cv_sys_stat_statfs2_bsize=no
13311 fi
13312 rm -fr conftest*
13313 fi
13314
13315 fi
13316
13317   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
13318   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
13319     space=yes
13320     cat >> confdefs.h <<\EOF
13321 #define STAT_STATFS2_BSIZE 1
13322 EOF
13323
13324   fi
13325 fi
13326
13327 if test $space = no; then
13328 # SVR3
13329   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
13330 echo "configure:13331: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
13331   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
13332   echo $ac_n "(cached) $ac_c" 1>&6
13333 else
13334   if test "$cross_compiling" = yes; then
13335   fu_cv_sys_stat_statfs4=no
13336 else
13337   cat > conftest.$ac_ext <<EOF
13338 #line 13339 "configure"
13339 #include "confdefs.h"
13340 #include <sys/types.h>
13341 #include <sys/statfs.h>
13342   main ()
13343   {
13344   struct statfs fsd;
13345   exit (statfs (".", &fsd, sizeof fsd, 0));
13346   }
13347 EOF
13348 if { (eval echo configure:13349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13349 then
13350   fu_cv_sys_stat_statfs4=yes
13351 else
13352   echo "configure: failed program was:" >&5
13353   cat conftest.$ac_ext >&5
13354   rm -fr conftest*
13355   fu_cv_sys_stat_statfs4=no
13356 fi
13357 rm -fr conftest*
13358 fi
13359
13360 fi
13361
13362   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
13363   if test $fu_cv_sys_stat_statfs4 = yes; then
13364     space=yes
13365     cat >> confdefs.h <<\EOF
13366 #define STAT_STATFS4 1
13367 EOF
13368
13369   fi
13370 fi
13371
13372 if test $space = no; then
13373 # 4.4BSD and NetBSD
13374   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
13375 echo "configure:13376: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
13376   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
13377   echo $ac_n "(cached) $ac_c" 1>&6
13378 else
13379   if test "$cross_compiling" = yes; then
13380   fu_cv_sys_stat_statfs2_fsize=no
13381 else
13382   cat > conftest.$ac_ext <<EOF
13383 #line 13384 "configure"
13384 #include "confdefs.h"
13385 #include <sys/types.h>
13386 #ifdef HAVE_SYS_PARAM_H
13387 #include <sys/param.h>
13388 #endif
13389 #ifdef HAVE_SYS_MOUNT_H
13390 #include <sys/mount.h>
13391 #endif
13392   main ()
13393   {
13394   struct statfs fsd;
13395   fsd.f_fsize = 0;
13396   exit (statfs (".", &fsd));
13397   }
13398 EOF
13399 if { (eval echo configure:13400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13400 then
13401   fu_cv_sys_stat_statfs2_fsize=yes
13402 else
13403   echo "configure: failed program was:" >&5
13404   cat conftest.$ac_ext >&5
13405   rm -fr conftest*
13406   fu_cv_sys_stat_statfs2_fsize=no
13407 fi
13408 rm -fr conftest*
13409 fi
13410
13411 fi
13412
13413   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
13414   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
13415     space=yes
13416     cat >> confdefs.h <<\EOF
13417 #define STAT_STATFS2_FSIZE 1
13418 EOF
13419
13420   fi
13421 fi
13422
13423 if test $space = no; then
13424   # Ultrix
13425   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
13426 echo "configure:13427: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
13427   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
13428   echo $ac_n "(cached) $ac_c" 1>&6
13429 else
13430   if test "$cross_compiling" = yes; then
13431   fu_cv_sys_stat_fs_data=no
13432 else
13433   cat > conftest.$ac_ext <<EOF
13434 #line 13435 "configure"
13435 #include "confdefs.h"
13436 #include <sys/types.h>
13437 #ifdef HAVE_SYS_PARAM_H
13438 #include <sys/param.h>
13439 #endif
13440 #ifdef HAVE_SYS_MOUNT_H
13441 #include <sys/mount.h>
13442 #endif
13443 #ifdef HAVE_SYS_FS_TYPES_H
13444 #include <sys/fs_types.h>
13445 #endif
13446   main ()
13447   {
13448   struct fs_data fsd;
13449   /* Ultrix's statfs returns 1 for success,
13450      0 for not mounted, -1 for failure.  */
13451   exit (statfs (".", &fsd) != 1);
13452   }
13453 EOF
13454 if { (eval echo configure:13455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13455 then
13456   fu_cv_sys_stat_fs_data=yes
13457 else
13458   echo "configure: failed program was:" >&5
13459   cat conftest.$ac_ext >&5
13460   rm -fr conftest*
13461   fu_cv_sys_stat_fs_data=no
13462 fi
13463 rm -fr conftest*
13464 fi
13465
13466 fi
13467
13468   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
13469   if test $fu_cv_sys_stat_fs_data = yes; then
13470     space=yes
13471     cat >> confdefs.h <<\EOF
13472 #define STAT_STATFS2_FS_DATA 1
13473 EOF
13474
13475   fi
13476 fi
13477
13478 #
13479 # As a gating factor for large file support, in order to
13480 # use <4GB files we must have the following minimal support
13481 # available.
13482 # long long, and a 64 bit off_t or off64_t.
13483 # If we don't have all of these then disable large
13484 # file support.
13485 #
13486 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
13487 echo "configure:13488: checking if large file support can be enabled" >&5
13488 cat > conftest.$ac_ext <<EOF
13489 #line 13490 "configure"
13490 #include "confdefs.h"
13491
13492 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
13493 #include <sys/types.h>
13494 #else
13495 __COMPILE_ERROR_
13496 #endif
13497
13498 int main() {
13499 int i
13500 ; return 0; }
13501 EOF
13502 if { (eval echo configure:13503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13503   rm -rf conftest*
13504   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
13505 else
13506   echo "configure: failed program was:" >&5
13507   cat conftest.$ac_ext >&5
13508   rm -rf conftest*
13509   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
13510 fi
13511 rm -f conftest*
13512 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
13513     cat >> confdefs.h <<\EOF
13514 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
13515 EOF
13516
13517 fi
13518 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
13519
13520 # Check whether --with-spinlocks or --without-spinlocks was given.
13521 if test "${with_spinlocks+set}" = set; then
13522   withval="$with_spinlocks"
13523   :
13524 fi
13525
13526 if test "x$with_spinlocks" = "xyes"; then
13527     cat >> confdefs.h <<\EOF
13528 #define USE_SPINLOCKS 1
13529 EOF
13530
13531
13532     case "$host_cpu" in
13533         sparc)
13534             cat >> confdefs.h <<\EOF
13535 #define SPARC_SPINLOCKS 1
13536 EOF
13537
13538             ;;
13539
13540         i386|i486|i586|i686)
13541             cat >> confdefs.h <<\EOF
13542 #define INTEL_SPINLOCKS 1
13543 EOF
13544
13545             ;;
13546
13547         mips)
13548             cat >> confdefs.h <<\EOF
13549 #define MIPS_SPINLOCKS 1
13550 EOF
13551
13552             ;;
13553
13554         powerpc)
13555             cat >> confdefs.h <<\EOF
13556 #define POWERPC_SPINLOCKS 1
13557 EOF
13558
13559             ;;
13560     esac
13561 fi
13562
13563 #################################################
13564 # check for ACL support
13565
13566 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
13567 echo "configure:13568: checking whether to support ACLs" >&5
13568 # Check whether --with-acl-support or --without-acl-support was given.
13569 if test "${with_acl_support+set}" = set; then
13570   withval="$with_acl_support"
13571    case "$withval" in
13572   yes)
13573
13574         case "$host_os" in
13575         *sysv5*)
13576                 echo "$ac_t""Using UnixWare ACLs" 1>&6
13577                 cat >> confdefs.h <<\EOF
13578 #define HAVE_UNIXWARE_ACLS 1
13579 EOF
13580
13581                 ;;
13582         *solaris*)
13583                 echo "$ac_t""Using solaris ACLs" 1>&6
13584                 cat >> confdefs.h <<\EOF
13585 #define HAVE_SOLARIS_ACLS 1
13586 EOF
13587
13588                 ;;
13589         *hpux*)
13590                 echo "$ac_t""Using HPUX ACLs" 1>&6
13591                 cat >> confdefs.h <<\EOF
13592 #define HAVE_HPUX_ACLS 1
13593 EOF
13594
13595                 ;;
13596         *irix*)
13597                 echo "$ac_t""Using IRIX ACLs" 1>&6
13598                 cat >> confdefs.h <<\EOF
13599 #define HAVE_IRIX_ACLS 1
13600 EOF
13601
13602                 ;;
13603         *aix*)
13604                 echo "$ac_t""Using AIX ACLs" 1>&6
13605                 cat >> confdefs.h <<\EOF
13606 #define HAVE_AIX_ACLS 1
13607 EOF
13608
13609                 ;;
13610         *osf*)
13611                 echo "$ac_t""Using Tru64 ACLs" 1>&6
13612                 cat >> confdefs.h <<\EOF
13613 #define HAVE_TRU64_ACLS 1
13614 EOF
13615
13616                 LIBS="$LIBS -lpacl"
13617                 ;;
13618         *)
13619                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
13620 echo "configure:13621: checking for acl_get_file in -lacl" >&5
13621 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
13622 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13623   echo $ac_n "(cached) $ac_c" 1>&6
13624 else
13625   ac_save_LIBS="$LIBS"
13626 LIBS="-lacl  $LIBS"
13627 cat > conftest.$ac_ext <<EOF
13628 #line 13629 "configure"
13629 #include "confdefs.h"
13630 /* Override any gcc2 internal prototype to avoid an error.  */
13631 /* We use char because int might match the return type of a gcc2
13632     builtin and then its argument prototype would still apply.  */
13633 char acl_get_file();
13634
13635 int main() {
13636 acl_get_file()
13637 ; return 0; }
13638 EOF
13639 if { (eval echo configure:13640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13640   rm -rf conftest*
13641   eval "ac_cv_lib_$ac_lib_var=yes"
13642 else
13643   echo "configure: failed program was:" >&5
13644   cat conftest.$ac_ext >&5
13645   rm -rf conftest*
13646   eval "ac_cv_lib_$ac_lib_var=no"
13647 fi
13648 rm -f conftest*
13649 LIBS="$ac_save_LIBS"
13650
13651 fi
13652 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13653   echo "$ac_t""yes" 1>&6
13654     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13655     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13656   cat >> confdefs.h <<EOF
13657 #define $ac_tr_lib 1
13658 EOF
13659
13660   LIBS="-lacl $LIBS"
13661
13662 else
13663   echo "$ac_t""no" 1>&6
13664 fi
13665
13666                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13667 echo "configure:13668: checking for ACL support" >&5
13668 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
13669   echo $ac_n "(cached) $ac_c" 1>&6
13670 else
13671   
13672                 cat > conftest.$ac_ext <<EOF
13673 #line 13674 "configure"
13674 #include "confdefs.h"
13675 #include <sys/types.h>
13676 #include <sys/acl.h>
13677 int main() {
13678  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
13679 ; return 0; }
13680 EOF
13681 if { (eval echo configure:13682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13682   rm -rf conftest*
13683   samba_cv_HAVE_POSIX_ACLS=yes
13684 else
13685   echo "configure: failed program was:" >&5
13686   cat conftest.$ac_ext >&5
13687   rm -rf conftest*
13688   samba_cv_HAVE_POSIX_ACLS=no
13689 fi
13690 rm -f conftest*
13691 fi
13692
13693 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13694                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13695                                 echo "$ac_t""Using posix ACLs" 1>&6
13696                                 cat >> confdefs.h <<\EOF
13697 #define HAVE_POSIX_ACLS 1
13698 EOF
13699
13700                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13701 echo "configure:13702: checking for acl_get_perm_np" >&5
13702 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13703   echo $ac_n "(cached) $ac_c" 1>&6
13704 else
13705   
13706                                 cat > conftest.$ac_ext <<EOF
13707 #line 13708 "configure"
13708 #include "confdefs.h"
13709 #include <sys/types.h>
13710 #include <sys/acl.h>
13711 int main() {
13712  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13713 ; return 0; }
13714 EOF
13715 if { (eval echo configure:13716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13716   rm -rf conftest*
13717   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13718 else
13719   echo "configure: failed program was:" >&5
13720   cat conftest.$ac_ext >&5
13721   rm -rf conftest*
13722   samba_cv_HAVE_ACL_GET_PERM_NP=no
13723 fi
13724 rm -f conftest*
13725 fi
13726
13727 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13728                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13729                                         cat >> confdefs.h <<\EOF
13730 #define HAVE_ACL_GET_PERM_NP 1
13731 EOF
13732
13733                                 fi
13734                         fi
13735             ;;
13736         esac
13737         ;;
13738   *)
13739     echo "$ac_t""no" 1>&6
13740     cat >> confdefs.h <<\EOF
13741 #define HAVE_NO_ACLS 1
13742 EOF
13743
13744     ;;
13745   esac 
13746 else
13747   cat >> confdefs.h <<\EOF
13748 #define HAVE_NO_ACLS 1
13749 EOF
13750
13751   echo "$ac_t""no" 1>&6
13752
13753 fi
13754
13755
13756 #################################################
13757 # Check whether winbind is supported on this platform.  If so we need to
13758 # build and install client programs (WINBIND_TARGETS), sbin programs
13759 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
13760
13761 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
13762 echo "configure:13763: checking whether to build winbind" >&5
13763
13764 # Initially, the value of $host_os decides whether winbind is supported
13765
13766 case "$host_os" in
13767         *linux*|*irix*)
13768                 HAVE_WINBIND=yes
13769                 ;;
13770         *solaris*)
13771                 HAVE_WINBIND=yes
13772                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
13773                 WINBIND_NSS_EXTRA_LIBS="-lsocket"
13774                 ;;
13775         *hpux11*)
13776                 HAVE_WINBIND=yes
13777                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
13778                 ;;
13779         *)
13780                 HAVE_WINBIND=no
13781                 winbind_no_reason=", unsupported on $host_os"
13782                 ;;
13783 esac
13784
13785 # Check the setting of --with-winbindd
13786
13787 # Check whether --with-winbind or --without-winbind was given.
13788 if test "${with_winbind+set}" = set; then
13789   withval="$with_winbind"
13790    
13791   case "$withval" in
13792         yes)
13793                 HAVE_WINBIND=yes
13794                 ;;
13795         no)
13796                 HAVE_WINBIND=no
13797                 winbind_reason=""
13798                 ;;
13799   esac 
13800 fi
13801
13802
13803 # We need unix domain sockets for winbind
13804
13805 if test x"$HAVE_WINBIND" = x"yes"; then
13806         if test x"$samba_cv_unixsocket" = x"no"; then
13807                 winbind_no_reason=", no unix domain socket support on $host_os"
13808                 HAVE_WINBIND=no
13809         fi
13810 fi
13811
13812 # Display test results
13813
13814 WINBIND_TARGETS=""
13815 WINBIND_STARGETS=""
13816 WINBIND_LTARGETS=""
13817 WINBIND_PAM_PROGS=""
13818
13819 if test x"$HAVE_WINBIND" = x"yes"; then
13820         echo "$ac_t""yes" 1>&6
13821
13822         WINBIND_TARGETS="bin/wbinfo"
13823         WINBIND_STARGETS="bin/winbindd"
13824         if test x"$BLDSHARED" = x"true"; then
13825                 WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
13826                 if test x"$with_pam" = x"yes"; then
13827                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
13828                 fi
13829         fi
13830 else
13831         echo "$ac_t""no$winbind_no_reason" 1>&6
13832 fi
13833
13834 # Substitution time!
13835
13836
13837
13838
13839
13840
13841
13842
13843 # Solaris has some extra fields in struct passwd that need to be
13844 # initialised otherwise nscd crashes.  Unfortunately autoconf < 2.50
13845 # doesn't have the AC_CHECK_MEMBER macro which would be handy for checking
13846 # this. 
13847
13848 #AC_CHECK_MEMBER(struct passwd.pw_comment,
13849 #               AC_DEFINE(HAVE_PASSWD_PW_COMMENT, 1, [Defined if struct passwd has pw_comment field]),
13850 #               [#include <pwd.h>])
13851
13852 echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6
13853 echo "configure:13854: checking whether struct passwd has pw_comment" >&5
13854 if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then
13855   echo $ac_n "(cached) $ac_c" 1>&6
13856 else
13857   
13858     cat > conftest.$ac_ext <<EOF
13859 #line 13860 "configure"
13860 #include "confdefs.h"
13861 #include <pwd.h>
13862 int main() {
13863 struct passwd p; p.pw_comment;
13864 ; return 0; }
13865 EOF
13866 if { (eval echo configure:13867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13867   rm -rf conftest*
13868   samba_cv_passwd_pw_comment=yes
13869 else
13870   echo "configure: failed program was:" >&5
13871   cat conftest.$ac_ext >&5
13872   rm -rf conftest*
13873   samba_cv_passwd_pw_comment=no
13874 fi
13875 rm -f conftest*
13876 fi
13877
13878 echo "$ac_t""$samba_cv_passwd_pw_comment" 1>&6
13879 if test x"$samba_cv_passwd_pw_comment" = x"yes"; then
13880    cat >> confdefs.h <<\EOF
13881 #define HAVE_PASSWD_PW_COMMENT 1
13882 EOF
13883
13884 fi
13885
13886 #AC_CHECK_MEMBER(struct passwd.pw_age,
13887 #               AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]),
13888 #               [#include <pwd.h>])
13889
13890 echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6
13891 echo "configure:13892: checking whether struct passwd has pw_age" >&5
13892 if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then
13893   echo $ac_n "(cached) $ac_c" 1>&6
13894 else
13895   
13896     cat > conftest.$ac_ext <<EOF
13897 #line 13898 "configure"
13898 #include "confdefs.h"
13899 #include <pwd.h>
13900 int main() {
13901 struct passwd p; p.pw_age;
13902 ; return 0; }
13903 EOF
13904 if { (eval echo configure:13905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13905   rm -rf conftest*
13906   samba_cv_passwd_pw_age=yes
13907 else
13908   echo "configure: failed program was:" >&5
13909   cat conftest.$ac_ext >&5
13910   rm -rf conftest*
13911   samba_cv_passwd_pw_age=no
13912 fi
13913 rm -f conftest*
13914 fi
13915
13916 echo "$ac_t""$samba_cv_passwd_pw_age" 1>&6
13917 if test x"$samba_cv_passwd_pw_age" = x"yes"; then
13918    cat >> confdefs.h <<\EOF
13919 #define HAVE_PASSWD_PW_AGE 1
13920 EOF
13921
13922 fi
13923
13924 #################################################
13925 # Check to see if we should use the included popt 
13926
13927 # Check whether --with-included-popt or --without-included-popt was given.
13928 if test "${with_included_popt+set}" = set; then
13929   withval="$with_included_popt"
13930    
13931   case "$withval" in
13932         yes)
13933                 INCLUDED_POPT=yes
13934                 ;;
13935         no)
13936                 INCLUDED_POPT=no
13937                 ;;
13938   esac 
13939 fi
13940
13941 if test x"$INCLUDED_POPT" != x"yes"; then
13942     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
13943 echo "configure:13944: checking for poptGetContext in -lpopt" >&5
13944 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
13945 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13946   echo $ac_n "(cached) $ac_c" 1>&6
13947 else
13948   ac_save_LIBS="$LIBS"
13949 LIBS="-lpopt  $LIBS"
13950 cat > conftest.$ac_ext <<EOF
13951 #line 13952 "configure"
13952 #include "confdefs.h"
13953 /* Override any gcc2 internal prototype to avoid an error.  */
13954 /* We use char because int might match the return type of a gcc2
13955     builtin and then its argument prototype would still apply.  */
13956 char poptGetContext();
13957
13958 int main() {
13959 poptGetContext()
13960 ; return 0; }
13961 EOF
13962 if { (eval echo configure:13963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13963   rm -rf conftest*
13964   eval "ac_cv_lib_$ac_lib_var=yes"
13965 else
13966   echo "configure: failed program was:" >&5
13967   cat conftest.$ac_ext >&5
13968   rm -rf conftest*
13969   eval "ac_cv_lib_$ac_lib_var=no"
13970 fi
13971 rm -f conftest*
13972 LIBS="$ac_save_LIBS"
13973
13974 fi
13975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13976   echo "$ac_t""yes" 1>&6
13977   INCLUDED_POPT=no
13978 else
13979   echo "$ac_t""no" 1>&6
13980 INCLUDED_POPT=yes
13981 fi
13982
13983 fi
13984
13985 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
13986 echo "configure:13987: checking whether to use included popt" >&5
13987 if test x"$INCLUDED_POPT" = x"yes"; then
13988     echo "$ac_t""$srcdir/popt" 1>&6
13989     BUILD_POPT='$(POPT_OBJS)'
13990     FLAGS1="-I$srcdir/popt"
13991 else
13992     echo "$ac_t""no" 1>&6
13993     LIBS="$LIBS -lpopt"
13994 fi
13995
13996
13997
13998 #################################################
13999 # do extra things if we are running insure
14000
14001 if test "${ac_cv_prog_CC}" = "insure"; then
14002         CPPFLAGS="$CPPFLAGS -D__INSURE__"
14003 fi
14004
14005 #################################################
14006 # final configure stuff
14007
14008 echo $ac_n "checking configure summary""... $ac_c" 1>&6
14009 echo "configure:14010: checking configure summary" >&5
14010 if test "$cross_compiling" = yes; then
14011   echo "configure: warning: cannot run when cross-compiling" 1>&2
14012 else
14013   cat > conftest.$ac_ext <<EOF
14014 #line 14015 "configure"
14015 #include "confdefs.h"
14016 #include "${srcdir-.}/tests/summary.c"
14017 EOF
14018 if { (eval echo configure:14019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14019 then
14020   echo "$ac_t""yes" 1>&6
14021 else
14022   echo "configure: failed program was:" >&5
14023   cat conftest.$ac_ext >&5
14024   rm -fr conftest*
14025   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }; exit 1;
14026 fi
14027 rm -fr conftest*
14028 fi
14029
14030
14031 builddir=`pwd`
14032
14033
14034 trap '' 1 2 15
14035 cat > confcache <<\EOF
14036 # This file is a shell script that caches the results of configure
14037 # tests run on this system so they can be shared between configure
14038 # scripts and configure runs.  It is not useful on other systems.
14039 # If it contains results you don't want to keep, you may remove or edit it.
14040 #
14041 # By default, configure uses ./config.cache as the cache file,
14042 # creating it if it does not exist already.  You can give configure
14043 # the --cache-file=FILE option to use a different cache file; that is
14044 # what configure does when it calls configure scripts in
14045 # subdirectories, so they share the cache.
14046 # Giving --cache-file=/dev/null disables caching, for debugging configure.
14047 # config.status only pays attention to the cache file if you give it the
14048 # --recheck option to rerun configure.
14049 #
14050 EOF
14051 # The following way of writing the cache mishandles newlines in values,
14052 # but we know of no workaround that is simple, portable, and efficient.
14053 # So, don't put newlines in cache variables' values.
14054 # Ultrix sh set writes to stderr and can't be redirected directly,
14055 # and sets the high bit in the cache file unless we assign to the vars.
14056 (set) 2>&1 |
14057   case `(ac_space=' '; set | grep ac_space) 2>&1` in
14058   *ac_space=\ *)
14059     # `set' does not quote correctly, so add quotes (double-quote substitution
14060     # turns \\\\ into \\, and sed turns \\ into \).
14061     sed -n \
14062       -e "s/'/'\\\\''/g" \
14063       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
14064     ;;
14065   *)
14066     # `set' quotes correctly as required by POSIX, so do not add quotes.
14067     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
14068     ;;
14069   esac >> confcache
14070 if cmp -s $cache_file confcache; then
14071   :
14072 else
14073   if test -w $cache_file; then
14074     echo "updating cache $cache_file"
14075     cat confcache > $cache_file
14076   else
14077     echo "not updating unwritable cache $cache_file"
14078   fi
14079 fi
14080 rm -f confcache
14081
14082 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14083
14084 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14085 # Let make expand exec_prefix.
14086 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14087
14088 # Any assignment to VPATH causes Sun make to only execute
14089 # the first set of double-colon rules, so remove it if not needed.
14090 # If there is a colon in the path, we need to keep it.
14091 if test "x$srcdir" = x.; then
14092   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14093 fi
14094
14095 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14096
14097 DEFS=-DHAVE_CONFIG_H
14098
14099 # Without the "./", some shells look in PATH for config.status.
14100 : ${CONFIG_STATUS=./config.status}
14101
14102 echo creating $CONFIG_STATUS
14103 rm -f $CONFIG_STATUS
14104 cat > $CONFIG_STATUS <<EOF
14105 #! /bin/sh
14106 # Generated automatically by configure.
14107 # Run this file to recreate the current configuration.
14108 # This directory was configured as follows,
14109 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14110 #
14111 # $0 $ac_configure_args
14112 #
14113 # Compiler output produced by configure, useful for debugging
14114 # configure, is in ./config.log if it exists.
14115
14116 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14117 for ac_option
14118 do
14119   case "\$ac_option" in
14120   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14121     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14122     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14123   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14124     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14125     exit 0 ;;
14126   -help | --help | --hel | --he | --h)
14127     echo "\$ac_cs_usage"; exit 0 ;;
14128   *) echo "\$ac_cs_usage"; exit 1 ;;
14129   esac
14130 done
14131
14132 ac_given_srcdir=$srcdir
14133 ac_given_INSTALL="$INSTALL"
14134
14135 trap 'rm -fr `echo "include/stamp-h Makefile script/findsmb include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14136 EOF
14137 cat >> $CONFIG_STATUS <<EOF
14138
14139 # Protect against being on the right side of a sed subst in config.status.
14140 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14141  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14142 $ac_vpsub
14143 $extrasub
14144 s%@SHELL@%$SHELL%g
14145 s%@CFLAGS@%$CFLAGS%g
14146 s%@CPPFLAGS@%$CPPFLAGS%g
14147 s%@CXXFLAGS@%$CXXFLAGS%g
14148 s%@FFLAGS@%$FFLAGS%g
14149 s%@DEFS@%$DEFS%g
14150 s%@LDFLAGS@%$LDFLAGS%g
14151 s%@LIBS@%$LIBS%g
14152 s%@exec_prefix@%$exec_prefix%g
14153 s%@prefix@%$prefix%g
14154 s%@program_transform_name@%$program_transform_name%g
14155 s%@bindir@%$bindir%g
14156 s%@sbindir@%$sbindir%g
14157 s%@libexecdir@%$libexecdir%g
14158 s%@datadir@%$datadir%g
14159 s%@sysconfdir@%$sysconfdir%g
14160 s%@sharedstatedir@%$sharedstatedir%g
14161 s%@localstatedir@%$localstatedir%g
14162 s%@libdir@%$libdir%g
14163 s%@includedir@%$includedir%g
14164 s%@oldincludedir@%$oldincludedir%g
14165 s%@infodir@%$infodir%g
14166 s%@mandir@%$mandir%g
14167 s%@codepagedir@%$codepagedir%g
14168 s%@configdir@%$configdir%g
14169 s%@lockdir@%$lockdir%g
14170 s%@piddir@%$piddir%g
14171 s%@logfilebase@%$logfilebase%g
14172 s%@privatedir@%$privatedir%g
14173 s%@swatdir@%$swatdir%g
14174 s%@RUNPROG@%$RUNPROG%g
14175 s%@MPROGS@%$MPROGS%g
14176 s%@LDSHFLAGS@%$LDSHFLAGS%g
14177 s%@SHLD@%$SHLD%g
14178 s%@HOST_OS@%$HOST_OS%g
14179 s%@PAM_MOD@%$PAM_MOD%g
14180 s%@WRAP@%$WRAP%g
14181 s%@WRAP32@%$WRAP32%g
14182 s%@PICFLAG@%$PICFLAG%g
14183 s%@PICSUFFIX@%$PICSUFFIX%g
14184 s%@POBAD_CC@%$POBAD_CC%g
14185 s%@SHLIBEXT@%$SHLIBEXT%g
14186 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
14187 s%@CC@%$CC%g
14188 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14189 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14190 s%@INSTALL_DATA@%$INSTALL_DATA%g
14191 s%@AWK@%$AWK%g
14192 s%@BROKEN_CC@%$BROKEN_CC%g
14193 s%@host@%$host%g
14194 s%@host_alias@%$host_alias%g
14195 s%@host_cpu@%$host_cpu%g
14196 s%@host_vendor@%$host_vendor%g
14197 s%@host_os@%$host_os%g
14198 s%@target@%$target%g
14199 s%@target_alias@%$target_alias%g
14200 s%@target_cpu@%$target_cpu%g
14201 s%@target_vendor@%$target_vendor%g
14202 s%@target_os@%$target_os%g
14203 s%@build@%$build%g
14204 s%@build_alias@%$build_alias%g
14205 s%@build_cpu@%$build_cpu%g
14206 s%@build_vendor@%$build_vendor%g
14207 s%@build_os@%$build_os%g
14208 s%@CPP@%$CPP%g
14209 s%@LIBOBJS@%$LIBOBJS%g
14210 s%@TERMLIBS@%$TERMLIBS%g
14211 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
14212 s%@ROFF@%$ROFF%g
14213 s%@DYNEXP@%$DYNEXP%g
14214 s%@QUOTAOBJS@%$QUOTAOBJS%g
14215 s%@manlangs@%$manlangs%g
14216 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
14217 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
14218 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
14219 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
14220 s%@WINBIND_NSS_EXTRA_OBJS@%$WINBIND_NSS_EXTRA_OBJS%g
14221 s%@WINBIND_NSS_EXTRA_LIBS@%$WINBIND_NSS_EXTRA_LIBS%g
14222 s%@BUILD_POPT@%$BUILD_POPT%g
14223 s%@FLAGS1@%$FLAGS1%g
14224 s%@builddir@%$builddir%g
14225
14226 CEOF
14227 EOF
14228
14229 cat >> $CONFIG_STATUS <<\EOF
14230
14231 # Split the substitutions into bite-sized pieces for seds with
14232 # small command number limits, like on Digital OSF/1 and HP-UX.
14233 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14234 ac_file=1 # Number of current file.
14235 ac_beg=1 # First line for current file.
14236 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14237 ac_more_lines=:
14238 ac_sed_cmds=""
14239 while $ac_more_lines; do
14240   if test $ac_beg -gt 1; then
14241     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14242   else
14243     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14244   fi
14245   if test ! -s conftest.s$ac_file; then
14246     ac_more_lines=false
14247     rm -f conftest.s$ac_file
14248   else
14249     if test -z "$ac_sed_cmds"; then
14250       ac_sed_cmds="sed -f conftest.s$ac_file"
14251     else
14252       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14253     fi
14254     ac_file=`expr $ac_file + 1`
14255     ac_beg=$ac_end
14256     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14257   fi
14258 done
14259 if test -z "$ac_sed_cmds"; then
14260   ac_sed_cmds=cat
14261 fi
14262 EOF
14263
14264 cat >> $CONFIG_STATUS <<EOF
14265
14266 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile script/findsmb"}
14267 EOF
14268 cat >> $CONFIG_STATUS <<\EOF
14269 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14270   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14271   case "$ac_file" in
14272   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14273        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14274   *) ac_file_in="${ac_file}.in" ;;
14275   esac
14276
14277   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14278
14279   # Remove last slash and all that follows it.  Not all systems have dirname.
14280   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14281   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14282     # The file is in a subdirectory.
14283     test ! -d "$ac_dir" && mkdir "$ac_dir"
14284     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14285     # A "../" for each directory in $ac_dir_suffix.
14286     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14287   else
14288     ac_dir_suffix= ac_dots=
14289   fi
14290
14291   case "$ac_given_srcdir" in
14292   .)  srcdir=.
14293       if test -z "$ac_dots"; then top_srcdir=.
14294       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14295   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14296   *) # Relative path.
14297     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14298     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14299   esac
14300
14301   case "$ac_given_INSTALL" in
14302   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14303   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14304   esac
14305
14306   echo creating "$ac_file"
14307   rm -f "$ac_file"
14308   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14309   case "$ac_file" in
14310   *Makefile*) ac_comsub="1i\\
14311 # $configure_input" ;;
14312   *) ac_comsub= ;;
14313   esac
14314
14315   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14316   sed -e "$ac_comsub
14317 s%@configure_input@%$configure_input%g
14318 s%@srcdir@%$srcdir%g
14319 s%@top_srcdir@%$top_srcdir%g
14320 s%@INSTALL@%$INSTALL%g
14321 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14322 fi; done
14323 rm -f conftest.s*
14324
14325 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14326 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14327 #
14328 # ac_d sets the value in "#define NAME VALUE" lines.
14329 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14330 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14331 ac_dC='\3'
14332 ac_dD='%g'
14333 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14334 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14335 ac_uB='\([      ]\)%\1#\2define\3'
14336 ac_uC=' '
14337 ac_uD='\4%g'
14338 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14339 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14340 ac_eB='$%\1#\2define\3'
14341 ac_eC=' '
14342 ac_eD='%g'
14343
14344 if test "${CONFIG_HEADERS+set}" != set; then
14345 EOF
14346 cat >> $CONFIG_STATUS <<EOF
14347   CONFIG_HEADERS="include/config.h"
14348 EOF
14349 cat >> $CONFIG_STATUS <<\EOF
14350 fi
14351 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14352   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14353   case "$ac_file" in
14354   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14355        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14356   *) ac_file_in="${ac_file}.in" ;;
14357   esac
14358
14359   echo creating $ac_file
14360
14361   rm -f conftest.frag conftest.in conftest.out
14362   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14363   cat $ac_file_inputs > conftest.in
14364
14365 EOF
14366
14367 # Transform confdefs.h into a sed script conftest.vals that substitutes
14368 # the proper values into config.h.in to produce config.h.  And first:
14369 # Protect against being on the right side of a sed subst in config.status.
14370 # Protect against being in an unquoted here document in config.status.
14371 rm -f conftest.vals
14372 cat > conftest.hdr <<\EOF
14373 s/[\\&%]/\\&/g
14374 s%[\\$`]%\\&%g
14375 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14376 s%ac_d%ac_u%gp
14377 s%ac_u%ac_e%gp
14378 EOF
14379 sed -n -f conftest.hdr confdefs.h > conftest.vals
14380 rm -f conftest.hdr
14381
14382 # This sed command replaces #undef with comments.  This is necessary, for
14383 # example, in the case of _POSIX_SOURCE, which is predefined and required
14384 # on some systems where configure will not decide to define it.
14385 cat >> conftest.vals <<\EOF
14386 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14387 EOF
14388
14389 # Break up conftest.vals because some shells have a limit on
14390 # the size of here documents, and old seds have small limits too.
14391
14392 rm -f conftest.tail
14393 while :
14394 do
14395   ac_lines=`grep -c . conftest.vals`
14396   # grep -c gives empty output for an empty file on some AIX systems.
14397   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14398   # Write a limited-size here document to conftest.frag.
14399   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14400   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14401   echo 'CEOF
14402   sed -f conftest.frag conftest.in > conftest.out
14403   rm -f conftest.in
14404   mv conftest.out conftest.in
14405 ' >> $CONFIG_STATUS
14406   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14407   rm -f conftest.vals
14408   mv conftest.tail conftest.vals
14409 done
14410 rm -f conftest.vals
14411
14412 cat >> $CONFIG_STATUS <<\EOF
14413   rm -f conftest.frag conftest.h
14414   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14415   cat conftest.in >> conftest.h
14416   rm -f conftest.in
14417   if cmp -s $ac_file conftest.h 2>/dev/null; then
14418     echo "$ac_file is unchanged"
14419     rm -f conftest.h
14420   else
14421     # Remove last slash and all that follows it.  Not all systems have dirname.
14422       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14423       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14424       # The file is in a subdirectory.
14425       test ! -d "$ac_dir" && mkdir "$ac_dir"
14426     fi
14427     rm -f $ac_file
14428     mv conftest.h $ac_file
14429   fi
14430 fi; done
14431
14432 EOF
14433 cat >> $CONFIG_STATUS <<EOF
14434
14435 EOF
14436 cat >> $CONFIG_STATUS <<\EOF
14437
14438 exit 0
14439 EOF
14440 chmod +x $CONFIG_STATUS
14441 rm -fr confdefs* $ac_clean_files
14442 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
14443
14444
14445 #################################################
14446 # Print very concise instructions on building/use
14447 if test "x$enable_dmalloc" = xyes
14448 then
14449         echo "$ac_t""Note: The dmalloc debug library will be included.  To turn it on use" 1>&6
14450         echo "$ac_t""      \$ eval \`dmalloc samba\`." 1>&6
14451 fi