Make --with-ldapsam 'go away'. This is now a standard, stable, feature
[samba.git] / source3 / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/samba
15 ac_help="$ac_help
16   --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-nisplussam       Include NISPLUS SAM support (default=no)"
63 ac_help="$ac_help
64   --with-nisplus-home     Include NISPLUS_HOME support (default=no)"
65 ac_help="$ac_help
66   --with-syslog           Include experimental SYSLOG support (default=no)"
67 ac_help="$ac_help
68   --with-profiling-data   Include gathering source code profile information (default=no)"
69 ac_help="$ac_help
70   --with-quotas           Include experimental disk-quota support (default=no)"
71 ac_help="$ac_help
72   --with-utmp             Include experimental utmp accounting (default=no)"
73 ac_help="$ac_help
74   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
75 ac_help="$ac_help
76   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
77 ac_help="$ac_help
78   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
79 ac_help="$ac_help
80   --with-manpages-langs={en,ja,pl}  Choose man pages' language(s). (en)"
81 ac_help="$ac_help
82   --with-spinlocks        Use spin locks instead of fcntl locks (default=no) "
83 ac_help="$ac_help
84   --with-acl-support      Include ACL support (default=no)"
85 ac_help="$ac_help
86   --with-winbind          Build winbind (default, if supported by OS)"
87 ac_help="$ac_help
88   --with-included-popt    use bundled popt library, not from system"
89
90 # Initialize some variables set by options.
91 # The variables have the same names as the options, with
92 # dashes changed to underlines.
93 build=NONE
94 cache_file=./config.cache
95 exec_prefix=NONE
96 host=NONE
97 no_create=
98 nonopt=NONE
99 no_recursion=
100 prefix=NONE
101 program_prefix=NONE
102 program_suffix=NONE
103 program_transform_name=s,x,x,
104 silent=
105 site=
106 srcdir=
107 target=NONE
108 verbose=
109 x_includes=NONE
110 x_libraries=NONE
111 bindir='${exec_prefix}/bin'
112 sbindir='${exec_prefix}/sbin'
113 libexecdir='${exec_prefix}/libexec'
114 datadir='${prefix}/share'
115 sysconfdir='${prefix}/etc'
116 sharedstatedir='${prefix}/com'
117 localstatedir='${prefix}/var'
118 libdir='${exec_prefix}/lib'
119 includedir='${prefix}/include'
120 oldincludedir='/usr/include'
121 infodir='${prefix}/info'
122 mandir='${prefix}/man'
123
124 # Initialize some other variables.
125 subdirs=
126 MFLAGS= MAKEFLAGS=
127 SHELL=${CONFIG_SHELL-/bin/sh}
128 # Maximum number of lines to put in a shell here document.
129 ac_max_here_lines=12
130
131 ac_prev=
132 for ac_option
133 do
134
135   # If the previous option needs an argument, assign it.
136   if test -n "$ac_prev"; then
137     eval "$ac_prev=\$ac_option"
138     ac_prev=
139     continue
140   fi
141
142   case "$ac_option" in
143   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
144   *) ac_optarg= ;;
145   esac
146
147   # Accept the important Cygnus configure options, so we can diagnose typos.
148
149   case "$ac_option" in
150
151   -bindir | --bindir | --bindi | --bind | --bin | --bi)
152     ac_prev=bindir ;;
153   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
154     bindir="$ac_optarg" ;;
155
156   -build | --build | --buil | --bui | --bu)
157     ac_prev=build ;;
158   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
159     build="$ac_optarg" ;;
160
161   -cache-file | --cache-file | --cache-fil | --cache-fi \
162   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
163     ac_prev=cache_file ;;
164   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
165   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
166     cache_file="$ac_optarg" ;;
167
168   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
169     ac_prev=datadir ;;
170   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
171   | --da=*)
172     datadir="$ac_optarg" ;;
173
174   -disable-* | --disable-*)
175     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
176     # Reject names that are not valid shell variable names.
177     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
178       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
179     fi
180     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
181     eval "enable_${ac_feature}=no" ;;
182
183   -enable-* | --enable-*)
184     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
185     # Reject names that are not valid shell variable names.
186     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
187       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
188     fi
189     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
190     case "$ac_option" in
191       *=*) ;;
192       *) ac_optarg=yes ;;
193     esac
194     eval "enable_${ac_feature}='$ac_optarg'" ;;
195
196   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
197   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
198   | --exec | --exe | --ex)
199     ac_prev=exec_prefix ;;
200   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
201   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
202   | --exec=* | --exe=* | --ex=*)
203     exec_prefix="$ac_optarg" ;;
204
205   -gas | --gas | --ga | --g)
206     # Obsolete; use --with-gas.
207     with_gas=yes ;;
208
209   -help | --help | --hel | --he)
210     # Omit some internal or obsolete options to make the list less imposing.
211     # This message is too long to be a string in the A/UX 3.1 sh.
212     cat << EOF
213 Usage: configure [options] [host]
214 Options: [defaults in brackets after descriptions]
215 Configuration:
216   --cache-file=FILE       cache test results in FILE
217   --help                  print this message
218   --no-create             do not create output files
219   --quiet, --silent       do not print \`checking...' messages
220   --version               print the version of autoconf that created configure
221 Directory and file names:
222   --prefix=PREFIX         install architecture-independent files in PREFIX
223                           [$ac_default_prefix]
224   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
225                           [same as prefix]
226   --bindir=DIR            user executables in DIR [EPREFIX/bin]
227   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
228   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
229   --datadir=DIR           read-only architecture-independent data in DIR
230                           [PREFIX/share]
231   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
232   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
233                           [PREFIX/com]
234   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
235   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
236   --includedir=DIR        C header files in DIR [PREFIX/include]
237   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
238   --infodir=DIR           info documentation in DIR [PREFIX/info]
239   --mandir=DIR            man documentation in DIR [PREFIX/man]
240   --srcdir=DIR            find the sources in DIR [configure dir or ..]
241   --program-prefix=PREFIX prepend PREFIX to installed program names
242   --program-suffix=SUFFIX append SUFFIX to installed program names
243   --program-transform-name=PROGRAM
244                           run sed PROGRAM on installed program names
245 EOF
246     cat << EOF
247 Host type:
248   --build=BUILD           configure for building on BUILD [BUILD=HOST]
249   --host=HOST             configure for HOST [guessed]
250   --target=TARGET         configure for TARGET [TARGET=HOST]
251 Features and packages:
252   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
253   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
254   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
255   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
256   --x-includes=DIR        X include files are in DIR
257   --x-libraries=DIR       X library files are in DIR
258 EOF
259     if test -n "$ac_help"; then
260       echo "--enable and --with options recognized:$ac_help"
261     fi
262     exit 0 ;;
263
264   -host | --host | --hos | --ho)
265     ac_prev=host ;;
266   -host=* | --host=* | --hos=* | --ho=*)
267     host="$ac_optarg" ;;
268
269   -includedir | --includedir | --includedi | --included | --include \
270   | --includ | --inclu | --incl | --inc)
271     ac_prev=includedir ;;
272   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
273   | --includ=* | --inclu=* | --incl=* | --inc=*)
274     includedir="$ac_optarg" ;;
275
276   -infodir | --infodir | --infodi | --infod | --info | --inf)
277     ac_prev=infodir ;;
278   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
279     infodir="$ac_optarg" ;;
280
281   -libdir | --libdir | --libdi | --libd)
282     ac_prev=libdir ;;
283   -libdir=* | --libdir=* | --libdi=* | --libd=*)
284     libdir="$ac_optarg" ;;
285
286   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
287   | --libexe | --libex | --libe)
288     ac_prev=libexecdir ;;
289   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
290   | --libexe=* | --libex=* | --libe=*)
291     libexecdir="$ac_optarg" ;;
292
293   -localstatedir | --localstatedir | --localstatedi | --localstated \
294   | --localstate | --localstat | --localsta | --localst \
295   | --locals | --local | --loca | --loc | --lo)
296     ac_prev=localstatedir ;;
297   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
298   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
299   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
300     localstatedir="$ac_optarg" ;;
301
302   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
303     ac_prev=mandir ;;
304   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
305     mandir="$ac_optarg" ;;
306
307   -nfp | --nfp | --nf)
308     # Obsolete; use --without-fp.
309     with_fp=no ;;
310
311   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
312   | --no-cr | --no-c)
313     no_create=yes ;;
314
315   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
316   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
317     no_recursion=yes ;;
318
319   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
320   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
321   | --oldin | --oldi | --old | --ol | --o)
322     ac_prev=oldincludedir ;;
323   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
324   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
325   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
326     oldincludedir="$ac_optarg" ;;
327
328   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
329     ac_prev=prefix ;;
330   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
331     prefix="$ac_optarg" ;;
332
333   -program-prefix | --program-prefix | --program-prefi | --program-pref \
334   | --program-pre | --program-pr | --program-p)
335     ac_prev=program_prefix ;;
336   -program-prefix=* | --program-prefix=* | --program-prefi=* \
337   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
338     program_prefix="$ac_optarg" ;;
339
340   -program-suffix | --program-suffix | --program-suffi | --program-suff \
341   | --program-suf | --program-su | --program-s)
342     ac_prev=program_suffix ;;
343   -program-suffix=* | --program-suffix=* | --program-suffi=* \
344   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
345     program_suffix="$ac_optarg" ;;
346
347   -program-transform-name | --program-transform-name \
348   | --program-transform-nam | --program-transform-na \
349   | --program-transform-n | --program-transform- \
350   | --program-transform | --program-transfor \
351   | --program-transfo | --program-transf \
352   | --program-trans | --program-tran \
353   | --progr-tra | --program-tr | --program-t)
354     ac_prev=program_transform_name ;;
355   -program-transform-name=* | --program-transform-name=* \
356   | --program-transform-nam=* | --program-transform-na=* \
357   | --program-transform-n=* | --program-transform-=* \
358   | --program-transform=* | --program-transfor=* \
359   | --program-transfo=* | --program-transf=* \
360   | --program-trans=* | --program-tran=* \
361   | --progr-tra=* | --program-tr=* | --program-t=*)
362     program_transform_name="$ac_optarg" ;;
363
364   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
365   | -silent | --silent | --silen | --sile | --sil)
366     silent=yes ;;
367
368   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
369     ac_prev=sbindir ;;
370   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
371   | --sbi=* | --sb=*)
372     sbindir="$ac_optarg" ;;
373
374   -sharedstatedir | --sharedstatedir | --sharedstatedi \
375   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
376   | --sharedst | --shareds | --shared | --share | --shar \
377   | --sha | --sh)
378     ac_prev=sharedstatedir ;;
379   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
380   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
381   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
382   | --sha=* | --sh=*)
383     sharedstatedir="$ac_optarg" ;;
384
385   -site | --site | --sit)
386     ac_prev=site ;;
387   -site=* | --site=* | --sit=*)
388     site="$ac_optarg" ;;
389
390   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
391     ac_prev=srcdir ;;
392   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
393     srcdir="$ac_optarg" ;;
394
395   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
396   | --syscon | --sysco | --sysc | --sys | --sy)
397     ac_prev=sysconfdir ;;
398   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
399   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
400     sysconfdir="$ac_optarg" ;;
401
402   -target | --target | --targe | --targ | --tar | --ta | --t)
403     ac_prev=target ;;
404   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
405     target="$ac_optarg" ;;
406
407   -v | -verbose | --verbose | --verbos | --verbo | --verb)
408     verbose=yes ;;
409
410   -version | --version | --versio | --versi | --vers)
411     echo "configure generated by autoconf version 2.13"
412     exit 0 ;;
413
414   -with-* | --with-*)
415     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
416     # Reject names that are not valid shell variable names.
417     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
418       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
419     fi
420     ac_package=`echo $ac_package| sed 's/-/_/g'`
421     case "$ac_option" in
422       *=*) ;;
423       *) ac_optarg=yes ;;
424     esac
425     eval "with_${ac_package}='$ac_optarg'" ;;
426
427   -without-* | --without-*)
428     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
429     # Reject names that are not valid shell variable names.
430     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
431       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
432     fi
433     ac_package=`echo $ac_package| sed 's/-/_/g'`
434     eval "with_${ac_package}=no" ;;
435
436   --x)
437     # Obsolete; use --with-x.
438     with_x=yes ;;
439
440   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
441   | --x-incl | --x-inc | --x-in | --x-i)
442     ac_prev=x_includes ;;
443   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
444   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
445     x_includes="$ac_optarg" ;;
446
447   -x-libraries | --x-libraries | --x-librarie | --x-librari \
448   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
449     ac_prev=x_libraries ;;
450   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
451   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
452     x_libraries="$ac_optarg" ;;
453
454   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
455     ;;
456
457   *)
458     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
459       echo "configure: warning: $ac_option: invalid host type" 1>&2
460     fi
461     if test "x$nonopt" != xNONE; then
462       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
463     fi
464     nonopt="$ac_option"
465     ;;
466
467   esac
468 done
469
470 if test -n "$ac_prev"; then
471   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
472 fi
473
474 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
475
476 # File descriptor usage:
477 # 0 standard input
478 # 1 file creation
479 # 2 errors and warnings
480 # 3 some systems may open it to /dev/tty
481 # 4 used on the Kubota Titan
482 # 6 checking for... messages and results
483 # 5 compiler messages saved in config.log
484 if test "$silent" = yes; then
485   exec 6>/dev/null
486 else
487   exec 6>&1
488 fi
489 exec 5>./config.log
490
491 echo "\
492 This file contains any messages produced by compilers while
493 running configure, to aid debugging if configure makes a mistake.
494 " 1>&5
495
496 # Strip out --no-create and --no-recursion so they do not pile up.
497 # Also quote any args containing shell metacharacters.
498 ac_configure_args=
499 for ac_arg
500 do
501   case "$ac_arg" in
502   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
503   | --no-cr | --no-c) ;;
504   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
505   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
506   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
507   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
508   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
509   esac
510 done
511
512 # NLS nuisances.
513 # Only set these to C if already set.  These must not be set unconditionally
514 # because not all systems understand e.g. LANG=C (notably SCO).
515 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
516 # Non-C LC_CTYPE values break the ctype check.
517 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
518 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
519 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
520 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
521
522 # confdefs.h avoids OS command line length limits that DEFS can exceed.
523 rm -rf conftest* confdefs.h
524 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
525 echo > confdefs.h
526
527 # A filename unique to this package, relative to the directory that
528 # configure is in, which we can look for to find out if srcdir is correct.
529 ac_unique_file=include/includes.h
530
531 # Find the source files, if location was not specified.
532 if test -z "$srcdir"; then
533   ac_srcdir_defaulted=yes
534   # Try the directory containing this script, then its parent.
535   ac_prog=$0
536   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
537   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
538   srcdir=$ac_confdir
539   if test ! -r $srcdir/$ac_unique_file; then
540     srcdir=..
541   fi
542 else
543   ac_srcdir_defaulted=no
544 fi
545 if test ! -r $srcdir/$ac_unique_file; then
546   if test "$ac_srcdir_defaulted" = yes; then
547     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
548   else
549     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
550   fi
551 fi
552 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
553
554 # Prefer explicitly selected file to automatically selected ones.
555 if test -z "$CONFIG_SITE"; then
556   if test "x$prefix" != xNONE; then
557     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
558   else
559     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
560   fi
561 fi
562 for ac_site_file in $CONFIG_SITE; do
563   if test -r "$ac_site_file"; then
564     echo "loading site script $ac_site_file"
565     . "$ac_site_file"
566   fi
567 done
568
569 if test -r "$cache_file"; then
570   echo "loading cache $cache_file"
571   . $cache_file
572 else
573   echo "creating cache $cache_file"
574   > $cache_file
575 fi
576
577 ac_ext=c
578 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
579 ac_cpp='$CPP $CPPFLAGS'
580 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
581 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
582 cross_compiling=$ac_cv_prog_cc_cross
583
584 ac_exeext=
585 ac_objext=o
586 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
587   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
588   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
589     ac_n= ac_c='
590 ' ac_t='        '
591   else
592     ac_n=-n ac_c= ac_t=
593   fi
594 else
595   ac_n= ac_c='\c' ac_t=
596 fi
597
598
599
600
601 #################################################
602 # Directory handling stuff to support both the
603 # legacy SAMBA directories and FHS compliant
604 # ones...
605
606
607 # Check whether --with-fhs or --without-fhs was given.
608 if test "${with_fhs+set}" = set; then
609   withval="$with_fhs"
610   codepagedir="\$(DATADIR)/samba/codepages"
611     configdir="${sysconfdir}/samba"
612     lockdir="\${VARDIR}/cache/samba"
613     piddir="\$(VARDIR)/run/samba"
614     logfilebase="\${VARDIR}/log/samba"
615     privatedir="\${CONFIGDIR}/private"
616     swatdir="\${DATADIR}/samba/swat"
617 else
618   codepagedir="\$(LIBDIR)/codepages"
619     configdir="\$(LIBDIR)"
620     logfilebase="\$(VARDIR)"
621     lockdir="\${VARDIR}/locks"
622     piddir="\$(VARDIR)/locks"
623     privatedir="\${prefix}/private"
624     swatdir="\${prefix}/swat"
625 fi
626
627
628 #################################################
629 # set private directory location
630 # Check whether --with-privatedir or --without-privatedir was given.
631 if test "${with_privatedir+set}" = set; then
632   withval="$with_privatedir"
633    case "$withval" in
634   yes|no)
635   #
636   # Just in case anybody calls it without argument
637   #
638     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
639   ;;
640   * )
641     privatedir="$withval"
642     ;;
643   esac
644 fi
645
646
647 #################################################
648 # set lock directory location
649 # Check whether --with-lockdir or --without-lockdir was given.
650 if test "${with_lockdir+set}" = set; then
651   withval="$with_lockdir"
652    case "$withval" in
653   yes|no)
654   #
655   # Just in case anybody calls it without argument
656   #
657     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
658   ;;
659   * )
660     lockdir="$withval"
661     ;;
662   esac
663 fi
664
665
666 #################################################
667 # set pid directory location
668 # Check whether --with-piddir or --without-piddir was given.
669 if test "${with_piddir+set}" = set; then
670   withval="$with_piddir"
671    case "$withval" in
672   yes|no)
673   #
674   # Just in case anybody calls it without argument
675   #
676     echo "configure: warning: --with-piddir called without argument - will use default" 1>&2
677   ;;
678   * )
679     piddir="$withval"
680     ;;
681   esac
682 fi
683
684
685 #################################################
686 # set SWAT directory location
687 # Check whether --with-swatdir or --without-swatdir was given.
688 if test "${with_swatdir+set}" = set; then
689   withval="$with_swatdir"
690    case "$withval" in
691   yes|no)
692   #
693   # Just in case anybody does it
694   #
695     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
696   ;;
697   * )
698     swatdir="$withval"
699     ;;
700   esac
701 fi
702
703
704 #################################################
705 # set configuration directory location
706 # Check whether --with-configdir or --without-configdir was given.
707 if test "${with_configdir+set}" = set; then
708   withval="$with_configdir"
709    case "$withval" in
710   yes|no)
711   #
712   # Just in case anybody does it
713   #
714     echo "configure: warning: --with-configdir called without argument - will use default" 1>&2
715   ;;
716   * )
717     configdir="$withval"
718     ;;
719   esac
720 fi
721
722
723 #################################################
724 # set codepage directory location
725 # Check whether --with-codepagedir or --without-codepagedir was given.
726 if test "${with_codepagedir+set}" = set; then
727   withval="$with_codepagedir"
728    case "$withval" in
729   yes|no)
730   #
731   # Just in case anybody does it
732   #
733     echo "configure: warning: --with-codepagedir called without argument - will use default" 1>&2
734   ;;
735   * )
736     codepagedir="$withval"
737     ;;
738   esac
739 fi
740
741
742 #################################################
743 # set log directory location
744 # Check whether --with-logfilebase or --without-logfilebase was given.
745 if test "${with_logfilebase+set}" = set; then
746   withval="$with_logfilebase"
747    case "$withval" in
748   yes|no)
749   #
750   # Just in case anybody does it
751   #
752     echo "configure: warning: --with-logfilebase called without argument - will use default" 1>&2
753   ;;
754   * )
755     logfilebase="$withval"
756     ;;
757   esac
758 fi
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786 # compile with optimisation and without debugging by default
787 CFLAGS="-O ${CFLAGS}"
788
789 # Check whether --enable-debug or --disable-debug was given.
790 if test "${enable_debug+set}" = set; then
791   enableval="$enable_debug"
792   if eval "test x$enable_debug = xyes"; then
793         CFLAGS="${CFLAGS} -g"
794     fi
795 fi
796
797
798 # Check whether --enable-developer or --disable-developer was given.
799 if test "${enable_developer+set}" = set; then
800   enableval="$enable_developer"
801   if eval "test x$enable_developer = xyes"; then
802         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
803     fi
804 fi
805
806
807 # Check whether --enable-krb5developer or --disable-krb5developer was given.
808 if test "${enable_krb5developer+set}" = set; then
809   enableval="$enable_krb5developer"
810   if eval "test x$enable_krb5developer = xyes"; then
811         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
812     fi
813 fi
814
815
816 # Check whether --enable-dmalloc or --disable-dmalloc was given.
817 if test "${enable_dmalloc+set}" = set; then
818   enableval="$enable_dmalloc"
819   :
820 fi
821
822
823 if test "x$enable_dmalloc" = xyes
824 then
825         cat >> confdefs.h <<\EOF
826 #define ENABLE_DMALLOC 1
827 EOF
828
829         cat >> confdefs.h <<\EOF
830 #define DMALLOC_FUNC_CHECK 1
831 EOF
832
833         LIBS="$LIBS -ldmalloc"  
834 fi
835
836 # Extract the first word of "gcc", so it can be a program name with args.
837 set dummy gcc; ac_word=$2
838 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
839 echo "configure:840: checking for $ac_word" >&5
840 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
841   echo $ac_n "(cached) $ac_c" 1>&6
842 else
843   if test -n "$CC"; then
844   ac_cv_prog_CC="$CC" # Let the user override the test.
845 else
846   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
847   ac_dummy="$PATH"
848   for ac_dir in $ac_dummy; do
849     test -z "$ac_dir" && ac_dir=.
850     if test -f $ac_dir/$ac_word; then
851       ac_cv_prog_CC="gcc"
852       break
853     fi
854   done
855   IFS="$ac_save_ifs"
856 fi
857 fi
858 CC="$ac_cv_prog_CC"
859 if test -n "$CC"; then
860   echo "$ac_t""$CC" 1>&6
861 else
862   echo "$ac_t""no" 1>&6
863 fi
864
865 if test -z "$CC"; then
866   # Extract the first word of "cc", so it can be a program name with args.
867 set dummy cc; ac_word=$2
868 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
869 echo "configure:870: checking for $ac_word" >&5
870 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
871   echo $ac_n "(cached) $ac_c" 1>&6
872 else
873   if test -n "$CC"; then
874   ac_cv_prog_CC="$CC" # Let the user override the test.
875 else
876   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
877   ac_prog_rejected=no
878   ac_dummy="$PATH"
879   for ac_dir in $ac_dummy; do
880     test -z "$ac_dir" && ac_dir=.
881     if test -f $ac_dir/$ac_word; then
882       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
883         ac_prog_rejected=yes
884         continue
885       fi
886       ac_cv_prog_CC="cc"
887       break
888     fi
889   done
890   IFS="$ac_save_ifs"
891 if test $ac_prog_rejected = yes; then
892   # We found a bogon in the path, so make sure we never use it.
893   set dummy $ac_cv_prog_CC
894   shift
895   if test $# -gt 0; then
896     # We chose a different compiler from the bogus one.
897     # However, it has the same basename, so the bogon will be chosen
898     # first if we set CC to just the basename; use the full file name.
899     shift
900     set dummy "$ac_dir/$ac_word" "$@"
901     shift
902     ac_cv_prog_CC="$@"
903   fi
904 fi
905 fi
906 fi
907 CC="$ac_cv_prog_CC"
908 if test -n "$CC"; then
909   echo "$ac_t""$CC" 1>&6
910 else
911   echo "$ac_t""no" 1>&6
912 fi
913
914   if test -z "$CC"; then
915     case "`uname -s`" in
916     *win32* | *WIN32*)
917       # Extract the first word of "cl", so it can be a program name with args.
918 set dummy cl; ac_word=$2
919 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
920 echo "configure:921: checking for $ac_word" >&5
921 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
922   echo $ac_n "(cached) $ac_c" 1>&6
923 else
924   if test -n "$CC"; then
925   ac_cv_prog_CC="$CC" # Let the user override the test.
926 else
927   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
928   ac_dummy="$PATH"
929   for ac_dir in $ac_dummy; do
930     test -z "$ac_dir" && ac_dir=.
931     if test -f $ac_dir/$ac_word; then
932       ac_cv_prog_CC="cl"
933       break
934     fi
935   done
936   IFS="$ac_save_ifs"
937 fi
938 fi
939 CC="$ac_cv_prog_CC"
940 if test -n "$CC"; then
941   echo "$ac_t""$CC" 1>&6
942 else
943   echo "$ac_t""no" 1>&6
944 fi
945  ;;
946     esac
947   fi
948   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
949 fi
950
951 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
952 echo "configure:953: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
953
954 ac_ext=c
955 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
956 ac_cpp='$CPP $CPPFLAGS'
957 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
958 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
959 cross_compiling=$ac_cv_prog_cc_cross
960
961 cat > conftest.$ac_ext << EOF
962
963 #line 964 "configure"
964 #include "confdefs.h"
965
966 main(){return(0);}
967 EOF
968 if { (eval echo configure:969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
969   ac_cv_prog_cc_works=yes
970   # If we can't run a trivial program, we are probably using a cross compiler.
971   if (./conftest; exit) 2>/dev/null; then
972     ac_cv_prog_cc_cross=no
973   else
974     ac_cv_prog_cc_cross=yes
975   fi
976 else
977   echo "configure: failed program was:" >&5
978   cat conftest.$ac_ext >&5
979   ac_cv_prog_cc_works=no
980 fi
981 rm -fr conftest*
982 ac_ext=c
983 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
984 ac_cpp='$CPP $CPPFLAGS'
985 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
986 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
987 cross_compiling=$ac_cv_prog_cc_cross
988
989 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
990 if test $ac_cv_prog_cc_works = no; then
991   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
992 fi
993 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
994 echo "configure:995: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
995 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
996 cross_compiling=$ac_cv_prog_cc_cross
997
998 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
999 echo "configure:1000: checking whether we are using GNU C" >&5
1000 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1001   echo $ac_n "(cached) $ac_c" 1>&6
1002 else
1003   cat > conftest.c <<EOF
1004 #ifdef __GNUC__
1005   yes;
1006 #endif
1007 EOF
1008 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1009   ac_cv_prog_gcc=yes
1010 else
1011   ac_cv_prog_gcc=no
1012 fi
1013 fi
1014
1015 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1016
1017 if test $ac_cv_prog_gcc = yes; then
1018   GCC=yes
1019 else
1020   GCC=
1021 fi
1022
1023 ac_test_CFLAGS="${CFLAGS+set}"
1024 ac_save_CFLAGS="$CFLAGS"
1025 CFLAGS=
1026 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1027 echo "configure:1028: checking whether ${CC-cc} accepts -g" >&5
1028 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1029   echo $ac_n "(cached) $ac_c" 1>&6
1030 else
1031   echo 'void f(){}' > conftest.c
1032 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1033   ac_cv_prog_cc_g=yes
1034 else
1035   ac_cv_prog_cc_g=no
1036 fi
1037 rm -f conftest*
1038
1039 fi
1040
1041 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1042 if test "$ac_test_CFLAGS" = set; then
1043   CFLAGS="$ac_save_CFLAGS"
1044 elif test $ac_cv_prog_cc_g = yes; then
1045   if test "$GCC" = yes; then
1046     CFLAGS="-g -O2"
1047   else
1048     CFLAGS="-g"
1049   fi
1050 else
1051   if test "$GCC" = yes; then
1052     CFLAGS="-O2"
1053   else
1054     CFLAGS=
1055   fi
1056 fi
1057
1058 ac_aux_dir=
1059 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1060   if test -f $ac_dir/install-sh; then
1061     ac_aux_dir=$ac_dir
1062     ac_install_sh="$ac_aux_dir/install-sh -c"
1063     break
1064   elif test -f $ac_dir/install.sh; then
1065     ac_aux_dir=$ac_dir
1066     ac_install_sh="$ac_aux_dir/install.sh -c"
1067     break
1068   fi
1069 done
1070 if test -z "$ac_aux_dir"; then
1071   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1072 fi
1073 ac_config_guess=$ac_aux_dir/config.guess
1074 ac_config_sub=$ac_aux_dir/config.sub
1075 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1076
1077 # Find a good install program.  We prefer a C program (faster),
1078 # so one script is as good as another.  But avoid the broken or
1079 # incompatible versions:
1080 # SysV /etc/install, /usr/sbin/install
1081 # SunOS /usr/etc/install
1082 # IRIX /sbin/install
1083 # AIX /bin/install
1084 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1085 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1086 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1087 # ./install, which can be erroneously created by make from ./install.sh.
1088 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1089 echo "configure:1090: checking for a BSD compatible install" >&5
1090 if test -z "$INSTALL"; then
1091 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1092   echo $ac_n "(cached) $ac_c" 1>&6
1093 else
1094     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1095   for ac_dir in $PATH; do
1096     # Account for people who put trailing slashes in PATH elements.
1097     case "$ac_dir/" in
1098     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1099     *)
1100       # OSF1 and SCO ODT 3.0 have their own names for install.
1101       # Don't use installbsd from OSF since it installs stuff as root
1102       # by default.
1103       for ac_prog in ginstall scoinst install; do
1104         if test -f $ac_dir/$ac_prog; then
1105           if test $ac_prog = install &&
1106             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1107             # AIX install.  It has an incompatible calling convention.
1108             :
1109           else
1110             ac_cv_path_install="$ac_dir/$ac_prog -c"
1111             break 2
1112           fi
1113         fi
1114       done
1115       ;;
1116     esac
1117   done
1118   IFS="$ac_save_IFS"
1119
1120 fi
1121   if test "${ac_cv_path_install+set}" = set; then
1122     INSTALL="$ac_cv_path_install"
1123   else
1124     # As a last resort, use the slow shell script.  We don't cache a
1125     # path for INSTALL within a source directory, because that will
1126     # break other packages using the cache if that directory is
1127     # removed, or if the path is relative.
1128     INSTALL="$ac_install_sh"
1129   fi
1130 fi
1131 echo "$ac_t""$INSTALL" 1>&6
1132
1133 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1134 # It thinks the first close brace ends the variable substitution.
1135 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1136
1137 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1138
1139 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1140
1141 for ac_prog in gawk mawk nawk awk
1142 do
1143 # Extract the first word of "$ac_prog", so it can be a program name with args.
1144 set dummy $ac_prog; ac_word=$2
1145 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1146 echo "configure:1147: checking for $ac_word" >&5
1147 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1148   echo $ac_n "(cached) $ac_c" 1>&6
1149 else
1150   if test -n "$AWK"; then
1151   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1152 else
1153   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1154   ac_dummy="$PATH"
1155   for ac_dir in $ac_dummy; do
1156     test -z "$ac_dir" && ac_dir=.
1157     if test -f $ac_dir/$ac_word; then
1158       ac_cv_prog_AWK="$ac_prog"
1159       break
1160     fi
1161   done
1162   IFS="$ac_save_ifs"
1163 fi
1164 fi
1165 AWK="$ac_cv_prog_AWK"
1166 if test -n "$AWK"; then
1167   echo "$ac_t""$AWK" 1>&6
1168 else
1169   echo "$ac_t""no" 1>&6
1170 fi
1171
1172 test -n "$AWK" && break
1173 done
1174
1175
1176 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1177 echo "configure:1178: checking for POSIXized ISC" >&5
1178 if test -d /etc/conf/kconfig.d &&
1179   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1180 then
1181   echo "$ac_t""yes" 1>&6
1182   ISC=yes # If later tests want to check for ISC.
1183   cat >> confdefs.h <<\EOF
1184 #define _POSIX_SOURCE 1
1185 EOF
1186
1187   if test "$GCC" = yes; then
1188     CC="$CC -posix"
1189   else
1190     CC="$CC -Xp"
1191   fi
1192 else
1193   echo "$ac_t""no" 1>&6
1194   ISC=
1195 fi
1196
1197
1198 if test "x$CC" != xcc; then
1199   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1200 echo "configure:1201: checking whether $CC and cc understand -c and -o together" >&5
1201 else
1202   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1203 echo "configure:1204: checking whether cc understands -c and -o together" >&5
1204 fi
1205 set dummy $CC; ac_cc="`echo $2 |
1206                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1207 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1208   echo $ac_n "(cached) $ac_c" 1>&6
1209 else
1210   echo 'foo(){}' > conftest.c
1211 # Make sure it works both with $CC and with simple cc.
1212 # We do the test twice because some compilers refuse to overwrite an
1213 # existing .o file with -o, though they will create one.
1214 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1215 if { (eval echo configure:1216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1216    test -f conftest.o && { (eval echo configure:1217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1217 then
1218   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1219   if test "x$CC" != xcc; then
1220     # Test first that cc exists at all.
1221     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1222       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1223       if { (eval echo configure:1224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1224          test -f conftest.o && { (eval echo configure:1225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1225       then
1226         # cc works too.
1227         :
1228       else
1229         # cc exists but doesn't like -o.
1230         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1231       fi
1232     fi
1233   fi
1234 else
1235   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1236 fi
1237 rm -f conftest*
1238
1239 fi
1240 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1241   echo "$ac_t""yes" 1>&6
1242 else
1243   echo "$ac_t""no" 1>&6
1244   cat >> confdefs.h <<\EOF
1245 #define NO_MINUS_C_MINUS_O 1
1246 EOF
1247
1248 fi
1249
1250 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1251       BROKEN_CC=
1252 else
1253       BROKEN_CC=#
1254 fi
1255
1256
1257 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1258 echo "configure:1259: checking that the C compiler understands volatile" >&5
1259 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1260   echo $ac_n "(cached) $ac_c" 1>&6
1261 else
1262   
1263     cat > conftest.$ac_ext <<EOF
1264 #line 1265 "configure"
1265 #include "confdefs.h"
1266 #include <sys/types.h>
1267 int main() {
1268 volatile int i = 0
1269 ; return 0; }
1270 EOF
1271 if { (eval echo configure:1272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1272   rm -rf conftest*
1273   samba_cv_volatile=yes
1274 else
1275   echo "configure: failed program was:" >&5
1276   cat conftest.$ac_ext >&5
1277   rm -rf conftest*
1278   samba_cv_volatile=no
1279 fi
1280 rm -f conftest*
1281 fi
1282
1283 echo "$ac_t""$samba_cv_volatile" 1>&6
1284 if test x"$samba_cv_volatile" = x"yes"; then
1285    cat >> confdefs.h <<\EOF
1286 #define HAVE_VOLATILE 1
1287 EOF
1288
1289 fi
1290
1291
1292
1293 # Do some error checking and defaulting for the host and target type.
1294 # The inputs are:
1295 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1296 #
1297 # The rules are:
1298 # 1. You are not allowed to specify --host, --target, and nonopt at the
1299 #    same time.
1300 # 2. Host defaults to nonopt.
1301 # 3. If nonopt is not specified, then host defaults to the current host,
1302 #    as determined by config.guess.
1303 # 4. Target and build default to nonopt.
1304 # 5. If nonopt is not specified, then target and build default to host.
1305
1306 # The aliases save the names the user supplied, while $host etc.
1307 # will get canonicalized.
1308 case $host---$target---$nonopt in
1309 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1310 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1311 esac
1312
1313
1314 # Make sure we can run config.sub.
1315 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1316 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1317 fi
1318
1319 echo $ac_n "checking host system type""... $ac_c" 1>&6
1320 echo "configure:1321: checking host system type" >&5
1321
1322 host_alias=$host
1323 case "$host_alias" in
1324 NONE)
1325   case $nonopt in
1326   NONE)
1327     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1328     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1329     fi ;;
1330   *) host_alias=$nonopt ;;
1331   esac ;;
1332 esac
1333
1334 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1335 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1336 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1337 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1338 echo "$ac_t""$host" 1>&6
1339
1340 echo $ac_n "checking target system type""... $ac_c" 1>&6
1341 echo "configure:1342: checking target system type" >&5
1342
1343 target_alias=$target
1344 case "$target_alias" in
1345 NONE)
1346   case $nonopt in
1347   NONE) target_alias=$host_alias ;;
1348   *) target_alias=$nonopt ;;
1349   esac ;;
1350 esac
1351
1352 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1353 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1354 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1355 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1356 echo "$ac_t""$target" 1>&6
1357
1358 echo $ac_n "checking build system type""... $ac_c" 1>&6
1359 echo "configure:1360: checking build system type" >&5
1360
1361 build_alias=$build
1362 case "$build_alias" in
1363 NONE)
1364   case $nonopt in
1365   NONE) build_alias=$host_alias ;;
1366   *) build_alias=$nonopt ;;
1367   esac ;;
1368 esac
1369
1370 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1371 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1372 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1373 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1374 echo "$ac_t""$build" 1>&6
1375
1376 test "$host_alias" != "$target_alias" &&
1377   test "$program_prefix$program_suffix$program_transform_name" = \
1378     NONENONEs,x,x, &&
1379   program_prefix=${target_alias}-
1380
1381
1382   case "$host_os" in
1383         *irix6*) cat >> confdefs.h <<\EOF
1384 #include <standards.h>
1385 EOF
1386
1387         ;;
1388 esac
1389
1390
1391     
1392     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1393 echo "configure:1394: checking config.cache system type" >&5
1394     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1395          test x"$ac_cv_host_system_type" != x"$host"; } ||
1396        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1397          test x"$ac_cv_build_system_type" != x"$build"; } ||
1398        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1399          test x"$ac_cv_target_system_type" != x"$target"; }; then
1400         echo "$ac_t""different" 1>&6
1401         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1402     else
1403         echo "$ac_t""same" 1>&6
1404     fi
1405     ac_cv_host_system_type="$host"
1406     ac_cv_build_system_type="$build"
1407     ac_cv_target_system_type="$target"
1408
1409
1410 DYNEXP=
1411
1412 #
1413 # Config CPPFLAG settings for strange OS's that must be set
1414 # before other tests.
1415 #
1416 case "$host_os" in
1417 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1418     *hpux*)
1419     
1420       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1421 echo "configure:1422: checking whether ${CC-cc} accepts -Ae" >&5
1422 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1423   echo $ac_n "(cached) $ac_c" 1>&6
1424 else
1425   echo 'void f(){}' > conftest.c
1426 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1427   ac_cv_prog_cc_Ae=yes
1428 else
1429   ac_cv_prog_cc_Ae=no
1430 fi
1431 rm -f conftest*
1432
1433 fi
1434
1435 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1436       # mmap on HPUX is completely broken...
1437       cat >> confdefs.h <<\EOF
1438 #define MMAP_BLACKLIST 1
1439 EOF
1440
1441       if test $ac_cv_prog_cc_Ae = yes; then
1442         CPPFLAGS="$CPPFLAGS -Ae"
1443       fi
1444 #
1445 # Defines needed for HPUX support.
1446 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1447 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1448 #
1449       case `uname -r` in
1450                         *9*|*10*)
1451                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1452                                 cat >> confdefs.h <<\EOF
1453 #define USE_BOTH_CRYPT_CALLS 1
1454 EOF
1455
1456                                 cat >> confdefs.h <<\EOF
1457 #define _HPUX_SOURCE 1
1458 EOF
1459
1460                                 cat >> confdefs.h <<\EOF
1461 #define _POSIX_SOURCE 1
1462 EOF
1463
1464                                 cat >> confdefs.h <<\EOF
1465 #define _ALIGNMENT_REQUIRED 1
1466 EOF
1467
1468                                 cat >> confdefs.h <<\EOF
1469 #define _MAX_ALIGNMENT 4
1470 EOF
1471
1472                                 ;;
1473                         *11*)
1474                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1475                                 cat >> confdefs.h <<\EOF
1476 #define USE_BOTH_CRYPT_CALLS 1
1477 EOF
1478
1479                                 cat >> confdefs.h <<\EOF
1480 #define _HPUX_SOURCE 1
1481 EOF
1482
1483                                 cat >> confdefs.h <<\EOF
1484 #define _POSIX_SOURCE 1
1485 EOF
1486
1487                                 cat >> confdefs.h <<\EOF
1488 #define _LARGEFILE64_SOURCE 1
1489 EOF
1490
1491                                 cat >> confdefs.h <<\EOF
1492 #define _ALIGNMENT_REQUIRED 1
1493 EOF
1494
1495                                 cat >> confdefs.h <<\EOF
1496 #define _MAX_ALIGNMENT 4
1497 EOF
1498
1499                                 ;;
1500       esac
1501       DYNEXP="-Wl,-E"
1502       ;;
1503
1504 #
1505 # CRAY Unicos has broken const handling
1506        *unicos*)
1507           echo "$ac_t""disabling const" 1>&6
1508           CPPFLAGS="$CPPFLAGS -Dconst="
1509           ;;
1510         
1511 #
1512 # AIX4.x doesn't even admit to having large
1513 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1514 #
1515     *aix4*)
1516           echo "$ac_t""enabling large file support" 1>&6
1517       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1518       cat >> confdefs.h <<\EOF
1519 #define _LARGE_FILES 1
1520 EOF
1521
1522       ;;    
1523 #
1524 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1525 # to the existance of large files..
1526 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1527 # recommendations on large file support, however it makes the
1528 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1529 # recommendation makes the compile fail on gcc2.7. JRA.
1530 #
1531         *solaris*)
1532                 case `uname -r` in
1533                         5.0*|5.1*|5.2*|5.3*|5.5*)
1534                                 echo "$ac_t""no large file support" 1>&6
1535                                 ;;
1536                         5.*)
1537                         echo "$ac_t""enabling large file support" 1>&6
1538                         if test "$ac_cv_prog_gcc" = yes; then
1539                                 ${CC-cc} -v >conftest.c 2>&1
1540                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1541                                 rm -fr conftest.c
1542                                 case "$ac_cv_gcc_compiler_version_number" in
1543                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1544                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1545                                                 cat >> confdefs.h <<\EOF
1546 #define _LARGEFILE64_SOURCE 1
1547 EOF
1548
1549                                                 ;;
1550                                         *)
1551                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1552                                                 cat >> confdefs.h <<\EOF
1553 #define _LARGEFILE64_SOURCE 1
1554 EOF
1555
1556                                                 cat >> confdefs.h <<\EOF
1557 #define _FILE_OFFSET_BITS 64
1558 EOF
1559
1560                                                 ;;
1561                                 esac
1562                         else
1563                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1564                                 cat >> confdefs.h <<\EOF
1565 #define _LARGEFILE64_SOURCE 1
1566 EOF
1567
1568                                 cat >> confdefs.h <<\EOF
1569 #define _FILE_OFFSET_BITS 64
1570 EOF
1571
1572                         fi
1573                         ;;
1574                 esac
1575                 ;;
1576 #
1577 # Tests needed for SINIX large file support.
1578 #
1579     *sysv4*)
1580       if test $host = mips-sni-sysv4 ; then
1581         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1582 echo "configure:1583: checking for LFS support" >&5
1583         old_CPPFLAGS="$CPPFLAGS"
1584         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1585         if test "$cross_compiling" = yes; then
1586   SINIX_LFS_SUPPORT=cross
1587 else
1588   cat > conftest.$ac_ext <<EOF
1589 #line 1590 "configure"
1590 #include "confdefs.h"
1591
1592 #include <unistd.h>
1593 main () {
1594 #if _LFS64_LARGEFILE == 1
1595 exit(0);
1596 #else
1597 exit(1);
1598 #endif
1599 }
1600 EOF
1601 if { (eval echo configure:1602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1602 then
1603   SINIX_LFS_SUPPORT=yes
1604 else
1605   echo "configure: failed program was:" >&5
1606   cat conftest.$ac_ext >&5
1607   rm -fr conftest*
1608   SINIX_LFS_SUPPORT=no
1609 fi
1610 rm -fr conftest*
1611 fi
1612
1613         CPPFLAGS="$old_CPPFLAGS"
1614         if test x$SINIX_LFS_SUPPORT = xyes ; then
1615           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1616           cat >> confdefs.h <<\EOF
1617 #define _LARGEFILE64_SOURCE 1
1618 EOF
1619
1620           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1621           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1622           LIBS="`getconf LFS64_LIBS` $LIBS"
1623         fi
1624       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1625       fi
1626     ;;
1627
1628 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1629 #
1630     *linux*)
1631         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1632 echo "configure:1633: checking for LFS support" >&5
1633         old_CPPFLAGS="$CPPFLAGS"
1634         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1635        if test "$cross_compiling" = yes; then
1636   LINUX_LFS_SUPPORT=cross
1637 else
1638   cat > conftest.$ac_ext <<EOF
1639 #line 1640 "configure"
1640 #include "confdefs.h"
1641
1642 #include <unistd.h>
1643 #include <sys/utsname.h>
1644 main() {
1645 #if _LFS64_LARGEFILE == 1
1646        struct utsname uts;
1647        char *release;
1648        int major, minor;
1649
1650        /* Ensure this is glibc 2.2 or higher */
1651 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1652        int libc_major = __GLIBC__;
1653        int libc_minor = __GLIBC_MINOR__;
1654
1655        if (libc_major < 2)
1656               exit(1);
1657        if (libc_minor < 2)
1658               exit(1);
1659 #endif
1660
1661        /* Ensure this is kernel 2.4 or higher */
1662
1663        uname(&uts);
1664        release = uts.release;
1665        major = atoi(strsep(&release, "."));
1666        minor = atoi(strsep(&release, "."));
1667
1668        if (major > 2 || (major == 2 && minor > 3))
1669                exit(0);
1670        exit(1);
1671 #else
1672        exit(1);
1673 #endif
1674 }
1675
1676 EOF
1677 if { (eval echo configure:1678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1678 then
1679   LINUX_LFS_SUPPORT=yes
1680 else
1681   echo "configure: failed program was:" >&5
1682   cat conftest.$ac_ext >&5
1683   rm -fr conftest*
1684   LINUX_LFS_SUPPORT=no
1685 fi
1686 rm -fr conftest*
1687 fi
1688
1689         CPPFLAGS="$old_CPPFLAGS"
1690         if test x$LINUX_LFS_SUPPORT = xyes ; then
1691           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1692           cat >> confdefs.h <<\EOF
1693 #define _LARGEFILE64_SOURCE 1
1694 EOF
1695
1696           cat >> confdefs.h <<\EOF
1697 #define _FILE_OFFSET_BITS 64
1698 EOF
1699
1700           cat >> confdefs.h <<\EOF
1701 #define _GNU_SOURCE 1
1702 EOF
1703
1704         fi
1705        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1706                 ;;
1707
1708     *hurd*)
1709         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1710 echo "configure:1711: checking for LFS support" >&5
1711         old_CPPFLAGS="$CPPFLAGS"
1712         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1713         if test "$cross_compiling" = yes; then
1714   GLIBC_LFS_SUPPORT=cross
1715 else
1716   cat > conftest.$ac_ext <<EOF
1717 #line 1718 "configure"
1718 #include "confdefs.h"
1719
1720 #include <unistd.h>
1721 main () {
1722 #if _LFS64_LARGEFILE == 1
1723 exit(0);
1724 #else
1725 exit(1);
1726 #endif
1727 }
1728 EOF
1729 if { (eval echo configure:1730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1730 then
1731   GLIBC_LFS_SUPPORT=yes
1732 else
1733   echo "configure: failed program was:" >&5
1734   cat conftest.$ac_ext >&5
1735   rm -fr conftest*
1736   GLIBC_LFS_SUPPORT=no
1737 fi
1738 rm -fr conftest*
1739 fi
1740
1741         CPPFLAGS="$old_CPPFLAGS"
1742         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1743           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1744           cat >> confdefs.h <<\EOF
1745 #define _LARGEFILE64_SOURCE 1
1746 EOF
1747
1748           cat >> confdefs.h <<\EOF
1749 #define _GNU_SOURCE 1
1750 EOF
1751
1752         fi
1753       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1754     ;;
1755
1756 esac
1757
1758 echo $ac_n "checking for inline""... $ac_c" 1>&6
1759 echo "configure:1760: checking for inline" >&5
1760 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1761   echo $ac_n "(cached) $ac_c" 1>&6
1762 else
1763   ac_cv_c_inline=no
1764 for ac_kw in inline __inline__ __inline; do
1765   cat > conftest.$ac_ext <<EOF
1766 #line 1767 "configure"
1767 #include "confdefs.h"
1768
1769 int main() {
1770 } $ac_kw foo() {
1771 ; return 0; }
1772 EOF
1773 if { (eval echo configure:1774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1774   rm -rf conftest*
1775   ac_cv_c_inline=$ac_kw; break
1776 else
1777   echo "configure: failed program was:" >&5
1778   cat conftest.$ac_ext >&5
1779 fi
1780 rm -f conftest*
1781 done
1782
1783 fi
1784
1785 echo "$ac_t""$ac_cv_c_inline" 1>&6
1786 case "$ac_cv_c_inline" in
1787   inline | yes) ;;
1788   no) cat >> confdefs.h <<\EOF
1789 #define inline 
1790 EOF
1791  ;;
1792   *)  cat >> confdefs.h <<EOF
1793 #define inline $ac_cv_c_inline
1794 EOF
1795  ;;
1796 esac
1797
1798 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1799 echo "configure:1800: checking how to run the C preprocessor" >&5
1800 # On Suns, sometimes $CPP names a directory.
1801 if test -n "$CPP" && test -d "$CPP"; then
1802   CPP=
1803 fi
1804 if test -z "$CPP"; then
1805 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1806   echo $ac_n "(cached) $ac_c" 1>&6
1807 else
1808     # This must be in double quotes, not single quotes, because CPP may get
1809   # substituted into the Makefile and "${CC-cc}" will confuse make.
1810   CPP="${CC-cc} -E"
1811   # On the NeXT, cc -E runs the code through the compiler's parser,
1812   # not just through cpp.
1813   cat > conftest.$ac_ext <<EOF
1814 #line 1815 "configure"
1815 #include "confdefs.h"
1816 #include <assert.h>
1817 Syntax Error
1818 EOF
1819 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1820 { (eval echo configure:1821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1821 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1822 if test -z "$ac_err"; then
1823   :
1824 else
1825   echo "$ac_err" >&5
1826   echo "configure: failed program was:" >&5
1827   cat conftest.$ac_ext >&5
1828   rm -rf conftest*
1829   CPP="${CC-cc} -E -traditional-cpp"
1830   cat > conftest.$ac_ext <<EOF
1831 #line 1832 "configure"
1832 #include "confdefs.h"
1833 #include <assert.h>
1834 Syntax Error
1835 EOF
1836 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1837 { (eval echo configure:1838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1838 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1839 if test -z "$ac_err"; then
1840   :
1841 else
1842   echo "$ac_err" >&5
1843   echo "configure: failed program was:" >&5
1844   cat conftest.$ac_ext >&5
1845   rm -rf conftest*
1846   CPP="${CC-cc} -nologo -E"
1847   cat > conftest.$ac_ext <<EOF
1848 #line 1849 "configure"
1849 #include "confdefs.h"
1850 #include <assert.h>
1851 Syntax Error
1852 EOF
1853 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1854 { (eval echo configure:1855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1855 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1856 if test -z "$ac_err"; then
1857   :
1858 else
1859   echo "$ac_err" >&5
1860   echo "configure: failed program was:" >&5
1861   cat conftest.$ac_ext >&5
1862   rm -rf conftest*
1863   CPP=/lib/cpp
1864 fi
1865 rm -f conftest*
1866 fi
1867 rm -f conftest*
1868 fi
1869 rm -f conftest*
1870   ac_cv_prog_CPP="$CPP"
1871 fi
1872   CPP="$ac_cv_prog_CPP"
1873 else
1874   ac_cv_prog_CPP="$CPP"
1875 fi
1876 echo "$ac_t""$CPP" 1>&6
1877
1878 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1879 echo "configure:1880: checking for ANSI C header files" >&5
1880 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1881   echo $ac_n "(cached) $ac_c" 1>&6
1882 else
1883   cat > conftest.$ac_ext <<EOF
1884 #line 1885 "configure"
1885 #include "confdefs.h"
1886 #include <stdlib.h>
1887 #include <stdarg.h>
1888 #include <string.h>
1889 #include <float.h>
1890 EOF
1891 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1892 { (eval echo configure:1893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1893 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1894 if test -z "$ac_err"; then
1895   rm -rf conftest*
1896   ac_cv_header_stdc=yes
1897 else
1898   echo "$ac_err" >&5
1899   echo "configure: failed program was:" >&5
1900   cat conftest.$ac_ext >&5
1901   rm -rf conftest*
1902   ac_cv_header_stdc=no
1903 fi
1904 rm -f conftest*
1905
1906 if test $ac_cv_header_stdc = yes; then
1907   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1908 cat > conftest.$ac_ext <<EOF
1909 #line 1910 "configure"
1910 #include "confdefs.h"
1911 #include <string.h>
1912 EOF
1913 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1914   egrep "memchr" >/dev/null 2>&1; then
1915   :
1916 else
1917   rm -rf conftest*
1918   ac_cv_header_stdc=no
1919 fi
1920 rm -f conftest*
1921
1922 fi
1923
1924 if test $ac_cv_header_stdc = yes; then
1925   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1926 cat > conftest.$ac_ext <<EOF
1927 #line 1928 "configure"
1928 #include "confdefs.h"
1929 #include <stdlib.h>
1930 EOF
1931 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1932   egrep "free" >/dev/null 2>&1; then
1933   :
1934 else
1935   rm -rf conftest*
1936   ac_cv_header_stdc=no
1937 fi
1938 rm -f conftest*
1939
1940 fi
1941
1942 if test $ac_cv_header_stdc = yes; then
1943   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1944 if test "$cross_compiling" = yes; then
1945   :
1946 else
1947   cat > conftest.$ac_ext <<EOF
1948 #line 1949 "configure"
1949 #include "confdefs.h"
1950 #include <ctype.h>
1951 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1952 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1953 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1954 int main () { int i; for (i = 0; i < 256; i++)
1955 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1956 exit (0); }
1957
1958 EOF
1959 if { (eval echo configure:1960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1960 then
1961   :
1962 else
1963   echo "configure: failed program was:" >&5
1964   cat conftest.$ac_ext >&5
1965   rm -fr conftest*
1966   ac_cv_header_stdc=no
1967 fi
1968 rm -fr conftest*
1969 fi
1970
1971 fi
1972 fi
1973
1974 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1975 if test $ac_cv_header_stdc = yes; then
1976   cat >> confdefs.h <<\EOF
1977 #define STDC_HEADERS 1
1978 EOF
1979
1980 fi
1981
1982 ac_header_dirent=no
1983 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1984 do
1985 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1986 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1987 echo "configure:1988: checking for $ac_hdr that defines DIR" >&5
1988 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1989   echo $ac_n "(cached) $ac_c" 1>&6
1990 else
1991   cat > conftest.$ac_ext <<EOF
1992 #line 1993 "configure"
1993 #include "confdefs.h"
1994 #include <sys/types.h>
1995 #include <$ac_hdr>
1996 int main() {
1997 DIR *dirp = 0;
1998 ; return 0; }
1999 EOF
2000 if { (eval echo configure:2001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2001   rm -rf conftest*
2002   eval "ac_cv_header_dirent_$ac_safe=yes"
2003 else
2004   echo "configure: failed program was:" >&5
2005   cat conftest.$ac_ext >&5
2006   rm -rf conftest*
2007   eval "ac_cv_header_dirent_$ac_safe=no"
2008 fi
2009 rm -f conftest*
2010 fi
2011 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2012   echo "$ac_t""yes" 1>&6
2013     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2014   cat >> confdefs.h <<EOF
2015 #define $ac_tr_hdr 1
2016 EOF
2017  ac_header_dirent=$ac_hdr; break
2018 else
2019   echo "$ac_t""no" 1>&6
2020 fi
2021 done
2022 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2023 if test $ac_header_dirent = dirent.h; then
2024 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2025 echo "configure:2026: checking for opendir in -ldir" >&5
2026 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2027 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2028   echo $ac_n "(cached) $ac_c" 1>&6
2029 else
2030   ac_save_LIBS="$LIBS"
2031 LIBS="-ldir  $LIBS"
2032 cat > conftest.$ac_ext <<EOF
2033 #line 2034 "configure"
2034 #include "confdefs.h"
2035 /* Override any gcc2 internal prototype to avoid an error.  */
2036 /* We use char because int might match the return type of a gcc2
2037     builtin and then its argument prototype would still apply.  */
2038 char opendir();
2039
2040 int main() {
2041 opendir()
2042 ; return 0; }
2043 EOF
2044 if { (eval echo configure:2045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2045   rm -rf conftest*
2046   eval "ac_cv_lib_$ac_lib_var=yes"
2047 else
2048   echo "configure: failed program was:" >&5
2049   cat conftest.$ac_ext >&5
2050   rm -rf conftest*
2051   eval "ac_cv_lib_$ac_lib_var=no"
2052 fi
2053 rm -f conftest*
2054 LIBS="$ac_save_LIBS"
2055
2056 fi
2057 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2058   echo "$ac_t""yes" 1>&6
2059   LIBS="$LIBS -ldir"
2060 else
2061   echo "$ac_t""no" 1>&6
2062 fi
2063
2064 else
2065 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2066 echo "configure:2067: checking for opendir in -lx" >&5
2067 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2068 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2069   echo $ac_n "(cached) $ac_c" 1>&6
2070 else
2071   ac_save_LIBS="$LIBS"
2072 LIBS="-lx  $LIBS"
2073 cat > conftest.$ac_ext <<EOF
2074 #line 2075 "configure"
2075 #include "confdefs.h"
2076 /* Override any gcc2 internal prototype to avoid an error.  */
2077 /* We use char because int might match the return type of a gcc2
2078     builtin and then its argument prototype would still apply.  */
2079 char opendir();
2080
2081 int main() {
2082 opendir()
2083 ; return 0; }
2084 EOF
2085 if { (eval echo configure:2086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2086   rm -rf conftest*
2087   eval "ac_cv_lib_$ac_lib_var=yes"
2088 else
2089   echo "configure: failed program was:" >&5
2090   cat conftest.$ac_ext >&5
2091   rm -rf conftest*
2092   eval "ac_cv_lib_$ac_lib_var=no"
2093 fi
2094 rm -f conftest*
2095 LIBS="$ac_save_LIBS"
2096
2097 fi
2098 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2099   echo "$ac_t""yes" 1>&6
2100   LIBS="$LIBS -lx"
2101 else
2102   echo "$ac_t""no" 1>&6
2103 fi
2104
2105 fi
2106
2107 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2108 echo "configure:2109: checking whether time.h and sys/time.h may both be included" >&5
2109 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2110   echo $ac_n "(cached) $ac_c" 1>&6
2111 else
2112   cat > conftest.$ac_ext <<EOF
2113 #line 2114 "configure"
2114 #include "confdefs.h"
2115 #include <sys/types.h>
2116 #include <sys/time.h>
2117 #include <time.h>
2118 int main() {
2119 struct tm *tp;
2120 ; return 0; }
2121 EOF
2122 if { (eval echo configure:2123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2123   rm -rf conftest*
2124   ac_cv_header_time=yes
2125 else
2126   echo "configure: failed program was:" >&5
2127   cat conftest.$ac_ext >&5
2128   rm -rf conftest*
2129   ac_cv_header_time=no
2130 fi
2131 rm -f conftest*
2132 fi
2133
2134 echo "$ac_t""$ac_cv_header_time" 1>&6
2135 if test $ac_cv_header_time = yes; then
2136   cat >> confdefs.h <<\EOF
2137 #define TIME_WITH_SYS_TIME 1
2138 EOF
2139
2140 fi
2141
2142 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2143 echo "configure:2144: checking for sys/wait.h that is POSIX.1 compatible" >&5
2144 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2145   echo $ac_n "(cached) $ac_c" 1>&6
2146 else
2147   cat > conftest.$ac_ext <<EOF
2148 #line 2149 "configure"
2149 #include "confdefs.h"
2150 #include <sys/types.h>
2151 #include <sys/wait.h>
2152 #ifndef WEXITSTATUS
2153 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2154 #endif
2155 #ifndef WIFEXITED
2156 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2157 #endif
2158 int main() {
2159 int s;
2160 wait (&s);
2161 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2162 ; return 0; }
2163 EOF
2164 if { (eval echo configure:2165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2165   rm -rf conftest*
2166   ac_cv_header_sys_wait_h=yes
2167 else
2168   echo "configure: failed program was:" >&5
2169   cat conftest.$ac_ext >&5
2170   rm -rf conftest*
2171   ac_cv_header_sys_wait_h=no
2172 fi
2173 rm -f conftest*
2174 fi
2175
2176 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2177 if test $ac_cv_header_sys_wait_h = yes; then
2178   cat >> confdefs.h <<\EOF
2179 #define HAVE_SYS_WAIT_H 1
2180 EOF
2181
2182 fi
2183
2184 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
2185 do
2186 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2187 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2188 echo "configure:2189: checking for $ac_hdr" >&5
2189 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2190   echo $ac_n "(cached) $ac_c" 1>&6
2191 else
2192   cat > conftest.$ac_ext <<EOF
2193 #line 2194 "configure"
2194 #include "confdefs.h"
2195 #include <$ac_hdr>
2196 EOF
2197 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2198 { (eval echo configure:2199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2199 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2200 if test -z "$ac_err"; then
2201   rm -rf conftest*
2202   eval "ac_cv_header_$ac_safe=yes"
2203 else
2204   echo "$ac_err" >&5
2205   echo "configure: failed program was:" >&5
2206   cat conftest.$ac_ext >&5
2207   rm -rf conftest*
2208   eval "ac_cv_header_$ac_safe=no"
2209 fi
2210 rm -f conftest*
2211 fi
2212 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2213   echo "$ac_t""yes" 1>&6
2214     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2215   cat >> confdefs.h <<EOF
2216 #define $ac_tr_hdr 1
2217 EOF
2218  
2219 else
2220   echo "$ac_t""no" 1>&6
2221 fi
2222 done
2223
2224 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
2225 do
2226 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2227 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2228 echo "configure:2229: checking for $ac_hdr" >&5
2229 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2230   echo $ac_n "(cached) $ac_c" 1>&6
2231 else
2232   cat > conftest.$ac_ext <<EOF
2233 #line 2234 "configure"
2234 #include "confdefs.h"
2235 #include <$ac_hdr>
2236 EOF
2237 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2238 { (eval echo configure:2239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2239 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2240 if test -z "$ac_err"; then
2241   rm -rf conftest*
2242   eval "ac_cv_header_$ac_safe=yes"
2243 else
2244   echo "$ac_err" >&5
2245   echo "configure: failed program was:" >&5
2246   cat conftest.$ac_ext >&5
2247   rm -rf conftest*
2248   eval "ac_cv_header_$ac_safe=no"
2249 fi
2250 rm -f conftest*
2251 fi
2252 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2253   echo "$ac_t""yes" 1>&6
2254     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2255   cat >> confdefs.h <<EOF
2256 #define $ac_tr_hdr 1
2257 EOF
2258  
2259 else
2260   echo "$ac_t""no" 1>&6
2261 fi
2262 done
2263
2264 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
2265 do
2266 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2267 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2268 echo "configure:2269: checking for $ac_hdr" >&5
2269 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2270   echo $ac_n "(cached) $ac_c" 1>&6
2271 else
2272   cat > conftest.$ac_ext <<EOF
2273 #line 2274 "configure"
2274 #include "confdefs.h"
2275 #include <$ac_hdr>
2276 EOF
2277 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2278 { (eval echo configure:2279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2279 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2280 if test -z "$ac_err"; then
2281   rm -rf conftest*
2282   eval "ac_cv_header_$ac_safe=yes"
2283 else
2284   echo "$ac_err" >&5
2285   echo "configure: failed program was:" >&5
2286   cat conftest.$ac_ext >&5
2287   rm -rf conftest*
2288   eval "ac_cv_header_$ac_safe=no"
2289 fi
2290 rm -f conftest*
2291 fi
2292 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2293   echo "$ac_t""yes" 1>&6
2294     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2295   cat >> confdefs.h <<EOF
2296 #define $ac_tr_hdr 1
2297 EOF
2298  
2299 else
2300   echo "$ac_t""no" 1>&6
2301 fi
2302 done
2303
2304 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
2305 do
2306 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2307 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2308 echo "configure:2309: checking for $ac_hdr" >&5
2309 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2310   echo $ac_n "(cached) $ac_c" 1>&6
2311 else
2312   cat > conftest.$ac_ext <<EOF
2313 #line 2314 "configure"
2314 #include "confdefs.h"
2315 #include <$ac_hdr>
2316 EOF
2317 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2318 { (eval echo configure:2319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2319 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2320 if test -z "$ac_err"; then
2321   rm -rf conftest*
2322   eval "ac_cv_header_$ac_safe=yes"
2323 else
2324   echo "$ac_err" >&5
2325   echo "configure: failed program was:" >&5
2326   cat conftest.$ac_ext >&5
2327   rm -rf conftest*
2328   eval "ac_cv_header_$ac_safe=no"
2329 fi
2330 rm -f conftest*
2331 fi
2332 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2333   echo "$ac_t""yes" 1>&6
2334     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2335   cat >> confdefs.h <<EOF
2336 #define $ac_tr_hdr 1
2337 EOF
2338  
2339 else
2340   echo "$ac_t""no" 1>&6
2341 fi
2342 done
2343
2344 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
2345 do
2346 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2347 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2348 echo "configure:2349: checking for $ac_hdr" >&5
2349 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2350   echo $ac_n "(cached) $ac_c" 1>&6
2351 else
2352   cat > conftest.$ac_ext <<EOF
2353 #line 2354 "configure"
2354 #include "confdefs.h"
2355 #include <$ac_hdr>
2356 EOF
2357 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2358 { (eval echo configure:2359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2359 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2360 if test -z "$ac_err"; then
2361   rm -rf conftest*
2362   eval "ac_cv_header_$ac_safe=yes"
2363 else
2364   echo "$ac_err" >&5
2365   echo "configure: failed program was:" >&5
2366   cat conftest.$ac_ext >&5
2367   rm -rf conftest*
2368   eval "ac_cv_header_$ac_safe=no"
2369 fi
2370 rm -f conftest*
2371 fi
2372 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2373   echo "$ac_t""yes" 1>&6
2374     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2375   cat >> confdefs.h <<EOF
2376 #define $ac_tr_hdr 1
2377 EOF
2378  
2379 else
2380   echo "$ac_t""no" 1>&6
2381 fi
2382 done
2383
2384 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2385 do
2386 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2387 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2388 echo "configure:2389: checking for $ac_hdr" >&5
2389 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2390   echo $ac_n "(cached) $ac_c" 1>&6
2391 else
2392   cat > conftest.$ac_ext <<EOF
2393 #line 2394 "configure"
2394 #include "confdefs.h"
2395 #include <$ac_hdr>
2396 EOF
2397 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2398 { (eval echo configure:2399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2399 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2400 if test -z "$ac_err"; then
2401   rm -rf conftest*
2402   eval "ac_cv_header_$ac_safe=yes"
2403 else
2404   echo "$ac_err" >&5
2405   echo "configure: failed program was:" >&5
2406   cat conftest.$ac_ext >&5
2407   rm -rf conftest*
2408   eval "ac_cv_header_$ac_safe=no"
2409 fi
2410 rm -f conftest*
2411 fi
2412 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2413   echo "$ac_t""yes" 1>&6
2414     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2415   cat >> confdefs.h <<EOF
2416 #define $ac_tr_hdr 1
2417 EOF
2418  
2419 else
2420   echo "$ac_t""no" 1>&6
2421 fi
2422 done
2423
2424 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2425 do
2426 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2427 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2428 echo "configure:2429: checking for $ac_hdr" >&5
2429 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2430   echo $ac_n "(cached) $ac_c" 1>&6
2431 else
2432   cat > conftest.$ac_ext <<EOF
2433 #line 2434 "configure"
2434 #include "confdefs.h"
2435 #include <$ac_hdr>
2436 EOF
2437 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2438 { (eval echo configure:2439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2439 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2440 if test -z "$ac_err"; then
2441   rm -rf conftest*
2442   eval "ac_cv_header_$ac_safe=yes"
2443 else
2444   echo "$ac_err" >&5
2445   echo "configure: failed program was:" >&5
2446   cat conftest.$ac_ext >&5
2447   rm -rf conftest*
2448   eval "ac_cv_header_$ac_safe=no"
2449 fi
2450 rm -f conftest*
2451 fi
2452 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2453   echo "$ac_t""yes" 1>&6
2454     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2455   cat >> confdefs.h <<EOF
2456 #define $ac_tr_hdr 1
2457 EOF
2458  
2459 else
2460   echo "$ac_t""no" 1>&6
2461 fi
2462 done
2463
2464 for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h dlfcn.h
2465 do
2466 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2467 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2468 echo "configure:2469: checking for $ac_hdr" >&5
2469 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2470   echo $ac_n "(cached) $ac_c" 1>&6
2471 else
2472   cat > conftest.$ac_ext <<EOF
2473 #line 2474 "configure"
2474 #include "confdefs.h"
2475 #include <$ac_hdr>
2476 EOF
2477 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2478 { (eval echo configure:2479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2479 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2480 if test -z "$ac_err"; then
2481   rm -rf conftest*
2482   eval "ac_cv_header_$ac_safe=yes"
2483 else
2484   echo "$ac_err" >&5
2485   echo "configure: failed program was:" >&5
2486   cat conftest.$ac_ext >&5
2487   rm -rf conftest*
2488   eval "ac_cv_header_$ac_safe=no"
2489 fi
2490 rm -f conftest*
2491 fi
2492 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2493   echo "$ac_t""yes" 1>&6
2494     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2495   cat >> confdefs.h <<EOF
2496 #define $ac_tr_hdr 1
2497 EOF
2498  
2499 else
2500   echo "$ac_t""no" 1>&6
2501 fi
2502 done
2503
2504
2505 #
2506 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2507 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2508 #
2509 case "$host_os" in
2510     *hpux*)
2511                 cat > conftest.$ac_ext <<EOF
2512 #line 2513 "configure"
2513 #include "confdefs.h"
2514 #include <shadow.h>
2515 int main() {
2516 struct spwd testme
2517 ; return 0; }
2518 EOF
2519 if { (eval echo configure:2520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2520   rm -rf conftest*
2521   ac_cv_header_shadow_h=yes
2522 else
2523   echo "configure: failed program was:" >&5
2524   cat conftest.$ac_ext >&5
2525   rm -rf conftest*
2526   ac_cv_header_shadow_h=no
2527 fi
2528 rm -f conftest*
2529                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2530                    cat >> confdefs.h <<\EOF
2531 #define HAVE_SHADOW_H 1
2532 EOF
2533
2534                 fi
2535         ;;
2536 esac
2537 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2538 do
2539 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2540 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2541 echo "configure:2542: checking for $ac_hdr" >&5
2542 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2543   echo $ac_n "(cached) $ac_c" 1>&6
2544 else
2545   cat > conftest.$ac_ext <<EOF
2546 #line 2547 "configure"
2547 #include "confdefs.h"
2548 #include <$ac_hdr>
2549 EOF
2550 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2551 { (eval echo configure:2552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2552 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2553 if test -z "$ac_err"; then
2554   rm -rf conftest*
2555   eval "ac_cv_header_$ac_safe=yes"
2556 else
2557   echo "$ac_err" >&5
2558   echo "configure: failed program was:" >&5
2559   cat conftest.$ac_ext >&5
2560   rm -rf conftest*
2561   eval "ac_cv_header_$ac_safe=no"
2562 fi
2563 rm -f conftest*
2564 fi
2565 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2566   echo "$ac_t""yes" 1>&6
2567     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2568   cat >> confdefs.h <<EOF
2569 #define $ac_tr_hdr 1
2570 EOF
2571  
2572 else
2573   echo "$ac_t""no" 1>&6
2574 fi
2575 done
2576
2577 for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
2578 do
2579 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2580 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2581 echo "configure:2582: checking for $ac_hdr" >&5
2582 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2583   echo $ac_n "(cached) $ac_c" 1>&6
2584 else
2585   cat > conftest.$ac_ext <<EOF
2586 #line 2587 "configure"
2587 #include "confdefs.h"
2588 #include <$ac_hdr>
2589 EOF
2590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2591 { (eval echo configure:2592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2593 if test -z "$ac_err"; then
2594   rm -rf conftest*
2595   eval "ac_cv_header_$ac_safe=yes"
2596 else
2597   echo "$ac_err" >&5
2598   echo "configure: failed program was:" >&5
2599   cat conftest.$ac_ext >&5
2600   rm -rf conftest*
2601   eval "ac_cv_header_$ac_safe=no"
2602 fi
2603 rm -f conftest*
2604 fi
2605 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2606   echo "$ac_t""yes" 1>&6
2607     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2608   cat >> confdefs.h <<EOF
2609 #define $ac_tr_hdr 1
2610 EOF
2611  
2612 else
2613   echo "$ac_t""no" 1>&6
2614 fi
2615 done
2616
2617 for ac_hdr in stropts.h poll.h
2618 do
2619 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2620 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2621 echo "configure:2622: checking for $ac_hdr" >&5
2622 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2623   echo $ac_n "(cached) $ac_c" 1>&6
2624 else
2625   cat > conftest.$ac_ext <<EOF
2626 #line 2627 "configure"
2627 #include "confdefs.h"
2628 #include <$ac_hdr>
2629 EOF
2630 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2631 { (eval echo configure:2632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2632 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2633 if test -z "$ac_err"; then
2634   rm -rf conftest*
2635   eval "ac_cv_header_$ac_safe=yes"
2636 else
2637   echo "$ac_err" >&5
2638   echo "configure: failed program was:" >&5
2639   cat conftest.$ac_ext >&5
2640   rm -rf conftest*
2641   eval "ac_cv_header_$ac_safe=no"
2642 fi
2643 rm -f conftest*
2644 fi
2645 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2646   echo "$ac_t""yes" 1>&6
2647     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2648   cat >> confdefs.h <<EOF
2649 #define $ac_tr_hdr 1
2650 EOF
2651  
2652 else
2653   echo "$ac_t""no" 1>&6
2654 fi
2655 done
2656
2657 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2658 do
2659 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2660 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2661 echo "configure:2662: checking for $ac_hdr" >&5
2662 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2663   echo $ac_n "(cached) $ac_c" 1>&6
2664 else
2665   cat > conftest.$ac_ext <<EOF
2666 #line 2667 "configure"
2667 #include "confdefs.h"
2668 #include <$ac_hdr>
2669 EOF
2670 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2671 { (eval echo configure:2672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2672 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2673 if test -z "$ac_err"; then
2674   rm -rf conftest*
2675   eval "ac_cv_header_$ac_safe=yes"
2676 else
2677   echo "$ac_err" >&5
2678   echo "configure: failed program was:" >&5
2679   cat conftest.$ac_ext >&5
2680   rm -rf conftest*
2681   eval "ac_cv_header_$ac_safe=no"
2682 fi
2683 rm -f conftest*
2684 fi
2685 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2686   echo "$ac_t""yes" 1>&6
2687     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2688   cat >> confdefs.h <<EOF
2689 #define $ac_tr_hdr 1
2690 EOF
2691  
2692 else
2693   echo "$ac_t""no" 1>&6
2694 fi
2695 done
2696
2697 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2698 do
2699 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2700 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2701 echo "configure:2702: checking for $ac_hdr" >&5
2702 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2703   echo $ac_n "(cached) $ac_c" 1>&6
2704 else
2705   cat > conftest.$ac_ext <<EOF
2706 #line 2707 "configure"
2707 #include "confdefs.h"
2708 #include <$ac_hdr>
2709 EOF
2710 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2711 { (eval echo configure:2712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2712 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2713 if test -z "$ac_err"; then
2714   rm -rf conftest*
2715   eval "ac_cv_header_$ac_safe=yes"
2716 else
2717   echo "$ac_err" >&5
2718   echo "configure: failed program was:" >&5
2719   cat conftest.$ac_ext >&5
2720   rm -rf conftest*
2721   eval "ac_cv_header_$ac_safe=no"
2722 fi
2723 rm -f conftest*
2724 fi
2725 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2726   echo "$ac_t""yes" 1>&6
2727     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2728   cat >> confdefs.h <<EOF
2729 #define $ac_tr_hdr 1
2730 EOF
2731  
2732 else
2733   echo "$ac_t""no" 1>&6
2734 fi
2735 done
2736
2737
2738 # For experimental utmp support (lastlog on some BSD-like systems)
2739 for ac_hdr in utmp.h utmpx.h lastlog.h
2740 do
2741 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2742 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2743 echo "configure:2744: checking for $ac_hdr" >&5
2744 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2745   echo $ac_n "(cached) $ac_c" 1>&6
2746 else
2747   cat > conftest.$ac_ext <<EOF
2748 #line 2749 "configure"
2749 #include "confdefs.h"
2750 #include <$ac_hdr>
2751 EOF
2752 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2753 { (eval echo configure:2754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2754 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2755 if test -z "$ac_err"; then
2756   rm -rf conftest*
2757   eval "ac_cv_header_$ac_safe=yes"
2758 else
2759   echo "$ac_err" >&5
2760   echo "configure: failed program was:" >&5
2761   cat conftest.$ac_ext >&5
2762   rm -rf conftest*
2763   eval "ac_cv_header_$ac_safe=no"
2764 fi
2765 rm -f conftest*
2766 fi
2767 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2768   echo "$ac_t""yes" 1>&6
2769     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2770   cat >> confdefs.h <<EOF
2771 #define $ac_tr_hdr 1
2772 EOF
2773  
2774 else
2775   echo "$ac_t""no" 1>&6
2776 fi
2777 done
2778
2779  
2780 # For quotas on Veritas VxFS filesystems
2781 for ac_hdr in sys/fs/vx_quota.h
2782 do
2783 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2784 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2785 echo "configure:2786: checking for $ac_hdr" >&5
2786 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2787   echo $ac_n "(cached) $ac_c" 1>&6
2788 else
2789   cat > conftest.$ac_ext <<EOF
2790 #line 2791 "configure"
2791 #include "confdefs.h"
2792 #include <$ac_hdr>
2793 EOF
2794 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2795 { (eval echo configure:2796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2796 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2797 if test -z "$ac_err"; then
2798   rm -rf conftest*
2799   eval "ac_cv_header_$ac_safe=yes"
2800 else
2801   echo "$ac_err" >&5
2802   echo "configure: failed program was:" >&5
2803   cat conftest.$ac_ext >&5
2804   rm -rf conftest*
2805   eval "ac_cv_header_$ac_safe=no"
2806 fi
2807 rm -f conftest*
2808 fi
2809 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2810   echo "$ac_t""yes" 1>&6
2811     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2812   cat >> confdefs.h <<EOF
2813 #define $ac_tr_hdr 1
2814 EOF
2815  
2816 else
2817   echo "$ac_t""no" 1>&6
2818 fi
2819 done
2820
2821
2822 # For quotas on Linux XFS filesystems
2823 for ac_hdr in linux/xqm.h
2824 do
2825 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2826 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2827 echo "configure:2828: checking for $ac_hdr" >&5
2828 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2829   echo $ac_n "(cached) $ac_c" 1>&6
2830 else
2831   cat > conftest.$ac_ext <<EOF
2832 #line 2833 "configure"
2833 #include "confdefs.h"
2834 #include <$ac_hdr>
2835 EOF
2836 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2837 { (eval echo configure:2838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2838 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2839 if test -z "$ac_err"; then
2840   rm -rf conftest*
2841   eval "ac_cv_header_$ac_safe=yes"
2842 else
2843   echo "$ac_err" >&5
2844   echo "configure: failed program was:" >&5
2845   cat conftest.$ac_ext >&5
2846   rm -rf conftest*
2847   eval "ac_cv_header_$ac_safe=no"
2848 fi
2849 rm -f conftest*
2850 fi
2851 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2852   echo "$ac_t""yes" 1>&6
2853     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2854   cat >> confdefs.h <<EOF
2855 #define $ac_tr_hdr 1
2856 EOF
2857  
2858 else
2859   echo "$ac_t""no" 1>&6
2860 fi
2861 done
2862
2863
2864 echo $ac_n "checking size of int""... $ac_c" 1>&6
2865 echo "configure:2866: checking size of int" >&5
2866 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2867   echo $ac_n "(cached) $ac_c" 1>&6
2868 else
2869   if test "$cross_compiling" = yes; then
2870   ac_cv_sizeof_int=cross
2871 else
2872   cat > conftest.$ac_ext <<EOF
2873 #line 2874 "configure"
2874 #include "confdefs.h"
2875 #include <stdio.h>
2876 int main()
2877 {
2878   FILE *f=fopen("conftestval", "w");
2879   if (!f) return(1);
2880   fprintf(f, "%d\n", sizeof(int));
2881   return(0);
2882 }
2883 EOF
2884 if { (eval echo configure:2885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2885 then
2886   ac_cv_sizeof_int=`cat conftestval`
2887 else
2888   echo "configure: failed program was:" >&5
2889   cat conftest.$ac_ext >&5
2890   rm -fr conftest*
2891   ac_cv_sizeof_int=0
2892 fi
2893 rm -fr conftest*
2894 fi
2895
2896 fi
2897 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2898 cat >> confdefs.h <<EOF
2899 #define SIZEOF_INT $ac_cv_sizeof_int
2900 EOF
2901
2902
2903 echo $ac_n "checking size of long""... $ac_c" 1>&6
2904 echo "configure:2905: checking size of long" >&5
2905 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2906   echo $ac_n "(cached) $ac_c" 1>&6
2907 else
2908   if test "$cross_compiling" = yes; then
2909   ac_cv_sizeof_long=cross
2910 else
2911   cat > conftest.$ac_ext <<EOF
2912 #line 2913 "configure"
2913 #include "confdefs.h"
2914 #include <stdio.h>
2915 int main()
2916 {
2917   FILE *f=fopen("conftestval", "w");
2918   if (!f) return(1);
2919   fprintf(f, "%d\n", sizeof(long));
2920   return(0);
2921 }
2922 EOF
2923 if { (eval echo configure:2924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2924 then
2925   ac_cv_sizeof_long=`cat conftestval`
2926 else
2927   echo "configure: failed program was:" >&5
2928   cat conftest.$ac_ext >&5
2929   rm -fr conftest*
2930   ac_cv_sizeof_long=0
2931 fi
2932 rm -fr conftest*
2933 fi
2934
2935 fi
2936 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2937 cat >> confdefs.h <<EOF
2938 #define SIZEOF_LONG $ac_cv_sizeof_long
2939 EOF
2940
2941
2942 echo $ac_n "checking size of short""... $ac_c" 1>&6
2943 echo "configure:2944: checking size of short" >&5
2944 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2945   echo $ac_n "(cached) $ac_c" 1>&6
2946 else
2947   if test "$cross_compiling" = yes; then
2948   ac_cv_sizeof_short=cross
2949 else
2950   cat > conftest.$ac_ext <<EOF
2951 #line 2952 "configure"
2952 #include "confdefs.h"
2953 #include <stdio.h>
2954 int main()
2955 {
2956   FILE *f=fopen("conftestval", "w");
2957   if (!f) return(1);
2958   fprintf(f, "%d\n", sizeof(short));
2959   return(0);
2960 }
2961 EOF
2962 if { (eval echo configure:2963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2963 then
2964   ac_cv_sizeof_short=`cat conftestval`
2965 else
2966   echo "configure: failed program was:" >&5
2967   cat conftest.$ac_ext >&5
2968   rm -fr conftest*
2969   ac_cv_sizeof_short=0
2970 fi
2971 rm -fr conftest*
2972 fi
2973
2974 fi
2975 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2976 cat >> confdefs.h <<EOF
2977 #define SIZEOF_SHORT $ac_cv_sizeof_short
2978 EOF
2979
2980
2981
2982 echo $ac_n "checking for working const""... $ac_c" 1>&6
2983 echo "configure:2984: checking for working const" >&5
2984 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2985   echo $ac_n "(cached) $ac_c" 1>&6
2986 else
2987   cat > conftest.$ac_ext <<EOF
2988 #line 2989 "configure"
2989 #include "confdefs.h"
2990
2991 int main() {
2992
2993 /* Ultrix mips cc rejects this.  */
2994 typedef int charset[2]; const charset x;
2995 /* SunOS 4.1.1 cc rejects this.  */
2996 char const *const *ccp;
2997 char **p;
2998 /* NEC SVR4.0.2 mips cc rejects this.  */
2999 struct point {int x, y;};
3000 static struct point const zero = {0,0};
3001 /* AIX XL C 1.02.0.0 rejects this.
3002    It does not let you subtract one const X* pointer from another in an arm
3003    of an if-expression whose if-part is not a constant expression */
3004 const char *g = "string";
3005 ccp = &g + (g ? g-g : 0);
3006 /* HPUX 7.0 cc rejects these. */
3007 ++ccp;
3008 p = (char**) ccp;
3009 ccp = (char const *const *) p;
3010 { /* SCO 3.2v4 cc rejects this.  */
3011   char *t;
3012   char const *s = 0 ? (char *) 0 : (char const *) 0;
3013
3014   *t++ = 0;
3015 }
3016 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3017   int x[] = {25, 17};
3018   const int *foo = &x[0];
3019   ++foo;
3020 }
3021 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3022   typedef const int *iptr;
3023   iptr p = 0;
3024   ++p;
3025 }
3026 { /* AIX XL C 1.02.0.0 rejects this saying
3027      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3028   struct s { int j; const int *ap[3]; };
3029   struct s *b; b->j = 5;
3030 }
3031 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3032   const int foo = 10;
3033 }
3034
3035 ; return 0; }
3036 EOF
3037 if { (eval echo configure:3038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3038   rm -rf conftest*
3039   ac_cv_c_const=yes
3040 else
3041   echo "configure: failed program was:" >&5
3042   cat conftest.$ac_ext >&5
3043   rm -rf conftest*
3044   ac_cv_c_const=no
3045 fi
3046 rm -f conftest*
3047 fi
3048
3049 echo "$ac_t""$ac_cv_c_const" 1>&6
3050 if test $ac_cv_c_const = no; then
3051   cat >> confdefs.h <<\EOF
3052 #define const 
3053 EOF
3054
3055 fi
3056
3057 echo $ac_n "checking for inline""... $ac_c" 1>&6
3058 echo "configure:3059: checking for inline" >&5
3059 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3060   echo $ac_n "(cached) $ac_c" 1>&6
3061 else
3062   ac_cv_c_inline=no
3063 for ac_kw in inline __inline__ __inline; do
3064   cat > conftest.$ac_ext <<EOF
3065 #line 3066 "configure"
3066 #include "confdefs.h"
3067
3068 int main() {
3069 } $ac_kw foo() {
3070 ; return 0; }
3071 EOF
3072 if { (eval echo configure:3073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3073   rm -rf conftest*
3074   ac_cv_c_inline=$ac_kw; break
3075 else
3076   echo "configure: failed program was:" >&5
3077   cat conftest.$ac_ext >&5
3078 fi
3079 rm -f conftest*
3080 done
3081
3082 fi
3083
3084 echo "$ac_t""$ac_cv_c_inline" 1>&6
3085 case "$ac_cv_c_inline" in
3086   inline | yes) ;;
3087   no) cat >> confdefs.h <<\EOF
3088 #define inline 
3089 EOF
3090  ;;
3091   *)  cat >> confdefs.h <<EOF
3092 #define inline $ac_cv_c_inline
3093 EOF
3094  ;;
3095 esac
3096
3097 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3098 echo "configure:3099: checking whether byte ordering is bigendian" >&5
3099 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3100   echo $ac_n "(cached) $ac_c" 1>&6
3101 else
3102   ac_cv_c_bigendian=unknown
3103 # See if sys/param.h defines the BYTE_ORDER macro.
3104 cat > conftest.$ac_ext <<EOF
3105 #line 3106 "configure"
3106 #include "confdefs.h"
3107 #include <sys/types.h>
3108 #include <sys/param.h>
3109 int main() {
3110
3111 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3112  bogus endian macros
3113 #endif
3114 ; return 0; }
3115 EOF
3116 if { (eval echo configure:3117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3117   rm -rf conftest*
3118   # It does; now see whether it defined to BIG_ENDIAN or not.
3119 cat > conftest.$ac_ext <<EOF
3120 #line 3121 "configure"
3121 #include "confdefs.h"
3122 #include <sys/types.h>
3123 #include <sys/param.h>
3124 int main() {
3125
3126 #if BYTE_ORDER != BIG_ENDIAN
3127  not big endian
3128 #endif
3129 ; return 0; }
3130 EOF
3131 if { (eval echo configure:3132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3132   rm -rf conftest*
3133   ac_cv_c_bigendian=yes
3134 else
3135   echo "configure: failed program was:" >&5
3136   cat conftest.$ac_ext >&5
3137   rm -rf conftest*
3138   ac_cv_c_bigendian=no
3139 fi
3140 rm -f conftest*
3141 else
3142   echo "configure: failed program was:" >&5
3143   cat conftest.$ac_ext >&5
3144 fi
3145 rm -f conftest*
3146 if test $ac_cv_c_bigendian = unknown; then
3147 if test "$cross_compiling" = yes; then
3148     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3149 else
3150   cat > conftest.$ac_ext <<EOF
3151 #line 3152 "configure"
3152 #include "confdefs.h"
3153 main () {
3154   /* Are we little or big endian?  From Harbison&Steele.  */
3155   union
3156   {
3157     long l;
3158     char c[sizeof (long)];
3159   } u;
3160   u.l = 1;
3161   exit (u.c[sizeof (long) - 1] == 1);
3162 }
3163 EOF
3164 if { (eval echo configure:3165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3165 then
3166   ac_cv_c_bigendian=no
3167 else
3168   echo "configure: failed program was:" >&5
3169   cat conftest.$ac_ext >&5
3170   rm -fr conftest*
3171   ac_cv_c_bigendian=yes
3172 fi
3173 rm -fr conftest*
3174 fi
3175
3176 fi
3177 fi
3178
3179 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3180 if test $ac_cv_c_bigendian = yes; then
3181   cat >> confdefs.h <<\EOF
3182 #define WORDS_BIGENDIAN 1
3183 EOF
3184
3185 fi
3186
3187 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
3188 echo "configure:3189: checking whether char is unsigned" >&5
3189 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3190   echo $ac_n "(cached) $ac_c" 1>&6
3191 else
3192   if test "$GCC" = yes; then
3193   # GCC predefines this symbol on systems where it applies.
3194 cat > conftest.$ac_ext <<EOF
3195 #line 3196 "configure"
3196 #include "confdefs.h"
3197 #ifdef __CHAR_UNSIGNED__
3198   yes
3199 #endif
3200
3201 EOF
3202 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3203   egrep "yes" >/dev/null 2>&1; then
3204   rm -rf conftest*
3205   ac_cv_c_char_unsigned=yes
3206 else
3207   rm -rf conftest*
3208   ac_cv_c_char_unsigned=no
3209 fi
3210 rm -f conftest*
3211
3212 else
3213 if test "$cross_compiling" = yes; then
3214     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3215 else
3216   cat > conftest.$ac_ext <<EOF
3217 #line 3218 "configure"
3218 #include "confdefs.h"
3219 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
3220 #if !defined(__STDC__) || __STDC__ != 1
3221 #define volatile
3222 #endif
3223 main() {
3224   volatile char c = 255; exit(c < 0);
3225 }
3226 EOF
3227 if { (eval echo configure:3228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3228 then
3229   ac_cv_c_char_unsigned=yes
3230 else
3231   echo "configure: failed program was:" >&5
3232   cat conftest.$ac_ext >&5
3233   rm -fr conftest*
3234   ac_cv_c_char_unsigned=no
3235 fi
3236 rm -fr conftest*
3237 fi
3238
3239 fi
3240 fi
3241
3242 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
3243 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3244   cat >> confdefs.h <<\EOF
3245 #define __CHAR_UNSIGNED__ 1
3246 EOF
3247
3248 fi
3249
3250
3251 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3252 echo "configure:3253: checking return type of signal handlers" >&5
3253 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3254   echo $ac_n "(cached) $ac_c" 1>&6
3255 else
3256   cat > conftest.$ac_ext <<EOF
3257 #line 3258 "configure"
3258 #include "confdefs.h"
3259 #include <sys/types.h>
3260 #include <signal.h>
3261 #ifdef signal
3262 #undef signal
3263 #endif
3264 #ifdef __cplusplus
3265 extern "C" void (*signal (int, void (*)(int)))(int);
3266 #else
3267 void (*signal ()) ();
3268 #endif
3269
3270 int main() {
3271 int i;
3272 ; return 0; }
3273 EOF
3274 if { (eval echo configure:3275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3275   rm -rf conftest*
3276   ac_cv_type_signal=void
3277 else
3278   echo "configure: failed program was:" >&5
3279   cat conftest.$ac_ext >&5
3280   rm -rf conftest*
3281   ac_cv_type_signal=int
3282 fi
3283 rm -f conftest*
3284 fi
3285
3286 echo "$ac_t""$ac_cv_type_signal" 1>&6
3287 cat >> confdefs.h <<EOF
3288 #define RETSIGTYPE $ac_cv_type_signal
3289 EOF
3290
3291
3292 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3293 echo "configure:3294: checking for uid_t in sys/types.h" >&5
3294 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3295   echo $ac_n "(cached) $ac_c" 1>&6
3296 else
3297   cat > conftest.$ac_ext <<EOF
3298 #line 3299 "configure"
3299 #include "confdefs.h"
3300 #include <sys/types.h>
3301 EOF
3302 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3303   egrep "uid_t" >/dev/null 2>&1; then
3304   rm -rf conftest*
3305   ac_cv_type_uid_t=yes
3306 else
3307   rm -rf conftest*
3308   ac_cv_type_uid_t=no
3309 fi
3310 rm -f conftest*
3311
3312 fi
3313
3314 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3315 if test $ac_cv_type_uid_t = no; then
3316   cat >> confdefs.h <<\EOF
3317 #define uid_t int
3318 EOF
3319
3320   cat >> confdefs.h <<\EOF
3321 #define gid_t int
3322 EOF
3323
3324 fi
3325
3326 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3327 echo "configure:3328: checking for mode_t" >&5
3328 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3329   echo $ac_n "(cached) $ac_c" 1>&6
3330 else
3331   cat > conftest.$ac_ext <<EOF
3332 #line 3333 "configure"
3333 #include "confdefs.h"
3334 #include <sys/types.h>
3335 #if STDC_HEADERS
3336 #include <stdlib.h>
3337 #include <stddef.h>
3338 #endif
3339 EOF
3340 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3341   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3342   rm -rf conftest*
3343   ac_cv_type_mode_t=yes
3344 else
3345   rm -rf conftest*
3346   ac_cv_type_mode_t=no
3347 fi
3348 rm -f conftest*
3349
3350 fi
3351 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3352 if test $ac_cv_type_mode_t = no; then
3353   cat >> confdefs.h <<\EOF
3354 #define mode_t int
3355 EOF
3356
3357 fi
3358
3359 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3360 echo "configure:3361: checking for off_t" >&5
3361 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3362   echo $ac_n "(cached) $ac_c" 1>&6
3363 else
3364   cat > conftest.$ac_ext <<EOF
3365 #line 3366 "configure"
3366 #include "confdefs.h"
3367 #include <sys/types.h>
3368 #if STDC_HEADERS
3369 #include <stdlib.h>
3370 #include <stddef.h>
3371 #endif
3372 EOF
3373 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3374   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3375   rm -rf conftest*
3376   ac_cv_type_off_t=yes
3377 else
3378   rm -rf conftest*
3379   ac_cv_type_off_t=no
3380 fi
3381 rm -f conftest*
3382
3383 fi
3384 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3385 if test $ac_cv_type_off_t = no; then
3386   cat >> confdefs.h <<\EOF
3387 #define off_t long
3388 EOF
3389
3390 fi
3391
3392 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3393 echo "configure:3394: checking for size_t" >&5
3394 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3395   echo $ac_n "(cached) $ac_c" 1>&6
3396 else
3397   cat > conftest.$ac_ext <<EOF
3398 #line 3399 "configure"
3399 #include "confdefs.h"
3400 #include <sys/types.h>
3401 #if STDC_HEADERS
3402 #include <stdlib.h>
3403 #include <stddef.h>
3404 #endif
3405 EOF
3406 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3407   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3408   rm -rf conftest*
3409   ac_cv_type_size_t=yes
3410 else
3411   rm -rf conftest*
3412   ac_cv_type_size_t=no
3413 fi
3414 rm -f conftest*
3415
3416 fi
3417 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3418 if test $ac_cv_type_size_t = no; then
3419   cat >> confdefs.h <<\EOF
3420 #define size_t unsigned
3421 EOF
3422
3423 fi
3424
3425 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3426 echo "configure:3427: checking for pid_t" >&5
3427 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3428   echo $ac_n "(cached) $ac_c" 1>&6
3429 else
3430   cat > conftest.$ac_ext <<EOF
3431 #line 3432 "configure"
3432 #include "confdefs.h"
3433 #include <sys/types.h>
3434 #if STDC_HEADERS
3435 #include <stdlib.h>
3436 #include <stddef.h>
3437 #endif
3438 EOF
3439 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3440   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3441   rm -rf conftest*
3442   ac_cv_type_pid_t=yes
3443 else
3444   rm -rf conftest*
3445   ac_cv_type_pid_t=no
3446 fi
3447 rm -f conftest*
3448
3449 fi
3450 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3451 if test $ac_cv_type_pid_t = no; then
3452   cat >> confdefs.h <<\EOF
3453 #define pid_t int
3454 EOF
3455
3456 fi
3457
3458 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3459 echo "configure:3460: checking for st_rdev in struct stat" >&5
3460 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3461   echo $ac_n "(cached) $ac_c" 1>&6
3462 else
3463   cat > conftest.$ac_ext <<EOF
3464 #line 3465 "configure"
3465 #include "confdefs.h"
3466 #include <sys/types.h>
3467 #include <sys/stat.h>
3468 int main() {
3469 struct stat s; s.st_rdev;
3470 ; return 0; }
3471 EOF
3472 if { (eval echo configure:3473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3473   rm -rf conftest*
3474   ac_cv_struct_st_rdev=yes
3475 else
3476   echo "configure: failed program was:" >&5
3477   cat conftest.$ac_ext >&5
3478   rm -rf conftest*
3479   ac_cv_struct_st_rdev=no
3480 fi
3481 rm -f conftest*
3482 fi
3483
3484 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3485 if test $ac_cv_struct_st_rdev = yes; then
3486   cat >> confdefs.h <<\EOF
3487 #define HAVE_ST_RDEV 1
3488 EOF
3489
3490 fi
3491
3492 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3493 echo "configure:3494: checking for d_off in dirent" >&5
3494 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3495   echo $ac_n "(cached) $ac_c" 1>&6
3496 else
3497   cat > conftest.$ac_ext <<EOF
3498 #line 3499 "configure"
3499 #include "confdefs.h"
3500
3501 #include <unistd.h>
3502 #include <sys/types.h>
3503 #include <dirent.h>
3504 int main() {
3505 struct dirent d; d.d_off;
3506 ; return 0; }
3507 EOF
3508 if { (eval echo configure:3509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3509   rm -rf conftest*
3510   ac_cv_dirent_d_off=yes
3511 else
3512   echo "configure: failed program was:" >&5
3513   cat conftest.$ac_ext >&5
3514   rm -rf conftest*
3515   ac_cv_dirent_d_off=no
3516 fi
3517 rm -f conftest*
3518 fi
3519
3520 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3521 if test $ac_cv_dirent_d_off = yes; then
3522   cat >> confdefs.h <<\EOF
3523 #define HAVE_DIRENT_D_OFF 1
3524 EOF
3525
3526 fi
3527
3528 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3529 echo "configure:3530: checking for ino_t" >&5
3530 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3531   echo $ac_n "(cached) $ac_c" 1>&6
3532 else
3533   cat > conftest.$ac_ext <<EOF
3534 #line 3535 "configure"
3535 #include "confdefs.h"
3536 #include <sys/types.h>
3537 #if STDC_HEADERS
3538 #include <stdlib.h>
3539 #include <stddef.h>
3540 #endif
3541 EOF
3542 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3543   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3544   rm -rf conftest*
3545   ac_cv_type_ino_t=yes
3546 else
3547   rm -rf conftest*
3548   ac_cv_type_ino_t=no
3549 fi
3550 rm -f conftest*
3551
3552 fi
3553 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3554 if test $ac_cv_type_ino_t = no; then
3555   cat >> confdefs.h <<\EOF
3556 #define ino_t unsigned
3557 EOF
3558
3559 fi
3560
3561 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3562 echo "configure:3563: checking for loff_t" >&5
3563 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3564   echo $ac_n "(cached) $ac_c" 1>&6
3565 else
3566   cat > conftest.$ac_ext <<EOF
3567 #line 3568 "configure"
3568 #include "confdefs.h"
3569 #include <sys/types.h>
3570 #if STDC_HEADERS
3571 #include <stdlib.h>
3572 #include <stddef.h>
3573 #endif
3574 EOF
3575 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3576   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3577   rm -rf conftest*
3578   ac_cv_type_loff_t=yes
3579 else
3580   rm -rf conftest*
3581   ac_cv_type_loff_t=no
3582 fi
3583 rm -f conftest*
3584
3585 fi
3586 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3587 if test $ac_cv_type_loff_t = no; then
3588   cat >> confdefs.h <<\EOF
3589 #define loff_t off_t
3590 EOF
3591
3592 fi
3593
3594 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3595 echo "configure:3596: checking for offset_t" >&5
3596 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3597   echo $ac_n "(cached) $ac_c" 1>&6
3598 else
3599   cat > conftest.$ac_ext <<EOF
3600 #line 3601 "configure"
3601 #include "confdefs.h"
3602 #include <sys/types.h>
3603 #if STDC_HEADERS
3604 #include <stdlib.h>
3605 #include <stddef.h>
3606 #endif
3607 EOF
3608 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3609   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3610   rm -rf conftest*
3611   ac_cv_type_offset_t=yes
3612 else
3613   rm -rf conftest*
3614   ac_cv_type_offset_t=no
3615 fi
3616 rm -f conftest*
3617
3618 fi
3619 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3620 if test $ac_cv_type_offset_t = no; then
3621   cat >> confdefs.h <<\EOF
3622 #define offset_t loff_t
3623 EOF
3624
3625 fi
3626
3627 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3628 echo "configure:3629: checking for ssize_t" >&5
3629 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3630   echo $ac_n "(cached) $ac_c" 1>&6
3631 else
3632   cat > conftest.$ac_ext <<EOF
3633 #line 3634 "configure"
3634 #include "confdefs.h"
3635 #include <sys/types.h>
3636 #if STDC_HEADERS
3637 #include <stdlib.h>
3638 #include <stddef.h>
3639 #endif
3640 EOF
3641 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3642   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3643   rm -rf conftest*
3644   ac_cv_type_ssize_t=yes
3645 else
3646   rm -rf conftest*
3647   ac_cv_type_ssize_t=no
3648 fi
3649 rm -f conftest*
3650
3651 fi
3652 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3653 if test $ac_cv_type_ssize_t = no; then
3654   cat >> confdefs.h <<\EOF
3655 #define ssize_t int
3656 EOF
3657
3658 fi
3659
3660 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3661 echo "configure:3662: checking for wchar_t" >&5
3662 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3663   echo $ac_n "(cached) $ac_c" 1>&6
3664 else
3665   cat > conftest.$ac_ext <<EOF
3666 #line 3667 "configure"
3667 #include "confdefs.h"
3668 #include <sys/types.h>
3669 #if STDC_HEADERS
3670 #include <stdlib.h>
3671 #include <stddef.h>
3672 #endif
3673 EOF
3674 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3675   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3676   rm -rf conftest*
3677   ac_cv_type_wchar_t=yes
3678 else
3679   rm -rf conftest*
3680   ac_cv_type_wchar_t=no
3681 fi
3682 rm -f conftest*
3683
3684 fi
3685 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3686 if test $ac_cv_type_wchar_t = no; then
3687   cat >> confdefs.h <<\EOF
3688 #define wchar_t unsigned short
3689 EOF
3690
3691 fi
3692
3693
3694 ############################################
3695 # for cups support we need libcups, and a handful of header files
3696
3697 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3698 echo "configure:3699: checking for httpConnect in -lcups" >&5
3699 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3700 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3701   echo $ac_n "(cached) $ac_c" 1>&6
3702 else
3703   ac_save_LIBS="$LIBS"
3704 LIBS="-lcups  $LIBS"
3705 cat > conftest.$ac_ext <<EOF
3706 #line 3707 "configure"
3707 #include "confdefs.h"
3708 /* Override any gcc2 internal prototype to avoid an error.  */
3709 /* We use char because int might match the return type of a gcc2
3710     builtin and then its argument prototype would still apply.  */
3711 char httpConnect();
3712
3713 int main() {
3714 httpConnect()
3715 ; return 0; }
3716 EOF
3717 if { (eval echo configure:3718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3718   rm -rf conftest*
3719   eval "ac_cv_lib_$ac_lib_var=yes"
3720 else
3721   echo "configure: failed program was:" >&5
3722   cat conftest.$ac_ext >&5
3723   rm -rf conftest*
3724   eval "ac_cv_lib_$ac_lib_var=no"
3725 fi
3726 rm -f conftest*
3727 LIBS="$ac_save_LIBS"
3728
3729 fi
3730 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3731   echo "$ac_t""yes" 1>&6
3732     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3733     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3734   cat >> confdefs.h <<EOF
3735 #define $ac_tr_lib 1
3736 EOF
3737
3738   LIBS="-lcups $LIBS"
3739
3740 else
3741   echo "$ac_t""no" 1>&6
3742 fi
3743
3744
3745 # I wonder if there is a nicer way of doing this?
3746
3747 if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
3748         for ac_hdr in cups/cups.h cups/language.h
3749 do
3750 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3751 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3752 echo "configure:3753: checking for $ac_hdr" >&5
3753 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3754   echo $ac_n "(cached) $ac_c" 1>&6
3755 else
3756   cat > conftest.$ac_ext <<EOF
3757 #line 3758 "configure"
3758 #include "confdefs.h"
3759 #include <$ac_hdr>
3760 EOF
3761 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3762 { (eval echo configure:3763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3763 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3764 if test -z "$ac_err"; then
3765   rm -rf conftest*
3766   eval "ac_cv_header_$ac_safe=yes"
3767 else
3768   echo "$ac_err" >&5
3769   echo "configure: failed program was:" >&5
3770   cat conftest.$ac_ext >&5
3771   rm -rf conftest*
3772   eval "ac_cv_header_$ac_safe=no"
3773 fi
3774 rm -f conftest*
3775 fi
3776 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3777   echo "$ac_t""yes" 1>&6
3778     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3779   cat >> confdefs.h <<EOF
3780 #define $ac_tr_hdr 1
3781 EOF
3782  
3783 else
3784   echo "$ac_t""no" 1>&6
3785 fi
3786 done
3787
3788         if test x"$ac_cv_header_cups_cups_h" = x"yes"; then
3789                 if test x"$ac_cv_header_cups_language_h" = x"yes"; then
3790                         cat >> confdefs.h <<\EOF
3791 #define HAVE_CUPS 1
3792 EOF
3793
3794                 fi
3795         fi
3796 fi
3797
3798 ############################################
3799 # we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code
3800 for ac_func in dlopen
3801 do
3802 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3803 echo "configure:3804: checking for $ac_func" >&5
3804 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3805   echo $ac_n "(cached) $ac_c" 1>&6
3806 else
3807   cat > conftest.$ac_ext <<EOF
3808 #line 3809 "configure"
3809 #include "confdefs.h"
3810 /* System header to define __stub macros and hopefully few prototypes,
3811     which can conflict with char $ac_func(); below.  */
3812 #include <assert.h>
3813 /* Override any gcc2 internal prototype to avoid an error.  */
3814 /* We use char because int might match the return type of a gcc2
3815     builtin and then its argument prototype would still apply.  */
3816 char $ac_func();
3817
3818 int main() {
3819
3820 /* The GNU C library defines this for functions which it implements
3821     to always fail with ENOSYS.  Some functions are actually named
3822     something starting with __ and the normal name is an alias.  */
3823 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3824 choke me
3825 #else
3826 $ac_func();
3827 #endif
3828
3829 ; return 0; }
3830 EOF
3831 if { (eval echo configure:3832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3832   rm -rf conftest*
3833   eval "ac_cv_func_$ac_func=yes"
3834 else
3835   echo "configure: failed program was:" >&5
3836   cat conftest.$ac_ext >&5
3837   rm -rf conftest*
3838   eval "ac_cv_func_$ac_func=no"
3839 fi
3840 rm -f conftest*
3841 fi
3842
3843 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3844   echo "$ac_t""yes" 1>&6
3845     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3846   cat >> confdefs.h <<EOF
3847 #define $ac_tr_func 1
3848 EOF
3849  
3850 else
3851   echo "$ac_t""no" 1>&6
3852 fi
3853 done
3854
3855 if test x"$ac_cv_func_dlopen" = x"no"; then
3856     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3857 echo "configure:3858: checking for dlopen in -ldl" >&5
3858 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3859 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3860   echo $ac_n "(cached) $ac_c" 1>&6
3861 else
3862   ac_save_LIBS="$LIBS"
3863 LIBS="-ldl  $LIBS"
3864 cat > conftest.$ac_ext <<EOF
3865 #line 3866 "configure"
3866 #include "confdefs.h"
3867 /* Override any gcc2 internal prototype to avoid an error.  */
3868 /* We use char because int might match the return type of a gcc2
3869     builtin and then its argument prototype would still apply.  */
3870 char dlopen();
3871
3872 int main() {
3873 dlopen()
3874 ; return 0; }
3875 EOF
3876 if { (eval echo configure:3877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3877   rm -rf conftest*
3878   eval "ac_cv_lib_$ac_lib_var=yes"
3879 else
3880   echo "configure: failed program was:" >&5
3881   cat conftest.$ac_ext >&5
3882   rm -rf conftest*
3883   eval "ac_cv_lib_$ac_lib_var=no"
3884 fi
3885 rm -f conftest*
3886 LIBS="$ac_save_LIBS"
3887
3888 fi
3889 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3890   echo "$ac_t""yes" 1>&6
3891   LIBS="$LIBS -ldl";
3892         cat >> confdefs.h <<\EOF
3893 #define HAVE_DLOPEN 1
3894 EOF
3895
3896 else
3897   echo "$ac_t""no" 1>&6
3898 fi
3899
3900 fi
3901 # dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
3902
3903 ############################################
3904 # check if the compiler can do immediate structures
3905 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3906 echo "configure:3907: checking for immediate structures" >&5
3907 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3908   echo $ac_n "(cached) $ac_c" 1>&6
3909 else
3910   
3911     cat > conftest.$ac_ext <<EOF
3912 #line 3913 "configure"
3913 #include "confdefs.h"
3914
3915 #include <stdio.h>
3916 int main() {
3917
3918    typedef struct {unsigned x;} FOOBAR;
3919    #define X_FOOBAR(x) ((FOOBAR) { x })
3920    #define FOO_ONE X_FOOBAR(1)
3921    FOOBAR f = FOO_ONE;   
3922    static struct {
3923         FOOBAR y; 
3924         } f2[] = {
3925                 {FOO_ONE}
3926         };   
3927
3928 ; return 0; }
3929 EOF
3930 if { (eval echo configure:3931: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3931   rm -rf conftest*
3932   samba_cv_immediate_structures=yes
3933 else
3934   echo "configure: failed program was:" >&5
3935   cat conftest.$ac_ext >&5
3936   rm -rf conftest*
3937   samba_cv_immediate_structures=no
3938 fi
3939 rm -f conftest*
3940 fi
3941
3942 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3943 if test x"$samba_cv_immediate_structures" = x"yes"; then
3944    cat >> confdefs.h <<\EOF
3945 #define HAVE_IMMEDIATE_STRUCTURES 1
3946 EOF
3947
3948 fi
3949
3950 ############################################
3951 # check for unix domain sockets
3952 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3953 echo "configure:3954: checking for unix domain sockets" >&5
3954 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3955   echo $ac_n "(cached) $ac_c" 1>&6
3956 else
3957   
3958     cat > conftest.$ac_ext <<EOF
3959 #line 3960 "configure"
3960 #include "confdefs.h"
3961
3962 #include <sys/types.h>
3963 #include <stdlib.h>
3964 #include <stddef.h>
3965 #include <sys/socket.h>
3966 #include <sys/un.h>
3967 int main() {
3968
3969   struct sockaddr_un sunaddr; 
3970   sunaddr.sun_family = AF_UNIX;
3971
3972 ; return 0; }
3973 EOF
3974 if { (eval echo configure:3975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3975   rm -rf conftest*
3976   samba_cv_unixsocket=yes
3977 else
3978   echo "configure: failed program was:" >&5
3979   cat conftest.$ac_ext >&5
3980   rm -rf conftest*
3981   samba_cv_unixsocket=no
3982 fi
3983 rm -f conftest*
3984 fi
3985
3986 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3987 if test x"$samba_cv_unixsocket" = x"yes"; then
3988    cat >> confdefs.h <<\EOF
3989 #define HAVE_UNIXSOCKET 1
3990 EOF
3991
3992 fi
3993
3994
3995 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3996 echo "configure:3997: checking for socklen_t type" >&5
3997 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3998   echo $ac_n "(cached) $ac_c" 1>&6
3999 else
4000   
4001     cat > conftest.$ac_ext <<EOF
4002 #line 4003 "configure"
4003 #include "confdefs.h"
4004
4005 #include <sys/types.h>
4006 #if STDC_HEADERS
4007 #include <stdlib.h>
4008 #include <stddef.h>
4009 #endif
4010 #include <sys/socket.h>
4011 int main() {
4012 socklen_t i = 0
4013 ; return 0; }
4014 EOF
4015 if { (eval echo configure:4016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4016   rm -rf conftest*
4017   samba_cv_socklen_t=yes
4018 else
4019   echo "configure: failed program was:" >&5
4020   cat conftest.$ac_ext >&5
4021   rm -rf conftest*
4022   samba_cv_socklen_t=no
4023 fi
4024 rm -f conftest*
4025 fi
4026
4027 echo "$ac_t""$samba_cv_socklen_t" 1>&6
4028 if test x"$samba_cv_socklen_t" = x"yes"; then
4029    cat >> confdefs.h <<\EOF
4030 #define HAVE_SOCKLEN_T_TYPE 1
4031 EOF
4032
4033 fi
4034
4035 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
4036 echo "configure:4037: checking for sig_atomic_t type" >&5
4037 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
4038   echo $ac_n "(cached) $ac_c" 1>&6
4039 else
4040   
4041     cat > conftest.$ac_ext <<EOF
4042 #line 4043 "configure"
4043 #include "confdefs.h"
4044
4045 #include <sys/types.h>
4046 #if STDC_HEADERS
4047 #include <stdlib.h>
4048 #include <stddef.h>
4049 #endif
4050 #include <signal.h>
4051 int main() {
4052 sig_atomic_t i = 0
4053 ; return 0; }
4054 EOF
4055 if { (eval echo configure:4056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4056   rm -rf conftest*
4057   samba_cv_sig_atomic_t=yes
4058 else
4059   echo "configure: failed program was:" >&5
4060   cat conftest.$ac_ext >&5
4061   rm -rf conftest*
4062   samba_cv_sig_atomic_t=no
4063 fi
4064 rm -f conftest*
4065 fi
4066
4067 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
4068 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
4069    cat >> confdefs.h <<\EOF
4070 #define HAVE_SIG_ATOMIC_T_TYPE 1
4071 EOF
4072
4073 fi
4074
4075 # stupid headers have the functions but no declaration. grrrr.
4076
4077  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
4078 echo "configure:4079: checking for errno declaration" >&5
4079 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
4080   echo $ac_n "(cached) $ac_c" 1>&6
4081 else
4082   
4083     cat > conftest.$ac_ext <<EOF
4084 #line 4085 "configure"
4085 #include "confdefs.h"
4086 #include <errno.h>
4087 int main() {
4088 int i = (int)errno
4089 ; return 0; }
4090 EOF
4091 if { (eval echo configure:4092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4092   rm -rf conftest*
4093   ac_cv_have_errno_decl=yes
4094 else
4095   echo "configure: failed program was:" >&5
4096   cat conftest.$ac_ext >&5
4097   rm -rf conftest*
4098   ac_cv_have_errno_decl=no
4099 fi
4100 rm -f conftest*
4101 fi
4102
4103 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
4104  if test x"$ac_cv_have_errno_decl" = x"yes"; then
4105     cat >> confdefs.h <<\EOF
4106 #define HAVE_ERRNO_DECL 1
4107 EOF
4108
4109  fi
4110
4111
4112  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
4113 echo "configure:4114: checking for setresuid declaration" >&5
4114 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
4115   echo $ac_n "(cached) $ac_c" 1>&6
4116 else
4117   
4118     cat > conftest.$ac_ext <<EOF
4119 #line 4120 "configure"
4120 #include "confdefs.h"
4121 #include <unistd.h>
4122 int main() {
4123 int i = (int)setresuid
4124 ; return 0; }
4125 EOF
4126 if { (eval echo configure:4127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4127   rm -rf conftest*
4128   ac_cv_have_setresuid_decl=yes
4129 else
4130   echo "configure: failed program was:" >&5
4131   cat conftest.$ac_ext >&5
4132   rm -rf conftest*
4133   ac_cv_have_setresuid_decl=no
4134 fi
4135 rm -f conftest*
4136 fi
4137
4138 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
4139  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
4140     cat >> confdefs.h <<\EOF
4141 #define HAVE_SETRESUID_DECL 1
4142 EOF
4143
4144  fi
4145
4146
4147  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
4148 echo "configure:4149: checking for setresgid declaration" >&5
4149 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
4150   echo $ac_n "(cached) $ac_c" 1>&6
4151 else
4152   
4153     cat > conftest.$ac_ext <<EOF
4154 #line 4155 "configure"
4155 #include "confdefs.h"
4156 #include <unistd.h>
4157 int main() {
4158 int i = (int)setresgid
4159 ; return 0; }
4160 EOF
4161 if { (eval echo configure:4162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4162   rm -rf conftest*
4163   ac_cv_have_setresgid_decl=yes
4164 else
4165   echo "configure: failed program was:" >&5
4166   cat conftest.$ac_ext >&5
4167   rm -rf conftest*
4168   ac_cv_have_setresgid_decl=no
4169 fi
4170 rm -f conftest*
4171 fi
4172
4173 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
4174  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
4175     cat >> confdefs.h <<\EOF
4176 #define HAVE_SETRESGID_DECL 1
4177 EOF
4178
4179  fi
4180
4181
4182  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
4183 echo "configure:4184: checking for asprintf declaration" >&5
4184 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
4185   echo $ac_n "(cached) $ac_c" 1>&6
4186 else
4187   
4188     cat > conftest.$ac_ext <<EOF
4189 #line 4190 "configure"
4190 #include "confdefs.h"
4191 #include <stdio.h>
4192 int main() {
4193 int i = (int)asprintf
4194 ; return 0; }
4195 EOF
4196 if { (eval echo configure:4197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4197   rm -rf conftest*
4198   ac_cv_have_asprintf_decl=yes
4199 else
4200   echo "configure: failed program was:" >&5
4201   cat conftest.$ac_ext >&5
4202   rm -rf conftest*
4203   ac_cv_have_asprintf_decl=no
4204 fi
4205 rm -f conftest*
4206 fi
4207
4208 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
4209  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
4210     cat >> confdefs.h <<\EOF
4211 #define HAVE_ASPRINTF_DECL 1
4212 EOF
4213
4214  fi
4215
4216
4217  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
4218 echo "configure:4219: checking for vasprintf declaration" >&5
4219 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
4220   echo $ac_n "(cached) $ac_c" 1>&6
4221 else
4222   
4223     cat > conftest.$ac_ext <<EOF
4224 #line 4225 "configure"
4225 #include "confdefs.h"
4226 #include <stdio.h>
4227 int main() {
4228 int i = (int)vasprintf
4229 ; return 0; }
4230 EOF
4231 if { (eval echo configure:4232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4232   rm -rf conftest*
4233   ac_cv_have_vasprintf_decl=yes
4234 else
4235   echo "configure: failed program was:" >&5
4236   cat conftest.$ac_ext >&5
4237   rm -rf conftest*
4238   ac_cv_have_vasprintf_decl=no
4239 fi
4240 rm -f conftest*
4241 fi
4242
4243 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
4244  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
4245     cat >> confdefs.h <<\EOF
4246 #define HAVE_VASPRINTF_DECL 1
4247 EOF
4248
4249  fi
4250
4251
4252  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
4253 echo "configure:4254: checking for vsnprintf declaration" >&5
4254 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
4255   echo $ac_n "(cached) $ac_c" 1>&6
4256 else
4257   
4258     cat > conftest.$ac_ext <<EOF
4259 #line 4260 "configure"
4260 #include "confdefs.h"
4261 #include <stdio.h>
4262 int main() {
4263 int i = (int)vsnprintf
4264 ; return 0; }
4265 EOF
4266 if { (eval echo configure:4267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4267   rm -rf conftest*
4268   ac_cv_have_vsnprintf_decl=yes
4269 else
4270   echo "configure: failed program was:" >&5
4271   cat conftest.$ac_ext >&5
4272   rm -rf conftest*
4273   ac_cv_have_vsnprintf_decl=no
4274 fi
4275 rm -f conftest*
4276 fi
4277
4278 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
4279  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
4280     cat >> confdefs.h <<\EOF
4281 #define HAVE_VSNPRINTF_DECL 1
4282 EOF
4283
4284  fi
4285
4286
4287  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
4288 echo "configure:4289: checking for snprintf declaration" >&5
4289 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
4290   echo $ac_n "(cached) $ac_c" 1>&6
4291 else
4292   
4293     cat > conftest.$ac_ext <<EOF
4294 #line 4295 "configure"
4295 #include "confdefs.h"
4296 #include <stdio.h>
4297 int main() {
4298 int i = (int)snprintf
4299 ; return 0; }
4300 EOF
4301 if { (eval echo configure:4302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4302   rm -rf conftest*
4303   ac_cv_have_snprintf_decl=yes
4304 else
4305   echo "configure: failed program was:" >&5
4306   cat conftest.$ac_ext >&5
4307   rm -rf conftest*
4308   ac_cv_have_snprintf_decl=no
4309 fi
4310 rm -f conftest*
4311 fi
4312
4313 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
4314  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
4315     cat >> confdefs.h <<\EOF
4316 #define HAVE_SNPRINTF_DECL 1
4317 EOF
4318
4319  fi
4320
4321
4322 # and glibc has setresuid under linux but the function does
4323 # nothing until kernel 2.1.44! very dumb.
4324 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
4325 echo "configure:4326: checking for real setresuid" >&5
4326 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
4327   echo $ac_n "(cached) $ac_c" 1>&6
4328 else
4329   
4330     if test "$cross_compiling" = yes; then
4331   samba_cv_have_setresuid=cross
4332 else
4333   cat > conftest.$ac_ext <<EOF
4334 #line 4335 "configure"
4335 #include "confdefs.h"
4336 #include <errno.h>
4337 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4338 EOF
4339 if { (eval echo configure:4340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4340 then
4341   samba_cv_have_setresuid=yes
4342 else
4343   echo "configure: failed program was:" >&5
4344   cat conftest.$ac_ext >&5
4345   rm -fr conftest*
4346   samba_cv_have_setresuid=no
4347 fi
4348 rm -fr conftest*
4349 fi
4350
4351 fi
4352
4353 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4354 if test x"$samba_cv_have_setresuid" = x"yes"; then
4355     cat >> confdefs.h <<\EOF
4356 #define HAVE_SETRESUID 1
4357 EOF
4358
4359 fi
4360
4361 # Do the same check for setresguid...
4362 #
4363 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4364 echo "configure:4365: checking for real setresgid" >&5
4365 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4366   echo $ac_n "(cached) $ac_c" 1>&6
4367 else
4368   
4369     if test "$cross_compiling" = yes; then
4370   samba_cv_have_setresgid=cross
4371 else
4372   cat > conftest.$ac_ext <<EOF
4373 #line 4374 "configure"
4374 #include "confdefs.h"
4375 #include <unistd.h>
4376 #include <errno.h>
4377 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4378 EOF
4379 if { (eval echo configure:4380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4380 then
4381   samba_cv_have_setresgid=yes
4382 else
4383   echo "configure: failed program was:" >&5
4384   cat conftest.$ac_ext >&5
4385   rm -fr conftest*
4386   samba_cv_have_setresgid=no
4387 fi
4388 rm -fr conftest*
4389 fi
4390
4391 fi
4392
4393 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4394 if test x"$samba_cv_have_setresgid" = x"yes"; then
4395     cat >> confdefs.h <<\EOF
4396 #define HAVE_SETRESGID 1
4397 EOF
4398
4399 fi
4400
4401 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4402 echo "configure:4403: checking for 8-bit clean memcmp" >&5
4403 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4404   echo $ac_n "(cached) $ac_c" 1>&6
4405 else
4406   if test "$cross_compiling" = yes; then
4407   ac_cv_func_memcmp_clean=no
4408 else
4409   cat > conftest.$ac_ext <<EOF
4410 #line 4411 "configure"
4411 #include "confdefs.h"
4412
4413 main()
4414 {
4415   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4416   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4417 }
4418
4419 EOF
4420 if { (eval echo configure:4421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4421 then
4422   ac_cv_func_memcmp_clean=yes
4423 else
4424   echo "configure: failed program was:" >&5
4425   cat conftest.$ac_ext >&5
4426   rm -fr conftest*
4427   ac_cv_func_memcmp_clean=no
4428 fi
4429 rm -fr conftest*
4430 fi
4431
4432 fi
4433
4434 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4435 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4436
4437
4438 ###############################################
4439 # test for where we get crypt() from
4440 for ac_func in crypt
4441 do
4442 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4443 echo "configure:4444: checking for $ac_func" >&5
4444 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4445   echo $ac_n "(cached) $ac_c" 1>&6
4446 else
4447   cat > conftest.$ac_ext <<EOF
4448 #line 4449 "configure"
4449 #include "confdefs.h"
4450 /* System header to define __stub macros and hopefully few prototypes,
4451     which can conflict with char $ac_func(); below.  */
4452 #include <assert.h>
4453 /* Override any gcc2 internal prototype to avoid an error.  */
4454 /* We use char because int might match the return type of a gcc2
4455     builtin and then its argument prototype would still apply.  */
4456 char $ac_func();
4457
4458 int main() {
4459
4460 /* The GNU C library defines this for functions which it implements
4461     to always fail with ENOSYS.  Some functions are actually named
4462     something starting with __ and the normal name is an alias.  */
4463 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4464 choke me
4465 #else
4466 $ac_func();
4467 #endif
4468
4469 ; return 0; }
4470 EOF
4471 if { (eval echo configure:4472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4472   rm -rf conftest*
4473   eval "ac_cv_func_$ac_func=yes"
4474 else
4475   echo "configure: failed program was:" >&5
4476   cat conftest.$ac_ext >&5
4477   rm -rf conftest*
4478   eval "ac_cv_func_$ac_func=no"
4479 fi
4480 rm -f conftest*
4481 fi
4482
4483 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4484   echo "$ac_t""yes" 1>&6
4485     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4486   cat >> confdefs.h <<EOF
4487 #define $ac_tr_func 1
4488 EOF
4489  
4490 else
4491   echo "$ac_t""no" 1>&6
4492 fi
4493 done
4494
4495 if test x"$ac_cv_func_crypt" = x"no"; then
4496     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4497 echo "configure:4498: checking for crypt in -lcrypt" >&5
4498 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4499 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4500   echo $ac_n "(cached) $ac_c" 1>&6
4501 else
4502   ac_save_LIBS="$LIBS"
4503 LIBS="-lcrypt  $LIBS"
4504 cat > conftest.$ac_ext <<EOF
4505 #line 4506 "configure"
4506 #include "confdefs.h"
4507 /* Override any gcc2 internal prototype to avoid an error.  */
4508 /* We use char because int might match the return type of a gcc2
4509     builtin and then its argument prototype would still apply.  */
4510 char crypt();
4511
4512 int main() {
4513 crypt()
4514 ; return 0; }
4515 EOF
4516 if { (eval echo configure:4517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4517   rm -rf conftest*
4518   eval "ac_cv_lib_$ac_lib_var=yes"
4519 else
4520   echo "configure: failed program was:" >&5
4521   cat conftest.$ac_ext >&5
4522   rm -rf conftest*
4523   eval "ac_cv_lib_$ac_lib_var=no"
4524 fi
4525 rm -f conftest*
4526 LIBS="$ac_save_LIBS"
4527
4528 fi
4529 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4530   echo "$ac_t""yes" 1>&6
4531   LIBS="$LIBS -lcrypt";
4532         cat >> confdefs.h <<\EOF
4533 #define HAVE_CRYPT 1
4534 EOF
4535
4536 else
4537   echo "$ac_t""no" 1>&6
4538 fi
4539
4540 fi
4541
4542
4543 ###############################################
4544 # Readline included by default unless explicitly asked not to
4545 test "${with_readline+set}" != "set" && with_readline=yes
4546
4547 # test for where we get readline() from
4548 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4549 echo "configure:4550: checking whether to use readline" >&5
4550 # Check whether --with-readline or --without-readline was given.
4551 if test "${with_readline+set}" = set; then
4552   withval="$with_readline"
4553     case "$with_readline" in
4554   yes)
4555     echo "$ac_t""yes" 1>&6
4556
4557     for ac_hdr in readline.h history.h readline/readline.h
4558 do
4559 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4560 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4561 echo "configure:4562: checking for $ac_hdr" >&5
4562 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4563   echo $ac_n "(cached) $ac_c" 1>&6
4564 else
4565   cat > conftest.$ac_ext <<EOF
4566 #line 4567 "configure"
4567 #include "confdefs.h"
4568 #include <$ac_hdr>
4569 EOF
4570 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4571 { (eval echo configure:4572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4572 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4573 if test -z "$ac_err"; then
4574   rm -rf conftest*
4575   eval "ac_cv_header_$ac_safe=yes"
4576 else
4577   echo "$ac_err" >&5
4578   echo "configure: failed program was:" >&5
4579   cat conftest.$ac_ext >&5
4580   rm -rf conftest*
4581   eval "ac_cv_header_$ac_safe=no"
4582 fi
4583 rm -f conftest*
4584 fi
4585 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4586   echo "$ac_t""yes" 1>&6
4587     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4588   cat >> confdefs.h <<EOF
4589 #define $ac_tr_hdr 1
4590 EOF
4591  
4592 else
4593   echo "$ac_t""no" 1>&6
4594 fi
4595 done
4596
4597     for ac_hdr in readline/history.h
4598 do
4599 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4600 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4601 echo "configure:4602: checking for $ac_hdr" >&5
4602 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4603   echo $ac_n "(cached) $ac_c" 1>&6
4604 else
4605   cat > conftest.$ac_ext <<EOF
4606 #line 4607 "configure"
4607 #include "confdefs.h"
4608 #include <$ac_hdr>
4609 EOF
4610 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4611 { (eval echo configure:4612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4612 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4613 if test -z "$ac_err"; then
4614   rm -rf conftest*
4615   eval "ac_cv_header_$ac_safe=yes"
4616 else
4617   echo "$ac_err" >&5
4618   echo "configure: failed program was:" >&5
4619   cat conftest.$ac_ext >&5
4620   rm -rf conftest*
4621   eval "ac_cv_header_$ac_safe=no"
4622 fi
4623 rm -f conftest*
4624 fi
4625 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4626   echo "$ac_t""yes" 1>&6
4627     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4628   cat >> confdefs.h <<EOF
4629 #define $ac_tr_hdr 1
4630 EOF
4631  
4632 else
4633   echo "$ac_t""no" 1>&6
4634 fi
4635 done
4636
4637
4638     for ac_hdr in readline.h readline/readline.h
4639 do
4640 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4641 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4642 echo "configure:4643: checking for $ac_hdr" >&5
4643 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4644   echo $ac_n "(cached) $ac_c" 1>&6
4645 else
4646   cat > conftest.$ac_ext <<EOF
4647 #line 4648 "configure"
4648 #include "confdefs.h"
4649 #include <$ac_hdr>
4650 EOF
4651 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4652 { (eval echo configure:4653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4653 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4654 if test -z "$ac_err"; then
4655   rm -rf conftest*
4656   eval "ac_cv_header_$ac_safe=yes"
4657 else
4658   echo "$ac_err" >&5
4659   echo "configure: failed program was:" >&5
4660   cat conftest.$ac_ext >&5
4661   rm -rf conftest*
4662   eval "ac_cv_header_$ac_safe=no"
4663 fi
4664 rm -f conftest*
4665 fi
4666 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4667   echo "$ac_t""yes" 1>&6
4668     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4669   cat >> confdefs.h <<EOF
4670 #define $ac_tr_hdr 1
4671 EOF
4672  
4673       for termlib in ncurses curses termcap terminfo termlib; do
4674        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4675 echo "configure:4676: checking for tgetent in -l${termlib}" >&5
4676 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4677 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4678   echo $ac_n "(cached) $ac_c" 1>&6
4679 else
4680   ac_save_LIBS="$LIBS"
4681 LIBS="-l${termlib}  $LIBS"
4682 cat > conftest.$ac_ext <<EOF
4683 #line 4684 "configure"
4684 #include "confdefs.h"
4685 /* Override any gcc2 internal prototype to avoid an error.  */
4686 /* We use char because int might match the return type of a gcc2
4687     builtin and then its argument prototype would still apply.  */
4688 char tgetent();
4689
4690 int main() {
4691 tgetent()
4692 ; return 0; }
4693 EOF
4694 if { (eval echo configure:4695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4695   rm -rf conftest*
4696   eval "ac_cv_lib_$ac_lib_var=yes"
4697 else
4698   echo "configure: failed program was:" >&5
4699   cat conftest.$ac_ext >&5
4700   rm -rf conftest*
4701   eval "ac_cv_lib_$ac_lib_var=no"
4702 fi
4703 rm -f conftest*
4704 LIBS="$ac_save_LIBS"
4705
4706 fi
4707 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4708   echo "$ac_t""yes" 1>&6
4709   TERMLIBS="-l${termlib}"; break
4710 else
4711   echo "$ac_t""no" 1>&6
4712 fi
4713
4714       done
4715       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4716 echo "configure:4717: checking for rl_callback_handler_install in -lreadline" >&5
4717 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4718 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4719   echo $ac_n "(cached) $ac_c" 1>&6
4720 else
4721   ac_save_LIBS="$LIBS"
4722 LIBS="-lreadline $TERMLIBS $LIBS"
4723 cat > conftest.$ac_ext <<EOF
4724 #line 4725 "configure"
4725 #include "confdefs.h"
4726 /* Override any gcc2 internal prototype to avoid an error.  */
4727 /* We use char because int might match the return type of a gcc2
4728     builtin and then its argument prototype would still apply.  */
4729 char rl_callback_handler_install();
4730
4731 int main() {
4732 rl_callback_handler_install()
4733 ; return 0; }
4734 EOF
4735 if { (eval echo configure:4736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4736   rm -rf conftest*
4737   eval "ac_cv_lib_$ac_lib_var=yes"
4738 else
4739   echo "configure: failed program was:" >&5
4740   cat conftest.$ac_ext >&5
4741   rm -rf conftest*
4742   eval "ac_cv_lib_$ac_lib_var=no"
4743 fi
4744 rm -f conftest*
4745 LIBS="$ac_save_LIBS"
4746
4747 fi
4748 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4749   echo "$ac_t""yes" 1>&6
4750   TERMLIBS="-lreadline $TERMLIBS"
4751        cat >> confdefs.h <<\EOF
4752 #define HAVE_LIBREADLINE 1
4753 EOF
4754
4755        break
4756 else
4757   echo "$ac_t""no" 1>&6
4758 TERMLIBS=
4759 fi
4760
4761 else
4762   echo "$ac_t""no" 1>&6
4763 fi
4764 done
4765
4766     ;;
4767   no)
4768     echo "$ac_t""no" 1>&6
4769     ;;
4770   *)
4771     echo "$ac_t""yes" 1>&6
4772
4773     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4774     # alternate readline path
4775     _ldflags=${LDFLAGS}
4776     _cppflags=${CPPFLAGS}
4777
4778     # Add additional search path
4779     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4780     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4781
4782     for ac_hdr in readline.h history.h readline/readline.h
4783 do
4784 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4785 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4786 echo "configure:4787: checking for $ac_hdr" >&5
4787 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4788   echo $ac_n "(cached) $ac_c" 1>&6
4789 else
4790   cat > conftest.$ac_ext <<EOF
4791 #line 4792 "configure"
4792 #include "confdefs.h"
4793 #include <$ac_hdr>
4794 EOF
4795 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4796 { (eval echo configure:4797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4797 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4798 if test -z "$ac_err"; then
4799   rm -rf conftest*
4800   eval "ac_cv_header_$ac_safe=yes"
4801 else
4802   echo "$ac_err" >&5
4803   echo "configure: failed program was:" >&5
4804   cat conftest.$ac_ext >&5
4805   rm -rf conftest*
4806   eval "ac_cv_header_$ac_safe=no"
4807 fi
4808 rm -f conftest*
4809 fi
4810 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4811   echo "$ac_t""yes" 1>&6
4812     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4813   cat >> confdefs.h <<EOF
4814 #define $ac_tr_hdr 1
4815 EOF
4816  
4817 else
4818   echo "$ac_t""no" 1>&6
4819 fi
4820 done
4821
4822     for ac_hdr in readline/history.h
4823 do
4824 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4825 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4826 echo "configure:4827: checking for $ac_hdr" >&5
4827 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4828   echo $ac_n "(cached) $ac_c" 1>&6
4829 else
4830   cat > conftest.$ac_ext <<EOF
4831 #line 4832 "configure"
4832 #include "confdefs.h"
4833 #include <$ac_hdr>
4834 EOF
4835 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4836 { (eval echo configure:4837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4837 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4838 if test -z "$ac_err"; then
4839   rm -rf conftest*
4840   eval "ac_cv_header_$ac_safe=yes"
4841 else
4842   echo "$ac_err" >&5
4843   echo "configure: failed program was:" >&5
4844   cat conftest.$ac_ext >&5
4845   rm -rf conftest*
4846   eval "ac_cv_header_$ac_safe=no"
4847 fi
4848 rm -f conftest*
4849 fi
4850 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4851   echo "$ac_t""yes" 1>&6
4852     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4853   cat >> confdefs.h <<EOF
4854 #define $ac_tr_hdr 1
4855 EOF
4856  
4857 else
4858   echo "$ac_t""no" 1>&6
4859 fi
4860 done
4861
4862
4863     for ac_hdr in readline.h readline/readline.h
4864 do
4865 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4866 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4867 echo "configure:4868: checking for $ac_hdr" >&5
4868 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4869   echo $ac_n "(cached) $ac_c" 1>&6
4870 else
4871   cat > conftest.$ac_ext <<EOF
4872 #line 4873 "configure"
4873 #include "confdefs.h"
4874 #include <$ac_hdr>
4875 EOF
4876 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4877 { (eval echo configure:4878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4878 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4879 if test -z "$ac_err"; then
4880   rm -rf conftest*
4881   eval "ac_cv_header_$ac_safe=yes"
4882 else
4883   echo "$ac_err" >&5
4884   echo "configure: failed program was:" >&5
4885   cat conftest.$ac_ext >&5
4886   rm -rf conftest*
4887   eval "ac_cv_header_$ac_safe=no"
4888 fi
4889 rm -f conftest*
4890 fi
4891 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4892   echo "$ac_t""yes" 1>&6
4893     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4894   cat >> confdefs.h <<EOF
4895 #define $ac_tr_hdr 1
4896 EOF
4897  
4898       for termlib in ncurses curses termcap terminfo termlib; do
4899        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4900 echo "configure:4901: checking for tgetent in -l${termlib}" >&5
4901 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4902 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4903   echo $ac_n "(cached) $ac_c" 1>&6
4904 else
4905   ac_save_LIBS="$LIBS"
4906 LIBS="-l${termlib}  $LIBS"
4907 cat > conftest.$ac_ext <<EOF
4908 #line 4909 "configure"
4909 #include "confdefs.h"
4910 /* Override any gcc2 internal prototype to avoid an error.  */
4911 /* We use char because int might match the return type of a gcc2
4912     builtin and then its argument prototype would still apply.  */
4913 char tgetent();
4914
4915 int main() {
4916 tgetent()
4917 ; return 0; }
4918 EOF
4919 if { (eval echo configure:4920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4920   rm -rf conftest*
4921   eval "ac_cv_lib_$ac_lib_var=yes"
4922 else
4923   echo "configure: failed program was:" >&5
4924   cat conftest.$ac_ext >&5
4925   rm -rf conftest*
4926   eval "ac_cv_lib_$ac_lib_var=no"
4927 fi
4928 rm -f conftest*
4929 LIBS="$ac_save_LIBS"
4930
4931 fi
4932 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4933   echo "$ac_t""yes" 1>&6
4934   TERMLIBS="-l${termlib}"; break
4935 else
4936   echo "$ac_t""no" 1>&6
4937 fi
4938
4939       done
4940       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4941 echo "configure:4942: checking for rl_callback_handler_install in -lreadline" >&5
4942 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4943 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4944   echo $ac_n "(cached) $ac_c" 1>&6
4945 else
4946   ac_save_LIBS="$LIBS"
4947 LIBS="-lreadline $TERMLIBS $LIBS"
4948 cat > conftest.$ac_ext <<EOF
4949 #line 4950 "configure"
4950 #include "confdefs.h"
4951 /* Override any gcc2 internal prototype to avoid an error.  */
4952 /* We use char because int might match the return type of a gcc2
4953     builtin and then its argument prototype would still apply.  */
4954 char rl_callback_handler_install();
4955
4956 int main() {
4957 rl_callback_handler_install()
4958 ; return 0; }
4959 EOF
4960 if { (eval echo configure:4961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4961   rm -rf conftest*
4962   eval "ac_cv_lib_$ac_lib_var=yes"
4963 else
4964   echo "configure: failed program was:" >&5
4965   cat conftest.$ac_ext >&5
4966   rm -rf conftest*
4967   eval "ac_cv_lib_$ac_lib_var=no"
4968 fi
4969 rm -f conftest*
4970 LIBS="$ac_save_LIBS"
4971
4972 fi
4973 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4974   echo "$ac_t""yes" 1>&6
4975   TERMLDFLAGS="-L$with_readline/lib"
4976        TERMCPPFLAGS="-I$with_readline/include"
4977        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4978        TERMLIBS="-lreadline $TERMLIBS"
4979        cat >> confdefs.h <<\EOF
4980 #define HAVE_LIBREADLINE 1
4981 EOF
4982
4983        break
4984 else
4985   echo "$ac_t""no" 1>&6
4986 TERMLIBS= CPPFLAGS=$_cppflags
4987 fi
4988
4989 else
4990   echo "$ac_t""no" 1>&6
4991 fi
4992 done
4993
4994
4995     LDFLAGS=$_ldflags
4996     ;;
4997   esac
4998 else
4999   echo "$ac_t""no" 1>&6
5000
5001 fi
5002
5003
5004
5005
5006 # The readline API changed slightly from readline3 to readline4, so
5007 # code will generate warnings on one of them unless we have a few
5008 # special cases.
5009 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
5010 echo "configure:5011: checking for rl_completion_matches in -lreadline" >&5
5011 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
5012 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5013   echo $ac_n "(cached) $ac_c" 1>&6
5014 else
5015   ac_save_LIBS="$LIBS"
5016 LIBS="-lreadline $TERMLIBS $LIBS"
5017 cat > conftest.$ac_ext <<EOF
5018 #line 5019 "configure"
5019 #include "confdefs.h"
5020 /* Override any gcc2 internal prototype to avoid an error.  */
5021 /* We use char because int might match the return type of a gcc2
5022     builtin and then its argument prototype would still apply.  */
5023 char rl_completion_matches();
5024
5025 int main() {
5026 rl_completion_matches()
5027 ; return 0; }
5028 EOF
5029 if { (eval echo configure:5030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5030   rm -rf conftest*
5031   eval "ac_cv_lib_$ac_lib_var=yes"
5032 else
5033   echo "configure: failed program was:" >&5
5034   cat conftest.$ac_ext >&5
5035   rm -rf conftest*
5036   eval "ac_cv_lib_$ac_lib_var=no"
5037 fi
5038 rm -f conftest*
5039 LIBS="$ac_save_LIBS"
5040
5041 fi
5042 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5043   echo "$ac_t""yes" 1>&6
5044   cat >> confdefs.h <<\EOF
5045 #define HAVE_NEW_LIBREADLINE 1
5046 EOF
5047
5048 else
5049   echo "$ac_t""no" 1>&6
5050 fi
5051
5052
5053 # The following test taken from the cvs sources
5054 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
5055 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
5056 # libsocket.so which has a bad implementation of gethostbyname (it
5057 # only looks in /etc/hosts), so we only look for -lsocket if we need
5058 # it.
5059 for ac_func in connect
5060 do
5061 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5062 echo "configure:5063: checking for $ac_func" >&5
5063 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5064   echo $ac_n "(cached) $ac_c" 1>&6
5065 else
5066   cat > conftest.$ac_ext <<EOF
5067 #line 5068 "configure"
5068 #include "confdefs.h"
5069 /* System header to define __stub macros and hopefully few prototypes,
5070     which can conflict with char $ac_func(); below.  */
5071 #include <assert.h>
5072 /* Override any gcc2 internal prototype to avoid an error.  */
5073 /* We use char because int might match the return type of a gcc2
5074     builtin and then its argument prototype would still apply.  */
5075 char $ac_func();
5076
5077 int main() {
5078
5079 /* The GNU C library defines this for functions which it implements
5080     to always fail with ENOSYS.  Some functions are actually named
5081     something starting with __ and the normal name is an alias.  */
5082 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5083 choke me
5084 #else
5085 $ac_func();
5086 #endif
5087
5088 ; return 0; }
5089 EOF
5090 if { (eval echo configure:5091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5091   rm -rf conftest*
5092   eval "ac_cv_func_$ac_func=yes"
5093 else
5094   echo "configure: failed program was:" >&5
5095   cat conftest.$ac_ext >&5
5096   rm -rf conftest*
5097   eval "ac_cv_func_$ac_func=no"
5098 fi
5099 rm -f conftest*
5100 fi
5101
5102 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5103   echo "$ac_t""yes" 1>&6
5104     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5105   cat >> confdefs.h <<EOF
5106 #define $ac_tr_func 1
5107 EOF
5108  
5109 else
5110   echo "$ac_t""no" 1>&6
5111 fi
5112 done
5113
5114 if test x"$ac_cv_func_connect" = x"no"; then
5115     case "$LIBS" in
5116     *-lnsl*) ;;
5117     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
5118 echo "configure:5119: checking for printf in -lnsl_s" >&5
5119 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
5120 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5121   echo $ac_n "(cached) $ac_c" 1>&6
5122 else
5123   ac_save_LIBS="$LIBS"
5124 LIBS="-lnsl_s  $LIBS"
5125 cat > conftest.$ac_ext <<EOF
5126 #line 5127 "configure"
5127 #include "confdefs.h"
5128 /* Override any gcc2 internal prototype to avoid an error.  */
5129 /* We use char because int might match the return type of a gcc2
5130     builtin and then its argument prototype would still apply.  */
5131 char printf();
5132
5133 int main() {
5134 printf()
5135 ; return 0; }
5136 EOF
5137 if { (eval echo configure:5138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5138   rm -rf conftest*
5139   eval "ac_cv_lib_$ac_lib_var=yes"
5140 else
5141   echo "configure: failed program was:" >&5
5142   cat conftest.$ac_ext >&5
5143   rm -rf conftest*
5144   eval "ac_cv_lib_$ac_lib_var=no"
5145 fi
5146 rm -f conftest*
5147 LIBS="$ac_save_LIBS"
5148
5149 fi
5150 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5151   echo "$ac_t""yes" 1>&6
5152     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5153     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5154   cat >> confdefs.h <<EOF
5155 #define $ac_tr_lib 1
5156 EOF
5157
5158   LIBS="-lnsl_s $LIBS"
5159
5160 else
5161   echo "$ac_t""no" 1>&6
5162 fi
5163  ;;
5164     esac
5165     case "$LIBS" in
5166     *-lnsl*) ;;
5167     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
5168 echo "configure:5169: checking for printf in -lnsl" >&5
5169 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
5170 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5171   echo $ac_n "(cached) $ac_c" 1>&6
5172 else
5173   ac_save_LIBS="$LIBS"
5174 LIBS="-lnsl  $LIBS"
5175 cat > conftest.$ac_ext <<EOF
5176 #line 5177 "configure"
5177 #include "confdefs.h"
5178 /* Override any gcc2 internal prototype to avoid an error.  */
5179 /* We use char because int might match the return type of a gcc2
5180     builtin and then its argument prototype would still apply.  */
5181 char printf();
5182
5183 int main() {
5184 printf()
5185 ; return 0; }
5186 EOF
5187 if { (eval echo configure:5188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5188   rm -rf conftest*
5189   eval "ac_cv_lib_$ac_lib_var=yes"
5190 else
5191   echo "configure: failed program was:" >&5
5192   cat conftest.$ac_ext >&5
5193   rm -rf conftest*
5194   eval "ac_cv_lib_$ac_lib_var=no"
5195 fi
5196 rm -f conftest*
5197 LIBS="$ac_save_LIBS"
5198
5199 fi
5200 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5201   echo "$ac_t""yes" 1>&6
5202     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5203     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5204   cat >> confdefs.h <<EOF
5205 #define $ac_tr_lib 1
5206 EOF
5207
5208   LIBS="-lnsl $LIBS"
5209
5210 else
5211   echo "$ac_t""no" 1>&6
5212 fi
5213  ;;
5214     esac
5215     case "$LIBS" in
5216     *-lsocket*) ;;
5217     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5218 echo "configure:5219: checking for connect in -lsocket" >&5
5219 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5220 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5221   echo $ac_n "(cached) $ac_c" 1>&6
5222 else
5223   ac_save_LIBS="$LIBS"
5224 LIBS="-lsocket  $LIBS"
5225 cat > conftest.$ac_ext <<EOF
5226 #line 5227 "configure"
5227 #include "confdefs.h"
5228 /* Override any gcc2 internal prototype to avoid an error.  */
5229 /* We use char because int might match the return type of a gcc2
5230     builtin and then its argument prototype would still apply.  */
5231 char connect();
5232
5233 int main() {
5234 connect()
5235 ; return 0; }
5236 EOF
5237 if { (eval echo configure:5238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5238   rm -rf conftest*
5239   eval "ac_cv_lib_$ac_lib_var=yes"
5240 else
5241   echo "configure: failed program was:" >&5
5242   cat conftest.$ac_ext >&5
5243   rm -rf conftest*
5244   eval "ac_cv_lib_$ac_lib_var=no"
5245 fi
5246 rm -f conftest*
5247 LIBS="$ac_save_LIBS"
5248
5249 fi
5250 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5251   echo "$ac_t""yes" 1>&6
5252     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5253     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5254   cat >> confdefs.h <<EOF
5255 #define $ac_tr_lib 1
5256 EOF
5257
5258   LIBS="-lsocket $LIBS"
5259
5260 else
5261   echo "$ac_t""no" 1>&6
5262 fi
5263  ;;
5264     esac
5265     case "$LIBS" in
5266     *-linet*) ;;
5267     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
5268 echo "configure:5269: checking for connect in -linet" >&5
5269 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
5270 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5271   echo $ac_n "(cached) $ac_c" 1>&6
5272 else
5273   ac_save_LIBS="$LIBS"
5274 LIBS="-linet  $LIBS"
5275 cat > conftest.$ac_ext <<EOF
5276 #line 5277 "configure"
5277 #include "confdefs.h"
5278 /* Override any gcc2 internal prototype to avoid an error.  */
5279 /* We use char because int might match the return type of a gcc2
5280     builtin and then its argument prototype would still apply.  */
5281 char connect();
5282
5283 int main() {
5284 connect()
5285 ; return 0; }
5286 EOF
5287 if { (eval echo configure:5288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5288   rm -rf conftest*
5289   eval "ac_cv_lib_$ac_lib_var=yes"
5290 else
5291   echo "configure: failed program was:" >&5
5292   cat conftest.$ac_ext >&5
5293   rm -rf conftest*
5294   eval "ac_cv_lib_$ac_lib_var=no"
5295 fi
5296 rm -f conftest*
5297 LIBS="$ac_save_LIBS"
5298
5299 fi
5300 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5301   echo "$ac_t""yes" 1>&6
5302     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5303     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5304   cat >> confdefs.h <<EOF
5305 #define $ac_tr_lib 1
5306 EOF
5307
5308   LIBS="-linet $LIBS"
5309
5310 else
5311   echo "$ac_t""no" 1>&6
5312 fi
5313  ;;
5314     esac
5315             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
5316        test x"$ac_cv_lib_inet_connect" = x"yes"; then
5317         # ac_cv_func_connect=yes
5318         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
5319         cat >> confdefs.h <<\EOF
5320 #define HAVE_CONNECT 1
5321 EOF
5322
5323     fi
5324 fi
5325
5326 ###############################################
5327 # test for where we get get_yp_default_domain() from
5328 for ac_func in yp_get_default_domain
5329 do
5330 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5331 echo "configure:5332: checking for $ac_func" >&5
5332 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5333   echo $ac_n "(cached) $ac_c" 1>&6
5334 else
5335   cat > conftest.$ac_ext <<EOF
5336 #line 5337 "configure"
5337 #include "confdefs.h"
5338 /* System header to define __stub macros and hopefully few prototypes,
5339     which can conflict with char $ac_func(); below.  */
5340 #include <assert.h>
5341 /* Override any gcc2 internal prototype to avoid an error.  */
5342 /* We use char because int might match the return type of a gcc2
5343     builtin and then its argument prototype would still apply.  */
5344 char $ac_func();
5345
5346 int main() {
5347
5348 /* The GNU C library defines this for functions which it implements
5349     to always fail with ENOSYS.  Some functions are actually named
5350     something starting with __ and the normal name is an alias.  */
5351 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5352 choke me
5353 #else
5354 $ac_func();
5355 #endif
5356
5357 ; return 0; }
5358 EOF
5359 if { (eval echo configure:5360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5360   rm -rf conftest*
5361   eval "ac_cv_func_$ac_func=yes"
5362 else
5363   echo "configure: failed program was:" >&5
5364   cat conftest.$ac_ext >&5
5365   rm -rf conftest*
5366   eval "ac_cv_func_$ac_func=no"
5367 fi
5368 rm -f conftest*
5369 fi
5370
5371 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5372   echo "$ac_t""yes" 1>&6
5373     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5374   cat >> confdefs.h <<EOF
5375 #define $ac_tr_func 1
5376 EOF
5377  
5378 else
5379   echo "$ac_t""no" 1>&6
5380 fi
5381 done
5382
5383 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5384         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5385 echo "configure:5386: checking for yp_get_default_domain in -lnsl" >&5
5386 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5387 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5388   echo $ac_n "(cached) $ac_c" 1>&6
5389 else
5390   ac_save_LIBS="$LIBS"
5391 LIBS="-lnsl  $LIBS"
5392 cat > conftest.$ac_ext <<EOF
5393 #line 5394 "configure"
5394 #include "confdefs.h"
5395 /* Override any gcc2 internal prototype to avoid an error.  */
5396 /* We use char because int might match the return type of a gcc2
5397     builtin and then its argument prototype would still apply.  */
5398 char yp_get_default_domain();
5399
5400 int main() {
5401 yp_get_default_domain()
5402 ; return 0; }
5403 EOF
5404 if { (eval echo configure:5405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5405   rm -rf conftest*
5406   eval "ac_cv_lib_$ac_lib_var=yes"
5407 else
5408   echo "configure: failed program was:" >&5
5409   cat conftest.$ac_ext >&5
5410   rm -rf conftest*
5411   eval "ac_cv_lib_$ac_lib_var=no"
5412 fi
5413 rm -f conftest*
5414 LIBS="$ac_save_LIBS"
5415
5416 fi
5417 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5418   echo "$ac_t""yes" 1>&6
5419   LIBS="$LIBS -lnsl";
5420         cat >> confdefs.h <<\EOF
5421 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5422 EOF
5423
5424 else
5425   echo "$ac_t""no" 1>&6
5426 fi
5427  
5428 fi
5429
5430 # Check if we have execl, if not we need to compile smbrun.
5431 for ac_func in execl
5432 do
5433 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5434 echo "configure:5435: checking for $ac_func" >&5
5435 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5436   echo $ac_n "(cached) $ac_c" 1>&6
5437 else
5438   cat > conftest.$ac_ext <<EOF
5439 #line 5440 "configure"
5440 #include "confdefs.h"
5441 /* System header to define __stub macros and hopefully few prototypes,
5442     which can conflict with char $ac_func(); below.  */
5443 #include <assert.h>
5444 /* Override any gcc2 internal prototype to avoid an error.  */
5445 /* We use char because int might match the return type of a gcc2
5446     builtin and then its argument prototype would still apply.  */
5447 char $ac_func();
5448
5449 int main() {
5450
5451 /* The GNU C library defines this for functions which it implements
5452     to always fail with ENOSYS.  Some functions are actually named
5453     something starting with __ and the normal name is an alias.  */
5454 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5455 choke me
5456 #else
5457 $ac_func();
5458 #endif
5459
5460 ; return 0; }
5461 EOF
5462 if { (eval echo configure:5463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5463   rm -rf conftest*
5464   eval "ac_cv_func_$ac_func=yes"
5465 else
5466   echo "configure: failed program was:" >&5
5467   cat conftest.$ac_ext >&5
5468   rm -rf conftest*
5469   eval "ac_cv_func_$ac_func=no"
5470 fi
5471 rm -f conftest*
5472 fi
5473
5474 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5475   echo "$ac_t""yes" 1>&6
5476     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5477   cat >> confdefs.h <<EOF
5478 #define $ac_tr_func 1
5479 EOF
5480  
5481 else
5482   echo "$ac_t""no" 1>&6
5483 fi
5484 done
5485
5486 if test x"$ac_cv_func_execl" = x"no"; then
5487     RUNPROG="bin/smbrun"
5488 else
5489     RUNPROG=""
5490 fi
5491
5492 for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64
5493 do
5494 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5495 echo "configure:5496: checking for $ac_func" >&5
5496 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5497   echo $ac_n "(cached) $ac_c" 1>&6
5498 else
5499   cat > conftest.$ac_ext <<EOF
5500 #line 5501 "configure"
5501 #include "confdefs.h"
5502 /* System header to define __stub macros and hopefully few prototypes,
5503     which can conflict with char $ac_func(); below.  */
5504 #include <assert.h>
5505 /* Override any gcc2 internal prototype to avoid an error.  */
5506 /* We use char because int might match the return type of a gcc2
5507     builtin and then its argument prototype would still apply.  */
5508 char $ac_func();
5509
5510 int main() {
5511
5512 /* The GNU C library defines this for functions which it implements
5513     to always fail with ENOSYS.  Some functions are actually named
5514     something starting with __ and the normal name is an alias.  */
5515 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5516 choke me
5517 #else
5518 $ac_func();
5519 #endif
5520
5521 ; return 0; }
5522 EOF
5523 if { (eval echo configure:5524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5524   rm -rf conftest*
5525   eval "ac_cv_func_$ac_func=yes"
5526 else
5527   echo "configure: failed program was:" >&5
5528   cat conftest.$ac_ext >&5
5529   rm -rf conftest*
5530   eval "ac_cv_func_$ac_func=no"
5531 fi
5532 rm -f conftest*
5533 fi
5534
5535 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5536   echo "$ac_t""yes" 1>&6
5537     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5538   cat >> confdefs.h <<EOF
5539 #define $ac_tr_func 1
5540 EOF
5541  
5542 else
5543   echo "$ac_t""no" 1>&6
5544 fi
5545 done
5546
5547 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid
5548 do
5549 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5550 echo "configure:5551: checking for $ac_func" >&5
5551 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5552   echo $ac_n "(cached) $ac_c" 1>&6
5553 else
5554   cat > conftest.$ac_ext <<EOF
5555 #line 5556 "configure"
5556 #include "confdefs.h"
5557 /* System header to define __stub macros and hopefully few prototypes,
5558     which can conflict with char $ac_func(); below.  */
5559 #include <assert.h>
5560 /* Override any gcc2 internal prototype to avoid an error.  */
5561 /* We use char because int might match the return type of a gcc2
5562     builtin and then its argument prototype would still apply.  */
5563 char $ac_func();
5564
5565 int main() {
5566
5567 /* The GNU C library defines this for functions which it implements
5568     to always fail with ENOSYS.  Some functions are actually named
5569     something starting with __ and the normal name is an alias.  */
5570 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5571 choke me
5572 #else
5573 $ac_func();
5574 #endif
5575
5576 ; return 0; }
5577 EOF
5578 if { (eval echo configure:5579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5579   rm -rf conftest*
5580   eval "ac_cv_func_$ac_func=yes"
5581 else
5582   echo "configure: failed program was:" >&5
5583   cat conftest.$ac_ext >&5
5584   rm -rf conftest*
5585   eval "ac_cv_func_$ac_func=no"
5586 fi
5587 rm -f conftest*
5588 fi
5589
5590 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5591   echo "$ac_t""yes" 1>&6
5592     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5593   cat >> confdefs.h <<EOF
5594 #define $ac_tr_func 1
5595 EOF
5596  
5597 else
5598   echo "$ac_t""no" 1>&6
5599 fi
5600 done
5601
5602 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5603 do
5604 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5605 echo "configure:5606: checking for $ac_func" >&5
5606 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5607   echo $ac_n "(cached) $ac_c" 1>&6
5608 else
5609   cat > conftest.$ac_ext <<EOF
5610 #line 5611 "configure"
5611 #include "confdefs.h"
5612 /* System header to define __stub macros and hopefully few prototypes,
5613     which can conflict with char $ac_func(); below.  */
5614 #include <assert.h>
5615 /* Override any gcc2 internal prototype to avoid an error.  */
5616 /* We use char because int might match the return type of a gcc2
5617     builtin and then its argument prototype would still apply.  */
5618 char $ac_func();
5619
5620 int main() {
5621
5622 /* The GNU C library defines this for functions which it implements
5623     to always fail with ENOSYS.  Some functions are actually named
5624     something starting with __ and the normal name is an alias.  */
5625 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5626 choke me
5627 #else
5628 $ac_func();
5629 #endif
5630
5631 ; return 0; }
5632 EOF
5633 if { (eval echo configure:5634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5634   rm -rf conftest*
5635   eval "ac_cv_func_$ac_func=yes"
5636 else
5637   echo "configure: failed program was:" >&5
5638   cat conftest.$ac_ext >&5
5639   rm -rf conftest*
5640   eval "ac_cv_func_$ac_func=no"
5641 fi
5642 rm -f conftest*
5643 fi
5644
5645 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5646   echo "$ac_t""yes" 1>&6
5647     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5648   cat >> confdefs.h <<EOF
5649 #define $ac_tr_func 1
5650 EOF
5651  
5652 else
5653   echo "$ac_t""no" 1>&6
5654 fi
5655 done
5656
5657 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5658 do
5659 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5660 echo "configure:5661: checking for $ac_func" >&5
5661 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5662   echo $ac_n "(cached) $ac_c" 1>&6
5663 else
5664   cat > conftest.$ac_ext <<EOF
5665 #line 5666 "configure"
5666 #include "confdefs.h"
5667 /* System header to define __stub macros and hopefully few prototypes,
5668     which can conflict with char $ac_func(); below.  */
5669 #include <assert.h>
5670 /* Override any gcc2 internal prototype to avoid an error.  */
5671 /* We use char because int might match the return type of a gcc2
5672     builtin and then its argument prototype would still apply.  */
5673 char $ac_func();
5674
5675 int main() {
5676
5677 /* The GNU C library defines this for functions which it implements
5678     to always fail with ENOSYS.  Some functions are actually named
5679     something starting with __ and the normal name is an alias.  */
5680 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5681 choke me
5682 #else
5683 $ac_func();
5684 #endif
5685
5686 ; return 0; }
5687 EOF
5688 if { (eval echo configure:5689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5689   rm -rf conftest*
5690   eval "ac_cv_func_$ac_func=yes"
5691 else
5692   echo "configure: failed program was:" >&5
5693   cat conftest.$ac_ext >&5
5694   rm -rf conftest*
5695   eval "ac_cv_func_$ac_func=no"
5696 fi
5697 rm -f conftest*
5698 fi
5699
5700 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5701   echo "$ac_t""yes" 1>&6
5702     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5703   cat >> confdefs.h <<EOF
5704 #define $ac_tr_func 1
5705 EOF
5706  
5707 else
5708   echo "$ac_t""no" 1>&6
5709 fi
5710 done
5711
5712 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath
5713 do
5714 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5715 echo "configure:5716: checking for $ac_func" >&5
5716 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5717   echo $ac_n "(cached) $ac_c" 1>&6
5718 else
5719   cat > conftest.$ac_ext <<EOF
5720 #line 5721 "configure"
5721 #include "confdefs.h"
5722 /* System header to define __stub macros and hopefully few prototypes,
5723     which can conflict with char $ac_func(); below.  */
5724 #include <assert.h>
5725 /* Override any gcc2 internal prototype to avoid an error.  */
5726 /* We use char because int might match the return type of a gcc2
5727     builtin and then its argument prototype would still apply.  */
5728 char $ac_func();
5729
5730 int main() {
5731
5732 /* The GNU C library defines this for functions which it implements
5733     to always fail with ENOSYS.  Some functions are actually named
5734     something starting with __ and the normal name is an alias.  */
5735 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5736 choke me
5737 #else
5738 $ac_func();
5739 #endif
5740
5741 ; return 0; }
5742 EOF
5743 if { (eval echo configure:5744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5744   rm -rf conftest*
5745   eval "ac_cv_func_$ac_func=yes"
5746 else
5747   echo "configure: failed program was:" >&5
5748   cat conftest.$ac_ext >&5
5749   rm -rf conftest*
5750   eval "ac_cv_func_$ac_func=no"
5751 fi
5752 rm -f conftest*
5753 fi
5754
5755 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5756   echo "$ac_t""yes" 1>&6
5757     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5758   cat >> confdefs.h <<EOF
5759 #define $ac_tr_func 1
5760 EOF
5761  
5762 else
5763   echo "$ac_t""no" 1>&6
5764 fi
5765 done
5766
5767 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5768 do
5769 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5770 echo "configure:5771: checking for $ac_func" >&5
5771 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5772   echo $ac_n "(cached) $ac_c" 1>&6
5773 else
5774   cat > conftest.$ac_ext <<EOF
5775 #line 5776 "configure"
5776 #include "confdefs.h"
5777 /* System header to define __stub macros and hopefully few prototypes,
5778     which can conflict with char $ac_func(); below.  */
5779 #include <assert.h>
5780 /* Override any gcc2 internal prototype to avoid an error.  */
5781 /* We use char because int might match the return type of a gcc2
5782     builtin and then its argument prototype would still apply.  */
5783 char $ac_func();
5784
5785 int main() {
5786
5787 /* The GNU C library defines this for functions which it implements
5788     to always fail with ENOSYS.  Some functions are actually named
5789     something starting with __ and the normal name is an alias.  */
5790 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5791 choke me
5792 #else
5793 $ac_func();
5794 #endif
5795
5796 ; return 0; }
5797 EOF
5798 if { (eval echo configure:5799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5799   rm -rf conftest*
5800   eval "ac_cv_func_$ac_func=yes"
5801 else
5802   echo "configure: failed program was:" >&5
5803   cat conftest.$ac_ext >&5
5804   rm -rf conftest*
5805   eval "ac_cv_func_$ac_func=no"
5806 fi
5807 rm -f conftest*
5808 fi
5809
5810 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5811   echo "$ac_t""yes" 1>&6
5812     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5813   cat >> confdefs.h <<EOF
5814 #define $ac_tr_func 1
5815 EOF
5816  
5817 else
5818   echo "$ac_t""no" 1>&6
5819 fi
5820 done
5821
5822 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5823 do
5824 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5825 echo "configure:5826: checking for $ac_func" >&5
5826 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5827   echo $ac_n "(cached) $ac_c" 1>&6
5828 else
5829   cat > conftest.$ac_ext <<EOF
5830 #line 5831 "configure"
5831 #include "confdefs.h"
5832 /* System header to define __stub macros and hopefully few prototypes,
5833     which can conflict with char $ac_func(); below.  */
5834 #include <assert.h>
5835 /* Override any gcc2 internal prototype to avoid an error.  */
5836 /* We use char because int might match the return type of a gcc2
5837     builtin and then its argument prototype would still apply.  */
5838 char $ac_func();
5839
5840 int main() {
5841
5842 /* The GNU C library defines this for functions which it implements
5843     to always fail with ENOSYS.  Some functions are actually named
5844     something starting with __ and the normal name is an alias.  */
5845 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5846 choke me
5847 #else
5848 $ac_func();
5849 #endif
5850
5851 ; return 0; }
5852 EOF
5853 if { (eval echo configure:5854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5854   rm -rf conftest*
5855   eval "ac_cv_func_$ac_func=yes"
5856 else
5857   echo "configure: failed program was:" >&5
5858   cat conftest.$ac_ext >&5
5859   rm -rf conftest*
5860   eval "ac_cv_func_$ac_func=no"
5861 fi
5862 rm -f conftest*
5863 fi
5864
5865 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5866   echo "$ac_t""yes" 1>&6
5867     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5868   cat >> confdefs.h <<EOF
5869 #define $ac_tr_func 1
5870 EOF
5871  
5872 else
5873   echo "$ac_t""no" 1>&6
5874 fi
5875 done
5876
5877 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5878 do
5879 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5880 echo "configure:5881: checking for $ac_func" >&5
5881 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5882   echo $ac_n "(cached) $ac_c" 1>&6
5883 else
5884   cat > conftest.$ac_ext <<EOF
5885 #line 5886 "configure"
5886 #include "confdefs.h"
5887 /* System header to define __stub macros and hopefully few prototypes,
5888     which can conflict with char $ac_func(); below.  */
5889 #include <assert.h>
5890 /* Override any gcc2 internal prototype to avoid an error.  */
5891 /* We use char because int might match the return type of a gcc2
5892     builtin and then its argument prototype would still apply.  */
5893 char $ac_func();
5894
5895 int main() {
5896
5897 /* The GNU C library defines this for functions which it implements
5898     to always fail with ENOSYS.  Some functions are actually named
5899     something starting with __ and the normal name is an alias.  */
5900 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5901 choke me
5902 #else
5903 $ac_func();
5904 #endif
5905
5906 ; return 0; }
5907 EOF
5908 if { (eval echo configure:5909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5909   rm -rf conftest*
5910   eval "ac_cv_func_$ac_func=yes"
5911 else
5912   echo "configure: failed program was:" >&5
5913   cat conftest.$ac_ext >&5
5914   rm -rf conftest*
5915   eval "ac_cv_func_$ac_func=no"
5916 fi
5917 rm -f conftest*
5918 fi
5919
5920 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5921   echo "$ac_t""yes" 1>&6
5922     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5923   cat >> confdefs.h <<EOF
5924 #define $ac_tr_func 1
5925 EOF
5926  
5927 else
5928   echo "$ac_t""no" 1>&6
5929 fi
5930 done
5931
5932 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5933 do
5934 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5935 echo "configure:5936: checking for $ac_func" >&5
5936 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5937   echo $ac_n "(cached) $ac_c" 1>&6
5938 else
5939   cat > conftest.$ac_ext <<EOF
5940 #line 5941 "configure"
5941 #include "confdefs.h"
5942 /* System header to define __stub macros and hopefully few prototypes,
5943     which can conflict with char $ac_func(); below.  */
5944 #include <assert.h>
5945 /* Override any gcc2 internal prototype to avoid an error.  */
5946 /* We use char because int might match the return type of a gcc2
5947     builtin and then its argument prototype would still apply.  */
5948 char $ac_func();
5949
5950 int main() {
5951
5952 /* The GNU C library defines this for functions which it implements
5953     to always fail with ENOSYS.  Some functions are actually named
5954     something starting with __ and the normal name is an alias.  */
5955 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5956 choke me
5957 #else
5958 $ac_func();
5959 #endif
5960
5961 ; return 0; }
5962 EOF
5963 if { (eval echo configure:5964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5964   rm -rf conftest*
5965   eval "ac_cv_func_$ac_func=yes"
5966 else
5967   echo "configure: failed program was:" >&5
5968   cat conftest.$ac_ext >&5
5969   rm -rf conftest*
5970   eval "ac_cv_func_$ac_func=no"
5971 fi
5972 rm -f conftest*
5973 fi
5974
5975 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5976   echo "$ac_t""yes" 1>&6
5977     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5978   cat >> confdefs.h <<EOF
5979 #define $ac_tr_func 1
5980 EOF
5981  
5982 else
5983   echo "$ac_t""no" 1>&6
5984 fi
5985 done
5986
5987 for ac_func in syslog vsyslog
5988 do
5989 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5990 echo "configure:5991: checking for $ac_func" >&5
5991 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5992   echo $ac_n "(cached) $ac_c" 1>&6
5993 else
5994   cat > conftest.$ac_ext <<EOF
5995 #line 5996 "configure"
5996 #include "confdefs.h"
5997 /* System header to define __stub macros and hopefully few prototypes,
5998     which can conflict with char $ac_func(); below.  */
5999 #include <assert.h>
6000 /* Override any gcc2 internal prototype to avoid an error.  */
6001 /* We use char because int might match the return type of a gcc2
6002     builtin and then its argument prototype would still apply.  */
6003 char $ac_func();
6004
6005 int main() {
6006
6007 /* The GNU C library defines this for functions which it implements
6008     to always fail with ENOSYS.  Some functions are actually named
6009     something starting with __ and the normal name is an alias.  */
6010 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6011 choke me
6012 #else
6013 $ac_func();
6014 #endif
6015
6016 ; return 0; }
6017 EOF
6018 if { (eval echo configure:6019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6019   rm -rf conftest*
6020   eval "ac_cv_func_$ac_func=yes"
6021 else
6022   echo "configure: failed program was:" >&5
6023   cat conftest.$ac_ext >&5
6024   rm -rf conftest*
6025   eval "ac_cv_func_$ac_func=no"
6026 fi
6027 rm -f conftest*
6028 fi
6029
6030 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6031   echo "$ac_t""yes" 1>&6
6032     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6033   cat >> confdefs.h <<EOF
6034 #define $ac_tr_func 1
6035 EOF
6036  
6037 else
6038   echo "$ac_t""no" 1>&6
6039 fi
6040 done
6041
6042 # setbuffer is needed for smbtorture
6043 for ac_func in setbuffer
6044 do
6045 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6046 echo "configure:6047: checking for $ac_func" >&5
6047 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6048   echo $ac_n "(cached) $ac_c" 1>&6
6049 else
6050   cat > conftest.$ac_ext <<EOF
6051 #line 6052 "configure"
6052 #include "confdefs.h"
6053 /* System header to define __stub macros and hopefully few prototypes,
6054     which can conflict with char $ac_func(); below.  */
6055 #include <assert.h>
6056 /* Override any gcc2 internal prototype to avoid an error.  */
6057 /* We use char because int might match the return type of a gcc2
6058     builtin and then its argument prototype would still apply.  */
6059 char $ac_func();
6060
6061 int main() {
6062
6063 /* The GNU C library defines this for functions which it implements
6064     to always fail with ENOSYS.  Some functions are actually named
6065     something starting with __ and the normal name is an alias.  */
6066 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6067 choke me
6068 #else
6069 $ac_func();
6070 #endif
6071
6072 ; return 0; }
6073 EOF
6074 if { (eval echo configure:6075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6075   rm -rf conftest*
6076   eval "ac_cv_func_$ac_func=yes"
6077 else
6078   echo "configure: failed program was:" >&5
6079   cat conftest.$ac_ext >&5
6080   rm -rf conftest*
6081   eval "ac_cv_func_$ac_func=no"
6082 fi
6083 rm -f conftest*
6084 fi
6085
6086 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6087   echo "$ac_t""yes" 1>&6
6088     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6089   cat >> confdefs.h <<EOF
6090 #define $ac_tr_func 1
6091 EOF
6092  
6093 else
6094   echo "$ac_t""no" 1>&6
6095 fi
6096 done
6097
6098
6099 # syscall() is needed for smbwrapper.
6100 for ac_func in syscall
6101 do
6102 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6103 echo "configure:6104: checking for $ac_func" >&5
6104 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6105   echo $ac_n "(cached) $ac_c" 1>&6
6106 else
6107   cat > conftest.$ac_ext <<EOF
6108 #line 6109 "configure"
6109 #include "confdefs.h"
6110 /* System header to define __stub macros and hopefully few prototypes,
6111     which can conflict with char $ac_func(); below.  */
6112 #include <assert.h>
6113 /* Override any gcc2 internal prototype to avoid an error.  */
6114 /* We use char because int might match the return type of a gcc2
6115     builtin and then its argument prototype would still apply.  */
6116 char $ac_func();
6117
6118 int main() {
6119
6120 /* The GNU C library defines this for functions which it implements
6121     to always fail with ENOSYS.  Some functions are actually named
6122     something starting with __ and the normal name is an alias.  */
6123 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6124 choke me
6125 #else
6126 $ac_func();
6127 #endif
6128
6129 ; return 0; }
6130 EOF
6131 if { (eval echo configure:6132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6132   rm -rf conftest*
6133   eval "ac_cv_func_$ac_func=yes"
6134 else
6135   echo "configure: failed program was:" >&5
6136   cat conftest.$ac_ext >&5
6137   rm -rf conftest*
6138   eval "ac_cv_func_$ac_func=no"
6139 fi
6140 rm -f conftest*
6141 fi
6142
6143 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6144   echo "$ac_t""yes" 1>&6
6145     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6146   cat >> confdefs.h <<EOF
6147 #define $ac_tr_func 1
6148 EOF
6149  
6150 else
6151   echo "$ac_t""no" 1>&6
6152 fi
6153 done
6154
6155
6156 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
6157 do
6158 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6159 echo "configure:6160: checking for $ac_func" >&5
6160 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6161   echo $ac_n "(cached) $ac_c" 1>&6
6162 else
6163   cat > conftest.$ac_ext <<EOF
6164 #line 6165 "configure"
6165 #include "confdefs.h"
6166 /* System header to define __stub macros and hopefully few prototypes,
6167     which can conflict with char $ac_func(); below.  */
6168 #include <assert.h>
6169 /* Override any gcc2 internal prototype to avoid an error.  */
6170 /* We use char because int might match the return type of a gcc2
6171     builtin and then its argument prototype would still apply.  */
6172 char $ac_func();
6173
6174 int main() {
6175
6176 /* The GNU C library defines this for functions which it implements
6177     to always fail with ENOSYS.  Some functions are actually named
6178     something starting with __ and the normal name is an alias.  */
6179 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6180 choke me
6181 #else
6182 $ac_func();
6183 #endif
6184
6185 ; return 0; }
6186 EOF
6187 if { (eval echo configure:6188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6188   rm -rf conftest*
6189   eval "ac_cv_func_$ac_func=yes"
6190 else
6191   echo "configure: failed program was:" >&5
6192   cat conftest.$ac_ext >&5
6193   rm -rf conftest*
6194   eval "ac_cv_func_$ac_func=no"
6195 fi
6196 rm -f conftest*
6197 fi
6198
6199 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6200   echo "$ac_t""yes" 1>&6
6201     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6202   cat >> confdefs.h <<EOF
6203 #define $ac_tr_func 1
6204 EOF
6205  
6206 else
6207   echo "$ac_t""no" 1>&6
6208 fi
6209 done
6210
6211 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
6212 do
6213 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6214 echo "configure:6215: checking for $ac_func" >&5
6215 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6216   echo $ac_n "(cached) $ac_c" 1>&6
6217 else
6218   cat > conftest.$ac_ext <<EOF
6219 #line 6220 "configure"
6220 #include "confdefs.h"
6221 /* System header to define __stub macros and hopefully few prototypes,
6222     which can conflict with char $ac_func(); below.  */
6223 #include <assert.h>
6224 /* Override any gcc2 internal prototype to avoid an error.  */
6225 /* We use char because int might match the return type of a gcc2
6226     builtin and then its argument prototype would still apply.  */
6227 char $ac_func();
6228
6229 int main() {
6230
6231 /* The GNU C library defines this for functions which it implements
6232     to always fail with ENOSYS.  Some functions are actually named
6233     something starting with __ and the normal name is an alias.  */
6234 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6235 choke me
6236 #else
6237 $ac_func();
6238 #endif
6239
6240 ; return 0; }
6241 EOF
6242 if { (eval echo configure:6243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6243   rm -rf conftest*
6244   eval "ac_cv_func_$ac_func=yes"
6245 else
6246   echo "configure: failed program was:" >&5
6247   cat conftest.$ac_ext >&5
6248   rm -rf conftest*
6249   eval "ac_cv_func_$ac_func=no"
6250 fi
6251 rm -f conftest*
6252 fi
6253
6254 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6255   echo "$ac_t""yes" 1>&6
6256     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6257   cat >> confdefs.h <<EOF
6258 #define $ac_tr_func 1
6259 EOF
6260  
6261 else
6262   echo "$ac_t""no" 1>&6
6263 fi
6264 done
6265
6266 for ac_func in __getcwd _getcwd
6267 do
6268 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6269 echo "configure:6270: checking for $ac_func" >&5
6270 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6271   echo $ac_n "(cached) $ac_c" 1>&6
6272 else
6273   cat > conftest.$ac_ext <<EOF
6274 #line 6275 "configure"
6275 #include "confdefs.h"
6276 /* System header to define __stub macros and hopefully few prototypes,
6277     which can conflict with char $ac_func(); below.  */
6278 #include <assert.h>
6279 /* Override any gcc2 internal prototype to avoid an error.  */
6280 /* We use char because int might match the return type of a gcc2
6281     builtin and then its argument prototype would still apply.  */
6282 char $ac_func();
6283
6284 int main() {
6285
6286 /* The GNU C library defines this for functions which it implements
6287     to always fail with ENOSYS.  Some functions are actually named
6288     something starting with __ and the normal name is an alias.  */
6289 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6290 choke me
6291 #else
6292 $ac_func();
6293 #endif
6294
6295 ; return 0; }
6296 EOF
6297 if { (eval echo configure:6298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6298   rm -rf conftest*
6299   eval "ac_cv_func_$ac_func=yes"
6300 else
6301   echo "configure: failed program was:" >&5
6302   cat conftest.$ac_ext >&5
6303   rm -rf conftest*
6304   eval "ac_cv_func_$ac_func=no"
6305 fi
6306 rm -f conftest*
6307 fi
6308
6309 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6310   echo "$ac_t""yes" 1>&6
6311     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6312   cat >> confdefs.h <<EOF
6313 #define $ac_tr_func 1
6314 EOF
6315  
6316 else
6317   echo "$ac_t""no" 1>&6
6318 fi
6319 done
6320
6321 for ac_func in __xstat __fxstat __lxstat
6322 do
6323 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6324 echo "configure:6325: checking for $ac_func" >&5
6325 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6326   echo $ac_n "(cached) $ac_c" 1>&6
6327 else
6328   cat > conftest.$ac_ext <<EOF
6329 #line 6330 "configure"
6330 #include "confdefs.h"
6331 /* System header to define __stub macros and hopefully few prototypes,
6332     which can conflict with char $ac_func(); below.  */
6333 #include <assert.h>
6334 /* Override any gcc2 internal prototype to avoid an error.  */
6335 /* We use char because int might match the return type of a gcc2
6336     builtin and then its argument prototype would still apply.  */
6337 char $ac_func();
6338
6339 int main() {
6340
6341 /* The GNU C library defines this for functions which it implements
6342     to always fail with ENOSYS.  Some functions are actually named
6343     something starting with __ and the normal name is an alias.  */
6344 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6345 choke me
6346 #else
6347 $ac_func();
6348 #endif
6349
6350 ; return 0; }
6351 EOF
6352 if { (eval echo configure:6353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6353   rm -rf conftest*
6354   eval "ac_cv_func_$ac_func=yes"
6355 else
6356   echo "configure: failed program was:" >&5
6357   cat conftest.$ac_ext >&5
6358   rm -rf conftest*
6359   eval "ac_cv_func_$ac_func=no"
6360 fi
6361 rm -f conftest*
6362 fi
6363
6364 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6365   echo "$ac_t""yes" 1>&6
6366     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6367   cat >> confdefs.h <<EOF
6368 #define $ac_tr_func 1
6369 EOF
6370  
6371 else
6372   echo "$ac_t""no" 1>&6
6373 fi
6374 done
6375
6376 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6377 do
6378 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6379 echo "configure:6380: checking for $ac_func" >&5
6380 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6381   echo $ac_n "(cached) $ac_c" 1>&6
6382 else
6383   cat > conftest.$ac_ext <<EOF
6384 #line 6385 "configure"
6385 #include "confdefs.h"
6386 /* System header to define __stub macros and hopefully few prototypes,
6387     which can conflict with char $ac_func(); below.  */
6388 #include <assert.h>
6389 /* Override any gcc2 internal prototype to avoid an error.  */
6390 /* We use char because int might match the return type of a gcc2
6391     builtin and then its argument prototype would still apply.  */
6392 char $ac_func();
6393
6394 int main() {
6395
6396 /* The GNU C library defines this for functions which it implements
6397     to always fail with ENOSYS.  Some functions are actually named
6398     something starting with __ and the normal name is an alias.  */
6399 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6400 choke me
6401 #else
6402 $ac_func();
6403 #endif
6404
6405 ; return 0; }
6406 EOF
6407 if { (eval echo configure:6408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6408   rm -rf conftest*
6409   eval "ac_cv_func_$ac_func=yes"
6410 else
6411   echo "configure: failed program was:" >&5
6412   cat conftest.$ac_ext >&5
6413   rm -rf conftest*
6414   eval "ac_cv_func_$ac_func=no"
6415 fi
6416 rm -f conftest*
6417 fi
6418
6419 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6420   echo "$ac_t""yes" 1>&6
6421     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6422   cat >> confdefs.h <<EOF
6423 #define $ac_tr_func 1
6424 EOF
6425  
6426 else
6427   echo "$ac_t""no" 1>&6
6428 fi
6429 done
6430
6431 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6432 do
6433 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6434 echo "configure:6435: checking for $ac_func" >&5
6435 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6436   echo $ac_n "(cached) $ac_c" 1>&6
6437 else
6438   cat > conftest.$ac_ext <<EOF
6439 #line 6440 "configure"
6440 #include "confdefs.h"
6441 /* System header to define __stub macros and hopefully few prototypes,
6442     which can conflict with char $ac_func(); below.  */
6443 #include <assert.h>
6444 /* Override any gcc2 internal prototype to avoid an error.  */
6445 /* We use char because int might match the return type of a gcc2
6446     builtin and then its argument prototype would still apply.  */
6447 char $ac_func();
6448
6449 int main() {
6450
6451 /* The GNU C library defines this for functions which it implements
6452     to always fail with ENOSYS.  Some functions are actually named
6453     something starting with __ and the normal name is an alias.  */
6454 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6455 choke me
6456 #else
6457 $ac_func();
6458 #endif
6459
6460 ; return 0; }
6461 EOF
6462 if { (eval echo configure:6463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6463   rm -rf conftest*
6464   eval "ac_cv_func_$ac_func=yes"
6465 else
6466   echo "configure: failed program was:" >&5
6467   cat conftest.$ac_ext >&5
6468   rm -rf conftest*
6469   eval "ac_cv_func_$ac_func=no"
6470 fi
6471 rm -f conftest*
6472 fi
6473
6474 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6475   echo "$ac_t""yes" 1>&6
6476     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6477   cat >> confdefs.h <<EOF
6478 #define $ac_tr_func 1
6479 EOF
6480  
6481 else
6482   echo "$ac_t""no" 1>&6
6483 fi
6484 done
6485
6486 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6487 do
6488 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6489 echo "configure:6490: checking for $ac_func" >&5
6490 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6491   echo $ac_n "(cached) $ac_c" 1>&6
6492 else
6493   cat > conftest.$ac_ext <<EOF
6494 #line 6495 "configure"
6495 #include "confdefs.h"
6496 /* System header to define __stub macros and hopefully few prototypes,
6497     which can conflict with char $ac_func(); below.  */
6498 #include <assert.h>
6499 /* Override any gcc2 internal prototype to avoid an error.  */
6500 /* We use char because int might match the return type of a gcc2
6501     builtin and then its argument prototype would still apply.  */
6502 char $ac_func();
6503
6504 int main() {
6505
6506 /* The GNU C library defines this for functions which it implements
6507     to always fail with ENOSYS.  Some functions are actually named
6508     something starting with __ and the normal name is an alias.  */
6509 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6510 choke me
6511 #else
6512 $ac_func();
6513 #endif
6514
6515 ; return 0; }
6516 EOF
6517 if { (eval echo configure:6518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6518   rm -rf conftest*
6519   eval "ac_cv_func_$ac_func=yes"
6520 else
6521   echo "configure: failed program was:" >&5
6522   cat conftest.$ac_ext >&5
6523   rm -rf conftest*
6524   eval "ac_cv_func_$ac_func=no"
6525 fi
6526 rm -f conftest*
6527 fi
6528
6529 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6530   echo "$ac_t""yes" 1>&6
6531     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6532   cat >> confdefs.h <<EOF
6533 #define $ac_tr_func 1
6534 EOF
6535  
6536 else
6537   echo "$ac_t""no" 1>&6
6538 fi
6539 done
6540
6541 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6542 do
6543 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6544 echo "configure:6545: checking for $ac_func" >&5
6545 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6546   echo $ac_n "(cached) $ac_c" 1>&6
6547 else
6548   cat > conftest.$ac_ext <<EOF
6549 #line 6550 "configure"
6550 #include "confdefs.h"
6551 /* System header to define __stub macros and hopefully few prototypes,
6552     which can conflict with char $ac_func(); below.  */
6553 #include <assert.h>
6554 /* Override any gcc2 internal prototype to avoid an error.  */
6555 /* We use char because int might match the return type of a gcc2
6556     builtin and then its argument prototype would still apply.  */
6557 char $ac_func();
6558
6559 int main() {
6560
6561 /* The GNU C library defines this for functions which it implements
6562     to always fail with ENOSYS.  Some functions are actually named
6563     something starting with __ and the normal name is an alias.  */
6564 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6565 choke me
6566 #else
6567 $ac_func();
6568 #endif
6569
6570 ; return 0; }
6571 EOF
6572 if { (eval echo configure:6573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6573   rm -rf conftest*
6574   eval "ac_cv_func_$ac_func=yes"
6575 else
6576   echo "configure: failed program was:" >&5
6577   cat conftest.$ac_ext >&5
6578   rm -rf conftest*
6579   eval "ac_cv_func_$ac_func=no"
6580 fi
6581 rm -f conftest*
6582 fi
6583
6584 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6585   echo "$ac_t""yes" 1>&6
6586     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6587   cat >> confdefs.h <<EOF
6588 #define $ac_tr_func 1
6589 EOF
6590  
6591 else
6592   echo "$ac_t""no" 1>&6
6593 fi
6594 done
6595
6596 for ac_func in _write __write _fork __fork
6597 do
6598 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6599 echo "configure:6600: checking for $ac_func" >&5
6600 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6601   echo $ac_n "(cached) $ac_c" 1>&6
6602 else
6603   cat > conftest.$ac_ext <<EOF
6604 #line 6605 "configure"
6605 #include "confdefs.h"
6606 /* System header to define __stub macros and hopefully few prototypes,
6607     which can conflict with char $ac_func(); below.  */
6608 #include <assert.h>
6609 /* Override any gcc2 internal prototype to avoid an error.  */
6610 /* We use char because int might match the return type of a gcc2
6611     builtin and then its argument prototype would still apply.  */
6612 char $ac_func();
6613
6614 int main() {
6615
6616 /* The GNU C library defines this for functions which it implements
6617     to always fail with ENOSYS.  Some functions are actually named
6618     something starting with __ and the normal name is an alias.  */
6619 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6620 choke me
6621 #else
6622 $ac_func();
6623 #endif
6624
6625 ; return 0; }
6626 EOF
6627 if { (eval echo configure:6628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6628   rm -rf conftest*
6629   eval "ac_cv_func_$ac_func=yes"
6630 else
6631   echo "configure: failed program was:" >&5
6632   cat conftest.$ac_ext >&5
6633   rm -rf conftest*
6634   eval "ac_cv_func_$ac_func=no"
6635 fi
6636 rm -f conftest*
6637 fi
6638
6639 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6640   echo "$ac_t""yes" 1>&6
6641     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6642   cat >> confdefs.h <<EOF
6643 #define $ac_tr_func 1
6644 EOF
6645  
6646 else
6647   echo "$ac_t""no" 1>&6
6648 fi
6649 done
6650
6651 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6652 do
6653 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6654 echo "configure:6655: checking for $ac_func" >&5
6655 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6656   echo $ac_n "(cached) $ac_c" 1>&6
6657 else
6658   cat > conftest.$ac_ext <<EOF
6659 #line 6660 "configure"
6660 #include "confdefs.h"
6661 /* System header to define __stub macros and hopefully few prototypes,
6662     which can conflict with char $ac_func(); below.  */
6663 #include <assert.h>
6664 /* Override any gcc2 internal prototype to avoid an error.  */
6665 /* We use char because int might match the return type of a gcc2
6666     builtin and then its argument prototype would still apply.  */
6667 char $ac_func();
6668
6669 int main() {
6670
6671 /* The GNU C library defines this for functions which it implements
6672     to always fail with ENOSYS.  Some functions are actually named
6673     something starting with __ and the normal name is an alias.  */
6674 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6675 choke me
6676 #else
6677 $ac_func();
6678 #endif
6679
6680 ; return 0; }
6681 EOF
6682 if { (eval echo configure:6683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6683   rm -rf conftest*
6684   eval "ac_cv_func_$ac_func=yes"
6685 else
6686   echo "configure: failed program was:" >&5
6687   cat conftest.$ac_ext >&5
6688   rm -rf conftest*
6689   eval "ac_cv_func_$ac_func=no"
6690 fi
6691 rm -f conftest*
6692 fi
6693
6694 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6695   echo "$ac_t""yes" 1>&6
6696     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6697   cat >> confdefs.h <<EOF
6698 #define $ac_tr_func 1
6699 EOF
6700  
6701 else
6702   echo "$ac_t""no" 1>&6
6703 fi
6704 done
6705
6706 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6707 do
6708 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6709 echo "configure:6710: checking for $ac_func" >&5
6710 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6711   echo $ac_n "(cached) $ac_c" 1>&6
6712 else
6713   cat > conftest.$ac_ext <<EOF
6714 #line 6715 "configure"
6715 #include "confdefs.h"
6716 /* System header to define __stub macros and hopefully few prototypes,
6717     which can conflict with char $ac_func(); below.  */
6718 #include <assert.h>
6719 /* Override any gcc2 internal prototype to avoid an error.  */
6720 /* We use char because int might match the return type of a gcc2
6721     builtin and then its argument prototype would still apply.  */
6722 char $ac_func();
6723
6724 int main() {
6725
6726 /* The GNU C library defines this for functions which it implements
6727     to always fail with ENOSYS.  Some functions are actually named
6728     something starting with __ and the normal name is an alias.  */
6729 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6730 choke me
6731 #else
6732 $ac_func();
6733 #endif
6734
6735 ; return 0; }
6736 EOF
6737 if { (eval echo configure:6738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6738   rm -rf conftest*
6739   eval "ac_cv_func_$ac_func=yes"
6740 else
6741   echo "configure: failed program was:" >&5
6742   cat conftest.$ac_ext >&5
6743   rm -rf conftest*
6744   eval "ac_cv_func_$ac_func=no"
6745 fi
6746 rm -f conftest*
6747 fi
6748
6749 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6750   echo "$ac_t""yes" 1>&6
6751     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6752   cat >> confdefs.h <<EOF
6753 #define $ac_tr_func 1
6754 EOF
6755  
6756 else
6757   echo "$ac_t""no" 1>&6
6758 fi
6759 done
6760
6761 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6762 do
6763 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6764 echo "configure:6765: checking for $ac_func" >&5
6765 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6766   echo $ac_n "(cached) $ac_c" 1>&6
6767 else
6768   cat > conftest.$ac_ext <<EOF
6769 #line 6770 "configure"
6770 #include "confdefs.h"
6771 /* System header to define __stub macros and hopefully few prototypes,
6772     which can conflict with char $ac_func(); below.  */
6773 #include <assert.h>
6774 /* Override any gcc2 internal prototype to avoid an error.  */
6775 /* We use char because int might match the return type of a gcc2
6776     builtin and then its argument prototype would still apply.  */
6777 char $ac_func();
6778
6779 int main() {
6780
6781 /* The GNU C library defines this for functions which it implements
6782     to always fail with ENOSYS.  Some functions are actually named
6783     something starting with __ and the normal name is an alias.  */
6784 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6785 choke me
6786 #else
6787 $ac_func();
6788 #endif
6789
6790 ; return 0; }
6791 EOF
6792 if { (eval echo configure:6793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6793   rm -rf conftest*
6794   eval "ac_cv_func_$ac_func=yes"
6795 else
6796   echo "configure: failed program was:" >&5
6797   cat conftest.$ac_ext >&5
6798   rm -rf conftest*
6799   eval "ac_cv_func_$ac_func=no"
6800 fi
6801 rm -f conftest*
6802 fi
6803
6804 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6805   echo "$ac_t""yes" 1>&6
6806     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6807   cat >> confdefs.h <<EOF
6808 #define $ac_tr_func 1
6809 EOF
6810  
6811 else
6812   echo "$ac_t""no" 1>&6
6813 fi
6814 done
6815
6816 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6817 do
6818 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6819 echo "configure:6820: checking for $ac_func" >&5
6820 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6821   echo $ac_n "(cached) $ac_c" 1>&6
6822 else
6823   cat > conftest.$ac_ext <<EOF
6824 #line 6825 "configure"
6825 #include "confdefs.h"
6826 /* System header to define __stub macros and hopefully few prototypes,
6827     which can conflict with char $ac_func(); below.  */
6828 #include <assert.h>
6829 /* Override any gcc2 internal prototype to avoid an error.  */
6830 /* We use char because int might match the return type of a gcc2
6831     builtin and then its argument prototype would still apply.  */
6832 char $ac_func();
6833
6834 int main() {
6835
6836 /* The GNU C library defines this for functions which it implements
6837     to always fail with ENOSYS.  Some functions are actually named
6838     something starting with __ and the normal name is an alias.  */
6839 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6840 choke me
6841 #else
6842 $ac_func();
6843 #endif
6844
6845 ; return 0; }
6846 EOF
6847 if { (eval echo configure:6848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6848   rm -rf conftest*
6849   eval "ac_cv_func_$ac_func=yes"
6850 else
6851   echo "configure: failed program was:" >&5
6852   cat conftest.$ac_ext >&5
6853   rm -rf conftest*
6854   eval "ac_cv_func_$ac_func=no"
6855 fi
6856 rm -f conftest*
6857 fi
6858
6859 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6860   echo "$ac_t""yes" 1>&6
6861     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6862   cat >> confdefs.h <<EOF
6863 #define $ac_tr_func 1
6864 EOF
6865  
6866 else
6867   echo "$ac_t""no" 1>&6
6868 fi
6869 done
6870
6871 for ac_func in open64 _open64 __open64 creat64
6872 do
6873 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6874 echo "configure:6875: checking for $ac_func" >&5
6875 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6876   echo $ac_n "(cached) $ac_c" 1>&6
6877 else
6878   cat > conftest.$ac_ext <<EOF
6879 #line 6880 "configure"
6880 #include "confdefs.h"
6881 /* System header to define __stub macros and hopefully few prototypes,
6882     which can conflict with char $ac_func(); below.  */
6883 #include <assert.h>
6884 /* Override any gcc2 internal prototype to avoid an error.  */
6885 /* We use char because int might match the return type of a gcc2
6886     builtin and then its argument prototype would still apply.  */
6887 char $ac_func();
6888
6889 int main() {
6890
6891 /* The GNU C library defines this for functions which it implements
6892     to always fail with ENOSYS.  Some functions are actually named
6893     something starting with __ and the normal name is an alias.  */
6894 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6895 choke me
6896 #else
6897 $ac_func();
6898 #endif
6899
6900 ; return 0; }
6901 EOF
6902 if { (eval echo configure:6903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6903   rm -rf conftest*
6904   eval "ac_cv_func_$ac_func=yes"
6905 else
6906   echo "configure: failed program was:" >&5
6907   cat conftest.$ac_ext >&5
6908   rm -rf conftest*
6909   eval "ac_cv_func_$ac_func=no"
6910 fi
6911 rm -f conftest*
6912 fi
6913
6914 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6915   echo "$ac_t""yes" 1>&6
6916     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6917   cat >> confdefs.h <<EOF
6918 #define $ac_tr_func 1
6919 EOF
6920  
6921 else
6922   echo "$ac_t""no" 1>&6
6923 fi
6924 done
6925
6926
6927 #
6928 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6929 #
6930
6931 if test x$ac_cv_func_stat64 = xno ; then
6932   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6933 echo "configure:6934: checking for stat64 in <sys/stat.h>" >&5
6934   cat > conftest.$ac_ext <<EOF
6935 #line 6936 "configure"
6936 #include "confdefs.h"
6937
6938 #if defined(HAVE_UNISTD_H)
6939 #include <unistd.h>
6940 #endif
6941 #include <sys/stat.h>
6942
6943 int main() {
6944 struct stat64 st64; exit(stat64(".",&st64));
6945 ; return 0; }
6946 EOF
6947 if { (eval echo configure:6948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6948   rm -rf conftest*
6949   ac_cv_func_stat64=yes
6950 else
6951   echo "configure: failed program was:" >&5
6952   cat conftest.$ac_ext >&5
6953 fi
6954 rm -f conftest*
6955   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6956   if test x$ac_cv_func_stat64 = xyes ; then
6957     cat >> confdefs.h <<\EOF
6958 #define HAVE_STAT64 1
6959 EOF
6960
6961   fi
6962 fi
6963
6964 if test x$ac_cv_func_lstat64 = xno ; then
6965   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6966 echo "configure:6967: checking for lstat64 in <sys/stat.h>" >&5
6967   cat > conftest.$ac_ext <<EOF
6968 #line 6969 "configure"
6969 #include "confdefs.h"
6970
6971 #if defined(HAVE_UNISTD_H)
6972 #include <unistd.h>
6973 #endif
6974 #include <sys/stat.h>
6975
6976 int main() {
6977 struct stat64 st64; exit(lstat64(".",&st64));
6978 ; return 0; }
6979 EOF
6980 if { (eval echo configure:6981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6981   rm -rf conftest*
6982   ac_cv_func_lstat64=yes
6983 else
6984   echo "configure: failed program was:" >&5
6985   cat conftest.$ac_ext >&5
6986 fi
6987 rm -f conftest*
6988   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6989   if test x$ac_cv_func_lstat64 = xyes ; then
6990     cat >> confdefs.h <<\EOF
6991 #define HAVE_LSTAT64 1
6992 EOF
6993
6994   fi
6995 fi
6996
6997 if test x$ac_cv_func_fstat64 = xno ; then
6998   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6999 echo "configure:7000: checking for fstat64 in <sys/stat.h>" >&5
7000   cat > conftest.$ac_ext <<EOF
7001 #line 7002 "configure"
7002 #include "confdefs.h"
7003
7004 #if defined(HAVE_UNISTD_H)
7005 #include <unistd.h>
7006 #endif
7007 #include <sys/stat.h>
7008
7009 int main() {
7010 struct stat64 st64; exit(fstat64(0,&st64));
7011 ; return 0; }
7012 EOF
7013 if { (eval echo configure:7014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7014   rm -rf conftest*
7015   ac_cv_func_fstat64=yes
7016 else
7017   echo "configure: failed program was:" >&5
7018   cat conftest.$ac_ext >&5
7019 fi
7020 rm -f conftest*
7021   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
7022   if test x$ac_cv_func_fstat64 = xyes ; then
7023     cat >> confdefs.h <<\EOF
7024 #define HAVE_FSTAT64 1
7025 EOF
7026
7027   fi
7028 fi
7029
7030 #####################################
7031 # we might need the resolv library on some systems
7032 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
7033 echo "configure:7034: checking for dn_expand in -lresolv" >&5
7034 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
7035 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7036   echo $ac_n "(cached) $ac_c" 1>&6
7037 else
7038   ac_save_LIBS="$LIBS"
7039 LIBS="-lresolv  $LIBS"
7040 cat > conftest.$ac_ext <<EOF
7041 #line 7042 "configure"
7042 #include "confdefs.h"
7043 /* Override any gcc2 internal prototype to avoid an error.  */
7044 /* We use char because int might match the return type of a gcc2
7045     builtin and then its argument prototype would still apply.  */
7046 char dn_expand();
7047
7048 int main() {
7049 dn_expand()
7050 ; return 0; }
7051 EOF
7052 if { (eval echo configure:7053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7053   rm -rf conftest*
7054   eval "ac_cv_lib_$ac_lib_var=yes"
7055 else
7056   echo "configure: failed program was:" >&5
7057   cat conftest.$ac_ext >&5
7058   rm -rf conftest*
7059   eval "ac_cv_lib_$ac_lib_var=no"
7060 fi
7061 rm -f conftest*
7062 LIBS="$ac_save_LIBS"
7063
7064 fi
7065 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7066   echo "$ac_t""yes" 1>&6
7067     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7068     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7069   cat >> confdefs.h <<EOF
7070 #define $ac_tr_lib 1
7071 EOF
7072
7073   LIBS="-lresolv $LIBS"
7074
7075 else
7076   echo "$ac_t""no" 1>&6
7077 fi
7078
7079
7080 #
7081 # Check for the functions putprpwnam, set_auth_parameters,
7082 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
7083 # Needed for OSF1 and HPUX.
7084 #
7085
7086 case "$LIBS" in
7087   *-lsecurity*) for ac_func in putprpwnam
7088 do
7089 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7090 echo "configure:7091: checking for $ac_func" >&5
7091 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7092   echo $ac_n "(cached) $ac_c" 1>&6
7093 else
7094   cat > conftest.$ac_ext <<EOF
7095 #line 7096 "configure"
7096 #include "confdefs.h"
7097 /* System header to define __stub macros and hopefully few prototypes,
7098     which can conflict with char $ac_func(); below.  */
7099 #include <assert.h>
7100 /* Override any gcc2 internal prototype to avoid an error.  */
7101 /* We use char because int might match the return type of a gcc2
7102     builtin and then its argument prototype would still apply.  */
7103 char $ac_func();
7104
7105 int main() {
7106
7107 /* The GNU C library defines this for functions which it implements
7108     to always fail with ENOSYS.  Some functions are actually named
7109     something starting with __ and the normal name is an alias.  */
7110 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7111 choke me
7112 #else
7113 $ac_func();
7114 #endif
7115
7116 ; return 0; }
7117 EOF
7118 if { (eval echo configure:7119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7119   rm -rf conftest*
7120   eval "ac_cv_func_$ac_func=yes"
7121 else
7122   echo "configure: failed program was:" >&5
7123   cat conftest.$ac_ext >&5
7124   rm -rf conftest*
7125   eval "ac_cv_func_$ac_func=no"
7126 fi
7127 rm -f conftest*
7128 fi
7129
7130 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7131   echo "$ac_t""yes" 1>&6
7132     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7133   cat >> confdefs.h <<EOF
7134 #define $ac_tr_func 1
7135 EOF
7136  
7137 else
7138   echo "$ac_t""no" 1>&6
7139 fi
7140 done
7141  ;;
7142   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
7143 echo "configure:7144: checking for putprpwnam in -lsecurity" >&5
7144 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
7145 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7146   echo $ac_n "(cached) $ac_c" 1>&6
7147 else
7148   ac_save_LIBS="$LIBS"
7149 LIBS="-lsecurity  $LIBS"
7150 cat > conftest.$ac_ext <<EOF
7151 #line 7152 "configure"
7152 #include "confdefs.h"
7153 /* Override any gcc2 internal prototype to avoid an error.  */
7154 /* We use char because int might match the return type of a gcc2
7155     builtin and then its argument prototype would still apply.  */
7156 char putprpwnam();
7157
7158 int main() {
7159 putprpwnam()
7160 ; return 0; }
7161 EOF
7162 if { (eval echo configure:7163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7163   rm -rf conftest*
7164   eval "ac_cv_lib_$ac_lib_var=yes"
7165 else
7166   echo "configure: failed program was:" >&5
7167   cat conftest.$ac_ext >&5
7168   rm -rf conftest*
7169   eval "ac_cv_lib_$ac_lib_var=no"
7170 fi
7171 rm -f conftest*
7172 LIBS="$ac_save_LIBS"
7173
7174 fi
7175 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7176   echo "$ac_t""yes" 1>&6
7177     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7178     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7179   cat >> confdefs.h <<EOF
7180 #define $ac_tr_lib 1
7181 EOF
7182
7183   LIBS="-lsecurity $LIBS"
7184
7185 else
7186   echo "$ac_t""no" 1>&6
7187 fi
7188  
7189      for ac_func in putprpwnam
7190 do
7191 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7192 echo "configure:7193: checking for $ac_func" >&5
7193 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7194   echo $ac_n "(cached) $ac_c" 1>&6
7195 else
7196   cat > conftest.$ac_ext <<EOF
7197 #line 7198 "configure"
7198 #include "confdefs.h"
7199 /* System header to define __stub macros and hopefully few prototypes,
7200     which can conflict with char $ac_func(); below.  */
7201 #include <assert.h>
7202 /* Override any gcc2 internal prototype to avoid an error.  */
7203 /* We use char because int might match the return type of a gcc2
7204     builtin and then its argument prototype would still apply.  */
7205 char $ac_func();
7206
7207 int main() {
7208
7209 /* The GNU C library defines this for functions which it implements
7210     to always fail with ENOSYS.  Some functions are actually named
7211     something starting with __ and the normal name is an alias.  */
7212 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7213 choke me
7214 #else
7215 $ac_func();
7216 #endif
7217
7218 ; return 0; }
7219 EOF
7220 if { (eval echo configure:7221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7221   rm -rf conftest*
7222   eval "ac_cv_func_$ac_func=yes"
7223 else
7224   echo "configure: failed program was:" >&5
7225   cat conftest.$ac_ext >&5
7226   rm -rf conftest*
7227   eval "ac_cv_func_$ac_func=no"
7228 fi
7229 rm -f conftest*
7230 fi
7231
7232 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7233   echo "$ac_t""yes" 1>&6
7234     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7235   cat >> confdefs.h <<EOF
7236 #define $ac_tr_func 1
7237 EOF
7238  
7239 else
7240   echo "$ac_t""no" 1>&6
7241 fi
7242 done
7243
7244   ;;
7245   esac
7246
7247 case "$LIBS" in
7248   *-lsec*) for ac_func in putprpwnam
7249 do
7250 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7251 echo "configure:7252: checking for $ac_func" >&5
7252 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7253   echo $ac_n "(cached) $ac_c" 1>&6
7254 else
7255   cat > conftest.$ac_ext <<EOF
7256 #line 7257 "configure"
7257 #include "confdefs.h"
7258 /* System header to define __stub macros and hopefully few prototypes,
7259     which can conflict with char $ac_func(); below.  */
7260 #include <assert.h>
7261 /* Override any gcc2 internal prototype to avoid an error.  */
7262 /* We use char because int might match the return type of a gcc2
7263     builtin and then its argument prototype would still apply.  */
7264 char $ac_func();
7265
7266 int main() {
7267
7268 /* The GNU C library defines this for functions which it implements
7269     to always fail with ENOSYS.  Some functions are actually named
7270     something starting with __ and the normal name is an alias.  */
7271 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7272 choke me
7273 #else
7274 $ac_func();
7275 #endif
7276
7277 ; return 0; }
7278 EOF
7279 if { (eval echo configure:7280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7280   rm -rf conftest*
7281   eval "ac_cv_func_$ac_func=yes"
7282 else
7283   echo "configure: failed program was:" >&5
7284   cat conftest.$ac_ext >&5
7285   rm -rf conftest*
7286   eval "ac_cv_func_$ac_func=no"
7287 fi
7288 rm -f conftest*
7289 fi
7290
7291 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7292   echo "$ac_t""yes" 1>&6
7293     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7294   cat >> confdefs.h <<EOF
7295 #define $ac_tr_func 1
7296 EOF
7297  
7298 else
7299   echo "$ac_t""no" 1>&6
7300 fi
7301 done
7302  ;;
7303   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
7304 echo "configure:7305: checking for putprpwnam in -lsec" >&5
7305 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
7306 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7307   echo $ac_n "(cached) $ac_c" 1>&6
7308 else
7309   ac_save_LIBS="$LIBS"
7310 LIBS="-lsec  $LIBS"
7311 cat > conftest.$ac_ext <<EOF
7312 #line 7313 "configure"
7313 #include "confdefs.h"
7314 /* Override any gcc2 internal prototype to avoid an error.  */
7315 /* We use char because int might match the return type of a gcc2
7316     builtin and then its argument prototype would still apply.  */
7317 char putprpwnam();
7318
7319 int main() {
7320 putprpwnam()
7321 ; return 0; }
7322 EOF
7323 if { (eval echo configure:7324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7324   rm -rf conftest*
7325   eval "ac_cv_lib_$ac_lib_var=yes"
7326 else
7327   echo "configure: failed program was:" >&5
7328   cat conftest.$ac_ext >&5
7329   rm -rf conftest*
7330   eval "ac_cv_lib_$ac_lib_var=no"
7331 fi
7332 rm -f conftest*
7333 LIBS="$ac_save_LIBS"
7334
7335 fi
7336 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7337   echo "$ac_t""yes" 1>&6
7338     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7339     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7340   cat >> confdefs.h <<EOF
7341 #define $ac_tr_lib 1
7342 EOF
7343
7344   LIBS="-lsec $LIBS"
7345
7346 else
7347   echo "$ac_t""no" 1>&6
7348 fi
7349  
7350      for ac_func in putprpwnam
7351 do
7352 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7353 echo "configure:7354: checking for $ac_func" >&5
7354 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7355   echo $ac_n "(cached) $ac_c" 1>&6
7356 else
7357   cat > conftest.$ac_ext <<EOF
7358 #line 7359 "configure"
7359 #include "confdefs.h"
7360 /* System header to define __stub macros and hopefully few prototypes,
7361     which can conflict with char $ac_func(); below.  */
7362 #include <assert.h>
7363 /* Override any gcc2 internal prototype to avoid an error.  */
7364 /* We use char because int might match the return type of a gcc2
7365     builtin and then its argument prototype would still apply.  */
7366 char $ac_func();
7367
7368 int main() {
7369
7370 /* The GNU C library defines this for functions which it implements
7371     to always fail with ENOSYS.  Some functions are actually named
7372     something starting with __ and the normal name is an alias.  */
7373 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7374 choke me
7375 #else
7376 $ac_func();
7377 #endif
7378
7379 ; return 0; }
7380 EOF
7381 if { (eval echo configure:7382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7382   rm -rf conftest*
7383   eval "ac_cv_func_$ac_func=yes"
7384 else
7385   echo "configure: failed program was:" >&5
7386   cat conftest.$ac_ext >&5
7387   rm -rf conftest*
7388   eval "ac_cv_func_$ac_func=no"
7389 fi
7390 rm -f conftest*
7391 fi
7392
7393 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7394   echo "$ac_t""yes" 1>&6
7395     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7396   cat >> confdefs.h <<EOF
7397 #define $ac_tr_func 1
7398 EOF
7399  
7400 else
7401   echo "$ac_t""no" 1>&6
7402 fi
7403 done
7404
7405   ;;
7406   esac
7407
7408
7409 case "$LIBS" in
7410   *-lsecurity*) for ac_func in set_auth_parameters
7411 do
7412 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7413 echo "configure:7414: checking for $ac_func" >&5
7414 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7415   echo $ac_n "(cached) $ac_c" 1>&6
7416 else
7417   cat > conftest.$ac_ext <<EOF
7418 #line 7419 "configure"
7419 #include "confdefs.h"
7420 /* System header to define __stub macros and hopefully few prototypes,
7421     which can conflict with char $ac_func(); below.  */
7422 #include <assert.h>
7423 /* Override any gcc2 internal prototype to avoid an error.  */
7424 /* We use char because int might match the return type of a gcc2
7425     builtin and then its argument prototype would still apply.  */
7426 char $ac_func();
7427
7428 int main() {
7429
7430 /* The GNU C library defines this for functions which it implements
7431     to always fail with ENOSYS.  Some functions are actually named
7432     something starting with __ and the normal name is an alias.  */
7433 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7434 choke me
7435 #else
7436 $ac_func();
7437 #endif
7438
7439 ; return 0; }
7440 EOF
7441 if { (eval echo configure:7442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7442   rm -rf conftest*
7443   eval "ac_cv_func_$ac_func=yes"
7444 else
7445   echo "configure: failed program was:" >&5
7446   cat conftest.$ac_ext >&5
7447   rm -rf conftest*
7448   eval "ac_cv_func_$ac_func=no"
7449 fi
7450 rm -f conftest*
7451 fi
7452
7453 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7454   echo "$ac_t""yes" 1>&6
7455     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7456   cat >> confdefs.h <<EOF
7457 #define $ac_tr_func 1
7458 EOF
7459  
7460 else
7461   echo "$ac_t""no" 1>&6
7462 fi
7463 done
7464  ;;
7465   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7466 echo "configure:7467: checking for set_auth_parameters in -lsecurity" >&5
7467 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7468 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7469   echo $ac_n "(cached) $ac_c" 1>&6
7470 else
7471   ac_save_LIBS="$LIBS"
7472 LIBS="-lsecurity  $LIBS"
7473 cat > conftest.$ac_ext <<EOF
7474 #line 7475 "configure"
7475 #include "confdefs.h"
7476 /* Override any gcc2 internal prototype to avoid an error.  */
7477 /* We use char because int might match the return type of a gcc2
7478     builtin and then its argument prototype would still apply.  */
7479 char set_auth_parameters();
7480
7481 int main() {
7482 set_auth_parameters()
7483 ; return 0; }
7484 EOF
7485 if { (eval echo configure:7486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7486   rm -rf conftest*
7487   eval "ac_cv_lib_$ac_lib_var=yes"
7488 else
7489   echo "configure: failed program was:" >&5
7490   cat conftest.$ac_ext >&5
7491   rm -rf conftest*
7492   eval "ac_cv_lib_$ac_lib_var=no"
7493 fi
7494 rm -f conftest*
7495 LIBS="$ac_save_LIBS"
7496
7497 fi
7498 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7499   echo "$ac_t""yes" 1>&6
7500     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7501     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7502   cat >> confdefs.h <<EOF
7503 #define $ac_tr_lib 1
7504 EOF
7505
7506   LIBS="-lsecurity $LIBS"
7507
7508 else
7509   echo "$ac_t""no" 1>&6
7510 fi
7511  
7512      for ac_func in set_auth_parameters
7513 do
7514 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7515 echo "configure:7516: checking for $ac_func" >&5
7516 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7517   echo $ac_n "(cached) $ac_c" 1>&6
7518 else
7519   cat > conftest.$ac_ext <<EOF
7520 #line 7521 "configure"
7521 #include "confdefs.h"
7522 /* System header to define __stub macros and hopefully few prototypes,
7523     which can conflict with char $ac_func(); below.  */
7524 #include <assert.h>
7525 /* Override any gcc2 internal prototype to avoid an error.  */
7526 /* We use char because int might match the return type of a gcc2
7527     builtin and then its argument prototype would still apply.  */
7528 char $ac_func();
7529
7530 int main() {
7531
7532 /* The GNU C library defines this for functions which it implements
7533     to always fail with ENOSYS.  Some functions are actually named
7534     something starting with __ and the normal name is an alias.  */
7535 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7536 choke me
7537 #else
7538 $ac_func();
7539 #endif
7540
7541 ; return 0; }
7542 EOF
7543 if { (eval echo configure:7544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7544   rm -rf conftest*
7545   eval "ac_cv_func_$ac_func=yes"
7546 else
7547   echo "configure: failed program was:" >&5
7548   cat conftest.$ac_ext >&5
7549   rm -rf conftest*
7550   eval "ac_cv_func_$ac_func=no"
7551 fi
7552 rm -f conftest*
7553 fi
7554
7555 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7556   echo "$ac_t""yes" 1>&6
7557     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7558   cat >> confdefs.h <<EOF
7559 #define $ac_tr_func 1
7560 EOF
7561  
7562 else
7563   echo "$ac_t""no" 1>&6
7564 fi
7565 done
7566
7567   ;;
7568   esac
7569
7570 case "$LIBS" in
7571   *-lsec*) for ac_func in set_auth_parameters
7572 do
7573 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7574 echo "configure:7575: checking for $ac_func" >&5
7575 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7576   echo $ac_n "(cached) $ac_c" 1>&6
7577 else
7578   cat > conftest.$ac_ext <<EOF
7579 #line 7580 "configure"
7580 #include "confdefs.h"
7581 /* System header to define __stub macros and hopefully few prototypes,
7582     which can conflict with char $ac_func(); below.  */
7583 #include <assert.h>
7584 /* Override any gcc2 internal prototype to avoid an error.  */
7585 /* We use char because int might match the return type of a gcc2
7586     builtin and then its argument prototype would still apply.  */
7587 char $ac_func();
7588
7589 int main() {
7590
7591 /* The GNU C library defines this for functions which it implements
7592     to always fail with ENOSYS.  Some functions are actually named
7593     something starting with __ and the normal name is an alias.  */
7594 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7595 choke me
7596 #else
7597 $ac_func();
7598 #endif
7599
7600 ; return 0; }
7601 EOF
7602 if { (eval echo configure:7603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7603   rm -rf conftest*
7604   eval "ac_cv_func_$ac_func=yes"
7605 else
7606   echo "configure: failed program was:" >&5
7607   cat conftest.$ac_ext >&5
7608   rm -rf conftest*
7609   eval "ac_cv_func_$ac_func=no"
7610 fi
7611 rm -f conftest*
7612 fi
7613
7614 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7615   echo "$ac_t""yes" 1>&6
7616     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7617   cat >> confdefs.h <<EOF
7618 #define $ac_tr_func 1
7619 EOF
7620  
7621 else
7622   echo "$ac_t""no" 1>&6
7623 fi
7624 done
7625  ;;
7626   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7627 echo "configure:7628: checking for set_auth_parameters in -lsec" >&5
7628 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7629 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7630   echo $ac_n "(cached) $ac_c" 1>&6
7631 else
7632   ac_save_LIBS="$LIBS"
7633 LIBS="-lsec  $LIBS"
7634 cat > conftest.$ac_ext <<EOF
7635 #line 7636 "configure"
7636 #include "confdefs.h"
7637 /* Override any gcc2 internal prototype to avoid an error.  */
7638 /* We use char because int might match the return type of a gcc2
7639     builtin and then its argument prototype would still apply.  */
7640 char set_auth_parameters();
7641
7642 int main() {
7643 set_auth_parameters()
7644 ; return 0; }
7645 EOF
7646 if { (eval echo configure:7647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7647   rm -rf conftest*
7648   eval "ac_cv_lib_$ac_lib_var=yes"
7649 else
7650   echo "configure: failed program was:" >&5
7651   cat conftest.$ac_ext >&5
7652   rm -rf conftest*
7653   eval "ac_cv_lib_$ac_lib_var=no"
7654 fi
7655 rm -f conftest*
7656 LIBS="$ac_save_LIBS"
7657
7658 fi
7659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7660   echo "$ac_t""yes" 1>&6
7661     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7662     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7663   cat >> confdefs.h <<EOF
7664 #define $ac_tr_lib 1
7665 EOF
7666
7667   LIBS="-lsec $LIBS"
7668
7669 else
7670   echo "$ac_t""no" 1>&6
7671 fi
7672  
7673      for ac_func in set_auth_parameters
7674 do
7675 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7676 echo "configure:7677: checking for $ac_func" >&5
7677 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7678   echo $ac_n "(cached) $ac_c" 1>&6
7679 else
7680   cat > conftest.$ac_ext <<EOF
7681 #line 7682 "configure"
7682 #include "confdefs.h"
7683 /* System header to define __stub macros and hopefully few prototypes,
7684     which can conflict with char $ac_func(); below.  */
7685 #include <assert.h>
7686 /* Override any gcc2 internal prototype to avoid an error.  */
7687 /* We use char because int might match the return type of a gcc2
7688     builtin and then its argument prototype would still apply.  */
7689 char $ac_func();
7690
7691 int main() {
7692
7693 /* The GNU C library defines this for functions which it implements
7694     to always fail with ENOSYS.  Some functions are actually named
7695     something starting with __ and the normal name is an alias.  */
7696 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7697 choke me
7698 #else
7699 $ac_func();
7700 #endif
7701
7702 ; return 0; }
7703 EOF
7704 if { (eval echo configure:7705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7705   rm -rf conftest*
7706   eval "ac_cv_func_$ac_func=yes"
7707 else
7708   echo "configure: failed program was:" >&5
7709   cat conftest.$ac_ext >&5
7710   rm -rf conftest*
7711   eval "ac_cv_func_$ac_func=no"
7712 fi
7713 rm -f conftest*
7714 fi
7715
7716 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7717   echo "$ac_t""yes" 1>&6
7718     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7719   cat >> confdefs.h <<EOF
7720 #define $ac_tr_func 1
7721 EOF
7722  
7723 else
7724   echo "$ac_t""no" 1>&6
7725 fi
7726 done
7727
7728   ;;
7729   esac
7730
7731
7732 # UnixWare 7.x has its getspnam in -lgen
7733 case "$LIBS" in
7734   *-lgen*) for ac_func in getspnam
7735 do
7736 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7737 echo "configure:7738: checking for $ac_func" >&5
7738 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7739   echo $ac_n "(cached) $ac_c" 1>&6
7740 else
7741   cat > conftest.$ac_ext <<EOF
7742 #line 7743 "configure"
7743 #include "confdefs.h"
7744 /* System header to define __stub macros and hopefully few prototypes,
7745     which can conflict with char $ac_func(); below.  */
7746 #include <assert.h>
7747 /* Override any gcc2 internal prototype to avoid an error.  */
7748 /* We use char because int might match the return type of a gcc2
7749     builtin and then its argument prototype would still apply.  */
7750 char $ac_func();
7751
7752 int main() {
7753
7754 /* The GNU C library defines this for functions which it implements
7755     to always fail with ENOSYS.  Some functions are actually named
7756     something starting with __ and the normal name is an alias.  */
7757 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7758 choke me
7759 #else
7760 $ac_func();
7761 #endif
7762
7763 ; return 0; }
7764 EOF
7765 if { (eval echo configure:7766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7766   rm -rf conftest*
7767   eval "ac_cv_func_$ac_func=yes"
7768 else
7769   echo "configure: failed program was:" >&5
7770   cat conftest.$ac_ext >&5
7771   rm -rf conftest*
7772   eval "ac_cv_func_$ac_func=no"
7773 fi
7774 rm -f conftest*
7775 fi
7776
7777 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7778   echo "$ac_t""yes" 1>&6
7779     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7780   cat >> confdefs.h <<EOF
7781 #define $ac_tr_func 1
7782 EOF
7783  
7784 else
7785   echo "$ac_t""no" 1>&6
7786 fi
7787 done
7788  ;;
7789   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7790 echo "configure:7791: checking for getspnam in -lgen" >&5
7791 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7792 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7793   echo $ac_n "(cached) $ac_c" 1>&6
7794 else
7795   ac_save_LIBS="$LIBS"
7796 LIBS="-lgen  $LIBS"
7797 cat > conftest.$ac_ext <<EOF
7798 #line 7799 "configure"
7799 #include "confdefs.h"
7800 /* Override any gcc2 internal prototype to avoid an error.  */
7801 /* We use char because int might match the return type of a gcc2
7802     builtin and then its argument prototype would still apply.  */
7803 char getspnam();
7804
7805 int main() {
7806 getspnam()
7807 ; return 0; }
7808 EOF
7809 if { (eval echo configure:7810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7810   rm -rf conftest*
7811   eval "ac_cv_lib_$ac_lib_var=yes"
7812 else
7813   echo "configure: failed program was:" >&5
7814   cat conftest.$ac_ext >&5
7815   rm -rf conftest*
7816   eval "ac_cv_lib_$ac_lib_var=no"
7817 fi
7818 rm -f conftest*
7819 LIBS="$ac_save_LIBS"
7820
7821 fi
7822 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7823   echo "$ac_t""yes" 1>&6
7824     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7825     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7826   cat >> confdefs.h <<EOF
7827 #define $ac_tr_lib 1
7828 EOF
7829
7830   LIBS="-lgen $LIBS"
7831
7832 else
7833   echo "$ac_t""no" 1>&6
7834 fi
7835  
7836      for ac_func in getspnam
7837 do
7838 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7839 echo "configure:7840: checking for $ac_func" >&5
7840 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7841   echo $ac_n "(cached) $ac_c" 1>&6
7842 else
7843   cat > conftest.$ac_ext <<EOF
7844 #line 7845 "configure"
7845 #include "confdefs.h"
7846 /* System header to define __stub macros and hopefully few prototypes,
7847     which can conflict with char $ac_func(); below.  */
7848 #include <assert.h>
7849 /* Override any gcc2 internal prototype to avoid an error.  */
7850 /* We use char because int might match the return type of a gcc2
7851     builtin and then its argument prototype would still apply.  */
7852 char $ac_func();
7853
7854 int main() {
7855
7856 /* The GNU C library defines this for functions which it implements
7857     to always fail with ENOSYS.  Some functions are actually named
7858     something starting with __ and the normal name is an alias.  */
7859 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7860 choke me
7861 #else
7862 $ac_func();
7863 #endif
7864
7865 ; return 0; }
7866 EOF
7867 if { (eval echo configure:7868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7868   rm -rf conftest*
7869   eval "ac_cv_func_$ac_func=yes"
7870 else
7871   echo "configure: failed program was:" >&5
7872   cat conftest.$ac_ext >&5
7873   rm -rf conftest*
7874   eval "ac_cv_func_$ac_func=no"
7875 fi
7876 rm -f conftest*
7877 fi
7878
7879 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7880   echo "$ac_t""yes" 1>&6
7881     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7882   cat >> confdefs.h <<EOF
7883 #define $ac_tr_func 1
7884 EOF
7885  
7886 else
7887   echo "$ac_t""no" 1>&6
7888 fi
7889 done
7890
7891   ;;
7892   esac
7893
7894
7895 case "$LIBS" in
7896   *-lsecurity*) for ac_func in getspnam
7897 do
7898 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7899 echo "configure:7900: checking for $ac_func" >&5
7900 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7901   echo $ac_n "(cached) $ac_c" 1>&6
7902 else
7903   cat > conftest.$ac_ext <<EOF
7904 #line 7905 "configure"
7905 #include "confdefs.h"
7906 /* System header to define __stub macros and hopefully few prototypes,
7907     which can conflict with char $ac_func(); below.  */
7908 #include <assert.h>
7909 /* Override any gcc2 internal prototype to avoid an error.  */
7910 /* We use char because int might match the return type of a gcc2
7911     builtin and then its argument prototype would still apply.  */
7912 char $ac_func();
7913
7914 int main() {
7915
7916 /* The GNU C library defines this for functions which it implements
7917     to always fail with ENOSYS.  Some functions are actually named
7918     something starting with __ and the normal name is an alias.  */
7919 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7920 choke me
7921 #else
7922 $ac_func();
7923 #endif
7924
7925 ; return 0; }
7926 EOF
7927 if { (eval echo configure:7928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7928   rm -rf conftest*
7929   eval "ac_cv_func_$ac_func=yes"
7930 else
7931   echo "configure: failed program was:" >&5
7932   cat conftest.$ac_ext >&5
7933   rm -rf conftest*
7934   eval "ac_cv_func_$ac_func=no"
7935 fi
7936 rm -f conftest*
7937 fi
7938
7939 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7940   echo "$ac_t""yes" 1>&6
7941     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7942   cat >> confdefs.h <<EOF
7943 #define $ac_tr_func 1
7944 EOF
7945  
7946 else
7947   echo "$ac_t""no" 1>&6
7948 fi
7949 done
7950  ;;
7951   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7952 echo "configure:7953: checking for getspnam in -lsecurity" >&5
7953 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7954 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7955   echo $ac_n "(cached) $ac_c" 1>&6
7956 else
7957   ac_save_LIBS="$LIBS"
7958 LIBS="-lsecurity  $LIBS"
7959 cat > conftest.$ac_ext <<EOF
7960 #line 7961 "configure"
7961 #include "confdefs.h"
7962 /* Override any gcc2 internal prototype to avoid an error.  */
7963 /* We use char because int might match the return type of a gcc2
7964     builtin and then its argument prototype would still apply.  */
7965 char getspnam();
7966
7967 int main() {
7968 getspnam()
7969 ; return 0; }
7970 EOF
7971 if { (eval echo configure:7972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7972   rm -rf conftest*
7973   eval "ac_cv_lib_$ac_lib_var=yes"
7974 else
7975   echo "configure: failed program was:" >&5
7976   cat conftest.$ac_ext >&5
7977   rm -rf conftest*
7978   eval "ac_cv_lib_$ac_lib_var=no"
7979 fi
7980 rm -f conftest*
7981 LIBS="$ac_save_LIBS"
7982
7983 fi
7984 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7985   echo "$ac_t""yes" 1>&6
7986     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7987     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7988   cat >> confdefs.h <<EOF
7989 #define $ac_tr_lib 1
7990 EOF
7991
7992   LIBS="-lsecurity $LIBS"
7993
7994 else
7995   echo "$ac_t""no" 1>&6
7996 fi
7997  
7998      for ac_func in getspnam
7999 do
8000 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8001 echo "configure:8002: checking for $ac_func" >&5
8002 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8003   echo $ac_n "(cached) $ac_c" 1>&6
8004 else
8005   cat > conftest.$ac_ext <<EOF
8006 #line 8007 "configure"
8007 #include "confdefs.h"
8008 /* System header to define __stub macros and hopefully few prototypes,
8009     which can conflict with char $ac_func(); below.  */
8010 #include <assert.h>
8011 /* Override any gcc2 internal prototype to avoid an error.  */
8012 /* We use char because int might match the return type of a gcc2
8013     builtin and then its argument prototype would still apply.  */
8014 char $ac_func();
8015
8016 int main() {
8017
8018 /* The GNU C library defines this for functions which it implements
8019     to always fail with ENOSYS.  Some functions are actually named
8020     something starting with __ and the normal name is an alias.  */
8021 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8022 choke me
8023 #else
8024 $ac_func();
8025 #endif
8026
8027 ; return 0; }
8028 EOF
8029 if { (eval echo configure:8030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8030   rm -rf conftest*
8031   eval "ac_cv_func_$ac_func=yes"
8032 else
8033   echo "configure: failed program was:" >&5
8034   cat conftest.$ac_ext >&5
8035   rm -rf conftest*
8036   eval "ac_cv_func_$ac_func=no"
8037 fi
8038 rm -f conftest*
8039 fi
8040
8041 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8042   echo "$ac_t""yes" 1>&6
8043     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8044   cat >> confdefs.h <<EOF
8045 #define $ac_tr_func 1
8046 EOF
8047  
8048 else
8049   echo "$ac_t""no" 1>&6
8050 fi
8051 done
8052
8053   ;;
8054   esac
8055
8056 case "$LIBS" in
8057   *-lsec*) for ac_func in getspnam
8058 do
8059 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8060 echo "configure:8061: checking for $ac_func" >&5
8061 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8062   echo $ac_n "(cached) $ac_c" 1>&6
8063 else
8064   cat > conftest.$ac_ext <<EOF
8065 #line 8066 "configure"
8066 #include "confdefs.h"
8067 /* System header to define __stub macros and hopefully few prototypes,
8068     which can conflict with char $ac_func(); below.  */
8069 #include <assert.h>
8070 /* Override any gcc2 internal prototype to avoid an error.  */
8071 /* We use char because int might match the return type of a gcc2
8072     builtin and then its argument prototype would still apply.  */
8073 char $ac_func();
8074
8075 int main() {
8076
8077 /* The GNU C library defines this for functions which it implements
8078     to always fail with ENOSYS.  Some functions are actually named
8079     something starting with __ and the normal name is an alias.  */
8080 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8081 choke me
8082 #else
8083 $ac_func();
8084 #endif
8085
8086 ; return 0; }
8087 EOF
8088 if { (eval echo configure:8089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8089   rm -rf conftest*
8090   eval "ac_cv_func_$ac_func=yes"
8091 else
8092   echo "configure: failed program was:" >&5
8093   cat conftest.$ac_ext >&5
8094   rm -rf conftest*
8095   eval "ac_cv_func_$ac_func=no"
8096 fi
8097 rm -f conftest*
8098 fi
8099
8100 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8101   echo "$ac_t""yes" 1>&6
8102     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8103   cat >> confdefs.h <<EOF
8104 #define $ac_tr_func 1
8105 EOF
8106  
8107 else
8108   echo "$ac_t""no" 1>&6
8109 fi
8110 done
8111  ;;
8112   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
8113 echo "configure:8114: checking for getspnam in -lsec" >&5
8114 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
8115 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8116   echo $ac_n "(cached) $ac_c" 1>&6
8117 else
8118   ac_save_LIBS="$LIBS"
8119 LIBS="-lsec  $LIBS"
8120 cat > conftest.$ac_ext <<EOF
8121 #line 8122 "configure"
8122 #include "confdefs.h"
8123 /* Override any gcc2 internal prototype to avoid an error.  */
8124 /* We use char because int might match the return type of a gcc2
8125     builtin and then its argument prototype would still apply.  */
8126 char getspnam();
8127
8128 int main() {
8129 getspnam()
8130 ; return 0; }
8131 EOF
8132 if { (eval echo configure:8133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8133   rm -rf conftest*
8134   eval "ac_cv_lib_$ac_lib_var=yes"
8135 else
8136   echo "configure: failed program was:" >&5
8137   cat conftest.$ac_ext >&5
8138   rm -rf conftest*
8139   eval "ac_cv_lib_$ac_lib_var=no"
8140 fi
8141 rm -f conftest*
8142 LIBS="$ac_save_LIBS"
8143
8144 fi
8145 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8146   echo "$ac_t""yes" 1>&6
8147     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8148     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8149   cat >> confdefs.h <<EOF
8150 #define $ac_tr_lib 1
8151 EOF
8152
8153   LIBS="-lsec $LIBS"
8154
8155 else
8156   echo "$ac_t""no" 1>&6
8157 fi
8158  
8159      for ac_func in getspnam
8160 do
8161 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8162 echo "configure:8163: checking for $ac_func" >&5
8163 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8164   echo $ac_n "(cached) $ac_c" 1>&6
8165 else
8166   cat > conftest.$ac_ext <<EOF
8167 #line 8168 "configure"
8168 #include "confdefs.h"
8169 /* System header to define __stub macros and hopefully few prototypes,
8170     which can conflict with char $ac_func(); below.  */
8171 #include <assert.h>
8172 /* Override any gcc2 internal prototype to avoid an error.  */
8173 /* We use char because int might match the return type of a gcc2
8174     builtin and then its argument prototype would still apply.  */
8175 char $ac_func();
8176
8177 int main() {
8178
8179 /* The GNU C library defines this for functions which it implements
8180     to always fail with ENOSYS.  Some functions are actually named
8181     something starting with __ and the normal name is an alias.  */
8182 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8183 choke me
8184 #else
8185 $ac_func();
8186 #endif
8187
8188 ; return 0; }
8189 EOF
8190 if { (eval echo configure:8191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8191   rm -rf conftest*
8192   eval "ac_cv_func_$ac_func=yes"
8193 else
8194   echo "configure: failed program was:" >&5
8195   cat conftest.$ac_ext >&5
8196   rm -rf conftest*
8197   eval "ac_cv_func_$ac_func=no"
8198 fi
8199 rm -f conftest*
8200 fi
8201
8202 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8203   echo "$ac_t""yes" 1>&6
8204     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8205   cat >> confdefs.h <<EOF
8206 #define $ac_tr_func 1
8207 EOF
8208  
8209 else
8210   echo "$ac_t""no" 1>&6
8211 fi
8212 done
8213
8214   ;;
8215   esac
8216
8217
8218 case "$LIBS" in
8219   *-lsecurity*) for ac_func in bigcrypt
8220 do
8221 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8222 echo "configure:8223: checking for $ac_func" >&5
8223 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8224   echo $ac_n "(cached) $ac_c" 1>&6
8225 else
8226   cat > conftest.$ac_ext <<EOF
8227 #line 8228 "configure"
8228 #include "confdefs.h"
8229 /* System header to define __stub macros and hopefully few prototypes,
8230     which can conflict with char $ac_func(); below.  */
8231 #include <assert.h>
8232 /* Override any gcc2 internal prototype to avoid an error.  */
8233 /* We use char because int might match the return type of a gcc2
8234     builtin and then its argument prototype would still apply.  */
8235 char $ac_func();
8236
8237 int main() {
8238
8239 /* The GNU C library defines this for functions which it implements
8240     to always fail with ENOSYS.  Some functions are actually named
8241     something starting with __ and the normal name is an alias.  */
8242 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8243 choke me
8244 #else
8245 $ac_func();
8246 #endif
8247
8248 ; return 0; }
8249 EOF
8250 if { (eval echo configure:8251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8251   rm -rf conftest*
8252   eval "ac_cv_func_$ac_func=yes"
8253 else
8254   echo "configure: failed program was:" >&5
8255   cat conftest.$ac_ext >&5
8256   rm -rf conftest*
8257   eval "ac_cv_func_$ac_func=no"
8258 fi
8259 rm -f conftest*
8260 fi
8261
8262 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8263   echo "$ac_t""yes" 1>&6
8264     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8265   cat >> confdefs.h <<EOF
8266 #define $ac_tr_func 1
8267 EOF
8268  
8269 else
8270   echo "$ac_t""no" 1>&6
8271 fi
8272 done
8273  ;;
8274   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
8275 echo "configure:8276: checking for bigcrypt in -lsecurity" >&5
8276 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
8277 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8278   echo $ac_n "(cached) $ac_c" 1>&6
8279 else
8280   ac_save_LIBS="$LIBS"
8281 LIBS="-lsecurity  $LIBS"
8282 cat > conftest.$ac_ext <<EOF
8283 #line 8284 "configure"
8284 #include "confdefs.h"
8285 /* Override any gcc2 internal prototype to avoid an error.  */
8286 /* We use char because int might match the return type of a gcc2
8287     builtin and then its argument prototype would still apply.  */
8288 char bigcrypt();
8289
8290 int main() {
8291 bigcrypt()
8292 ; return 0; }
8293 EOF
8294 if { (eval echo configure:8295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8295   rm -rf conftest*
8296   eval "ac_cv_lib_$ac_lib_var=yes"
8297 else
8298   echo "configure: failed program was:" >&5
8299   cat conftest.$ac_ext >&5
8300   rm -rf conftest*
8301   eval "ac_cv_lib_$ac_lib_var=no"
8302 fi
8303 rm -f conftest*
8304 LIBS="$ac_save_LIBS"
8305
8306 fi
8307 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8308   echo "$ac_t""yes" 1>&6
8309     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8310     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8311   cat >> confdefs.h <<EOF
8312 #define $ac_tr_lib 1
8313 EOF
8314
8315   LIBS="-lsecurity $LIBS"
8316
8317 else
8318   echo "$ac_t""no" 1>&6
8319 fi
8320  
8321      for ac_func in bigcrypt
8322 do
8323 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8324 echo "configure:8325: checking for $ac_func" >&5
8325 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8326   echo $ac_n "(cached) $ac_c" 1>&6
8327 else
8328   cat > conftest.$ac_ext <<EOF
8329 #line 8330 "configure"
8330 #include "confdefs.h"
8331 /* System header to define __stub macros and hopefully few prototypes,
8332     which can conflict with char $ac_func(); below.  */
8333 #include <assert.h>
8334 /* Override any gcc2 internal prototype to avoid an error.  */
8335 /* We use char because int might match the return type of a gcc2
8336     builtin and then its argument prototype would still apply.  */
8337 char $ac_func();
8338
8339 int main() {
8340
8341 /* The GNU C library defines this for functions which it implements
8342     to always fail with ENOSYS.  Some functions are actually named
8343     something starting with __ and the normal name is an alias.  */
8344 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8345 choke me
8346 #else
8347 $ac_func();
8348 #endif
8349
8350 ; return 0; }
8351 EOF
8352 if { (eval echo configure:8353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8353   rm -rf conftest*
8354   eval "ac_cv_func_$ac_func=yes"
8355 else
8356   echo "configure: failed program was:" >&5
8357   cat conftest.$ac_ext >&5
8358   rm -rf conftest*
8359   eval "ac_cv_func_$ac_func=no"
8360 fi
8361 rm -f conftest*
8362 fi
8363
8364 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8365   echo "$ac_t""yes" 1>&6
8366     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8367   cat >> confdefs.h <<EOF
8368 #define $ac_tr_func 1
8369 EOF
8370  
8371 else
8372   echo "$ac_t""no" 1>&6
8373 fi
8374 done
8375
8376   ;;
8377   esac
8378
8379 case "$LIBS" in
8380   *-lsec*) for ac_func in bigcrypt
8381 do
8382 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8383 echo "configure:8384: checking for $ac_func" >&5
8384 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8385   echo $ac_n "(cached) $ac_c" 1>&6
8386 else
8387   cat > conftest.$ac_ext <<EOF
8388 #line 8389 "configure"
8389 #include "confdefs.h"
8390 /* System header to define __stub macros and hopefully few prototypes,
8391     which can conflict with char $ac_func(); below.  */
8392 #include <assert.h>
8393 /* Override any gcc2 internal prototype to avoid an error.  */
8394 /* We use char because int might match the return type of a gcc2
8395     builtin and then its argument prototype would still apply.  */
8396 char $ac_func();
8397
8398 int main() {
8399
8400 /* The GNU C library defines this for functions which it implements
8401     to always fail with ENOSYS.  Some functions are actually named
8402     something starting with __ and the normal name is an alias.  */
8403 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8404 choke me
8405 #else
8406 $ac_func();
8407 #endif
8408
8409 ; return 0; }
8410 EOF
8411 if { (eval echo configure:8412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8412   rm -rf conftest*
8413   eval "ac_cv_func_$ac_func=yes"
8414 else
8415   echo "configure: failed program was:" >&5
8416   cat conftest.$ac_ext >&5
8417   rm -rf conftest*
8418   eval "ac_cv_func_$ac_func=no"
8419 fi
8420 rm -f conftest*
8421 fi
8422
8423 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8424   echo "$ac_t""yes" 1>&6
8425     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8426   cat >> confdefs.h <<EOF
8427 #define $ac_tr_func 1
8428 EOF
8429  
8430 else
8431   echo "$ac_t""no" 1>&6
8432 fi
8433 done
8434  ;;
8435   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8436 echo "configure:8437: checking for bigcrypt in -lsec" >&5
8437 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8438 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8439   echo $ac_n "(cached) $ac_c" 1>&6
8440 else
8441   ac_save_LIBS="$LIBS"
8442 LIBS="-lsec  $LIBS"
8443 cat > conftest.$ac_ext <<EOF
8444 #line 8445 "configure"
8445 #include "confdefs.h"
8446 /* Override any gcc2 internal prototype to avoid an error.  */
8447 /* We use char because int might match the return type of a gcc2
8448     builtin and then its argument prototype would still apply.  */
8449 char bigcrypt();
8450
8451 int main() {
8452 bigcrypt()
8453 ; return 0; }
8454 EOF
8455 if { (eval echo configure:8456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8456   rm -rf conftest*
8457   eval "ac_cv_lib_$ac_lib_var=yes"
8458 else
8459   echo "configure: failed program was:" >&5
8460   cat conftest.$ac_ext >&5
8461   rm -rf conftest*
8462   eval "ac_cv_lib_$ac_lib_var=no"
8463 fi
8464 rm -f conftest*
8465 LIBS="$ac_save_LIBS"
8466
8467 fi
8468 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8469   echo "$ac_t""yes" 1>&6
8470     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8471     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8472   cat >> confdefs.h <<EOF
8473 #define $ac_tr_lib 1
8474 EOF
8475
8476   LIBS="-lsec $LIBS"
8477
8478 else
8479   echo "$ac_t""no" 1>&6
8480 fi
8481  
8482      for ac_func in bigcrypt
8483 do
8484 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8485 echo "configure:8486: checking for $ac_func" >&5
8486 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8487   echo $ac_n "(cached) $ac_c" 1>&6
8488 else
8489   cat > conftest.$ac_ext <<EOF
8490 #line 8491 "configure"
8491 #include "confdefs.h"
8492 /* System header to define __stub macros and hopefully few prototypes,
8493     which can conflict with char $ac_func(); below.  */
8494 #include <assert.h>
8495 /* Override any gcc2 internal prototype to avoid an error.  */
8496 /* We use char because int might match the return type of a gcc2
8497     builtin and then its argument prototype would still apply.  */
8498 char $ac_func();
8499
8500 int main() {
8501
8502 /* The GNU C library defines this for functions which it implements
8503     to always fail with ENOSYS.  Some functions are actually named
8504     something starting with __ and the normal name is an alias.  */
8505 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8506 choke me
8507 #else
8508 $ac_func();
8509 #endif
8510
8511 ; return 0; }
8512 EOF
8513 if { (eval echo configure:8514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8514   rm -rf conftest*
8515   eval "ac_cv_func_$ac_func=yes"
8516 else
8517   echo "configure: failed program was:" >&5
8518   cat conftest.$ac_ext >&5
8519   rm -rf conftest*
8520   eval "ac_cv_func_$ac_func=no"
8521 fi
8522 rm -f conftest*
8523 fi
8524
8525 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8526   echo "$ac_t""yes" 1>&6
8527     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8528   cat >> confdefs.h <<EOF
8529 #define $ac_tr_func 1
8530 EOF
8531  
8532 else
8533   echo "$ac_t""no" 1>&6
8534 fi
8535 done
8536
8537   ;;
8538   esac
8539
8540
8541 case "$LIBS" in
8542   *-lsecurity*) for ac_func in getprpwnam
8543 do
8544 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8545 echo "configure:8546: checking for $ac_func" >&5
8546 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8547   echo $ac_n "(cached) $ac_c" 1>&6
8548 else
8549   cat > conftest.$ac_ext <<EOF
8550 #line 8551 "configure"
8551 #include "confdefs.h"
8552 /* System header to define __stub macros and hopefully few prototypes,
8553     which can conflict with char $ac_func(); below.  */
8554 #include <assert.h>
8555 /* Override any gcc2 internal prototype to avoid an error.  */
8556 /* We use char because int might match the return type of a gcc2
8557     builtin and then its argument prototype would still apply.  */
8558 char $ac_func();
8559
8560 int main() {
8561
8562 /* The GNU C library defines this for functions which it implements
8563     to always fail with ENOSYS.  Some functions are actually named
8564     something starting with __ and the normal name is an alias.  */
8565 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8566 choke me
8567 #else
8568 $ac_func();
8569 #endif
8570
8571 ; return 0; }
8572 EOF
8573 if { (eval echo configure:8574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8574   rm -rf conftest*
8575   eval "ac_cv_func_$ac_func=yes"
8576 else
8577   echo "configure: failed program was:" >&5
8578   cat conftest.$ac_ext >&5
8579   rm -rf conftest*
8580   eval "ac_cv_func_$ac_func=no"
8581 fi
8582 rm -f conftest*
8583 fi
8584
8585 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8586   echo "$ac_t""yes" 1>&6
8587     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8588   cat >> confdefs.h <<EOF
8589 #define $ac_tr_func 1
8590 EOF
8591  
8592 else
8593   echo "$ac_t""no" 1>&6
8594 fi
8595 done
8596  ;;
8597   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8598 echo "configure:8599: checking for getprpwnam in -lsecurity" >&5
8599 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8600 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8601   echo $ac_n "(cached) $ac_c" 1>&6
8602 else
8603   ac_save_LIBS="$LIBS"
8604 LIBS="-lsecurity  $LIBS"
8605 cat > conftest.$ac_ext <<EOF
8606 #line 8607 "configure"
8607 #include "confdefs.h"
8608 /* Override any gcc2 internal prototype to avoid an error.  */
8609 /* We use char because int might match the return type of a gcc2
8610     builtin and then its argument prototype would still apply.  */
8611 char getprpwnam();
8612
8613 int main() {
8614 getprpwnam()
8615 ; return 0; }
8616 EOF
8617 if { (eval echo configure:8618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8618   rm -rf conftest*
8619   eval "ac_cv_lib_$ac_lib_var=yes"
8620 else
8621   echo "configure: failed program was:" >&5
8622   cat conftest.$ac_ext >&5
8623   rm -rf conftest*
8624   eval "ac_cv_lib_$ac_lib_var=no"
8625 fi
8626 rm -f conftest*
8627 LIBS="$ac_save_LIBS"
8628
8629 fi
8630 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8631   echo "$ac_t""yes" 1>&6
8632     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8633     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8634   cat >> confdefs.h <<EOF
8635 #define $ac_tr_lib 1
8636 EOF
8637
8638   LIBS="-lsecurity $LIBS"
8639
8640 else
8641   echo "$ac_t""no" 1>&6
8642 fi
8643  
8644      for ac_func in getprpwnam
8645 do
8646 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8647 echo "configure:8648: checking for $ac_func" >&5
8648 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8649   echo $ac_n "(cached) $ac_c" 1>&6
8650 else
8651   cat > conftest.$ac_ext <<EOF
8652 #line 8653 "configure"
8653 #include "confdefs.h"
8654 /* System header to define __stub macros and hopefully few prototypes,
8655     which can conflict with char $ac_func(); below.  */
8656 #include <assert.h>
8657 /* Override any gcc2 internal prototype to avoid an error.  */
8658 /* We use char because int might match the return type of a gcc2
8659     builtin and then its argument prototype would still apply.  */
8660 char $ac_func();
8661
8662 int main() {
8663
8664 /* The GNU C library defines this for functions which it implements
8665     to always fail with ENOSYS.  Some functions are actually named
8666     something starting with __ and the normal name is an alias.  */
8667 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8668 choke me
8669 #else
8670 $ac_func();
8671 #endif
8672
8673 ; return 0; }
8674 EOF
8675 if { (eval echo configure:8676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8676   rm -rf conftest*
8677   eval "ac_cv_func_$ac_func=yes"
8678 else
8679   echo "configure: failed program was:" >&5
8680   cat conftest.$ac_ext >&5
8681   rm -rf conftest*
8682   eval "ac_cv_func_$ac_func=no"
8683 fi
8684 rm -f conftest*
8685 fi
8686
8687 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8688   echo "$ac_t""yes" 1>&6
8689     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8690   cat >> confdefs.h <<EOF
8691 #define $ac_tr_func 1
8692 EOF
8693  
8694 else
8695   echo "$ac_t""no" 1>&6
8696 fi
8697 done
8698
8699   ;;
8700   esac
8701
8702 case "$LIBS" in
8703   *-lsec*) for ac_func in getprpwnam
8704 do
8705 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8706 echo "configure:8707: checking for $ac_func" >&5
8707 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8708   echo $ac_n "(cached) $ac_c" 1>&6
8709 else
8710   cat > conftest.$ac_ext <<EOF
8711 #line 8712 "configure"
8712 #include "confdefs.h"
8713 /* System header to define __stub macros and hopefully few prototypes,
8714     which can conflict with char $ac_func(); below.  */
8715 #include <assert.h>
8716 /* Override any gcc2 internal prototype to avoid an error.  */
8717 /* We use char because int might match the return type of a gcc2
8718     builtin and then its argument prototype would still apply.  */
8719 char $ac_func();
8720
8721 int main() {
8722
8723 /* The GNU C library defines this for functions which it implements
8724     to always fail with ENOSYS.  Some functions are actually named
8725     something starting with __ and the normal name is an alias.  */
8726 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8727 choke me
8728 #else
8729 $ac_func();
8730 #endif
8731
8732 ; return 0; }
8733 EOF
8734 if { (eval echo configure:8735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8735   rm -rf conftest*
8736   eval "ac_cv_func_$ac_func=yes"
8737 else
8738   echo "configure: failed program was:" >&5
8739   cat conftest.$ac_ext >&5
8740   rm -rf conftest*
8741   eval "ac_cv_func_$ac_func=no"
8742 fi
8743 rm -f conftest*
8744 fi
8745
8746 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8747   echo "$ac_t""yes" 1>&6
8748     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8749   cat >> confdefs.h <<EOF
8750 #define $ac_tr_func 1
8751 EOF
8752  
8753 else
8754   echo "$ac_t""no" 1>&6
8755 fi
8756 done
8757  ;;
8758   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8759 echo "configure:8760: checking for getprpwnam in -lsec" >&5
8760 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8761 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8762   echo $ac_n "(cached) $ac_c" 1>&6
8763 else
8764   ac_save_LIBS="$LIBS"
8765 LIBS="-lsec  $LIBS"
8766 cat > conftest.$ac_ext <<EOF
8767 #line 8768 "configure"
8768 #include "confdefs.h"
8769 /* Override any gcc2 internal prototype to avoid an error.  */
8770 /* We use char because int might match the return type of a gcc2
8771     builtin and then its argument prototype would still apply.  */
8772 char getprpwnam();
8773
8774 int main() {
8775 getprpwnam()
8776 ; return 0; }
8777 EOF
8778 if { (eval echo configure:8779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8779   rm -rf conftest*
8780   eval "ac_cv_lib_$ac_lib_var=yes"
8781 else
8782   echo "configure: failed program was:" >&5
8783   cat conftest.$ac_ext >&5
8784   rm -rf conftest*
8785   eval "ac_cv_lib_$ac_lib_var=no"
8786 fi
8787 rm -f conftest*
8788 LIBS="$ac_save_LIBS"
8789
8790 fi
8791 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8792   echo "$ac_t""yes" 1>&6
8793     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8794     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8795   cat >> confdefs.h <<EOF
8796 #define $ac_tr_lib 1
8797 EOF
8798
8799   LIBS="-lsec $LIBS"
8800
8801 else
8802   echo "$ac_t""no" 1>&6
8803 fi
8804  
8805      for ac_func in getprpwnam
8806 do
8807 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8808 echo "configure:8809: checking for $ac_func" >&5
8809 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8810   echo $ac_n "(cached) $ac_c" 1>&6
8811 else
8812   cat > conftest.$ac_ext <<EOF
8813 #line 8814 "configure"
8814 #include "confdefs.h"
8815 /* System header to define __stub macros and hopefully few prototypes,
8816     which can conflict with char $ac_func(); below.  */
8817 #include <assert.h>
8818 /* Override any gcc2 internal prototype to avoid an error.  */
8819 /* We use char because int might match the return type of a gcc2
8820     builtin and then its argument prototype would still apply.  */
8821 char $ac_func();
8822
8823 int main() {
8824
8825 /* The GNU C library defines this for functions which it implements
8826     to always fail with ENOSYS.  Some functions are actually named
8827     something starting with __ and the normal name is an alias.  */
8828 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8829 choke me
8830 #else
8831 $ac_func();
8832 #endif
8833
8834 ; return 0; }
8835 EOF
8836 if { (eval echo configure:8837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8837   rm -rf conftest*
8838   eval "ac_cv_func_$ac_func=yes"
8839 else
8840   echo "configure: failed program was:" >&5
8841   cat conftest.$ac_ext >&5
8842   rm -rf conftest*
8843   eval "ac_cv_func_$ac_func=no"
8844 fi
8845 rm -f conftest*
8846 fi
8847
8848 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8849   echo "$ac_t""yes" 1>&6
8850     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8851   cat >> confdefs.h <<EOF
8852 #define $ac_tr_func 1
8853 EOF
8854  
8855 else
8856   echo "$ac_t""no" 1>&6
8857 fi
8858 done
8859
8860   ;;
8861   esac
8862
8863
8864 # this bit needs to be modified for each OS that is suported by
8865 # smbwrapper. You need to specify how to created a shared library and
8866 # how to compile C code to produce PIC object files
8867
8868 # these are the defaults, good for lots of systems
8869 HOST_OS="$host_os"
8870 LDSHFLAGS="-shared"
8871 SHLD="\${CC}"
8872 PICFLAG=""
8873 PICSUFFIX="po"
8874 POBAD_CC="#"
8875 SHLIBEXT="so"
8876 # Assume non-shared by default and override below
8877 BLDSHARED="false"
8878 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8879 echo "configure:8880: checking ability to build shared libraries" >&5
8880
8881 # and these are for particular systems
8882 case "$host_os" in
8883                 *linux*)   cat >> confdefs.h <<\EOF
8884 #define LINUX 1
8885 EOF
8886
8887                         BLDSHARED="true"
8888                         LDSHFLAGS="-shared" 
8889                         DYNEXP="-Wl,--export-dynamic"
8890                         PICFLAG="-fPIC"
8891                         cat >> confdefs.h <<\EOF
8892 #define STAT_ST_BLOCKSIZE 512
8893 EOF
8894
8895                 ;;
8896                 *solaris*) 
8897                         cat >> confdefs.h <<\EOF
8898 #define SUNOS5 1
8899 EOF
8900
8901                         BLDSHARED="true"
8902                         LDSHFLAGS="-h \$@ -G"
8903                         if test "${GCC}" = "yes"; then
8904                                 PICFLAG="-fPIC"
8905                         else
8906                                 PICFLAG="-KPIC"
8907                                 POBAD_CC=""
8908                                 PICSUFFIX="po.o"
8909                         fi
8910                         cat >> confdefs.h <<\EOF
8911 #define STAT_ST_BLOCKSIZE 512
8912 EOF
8913
8914                 ;;
8915                 *sunos*) cat >> confdefs.h <<\EOF
8916 #define SUNOS4 1
8917 EOF
8918
8919                         BLDSHARED="true"
8920                         LDSHFLAGS="-Wl,-h,\$@ -G"
8921                         PICFLAG="-KPIC"   # Is this correct for SunOS
8922                 ;;
8923                 *bsd*)  BLDSHARED="true"
8924                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8925                         DYNEXP="-Wl,-Bdynamic"
8926                         PICFLAG="-fPIC"
8927                         cat >> confdefs.h <<\EOF
8928 #define STAT_ST_BLOCKSIZE 512
8929 EOF
8930
8931                 ;;
8932                 *irix*) cat >> confdefs.h <<\EOF
8933 #define IRIX 1
8934 EOF
8935
8936                         case "$host_os" in
8937                         *irix6*) cat >> confdefs.h <<\EOF
8938 #define IRIX6 1
8939 EOF
8940
8941                         ;;
8942                         esac
8943                         ATTEMPT_WRAP32_BUILD=yes
8944                         BLDSHARED="true"
8945                         LDSHFLAGS="-soname \$@ -shared"
8946                         SHLD="\${LD}"
8947                         if test "${GCC}" = "yes"; then
8948                                 PICFLAG="-fPIC"
8949                         else 
8950                                 PICFLAG="-KPIC"
8951                         fi
8952                         cat >> confdefs.h <<\EOF
8953 #define STAT_ST_BLOCKSIZE 512
8954 EOF
8955
8956                 ;;
8957                 *aix*) cat >> confdefs.h <<\EOF
8958 #define AIX 1
8959 EOF
8960
8961                         BLDSHARED="true"
8962                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8963                         PICFLAG="-O2 -qmaxmem=6000"
8964                         cat >> confdefs.h <<\EOF
8965 #define STAT_ST_BLOCKSIZE DEV_BSIZE
8966 EOF
8967
8968                 ;;
8969                 *hpux*) cat >> confdefs.h <<\EOF
8970 #define HPUX 1
8971 EOF
8972
8973                         SHLIBEXT="sl"
8974                         # Use special PIC flags for the native HP-UX compiler.
8975                         if test $ac_cv_prog_cc_Ae = yes; then
8976                                 SHLD="/usr/bin/ld"
8977                                 BLDSHARED="true"
8978                                 LDSHFLAGS="-B symbolic -b -z +h \$@"
8979                                 PICFLAG="+z"
8980                         fi
8981                         DYNEXP="-Wl,-E"
8982                         cat >> confdefs.h <<\EOF
8983 #define STAT_ST_BLOCKSIZE 8192
8984 EOF
8985
8986                 ;;
8987                 *qnx*) cat >> confdefs.h <<\EOF
8988 #define QNX 1
8989 EOF
8990 ;;
8991                 *osf*) cat >> confdefs.h <<\EOF
8992 #define OSF1 1
8993 EOF
8994
8995                         BLDSHARED="true"
8996                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8997                         PICFLAG="-fPIC"
8998                 ;;
8999                 *sco*) 
9000                         cat >> confdefs.h <<\EOF
9001 #define SCO 1
9002 EOF
9003
9004                 ;;
9005                 *unixware*) cat >> confdefs.h <<\EOF
9006 #define UNIXWARE 1
9007 EOF
9008
9009                         BLDSHARED="true"
9010                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
9011                         PICFLAG="-KPIC"
9012                 ;;
9013                 *next2*) cat >> confdefs.h <<\EOF
9014 #define NEXT2 1
9015 EOF
9016 ;;
9017                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
9018 set dummy groff; ac_word=$2
9019 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9020 echo "configure:9021: checking for $ac_word" >&5
9021 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
9022   echo $ac_n "(cached) $ac_c" 1>&6
9023 else
9024   if test -n "$ROFF"; then
9025   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
9026 else
9027   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
9028   ac_dummy="$PATH"
9029   for ac_dir in $ac_dummy; do
9030     test -z "$ac_dir" && ac_dir=.
9031     if test -f $ac_dir/$ac_word; then
9032       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
9033       break
9034     fi
9035   done
9036   IFS="$ac_save_ifs"
9037 fi
9038 fi
9039 ROFF="$ac_cv_prog_ROFF"
9040 if test -n "$ROFF"; then
9041   echo "$ac_t""$ROFF" 1>&6
9042 else
9043   echo "$ac_t""no" 1>&6
9044 fi
9045 ;;
9046                 *sysv4*)
9047                         case "$host" in
9048                                 *-univel-*)
9049                                         if  test "$GCC" != yes ; then
9050                                                 cat >> confdefs.h <<\EOF
9051 #define HAVE_MEMSET 1
9052 EOF
9053
9054                                         fi
9055                                         LDSHFLAGS="-G"
9056                                         DYNEXP="-Bexport"
9057                                 ;;
9058                                 *mips-sni-sysv4*)
9059                                         cat >> confdefs.h <<\EOF
9060 #define RELIANTUNIX 1
9061 EOF
9062
9063                                 ;;
9064                         esac
9065                 ;;
9066
9067                 *sysv5*)
9068                         if  test "$GCC" != yes ; then
9069                                 cat >> confdefs.h <<\EOF
9070 #define HAVE_MEMSET 1
9071 EOF
9072
9073                         fi
9074                         LDSHFLAGS="-G"
9075                 ;;
9076 esac
9077
9078 echo "$ac_t""$BLDSHARED" 1>&6
9079 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
9080 echo "configure:9081: checking linker flags for shared libraries" >&5
9081 echo "$ac_t""$LDSHFLAGS" 1>&6
9082 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
9083 echo "configure:9084: checking compiler flags for position-independent code" >&5
9084 echo "$ac_t""$PICFLAGS" 1>&6
9085
9086 #######################################################
9087 # test whether building a shared library actually works
9088 if test $BLDSHARED = true; then
9089 echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6
9090 echo "configure:9091: checking whether building shared libraries actually works" >&5
9091 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then
9092   echo $ac_n "(cached) $ac_c" 1>&6
9093 else
9094   
9095    ac_cv_shlib_works=no
9096    # try building a trivial shared library
9097    $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
9098      $CC $CPPFLAGS $CFLAGS $LDSHFLAGS -o shlib.so shlib.po &&
9099      ac_cv_shlib_works=yes
9100    rm -f shlib.so shlib.po
9101
9102 fi
9103
9104 echo "$ac_t""$ac_cv_shlib_works" 1>&6
9105 if test $ac_cv_shlib_works = no; then
9106    BLDSHARED=false
9107 fi
9108 fi
9109
9110
9111 # this updates our target list if we can build shared libs
9112 if test $BLDSHARED = true; then
9113    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
9114 else
9115    LIBSMBCLIENT_SHARED=
9116 fi
9117
9118 ################
9119
9120 echo $ac_n "checking for long long""... $ac_c" 1>&6
9121 echo "configure:9122: checking for long long" >&5
9122 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
9123   echo $ac_n "(cached) $ac_c" 1>&6
9124 else
9125   
9126 if test "$cross_compiling" = yes; then
9127   samba_cv_have_longlong=cross
9128 else
9129   cat > conftest.$ac_ext <<EOF
9130 #line 9131 "configure"
9131 #include "confdefs.h"
9132 #include <stdio.h>
9133 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
9134 EOF
9135 if { (eval echo configure:9136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9136 then
9137   samba_cv_have_longlong=yes
9138 else
9139   echo "configure: failed program was:" >&5
9140   cat conftest.$ac_ext >&5
9141   rm -fr conftest*
9142   samba_cv_have_longlong=no
9143 fi
9144 rm -fr conftest*
9145 fi
9146
9147 fi
9148
9149 echo "$ac_t""$samba_cv_have_longlong" 1>&6
9150 if test x"$samba_cv_have_longlong" = x"yes"; then
9151     cat >> confdefs.h <<\EOF
9152 #define HAVE_LONGLONG 1
9153 EOF
9154
9155 fi
9156
9157 #
9158 # Check if the compiler supports the LL prefix on long long integers.
9159 # AIX needs this.
9160
9161 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
9162 echo "configure:9163: checking for LL suffix on long long integers" >&5
9163 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
9164   echo $ac_n "(cached) $ac_c" 1>&6
9165 else
9166   
9167     cat > conftest.$ac_ext <<EOF
9168 #line 9169 "configure"
9169 #include "confdefs.h"
9170 #include <stdio.h>
9171 int main() {
9172 long long i = 0x8000000000LL
9173 ; return 0; }
9174 EOF
9175 if { (eval echo configure:9176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9176   rm -rf conftest*
9177   samba_cv_compiler_supports_ll=yes
9178 else
9179   echo "configure: failed program was:" >&5
9180   cat conftest.$ac_ext >&5
9181   rm -rf conftest*
9182   samba_cv_compiler_supports_ll=no
9183 fi
9184 rm -f conftest*
9185 fi
9186
9187 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
9188 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
9189    cat >> confdefs.h <<\EOF
9190 #define COMPILER_SUPPORTS_LL 1
9191 EOF
9192
9193 fi
9194
9195   
9196 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
9197 echo "configure:9198: checking for 64 bit off_t" >&5
9198 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
9199   echo $ac_n "(cached) $ac_c" 1>&6
9200 else
9201   
9202 if test "$cross_compiling" = yes; then
9203   samba_cv_SIZEOF_OFF_T=cross
9204 else
9205   cat > conftest.$ac_ext <<EOF
9206 #line 9207 "configure"
9207 #include "confdefs.h"
9208 #include <stdio.h>
9209 #include <sys/stat.h>
9210 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
9211 EOF
9212 if { (eval echo configure:9213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9213 then
9214   samba_cv_SIZEOF_OFF_T=yes
9215 else
9216   echo "configure: failed program was:" >&5
9217   cat conftest.$ac_ext >&5
9218   rm -fr conftest*
9219   samba_cv_SIZEOF_OFF_T=no
9220 fi
9221 rm -fr conftest*
9222 fi
9223
9224 fi
9225
9226 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
9227 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
9228     cat >> confdefs.h <<\EOF
9229 #define SIZEOF_OFF_T 8
9230 EOF
9231
9232 fi
9233
9234 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
9235 echo "configure:9236: checking for off64_t" >&5
9236 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
9237   echo $ac_n "(cached) $ac_c" 1>&6
9238 else
9239   
9240 if test "$cross_compiling" = yes; then
9241   samba_cv_HAVE_OFF64_T=cross
9242 else
9243   cat > conftest.$ac_ext <<EOF
9244 #line 9245 "configure"
9245 #include "confdefs.h"
9246
9247 #if defined(HAVE_UNISTD_H)
9248 #include <unistd.h>
9249 #endif
9250 #include <stdio.h>
9251 #include <sys/stat.h>
9252 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9253 EOF
9254 if { (eval echo configure:9255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9255 then
9256   samba_cv_HAVE_OFF64_T=yes
9257 else
9258   echo "configure: failed program was:" >&5
9259   cat conftest.$ac_ext >&5
9260   rm -fr conftest*
9261   samba_cv_HAVE_OFF64_T=no
9262 fi
9263 rm -fr conftest*
9264 fi
9265
9266 fi
9267
9268 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
9269 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
9270     cat >> confdefs.h <<\EOF
9271 #define HAVE_OFF64_T 1
9272 EOF
9273
9274 fi
9275
9276 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
9277 echo "configure:9278: checking for 64 bit ino_t" >&5
9278 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
9279   echo $ac_n "(cached) $ac_c" 1>&6
9280 else
9281   
9282 if test "$cross_compiling" = yes; then
9283   samba_cv_SIZEOF_INO_T=cross
9284 else
9285   cat > conftest.$ac_ext <<EOF
9286 #line 9287 "configure"
9287 #include "confdefs.h"
9288 #include <stdio.h>
9289 #include <sys/stat.h>
9290 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
9291 EOF
9292 if { (eval echo configure:9293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9293 then
9294   samba_cv_SIZEOF_INO_T=yes
9295 else
9296   echo "configure: failed program was:" >&5
9297   cat conftest.$ac_ext >&5
9298   rm -fr conftest*
9299   samba_cv_SIZEOF_INO_T=no
9300 fi
9301 rm -fr conftest*
9302 fi
9303
9304 fi
9305
9306 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
9307 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
9308     cat >> confdefs.h <<\EOF
9309 #define SIZEOF_INO_T 8
9310 EOF
9311
9312 fi
9313
9314 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
9315 echo "configure:9316: checking for ino64_t" >&5
9316 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
9317   echo $ac_n "(cached) $ac_c" 1>&6
9318 else
9319   
9320 if test "$cross_compiling" = yes; then
9321   samba_cv_HAVE_INO64_T=cross
9322 else
9323   cat > conftest.$ac_ext <<EOF
9324 #line 9325 "configure"
9325 #include "confdefs.h"
9326
9327 #if defined(HAVE_UNISTD_H)
9328 #include <unistd.h>
9329 #endif
9330 #include <stdio.h>
9331 #include <sys/stat.h>
9332 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9333 EOF
9334 if { (eval echo configure:9335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9335 then
9336   samba_cv_HAVE_INO64_T=yes
9337 else
9338   echo "configure: failed program was:" >&5
9339   cat conftest.$ac_ext >&5
9340   rm -fr conftest*
9341   samba_cv_HAVE_INO64_T=no
9342 fi
9343 rm -fr conftest*
9344 fi
9345
9346 fi
9347
9348 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9349 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9350     cat >> confdefs.h <<\EOF
9351 #define HAVE_INO64_T 1
9352 EOF
9353
9354 fi
9355
9356 echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
9357 echo "configure:9358: checking for dev64_t" >&5
9358 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then
9359   echo $ac_n "(cached) $ac_c" 1>&6
9360 else
9361   
9362 if test "$cross_compiling" = yes; then
9363   samba_cv_HAVE_DEV64_T=cross
9364 else
9365   cat > conftest.$ac_ext <<EOF
9366 #line 9367 "configure"
9367 #include "confdefs.h"
9368
9369 #if defined(HAVE_UNISTD_H)
9370 #include <unistd.h>
9371 #endif
9372 #include <stdio.h>
9373 #include <sys/stat.h>
9374 main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9375 EOF
9376 if { (eval echo configure:9377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9377 then
9378   samba_cv_HAVE_DEV64_T=yes
9379 else
9380   echo "configure: failed program was:" >&5
9381   cat conftest.$ac_ext >&5
9382   rm -fr conftest*
9383   samba_cv_HAVE_DEV64_T=no
9384 fi
9385 rm -fr conftest*
9386 fi
9387
9388 fi
9389
9390 echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6
9391 if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
9392     cat >> confdefs.h <<\EOF
9393 #define HAVE_DEV64_T 1
9394 EOF
9395
9396 fi
9397
9398 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9399 echo "configure:9400: checking for struct dirent64" >&5
9400 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9401   echo $ac_n "(cached) $ac_c" 1>&6
9402 else
9403   
9404 cat > conftest.$ac_ext <<EOF
9405 #line 9406 "configure"
9406 #include "confdefs.h"
9407
9408 #if defined(HAVE_UNISTD_H)
9409 #include <unistd.h>
9410 #endif
9411 #include <sys/types.h>
9412 #include <dirent.h>
9413 int main() {
9414 struct dirent64 de;
9415 ; return 0; }
9416 EOF
9417 if { (eval echo configure:9418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9418   rm -rf conftest*
9419   samba_cv_HAVE_STRUCT_DIRENT64=yes
9420 else
9421   echo "configure: failed program was:" >&5
9422   cat conftest.$ac_ext >&5
9423   rm -rf conftest*
9424   samba_cv_HAVE_STRUCT_DIRENT64=no
9425 fi
9426 rm -f conftest*
9427 fi
9428
9429 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9430 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
9431     cat >> confdefs.h <<\EOF
9432 #define HAVE_STRUCT_DIRENT64 1
9433 EOF
9434
9435 fi
9436
9437 echo $ac_n "checking for major macro""... $ac_c" 1>&6
9438 echo "configure:9439: checking for major macro" >&5
9439 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then
9440   echo $ac_n "(cached) $ac_c" 1>&6
9441 else
9442   
9443 if test "$cross_compiling" = yes; then
9444   samba_cv_HAVE_DEVICE_MAJOR_FN=cross
9445 else
9446   cat > conftest.$ac_ext <<EOF
9447 #line 9448 "configure"
9448 #include "confdefs.h"
9449
9450 #if defined(HAVE_UNISTD_H)
9451 #include <unistd.h>
9452 #endif
9453 #include <sys/types.h>
9454 main() { dev_t dev; int i = major(dev); return 0; }
9455 EOF
9456 if { (eval echo configure:9457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9457 then
9458   samba_cv_HAVE_DEVICE_MAJOR_FN=yes
9459 else
9460   echo "configure: failed program was:" >&5
9461   cat conftest.$ac_ext >&5
9462   rm -fr conftest*
9463   samba_cv_HAVE_DEVICE_MAJOR_FN=no
9464 fi
9465 rm -fr conftest*
9466 fi
9467
9468 fi
9469
9470 echo "$ac_t""$samba_cv_HAVE_DEVICE_MAJOR_FN" 1>&6
9471 if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then
9472     cat >> confdefs.h <<\EOF
9473 #define HAVE_DEVICE_MAJOR_FN 1
9474 EOF
9475
9476 fi
9477
9478 echo $ac_n "checking for minor macro""... $ac_c" 1>&6
9479 echo "configure:9480: checking for minor macro" >&5
9480 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then
9481   echo $ac_n "(cached) $ac_c" 1>&6
9482 else
9483   
9484 if test "$cross_compiling" = yes; then
9485   samba_cv_HAVE_DEVICE_MINOR_FN=cross
9486 else
9487   cat > conftest.$ac_ext <<EOF
9488 #line 9489 "configure"
9489 #include "confdefs.h"
9490
9491 #if defined(HAVE_UNISTD_H)
9492 #include <unistd.h>
9493 #endif
9494 #include <sys/types.h>
9495 main() { dev_t dev; int i = minor(dev); return 0; }
9496 EOF
9497 if { (eval echo configure:9498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9498 then
9499   samba_cv_HAVE_DEVICE_MINOR_FN=yes
9500 else
9501   echo "configure: failed program was:" >&5
9502   cat conftest.$ac_ext >&5
9503   rm -fr conftest*
9504   samba_cv_HAVE_DEVICE_MINOR_FN=no
9505 fi
9506 rm -fr conftest*
9507 fi
9508
9509 fi
9510
9511 echo "$ac_t""$samba_cv_HAVE_DEVICE_MINOR_FN" 1>&6
9512 if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then
9513     cat >> confdefs.h <<\EOF
9514 #define HAVE_DEVICE_MINOR_FN 1
9515 EOF
9516
9517 fi
9518
9519 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9520 echo "configure:9521: checking for unsigned char" >&5
9521 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9522   echo $ac_n "(cached) $ac_c" 1>&6
9523 else
9524   
9525 if test "$cross_compiling" = yes; then
9526   samba_cv_HAVE_UNSIGNED_CHAR=cross
9527 else
9528   cat > conftest.$ac_ext <<EOF
9529 #line 9530 "configure"
9530 #include "confdefs.h"
9531 #include <stdio.h>
9532 main() { char c; c=250; exit((c > 0)?0:1); }
9533 EOF
9534 if { (eval echo configure:9535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9535 then
9536   samba_cv_HAVE_UNSIGNED_CHAR=yes
9537 else
9538   echo "configure: failed program was:" >&5
9539   cat conftest.$ac_ext >&5
9540   rm -fr conftest*
9541   samba_cv_HAVE_UNSIGNED_CHAR=no
9542 fi
9543 rm -fr conftest*
9544 fi
9545
9546 fi
9547
9548 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9549 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9550     cat >> confdefs.h <<\EOF
9551 #define HAVE_UNSIGNED_CHAR 1
9552 EOF
9553
9554 fi
9555
9556 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9557 echo "configure:9558: checking for sin_len in sock" >&5
9558 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9559   echo $ac_n "(cached) $ac_c" 1>&6
9560 else
9561   
9562 cat > conftest.$ac_ext <<EOF
9563 #line 9564 "configure"
9564 #include "confdefs.h"
9565 #include <sys/types.h>
9566 #include <sys/socket.h>
9567 #include <netinet/in.h>
9568 int main() {
9569 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9570 ; return 0; }
9571 EOF
9572 if { (eval echo configure:9573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9573   rm -rf conftest*
9574   samba_cv_HAVE_SOCK_SIN_LEN=yes
9575 else
9576   echo "configure: failed program was:" >&5
9577   cat conftest.$ac_ext >&5
9578   rm -rf conftest*
9579   samba_cv_HAVE_SOCK_SIN_LEN=no
9580 fi
9581 rm -f conftest*
9582 fi
9583
9584 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9585 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9586     cat >> confdefs.h <<\EOF
9587 #define HAVE_SOCK_SIN_LEN 1
9588 EOF
9589
9590 fi
9591
9592 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9593 echo "configure:9594: checking whether seekdir returns void" >&5
9594 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9595   echo $ac_n "(cached) $ac_c" 1>&6
9596 else
9597   
9598 cat > conftest.$ac_ext <<EOF
9599 #line 9600 "configure"
9600 #include "confdefs.h"
9601 #include <sys/types.h>
9602 #include <dirent.h>
9603 void seekdir(DIR *d, long loc) { return; }
9604 int main() {
9605 return 0;
9606 ; return 0; }
9607 EOF
9608 if { (eval echo configure:9609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9609   rm -rf conftest*
9610   samba_cv_SEEKDIR_RETURNS_VOID=yes
9611 else
9612   echo "configure: failed program was:" >&5
9613   cat conftest.$ac_ext >&5
9614   rm -rf conftest*
9615   samba_cv_SEEKDIR_RETURNS_VOID=no
9616 fi
9617 rm -f conftest*
9618 fi
9619
9620 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9621 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9622     cat >> confdefs.h <<\EOF
9623 #define SEEKDIR_RETURNS_VOID 1
9624 EOF
9625
9626 fi
9627
9628 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9629 echo "configure:9630: checking for __FILE__ macro" >&5
9630 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9631   echo $ac_n "(cached) $ac_c" 1>&6
9632 else
9633   
9634 cat > conftest.$ac_ext <<EOF
9635 #line 9636 "configure"
9636 #include "confdefs.h"
9637 #include <stdio.h>
9638 int main() {
9639 printf("%s\n", __FILE__);
9640 ; return 0; }
9641 EOF
9642 if { (eval echo configure:9643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9643   rm -rf conftest*
9644   samba_cv_HAVE_FILE_MACRO=yes
9645 else
9646   echo "configure: failed program was:" >&5
9647   cat conftest.$ac_ext >&5
9648   rm -rf conftest*
9649   samba_cv_HAVE_FILE_MACRO=no
9650 fi
9651 rm -f conftest*
9652 fi
9653
9654 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9655 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9656     cat >> confdefs.h <<\EOF
9657 #define HAVE_FILE_MACRO 1
9658 EOF
9659
9660 fi
9661
9662 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9663 echo "configure:9664: checking for __FUNCTION__ macro" >&5
9664 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9665   echo $ac_n "(cached) $ac_c" 1>&6
9666 else
9667   
9668 cat > conftest.$ac_ext <<EOF
9669 #line 9670 "configure"
9670 #include "confdefs.h"
9671 #include <stdio.h>
9672 int main() {
9673 printf("%s\n", __FUNCTION__);
9674 ; return 0; }
9675 EOF
9676 if { (eval echo configure:9677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9677   rm -rf conftest*
9678   samba_cv_HAVE_FUNCTION_MACRO=yes
9679 else
9680   echo "configure: failed program was:" >&5
9681   cat conftest.$ac_ext >&5
9682   rm -rf conftest*
9683   samba_cv_HAVE_FUNCTION_MACRO=no
9684 fi
9685 rm -f conftest*
9686 fi
9687
9688 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9689 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9690     cat >> confdefs.h <<\EOF
9691 #define HAVE_FUNCTION_MACRO 1
9692 EOF
9693
9694 fi
9695
9696 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9697 echo "configure:9698: checking if gettimeofday takes tz argument" >&5
9698 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9699   echo $ac_n "(cached) $ac_c" 1>&6
9700 else
9701   
9702 if test "$cross_compiling" = yes; then
9703   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9704 else
9705   cat > conftest.$ac_ext <<EOF
9706 #line 9707 "configure"
9707 #include "confdefs.h"
9708
9709 #include <sys/time.h>
9710 #include <unistd.h>
9711 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9712 EOF
9713 if { (eval echo configure:9714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9714 then
9715   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9716 else
9717   echo "configure: failed program was:" >&5
9718   cat conftest.$ac_ext >&5
9719   rm -fr conftest*
9720   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9721 fi
9722 rm -fr conftest*
9723 fi
9724
9725 fi
9726
9727 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9728 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9729     cat >> confdefs.h <<\EOF
9730 #define HAVE_GETTIMEOFDAY_TZ 1
9731 EOF
9732
9733 fi
9734
9735 echo $ac_n "checking for __va_copy""... $ac_c" 1>&6
9736 echo "configure:9737: checking for __va_copy" >&5
9737 if eval "test \"`echo '$''{'samba_cv_HAVE_VA_COPY'+set}'`\" = set"; then
9738   echo $ac_n "(cached) $ac_c" 1>&6
9739 else
9740   
9741 cat > conftest.$ac_ext <<EOF
9742 #line 9743 "configure"
9743 #include "confdefs.h"
9744 #include <stdarg.h>
9745 va_list ap1,ap2;
9746 int main() {
9747 __va_copy(ap1,ap2);
9748 ; return 0; }
9749 EOF
9750 if { (eval echo configure:9751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9751   rm -rf conftest*
9752   samba_cv_HAVE_VA_COPY=yes
9753 else
9754   echo "configure: failed program was:" >&5
9755   cat conftest.$ac_ext >&5
9756   rm -rf conftest*
9757   samba_cv_HAVE_VA_COPY=no
9758 fi
9759 rm -f conftest*
9760 fi
9761
9762 echo "$ac_t""$samba_cv_HAVE_VA_COPY" 1>&6
9763 if test x"$samba_cv_HAVE_VA_COPY" = x"yes"; then
9764     cat >> confdefs.h <<\EOF
9765 #define HAVE_VA_COPY 1
9766 EOF
9767
9768 fi
9769
9770 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9771 echo "configure:9772: checking for C99 vsnprintf" >&5
9772 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9773   echo $ac_n "(cached) $ac_c" 1>&6
9774 else
9775   
9776 if test "$cross_compiling" = yes; then
9777   samba_cv_HAVE_C99_VSNPRINTF=cross
9778 else
9779   cat > conftest.$ac_ext <<EOF
9780 #line 9781 "configure"
9781 #include "confdefs.h"
9782
9783 #include <sys/types.h>
9784 #include <stdarg.h>
9785 void foo(const char *format, ...) { 
9786        va_list ap;
9787        int len;
9788        char buf[5];
9789
9790        va_start(ap, format);
9791        len = vsnprintf(buf, 0, format, ap);
9792        va_end(ap);
9793        if (len != 5) exit(1);
9794
9795        va_start(ap, format);
9796        len = vsnprintf(0, 0, format, ap);
9797        va_end(ap);
9798        if (len != 5) exit(1);
9799
9800        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9801
9802        exit(0);
9803 }
9804 main() { foo("hello"); }
9805
9806 EOF
9807 if { (eval echo configure:9808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9808 then
9809   samba_cv_HAVE_C99_VSNPRINTF=yes
9810 else
9811   echo "configure: failed program was:" >&5
9812   cat conftest.$ac_ext >&5
9813   rm -fr conftest*
9814   samba_cv_HAVE_C99_VSNPRINTF=no
9815 fi
9816 rm -fr conftest*
9817 fi
9818
9819 fi
9820
9821 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9822 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9823     cat >> confdefs.h <<\EOF
9824 #define HAVE_C99_VSNPRINTF 1
9825 EOF
9826
9827 fi
9828
9829 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9830 echo "configure:9831: checking for broken readdir" >&5
9831 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9832   echo $ac_n "(cached) $ac_c" 1>&6
9833 else
9834   
9835 if test "$cross_compiling" = yes; then
9836   samba_cv_HAVE_BROKEN_READDIR=cross
9837 else
9838   cat > conftest.$ac_ext <<EOF
9839 #line 9840 "configure"
9840 #include "confdefs.h"
9841 #include <sys/types.h>
9842 #include <dirent.h>
9843 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9844 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9845 di->d_name[0] == 0) exit(0); exit(1);} 
9846 EOF
9847 if { (eval echo configure:9848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9848 then
9849   samba_cv_HAVE_BROKEN_READDIR=yes
9850 else
9851   echo "configure: failed program was:" >&5
9852   cat conftest.$ac_ext >&5
9853   rm -fr conftest*
9854   samba_cv_HAVE_BROKEN_READDIR=no
9855 fi
9856 rm -fr conftest*
9857 fi
9858
9859 fi
9860
9861 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9862 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9863     cat >> confdefs.h <<\EOF
9864 #define HAVE_BROKEN_READDIR 1
9865 EOF
9866
9867 fi
9868
9869 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9870 echo "configure:9871: checking for utimbuf" >&5
9871 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9872   echo $ac_n "(cached) $ac_c" 1>&6
9873 else
9874   
9875 cat > conftest.$ac_ext <<EOF
9876 #line 9877 "configure"
9877 #include "confdefs.h"
9878 #include <sys/types.h>
9879 #include <utime.h>
9880 int main() {
9881 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9882 ; return 0; }
9883 EOF
9884 if { (eval echo configure:9885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9885   rm -rf conftest*
9886   samba_cv_HAVE_UTIMBUF=yes
9887 else
9888   echo "configure: failed program was:" >&5
9889   cat conftest.$ac_ext >&5
9890   rm -rf conftest*
9891   samba_cv_HAVE_UTIMBUF=no
9892 fi
9893 rm -f conftest*
9894 fi
9895
9896 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9897 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9898     cat >> confdefs.h <<\EOF
9899 #define HAVE_UTIMBUF 1
9900 EOF
9901
9902 fi
9903
9904
9905 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9906 do
9907 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9908 echo "configure:9909: checking for $ac_func" >&5
9909 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9910   echo $ac_n "(cached) $ac_c" 1>&6
9911 else
9912   cat > conftest.$ac_ext <<EOF
9913 #line 9914 "configure"
9914 #include "confdefs.h"
9915 /* System header to define __stub macros and hopefully few prototypes,
9916     which can conflict with char $ac_func(); below.  */
9917 #include <assert.h>
9918 /* Override any gcc2 internal prototype to avoid an error.  */
9919 /* We use char because int might match the return type of a gcc2
9920     builtin and then its argument prototype would still apply.  */
9921 char $ac_func();
9922
9923 int main() {
9924
9925 /* The GNU C library defines this for functions which it implements
9926     to always fail with ENOSYS.  Some functions are actually named
9927     something starting with __ and the normal name is an alias.  */
9928 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9929 choke me
9930 #else
9931 $ac_func();
9932 #endif
9933
9934 ; return 0; }
9935 EOF
9936 if { (eval echo configure:9937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9937   rm -rf conftest*
9938   eval "ac_cv_func_$ac_func=yes"
9939 else
9940   echo "configure: failed program was:" >&5
9941   cat conftest.$ac_ext >&5
9942   rm -rf conftest*
9943   eval "ac_cv_func_$ac_func=no"
9944 fi
9945 rm -f conftest*
9946 fi
9947
9948 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9949   echo "$ac_t""yes" 1>&6
9950     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9951   cat >> confdefs.h <<EOF
9952 #define $ac_tr_func 1
9953 EOF
9954  
9955 else
9956   echo "$ac_t""no" 1>&6
9957 fi
9958 done
9959
9960
9961 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9962 echo "configure:9963: checking for ut_name in utmp" >&5
9963 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9964   echo $ac_n "(cached) $ac_c" 1>&6
9965 else
9966   
9967 cat > conftest.$ac_ext <<EOF
9968 #line 9969 "configure"
9969 #include "confdefs.h"
9970 #include <sys/types.h>
9971 #include <utmp.h>
9972 int main() {
9973 struct utmp ut;  ut.ut_name[0] = 'a';
9974 ; return 0; }
9975 EOF
9976 if { (eval echo configure:9977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9977   rm -rf conftest*
9978   samba_cv_HAVE_UT_UT_NAME=yes
9979 else
9980   echo "configure: failed program was:" >&5
9981   cat conftest.$ac_ext >&5
9982   rm -rf conftest*
9983   samba_cv_HAVE_UT_UT_NAME=no
9984 fi
9985 rm -f conftest*
9986 fi
9987
9988 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9989 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9990     cat >> confdefs.h <<\EOF
9991 #define HAVE_UT_UT_NAME 1
9992 EOF
9993
9994 fi 
9995
9996 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9997 echo "configure:9998: checking for ut_user in utmp" >&5
9998 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9999   echo $ac_n "(cached) $ac_c" 1>&6
10000 else
10001   
10002 cat > conftest.$ac_ext <<EOF
10003 #line 10004 "configure"
10004 #include "confdefs.h"
10005 #include <sys/types.h>
10006 #include <utmp.h>
10007 int main() {
10008 struct utmp ut;  ut.ut_user[0] = 'a';
10009 ; return 0; }
10010 EOF
10011 if { (eval echo configure:10012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10012   rm -rf conftest*
10013   samba_cv_HAVE_UT_UT_USER=yes
10014 else
10015   echo "configure: failed program was:" >&5
10016   cat conftest.$ac_ext >&5
10017   rm -rf conftest*
10018   samba_cv_HAVE_UT_UT_USER=no
10019 fi
10020 rm -f conftest*
10021 fi
10022
10023 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
10024 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
10025     cat >> confdefs.h <<\EOF
10026 #define HAVE_UT_UT_USER 1
10027 EOF
10028
10029 fi 
10030
10031 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
10032 echo "configure:10033: checking for ut_id in utmp" >&5
10033 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
10034   echo $ac_n "(cached) $ac_c" 1>&6
10035 else
10036   
10037 cat > conftest.$ac_ext <<EOF
10038 #line 10039 "configure"
10039 #include "confdefs.h"
10040 #include <sys/types.h>
10041 #include <utmp.h>
10042 int main() {
10043 struct utmp ut;  ut.ut_id[0] = 'a';
10044 ; return 0; }
10045 EOF
10046 if { (eval echo configure:10047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10047   rm -rf conftest*
10048   samba_cv_HAVE_UT_UT_ID=yes
10049 else
10050   echo "configure: failed program was:" >&5
10051   cat conftest.$ac_ext >&5
10052   rm -rf conftest*
10053   samba_cv_HAVE_UT_UT_ID=no
10054 fi
10055 rm -f conftest*
10056 fi
10057
10058 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
10059 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
10060     cat >> confdefs.h <<\EOF
10061 #define HAVE_UT_UT_ID 1
10062 EOF
10063
10064 fi 
10065
10066 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
10067 echo "configure:10068: checking for ut_host in utmp" >&5
10068 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
10069   echo $ac_n "(cached) $ac_c" 1>&6
10070 else
10071   
10072 cat > conftest.$ac_ext <<EOF
10073 #line 10074 "configure"
10074 #include "confdefs.h"
10075 #include <sys/types.h>
10076 #include <utmp.h>
10077 int main() {
10078 struct utmp ut;  ut.ut_host[0] = 'a';
10079 ; return 0; }
10080 EOF
10081 if { (eval echo configure:10082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10082   rm -rf conftest*
10083   samba_cv_HAVE_UT_UT_HOST=yes
10084 else
10085   echo "configure: failed program was:" >&5
10086   cat conftest.$ac_ext >&5
10087   rm -rf conftest*
10088   samba_cv_HAVE_UT_UT_HOST=no
10089 fi
10090 rm -f conftest*
10091 fi
10092
10093 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
10094 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
10095     cat >> confdefs.h <<\EOF
10096 #define HAVE_UT_UT_HOST 1
10097 EOF
10098
10099 fi 
10100
10101 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
10102 echo "configure:10103: checking for ut_time in utmp" >&5
10103 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
10104   echo $ac_n "(cached) $ac_c" 1>&6
10105 else
10106   
10107 cat > conftest.$ac_ext <<EOF
10108 #line 10109 "configure"
10109 #include "confdefs.h"
10110 #include <sys/types.h>
10111 #include <utmp.h>
10112 int main() {
10113 struct utmp ut;  time_t t; ut.ut_time = t;
10114 ; return 0; }
10115 EOF
10116 if { (eval echo configure:10117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10117   rm -rf conftest*
10118   samba_cv_HAVE_UT_UT_TIME=yes
10119 else
10120   echo "configure: failed program was:" >&5
10121   cat conftest.$ac_ext >&5
10122   rm -rf conftest*
10123   samba_cv_HAVE_UT_UT_TIME=no
10124 fi
10125 rm -f conftest*
10126 fi
10127
10128 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
10129 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
10130     cat >> confdefs.h <<\EOF
10131 #define HAVE_UT_UT_TIME 1
10132 EOF
10133
10134 fi 
10135
10136 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
10137 echo "configure:10138: checking for ut_tv in utmp" >&5
10138 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
10139   echo $ac_n "(cached) $ac_c" 1>&6
10140 else
10141   
10142 cat > conftest.$ac_ext <<EOF
10143 #line 10144 "configure"
10144 #include "confdefs.h"
10145 #include <sys/types.h>
10146 #include <utmp.h>
10147 int main() {
10148 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
10149 ; return 0; }
10150 EOF
10151 if { (eval echo configure:10152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10152   rm -rf conftest*
10153   samba_cv_HAVE_UT_UT_TV=yes
10154 else
10155   echo "configure: failed program was:" >&5
10156   cat conftest.$ac_ext >&5
10157   rm -rf conftest*
10158   samba_cv_HAVE_UT_UT_TV=no
10159 fi
10160 rm -f conftest*
10161 fi
10162
10163 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
10164 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
10165     cat >> confdefs.h <<\EOF
10166 #define HAVE_UT_UT_TV 1
10167 EOF
10168
10169 fi 
10170
10171 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
10172 echo "configure:10173: checking for ut_type in utmp" >&5
10173 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
10174   echo $ac_n "(cached) $ac_c" 1>&6
10175 else
10176   
10177 cat > conftest.$ac_ext <<EOF
10178 #line 10179 "configure"
10179 #include "confdefs.h"
10180 #include <sys/types.h>
10181 #include <utmp.h>
10182 int main() {
10183 struct utmp ut;  ut.ut_type = 0;
10184 ; return 0; }
10185 EOF
10186 if { (eval echo configure:10187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10187   rm -rf conftest*
10188   samba_cv_HAVE_UT_UT_TYPE=yes
10189 else
10190   echo "configure: failed program was:" >&5
10191   cat conftest.$ac_ext >&5
10192   rm -rf conftest*
10193   samba_cv_HAVE_UT_UT_TYPE=no
10194 fi
10195 rm -f conftest*
10196 fi
10197
10198 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
10199 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
10200     cat >> confdefs.h <<\EOF
10201 #define HAVE_UT_UT_TYPE 1
10202 EOF
10203
10204 fi 
10205
10206 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
10207 echo "configure:10208: checking for ut_pid in utmp" >&5
10208 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
10209   echo $ac_n "(cached) $ac_c" 1>&6
10210 else
10211   
10212 cat > conftest.$ac_ext <<EOF
10213 #line 10214 "configure"
10214 #include "confdefs.h"
10215 #include <sys/types.h>
10216 #include <utmp.h>
10217 int main() {
10218 struct utmp ut;  ut.ut_pid = 0;
10219 ; return 0; }
10220 EOF
10221 if { (eval echo configure:10222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10222   rm -rf conftest*
10223   samba_cv_HAVE_UT_UT_PID=yes
10224 else
10225   echo "configure: failed program was:" >&5
10226   cat conftest.$ac_ext >&5
10227   rm -rf conftest*
10228   samba_cv_HAVE_UT_UT_PID=no
10229 fi
10230 rm -f conftest*
10231 fi
10232
10233 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
10234 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
10235     cat >> confdefs.h <<\EOF
10236 #define HAVE_UT_UT_PID 1
10237 EOF
10238
10239 fi 
10240
10241 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
10242 echo "configure:10243: checking for ut_exit in utmp" >&5
10243 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
10244   echo $ac_n "(cached) $ac_c" 1>&6
10245 else
10246   
10247 cat > conftest.$ac_ext <<EOF
10248 #line 10249 "configure"
10249 #include "confdefs.h"
10250 #include <sys/types.h>
10251 #include <utmp.h>
10252 int main() {
10253 struct utmp ut;  ut.ut_exit.e_exit = 0;
10254 ; return 0; }
10255 EOF
10256 if { (eval echo configure:10257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10257   rm -rf conftest*
10258   samba_cv_HAVE_UT_UT_EXIT=yes
10259 else
10260   echo "configure: failed program was:" >&5
10261   cat conftest.$ac_ext >&5
10262   rm -rf conftest*
10263   samba_cv_HAVE_UT_UT_EXIT=no
10264 fi
10265 rm -f conftest*
10266 fi
10267
10268 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
10269 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
10270     cat >> confdefs.h <<\EOF
10271 #define HAVE_UT_UT_EXIT 1
10272 EOF
10273
10274 fi 
10275
10276 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
10277 echo "configure:10278: checking for ut_addr in utmp" >&5
10278 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
10279   echo $ac_n "(cached) $ac_c" 1>&6
10280 else
10281   
10282 cat > conftest.$ac_ext <<EOF
10283 #line 10284 "configure"
10284 #include "confdefs.h"
10285 #include <sys/types.h>
10286 #include <utmp.h>
10287 int main() {
10288 struct utmp ut;  ut.ut_addr = 0;
10289 ; return 0; }
10290 EOF
10291 if { (eval echo configure:10292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10292   rm -rf conftest*
10293   samba_cv_HAVE_UT_UT_ADDR=yes
10294 else
10295   echo "configure: failed program was:" >&5
10296   cat conftest.$ac_ext >&5
10297   rm -rf conftest*
10298   samba_cv_HAVE_UT_UT_ADDR=no
10299 fi
10300 rm -f conftest*
10301 fi
10302
10303 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
10304 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
10305     cat >> confdefs.h <<\EOF
10306 #define HAVE_UT_UT_ADDR 1
10307 EOF
10308
10309 fi 
10310
10311 if test x$ac_cv_func_pututline = xyes ; then
10312   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
10313 echo "configure:10314: checking whether pututline returns pointer" >&5
10314 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
10315   echo $ac_n "(cached) $ac_c" 1>&6
10316 else
10317   
10318   cat > conftest.$ac_ext <<EOF
10319 #line 10320 "configure"
10320 #include "confdefs.h"
10321 #include <sys/types.h>
10322 #include <utmp.h>
10323 int main() {
10324 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
10325 ; return 0; }
10326 EOF
10327 if { (eval echo configure:10328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10328   rm -rf conftest*
10329   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
10330 else
10331   echo "configure: failed program was:" >&5
10332   cat conftest.$ac_ext >&5
10333   rm -rf conftest*
10334   samba_cv_PUTUTLINE_RETURNS_UTMP=no
10335 fi
10336 rm -f conftest*
10337 fi
10338
10339 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
10340   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
10341       cat >> confdefs.h <<\EOF
10342 #define PUTUTLINE_RETURNS_UTMP 1
10343 EOF
10344
10345   fi
10346 fi
10347
10348 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
10349 echo "configure:10350: checking for ut_syslen in utmpx" >&5
10350 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
10351   echo $ac_n "(cached) $ac_c" 1>&6
10352 else
10353   
10354 cat > conftest.$ac_ext <<EOF
10355 #line 10356 "configure"
10356 #include "confdefs.h"
10357 #include <sys/types.h>
10358 #include <utmpx.h>
10359 int main() {
10360 struct utmpx ux;  ux.ut_syslen = 0;
10361 ; return 0; }
10362 EOF
10363 if { (eval echo configure:10364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10364   rm -rf conftest*
10365   samba_cv_HAVE_UX_UT_SYSLEN=yes
10366 else
10367   echo "configure: failed program was:" >&5
10368   cat conftest.$ac_ext >&5
10369   rm -rf conftest*
10370   samba_cv_HAVE_UX_UT_SYSLEN=no
10371 fi
10372 rm -f conftest*
10373 fi
10374
10375 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
10376 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
10377     cat >> confdefs.h <<\EOF
10378 #define HAVE_UX_UT_SYSLEN 1
10379 EOF
10380
10381 fi 
10382
10383
10384 #################################################
10385 # check for libiconv support
10386 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
10387 echo "configure:10388: checking whether to use libiconv" >&5
10388 # Check whether --with-libiconv or --without-libiconv was given.
10389 if test "${with_libiconv+set}" = set; then
10390   withval="$with_libiconv"
10391    case "$withval" in
10392   no)
10393     echo "$ac_t""no" 1>&6
10394     ;;
10395   *)
10396     echo "$ac_t""yes" 1>&6
10397     CFLAGS="$CFLAGS -I$withval/include"
10398     LDFLAGS="$LDFLAGS -L$withval/lib"
10399     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
10400 echo "configure:10401: checking for iconv_open in -liconv" >&5
10401 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
10402 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10403   echo $ac_n "(cached) $ac_c" 1>&6
10404 else
10405   ac_save_LIBS="$LIBS"
10406 LIBS="-liconv  $LIBS"
10407 cat > conftest.$ac_ext <<EOF
10408 #line 10409 "configure"
10409 #include "confdefs.h"
10410 /* Override any gcc2 internal prototype to avoid an error.  */
10411 /* We use char because int might match the return type of a gcc2
10412     builtin and then its argument prototype would still apply.  */
10413 char iconv_open();
10414
10415 int main() {
10416 iconv_open()
10417 ; return 0; }
10418 EOF
10419 if { (eval echo configure:10420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10420   rm -rf conftest*
10421   eval "ac_cv_lib_$ac_lib_var=yes"
10422 else
10423   echo "configure: failed program was:" >&5
10424   cat conftest.$ac_ext >&5
10425   rm -rf conftest*
10426   eval "ac_cv_lib_$ac_lib_var=no"
10427 fi
10428 rm -f conftest*
10429 LIBS="$ac_save_LIBS"
10430
10431 fi
10432 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10433   echo "$ac_t""yes" 1>&6
10434     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10435     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10436   cat >> confdefs.h <<EOF
10437 #define $ac_tr_lib 1
10438 EOF
10439
10440   LIBS="-liconv $LIBS"
10441
10442 else
10443   echo "$ac_t""no" 1>&6
10444 fi
10445
10446     cat >> confdefs.h <<EOF
10447 #define WITH_LIBICONV "${withval}"
10448 EOF
10449
10450     ;;
10451   esac 
10452 else
10453   echo "$ac_t""no" 1>&6
10454
10455 fi
10456
10457
10458
10459 ############
10460 # check for iconv in libc
10461 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
10462 echo "configure:10463: checking for working iconv" >&5
10463 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
10464   echo $ac_n "(cached) $ac_c" 1>&6
10465 else
10466   
10467 if test "$cross_compiling" = yes; then
10468   samba_cv_HAVE_NATIVE_ICONV=cross
10469 else
10470   cat > conftest.$ac_ext <<EOF
10471 #line 10472 "configure"
10472 #include "confdefs.h"
10473
10474 #include <iconv.h>
10475 main() {
10476        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
10477        if (cd == 0 || cd == (iconv_t)-1) return -1;
10478        return 0;
10479 }
10480
10481 EOF
10482 if { (eval echo configure:10483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10483 then
10484   samba_cv_HAVE_NATIVE_ICONV=yes
10485 else
10486   echo "configure: failed program was:" >&5
10487   cat conftest.$ac_ext >&5
10488   rm -fr conftest*
10489   samba_cv_HAVE_NATIVE_ICONV=no
10490 fi
10491 rm -fr conftest*
10492 fi
10493
10494 fi
10495
10496 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
10497 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
10498     cat >> confdefs.h <<\EOF
10499 #define HAVE_NATIVE_ICONV 1
10500 EOF
10501
10502 fi
10503
10504
10505 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
10506 echo "configure:10507: checking for Linux kernel oplocks" >&5
10507 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
10508   echo $ac_n "(cached) $ac_c" 1>&6
10509 else
10510   
10511 if test "$cross_compiling" = yes; then
10512   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
10513 else
10514   cat > conftest.$ac_ext <<EOF
10515 #line 10516 "configure"
10516 #include "confdefs.h"
10517
10518 #include <sys/types.h>
10519 #include <fcntl.h>
10520 #ifndef F_GETLEASE
10521 #define F_GETLEASE      1025
10522 #endif
10523 main() {
10524        int fd = open("/dev/null", O_RDONLY);
10525        return fcntl(fd, F_GETLEASE, 0) == -1;
10526 }
10527
10528 EOF
10529 if { (eval echo configure:10530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10530 then
10531   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10532 else
10533   echo "configure: failed program was:" >&5
10534   cat conftest.$ac_ext >&5
10535   rm -fr conftest*
10536   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10537 fi
10538 rm -fr conftest*
10539 fi
10540
10541 fi
10542
10543 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10544 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10545     cat >> confdefs.h <<\EOF
10546 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10547 EOF
10548
10549 fi
10550
10551 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10552 echo "configure:10553: checking for kernel change notify support" >&5
10553 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10554   echo $ac_n "(cached) $ac_c" 1>&6
10555 else
10556   
10557 if test "$cross_compiling" = yes; then
10558   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10559 else
10560   cat > conftest.$ac_ext <<EOF
10561 #line 10562 "configure"
10562 #include "confdefs.h"
10563
10564 #include <sys/types.h>
10565 #include <fcntl.h>
10566 #include <signal.h>
10567 #ifndef F_NOTIFY
10568 #define F_NOTIFY 1026
10569 #endif
10570 main() {
10571         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10572 }
10573
10574 EOF
10575 if { (eval echo configure:10576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10576 then
10577   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10578 else
10579   echo "configure: failed program was:" >&5
10580   cat conftest.$ac_ext >&5
10581   rm -fr conftest*
10582   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10583 fi
10584 rm -fr conftest*
10585 fi
10586
10587 fi
10588
10589 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10590 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10591     cat >> confdefs.h <<\EOF
10592 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10593 EOF
10594
10595 fi
10596
10597 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10598 echo "configure:10599: checking for kernel share modes" >&5
10599 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10600   echo $ac_n "(cached) $ac_c" 1>&6
10601 else
10602   
10603 if test "$cross_compiling" = yes; then
10604   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10605 else
10606   cat > conftest.$ac_ext <<EOF
10607 #line 10608 "configure"
10608 #include "confdefs.h"
10609
10610 #include <sys/types.h>
10611 #include <fcntl.h>
10612 #include <signal.h>
10613 #include <sys/file.h>
10614 #ifndef LOCK_MAND
10615 #define LOCK_MAND       32
10616 #define LOCK_READ       64
10617 #endif
10618 main() {
10619         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10620 }
10621
10622 EOF
10623 if { (eval echo configure:10624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10624 then
10625   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10626 else
10627   echo "configure: failed program was:" >&5
10628   cat conftest.$ac_ext >&5
10629   rm -fr conftest*
10630   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10631 fi
10632 rm -fr conftest*
10633 fi
10634
10635 fi
10636
10637 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10638 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10639     cat >> confdefs.h <<\EOF
10640 #define HAVE_KERNEL_SHARE_MODES 1
10641 EOF
10642
10643 fi
10644
10645
10646
10647
10648 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10649 echo "configure:10650: checking for IRIX kernel oplock type definitions" >&5
10650 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10651   echo $ac_n "(cached) $ac_c" 1>&6
10652 else
10653   
10654 cat > conftest.$ac_ext <<EOF
10655 #line 10656 "configure"
10656 #include "confdefs.h"
10657 #include <sys/types.h>
10658 #include <fcntl.h>
10659 int main() {
10660 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10661 ; return 0; }
10662 EOF
10663 if { (eval echo configure:10664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10664   rm -rf conftest*
10665   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10666 else
10667   echo "configure: failed program was:" >&5
10668   cat conftest.$ac_ext >&5
10669   rm -rf conftest*
10670   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10671 fi
10672 rm -f conftest*
10673 fi
10674
10675 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10676 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10677     cat >> confdefs.h <<\EOF
10678 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10679 EOF
10680
10681 fi
10682
10683 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10684 echo "configure:10685: checking for irix specific capabilities" >&5
10685 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10686   echo $ac_n "(cached) $ac_c" 1>&6
10687 else
10688   
10689 if test "$cross_compiling" = yes; then
10690   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10691 else
10692   cat > conftest.$ac_ext <<EOF
10693 #line 10694 "configure"
10694 #include "confdefs.h"
10695 #include <sys/types.h>
10696 #include <sys/capability.h>
10697 main() {
10698  cap_t cap;
10699  if ((cap = cap_get_proc()) == NULL)
10700    exit(1);
10701  cap->cap_effective |= CAP_NETWORK_MGT;
10702  cap->cap_inheritable |= CAP_NETWORK_MGT;
10703  cap_set_proc(cap);
10704  exit(0);
10705 }
10706
10707 EOF
10708 if { (eval echo configure:10709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10709 then
10710   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10711 else
10712   echo "configure: failed program was:" >&5
10713   cat conftest.$ac_ext >&5
10714   rm -fr conftest*
10715   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10716 fi
10717 rm -fr conftest*
10718 fi
10719
10720 fi
10721
10722 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10723 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10724     cat >> confdefs.h <<\EOF
10725 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10726 EOF
10727
10728 fi
10729
10730 #
10731 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10732 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10733 #
10734
10735 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10736 echo "configure:10737: checking for int16 typedef included by rpc/rpc.h" >&5
10737 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10738   echo $ac_n "(cached) $ac_c" 1>&6
10739 else
10740   
10741 cat > conftest.$ac_ext <<EOF
10742 #line 10743 "configure"
10743 #include "confdefs.h"
10744 #include <sys/types.h>
10745 #if defined(HAVE_RPC_RPC_H)
10746 #include <rpc/rpc.h>
10747 #endif
10748 int main() {
10749 int16 testvar;
10750 ; return 0; }
10751 EOF
10752 if { (eval echo configure:10753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10753   rm -rf conftest*
10754   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10755 else
10756   echo "configure: failed program was:" >&5
10757   cat conftest.$ac_ext >&5
10758   rm -rf conftest*
10759   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10760 fi
10761 rm -f conftest*
10762 fi
10763
10764 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10765 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10766     cat >> confdefs.h <<\EOF
10767 #define HAVE_INT16_FROM_RPC_RPC_H 1
10768 EOF
10769
10770 fi
10771
10772 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10773 echo "configure:10774: checking for uint16 typedef included by rpc/rpc.h" >&5
10774 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10775   echo $ac_n "(cached) $ac_c" 1>&6
10776 else
10777   
10778 cat > conftest.$ac_ext <<EOF
10779 #line 10780 "configure"
10780 #include "confdefs.h"
10781 #include <sys/types.h>
10782 #if defined(HAVE_RPC_RPC_H)
10783 #include <rpc/rpc.h>
10784 #endif
10785 int main() {
10786 uint16 testvar;
10787 ; return 0; }
10788 EOF
10789 if { (eval echo configure:10790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10790   rm -rf conftest*
10791   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10792 else
10793   echo "configure: failed program was:" >&5
10794   cat conftest.$ac_ext >&5
10795   rm -rf conftest*
10796   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10797 fi
10798 rm -f conftest*
10799 fi
10800
10801 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10802 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10803     cat >> confdefs.h <<\EOF
10804 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10805 EOF
10806
10807 fi
10808
10809 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10810 echo "configure:10811: checking for int32 typedef included by rpc/rpc.h" >&5
10811 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10812   echo $ac_n "(cached) $ac_c" 1>&6
10813 else
10814   
10815 cat > conftest.$ac_ext <<EOF
10816 #line 10817 "configure"
10817 #include "confdefs.h"
10818 #include <sys/types.h>
10819 #if defined(HAVE_RPC_RPC_H)
10820 #include <rpc/rpc.h>
10821 #endif
10822 int main() {
10823 int32 testvar;
10824 ; return 0; }
10825 EOF
10826 if { (eval echo configure:10827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10827   rm -rf conftest*
10828   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10829 else
10830   echo "configure: failed program was:" >&5
10831   cat conftest.$ac_ext >&5
10832   rm -rf conftest*
10833   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10834 fi
10835 rm -f conftest*
10836 fi
10837
10838 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10839 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10840     cat >> confdefs.h <<\EOF
10841 #define HAVE_INT32_FROM_RPC_RPC_H 1
10842 EOF
10843
10844 fi
10845
10846 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10847 echo "configure:10848: checking for uint32 typedef included by rpc/rpc.h" >&5
10848 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10849   echo $ac_n "(cached) $ac_c" 1>&6
10850 else
10851   
10852 cat > conftest.$ac_ext <<EOF
10853 #line 10854 "configure"
10854 #include "confdefs.h"
10855 #include <sys/types.h>
10856 #if defined(HAVE_RPC_RPC_H)
10857 #include <rpc/rpc.h>
10858 #endif
10859 int main() {
10860 uint32 testvar;
10861 ; return 0; }
10862 EOF
10863 if { (eval echo configure:10864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10864   rm -rf conftest*
10865   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10866 else
10867   echo "configure: failed program was:" >&5
10868   cat conftest.$ac_ext >&5
10869   rm -rf conftest*
10870   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10871 fi
10872 rm -f conftest*
10873 fi
10874
10875 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10876 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10877     cat >> confdefs.h <<\EOF
10878 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10879 EOF
10880
10881 fi
10882
10883
10884 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10885 echo "configure:10886: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10886 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10887   echo $ac_n "(cached) $ac_c" 1>&6
10888 else
10889   
10890 cat > conftest.$ac_ext <<EOF
10891 #line 10892 "configure"
10892 #include "confdefs.h"
10893 #include <sys/types.h>
10894 #ifdef HAVE_SYS_SECURITY_H
10895 #include <sys/security.h>
10896 #include <prot.h>
10897 #endif  /* HAVE_SYS_SECURITY_H */
10898 #if defined(HAVE_RPC_RPC_H)
10899 #include <rpc/rpc.h>
10900 #endif
10901 int main() {
10902 int testvar;
10903 ; return 0; }
10904 EOF
10905 if { (eval echo configure:10906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10906   rm -rf conftest*
10907   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10908 else
10909   echo "configure: failed program was:" >&5
10910   cat conftest.$ac_ext >&5
10911   rm -rf conftest*
10912   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10913 fi
10914 rm -f conftest*
10915 fi
10916
10917 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10918 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10919     cat >> confdefs.h <<\EOF
10920 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10921 EOF
10922
10923 fi
10924
10925 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10926 echo "configure:10927: checking for test routines" >&5
10927 if test "$cross_compiling" = yes; then
10928   echo "configure: warning: cannot run when cross-compiling" 1>&2
10929 else
10930   cat > conftest.$ac_ext <<EOF
10931 #line 10932 "configure"
10932 #include "confdefs.h"
10933 #include "${srcdir-.}/tests/trivial.c"
10934 EOF
10935 if { (eval echo configure:10936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10936 then
10937   echo "$ac_t""yes" 1>&6
10938 else
10939   echo "configure: failed program was:" >&5
10940   cat conftest.$ac_ext >&5
10941   rm -fr conftest*
10942   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10943 fi
10944 rm -fr conftest*
10945 fi
10946
10947
10948 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10949 echo "configure:10950: checking for ftruncate extend" >&5
10950 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10951   echo $ac_n "(cached) $ac_c" 1>&6
10952 else
10953   
10954 if test "$cross_compiling" = yes; then
10955   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10956 else
10957   cat > conftest.$ac_ext <<EOF
10958 #line 10959 "configure"
10959 #include "confdefs.h"
10960 #include "${srcdir-.}/tests/ftruncate.c"
10961 EOF
10962 if { (eval echo configure:10963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10963 then
10964   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10965 else
10966   echo "configure: failed program was:" >&5
10967   cat conftest.$ac_ext >&5
10968   rm -fr conftest*
10969   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10970 fi
10971 rm -fr conftest*
10972 fi
10973
10974 fi
10975
10976 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10977 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10978     cat >> confdefs.h <<\EOF
10979 #define HAVE_FTRUNCATE_EXTEND 1
10980 EOF
10981
10982 fi
10983
10984 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10985 echo "configure:10986: checking for AF_LOCAL socket support" >&5
10986 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10987   echo $ac_n "(cached) $ac_c" 1>&6
10988 else
10989   
10990 if test "$cross_compiling" = yes; then
10991   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10992 else
10993   cat > conftest.$ac_ext <<EOF
10994 #line 10995 "configure"
10995 #include "confdefs.h"
10996 #include "${srcdir-.}/tests/unixsock.c"
10997 EOF
10998 if { (eval echo configure:10999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10999 then
11000   samba_cv_HAVE_WORKING_AF_LOCAL=yes
11001 else
11002   echo "configure: failed program was:" >&5
11003   cat conftest.$ac_ext >&5
11004   rm -fr conftest*
11005   samba_cv_HAVE_WORKING_AF_LOCAL=no
11006 fi
11007 rm -fr conftest*
11008 fi
11009
11010 fi
11011
11012 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
11013 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
11014 then
11015     cat >> confdefs.h <<\EOF
11016 #define HAVE_WORKING_AF_LOCAL 1
11017 EOF
11018
11019 fi
11020
11021 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
11022 echo "configure:11023: checking for broken getgroups" >&5
11023 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
11024   echo $ac_n "(cached) $ac_c" 1>&6
11025 else
11026   
11027 if test "$cross_compiling" = yes; then
11028   samba_cv_HAVE_BROKEN_GETGROUPS=cross
11029 else
11030   cat > conftest.$ac_ext <<EOF
11031 #line 11032 "configure"
11032 #include "confdefs.h"
11033 #include "${srcdir-.}/tests/getgroups.c"
11034 EOF
11035 if { (eval echo configure:11036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11036 then
11037   samba_cv_HAVE_BROKEN_GETGROUPS=yes
11038 else
11039   echo "configure: failed program was:" >&5
11040   cat conftest.$ac_ext >&5
11041   rm -fr conftest*
11042   samba_cv_HAVE_BROKEN_GETGROUPS=no
11043 fi
11044 rm -fr conftest*
11045 fi
11046
11047 fi
11048
11049 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
11050 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
11051     cat >> confdefs.h <<\EOF
11052 #define HAVE_BROKEN_GETGROUPS 1
11053 EOF
11054
11055 fi
11056
11057 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
11058 echo "configure:11059: checking whether getpass should be replaced" >&5
11059 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
11060   echo $ac_n "(cached) $ac_c" 1>&6
11061 else
11062   
11063 SAVE_CPPFLAGS="$CPPFLAGS"
11064 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/popt -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
11065 cat > conftest.$ac_ext <<EOF
11066 #line 11067 "configure"
11067 #include "confdefs.h"
11068
11069 #define REPLACE_GETPASS 1
11070 #define NO_CONFIG_H 1
11071 #define main dont_declare_main
11072 #include "${srcdir-.}/lib/getsmbpass.c"
11073 #undef main
11074
11075 int main() {
11076
11077 ; return 0; }
11078 EOF
11079 if { (eval echo configure:11080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11080   rm -rf conftest*
11081   samba_cv_REPLACE_GETPASS=yes
11082 else
11083   echo "configure: failed program was:" >&5
11084   cat conftest.$ac_ext >&5
11085   rm -rf conftest*
11086   samba_cv_REPLACE_GETPASS=no
11087 fi
11088 rm -f conftest*
11089 CPPFLAGS="$SAVE_CPPFLAGS"
11090
11091 fi
11092
11093 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
11094 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
11095         cat >> confdefs.h <<\EOF
11096 #define REPLACE_GETPASS 1
11097 EOF
11098
11099 fi
11100
11101 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
11102 echo "configure:11103: checking for broken inet_ntoa" >&5
11103 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
11104   echo $ac_n "(cached) $ac_c" 1>&6
11105 else
11106   
11107 if test "$cross_compiling" = yes; then
11108   samba_cv_REPLACE_INET_NTOA=cross
11109 else
11110   cat > conftest.$ac_ext <<EOF
11111 #line 11112 "configure"
11112 #include "confdefs.h"
11113
11114 #include <stdio.h>
11115 #include <sys/types.h>
11116 #include <netinet/in.h>
11117 #ifdef HAVE_ARPA_INET_H
11118 #include <arpa/inet.h>
11119 #endif
11120 main() { struct in_addr ip; ip.s_addr = 0x12345678;
11121 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
11122     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
11123 exit(1);}
11124 EOF
11125 if { (eval echo configure:11126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11126 then
11127   samba_cv_REPLACE_INET_NTOA=yes
11128 else
11129   echo "configure: failed program was:" >&5
11130   cat conftest.$ac_ext >&5
11131   rm -fr conftest*
11132   samba_cv_REPLACE_INET_NTOA=no
11133 fi
11134 rm -fr conftest*
11135 fi
11136
11137 fi
11138
11139 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
11140 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
11141     cat >> confdefs.h <<\EOF
11142 #define REPLACE_INET_NTOA 1
11143 EOF
11144
11145 fi
11146
11147 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
11148 echo "configure:11149: checking for secure mkstemp" >&5
11149 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
11150   echo $ac_n "(cached) $ac_c" 1>&6
11151 else
11152   
11153 if test "$cross_compiling" = yes; then
11154   samba_cv_HAVE_SECURE_MKSTEMP=cross
11155 else
11156   cat > conftest.$ac_ext <<EOF
11157 #line 11158 "configure"
11158 #include "confdefs.h"
11159 #include <stdlib.h>
11160 #include <sys/types.h>
11161 #include <sys/stat.h>
11162 #include <unistd.h>
11163 main() { 
11164   struct stat st;
11165   char tpl[20]="/tmp/test.XXXXXX"; 
11166   int fd = mkstemp(tpl); 
11167   if (fd == -1) exit(1);
11168   unlink(tpl);
11169   if (fstat(fd, &st) != 0) exit(1);
11170   if ((st.st_mode & 0777) != 0600) exit(1);
11171   exit(0);
11172 }
11173 EOF
11174 if { (eval echo configure:11175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11175 then
11176   samba_cv_HAVE_SECURE_MKSTEMP=yes
11177 else
11178   echo "configure: failed program was:" >&5
11179   cat conftest.$ac_ext >&5
11180   rm -fr conftest*
11181   samba_cv_HAVE_SECURE_MKSTEMP=no
11182 fi
11183 rm -fr conftest*
11184 fi
11185
11186 fi
11187
11188 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
11189 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
11190     cat >> confdefs.h <<\EOF
11191 #define HAVE_SECURE_MKSTEMP 1
11192 EOF
11193
11194 fi
11195
11196 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
11197 echo "configure:11198: checking for sysconf(_SC_NGROUPS_MAX)" >&5
11198 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
11199   echo $ac_n "(cached) $ac_c" 1>&6
11200 else
11201   
11202 if test "$cross_compiling" = yes; then
11203   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
11204 else
11205   cat > conftest.$ac_ext <<EOF
11206 #line 11207 "configure"
11207 #include "confdefs.h"
11208 #include <unistd.h>
11209 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
11210 EOF
11211 if { (eval echo configure:11212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11212 then
11213   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
11214 else
11215   echo "configure: failed program was:" >&5
11216   cat conftest.$ac_ext >&5
11217   rm -fr conftest*
11218   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
11219 fi
11220 rm -fr conftest*
11221 fi
11222
11223 fi
11224
11225 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
11226 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
11227     cat >> confdefs.h <<\EOF
11228 #define SYSCONF_SC_NGROUPS_MAX 1
11229 EOF
11230
11231 fi
11232
11233 echo $ac_n "checking for root""... $ac_c" 1>&6
11234 echo "configure:11235: checking for root" >&5
11235 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
11236   echo $ac_n "(cached) $ac_c" 1>&6
11237 else
11238   
11239 if test "$cross_compiling" = yes; then
11240   samba_cv_HAVE_ROOT=cross
11241 else
11242   cat > conftest.$ac_ext <<EOF
11243 #line 11244 "configure"
11244 #include "confdefs.h"
11245 main() { exit(getuid() != 0); }
11246 EOF
11247 if { (eval echo configure:11248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11248 then
11249   samba_cv_HAVE_ROOT=yes
11250 else
11251   echo "configure: failed program was:" >&5
11252   cat conftest.$ac_ext >&5
11253   rm -fr conftest*
11254   samba_cv_HAVE_ROOT=no
11255 fi
11256 rm -fr conftest*
11257 fi
11258
11259 fi
11260
11261 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
11262 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
11263     cat >> confdefs.h <<\EOF
11264 #define HAVE_ROOT 1
11265 EOF
11266
11267 else
11268     echo "configure: warning: running as non-root will disable some tests" 1>&2
11269 fi
11270
11271 ##################
11272 # look for a method of finding the list of network interfaces
11273 iface=no;
11274 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
11275 echo "configure:11276: checking for iface AIX" >&5
11276 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
11277   echo $ac_n "(cached) $ac_c" 1>&6
11278 else
11279   
11280 if test "$cross_compiling" = yes; then
11281   samba_cv_HAVE_IFACE_AIX=cross
11282 else
11283   cat > conftest.$ac_ext <<EOF
11284 #line 11285 "configure"
11285 #include "confdefs.h"
11286
11287 #define HAVE_IFACE_AIX 1
11288 #define AUTOCONF_TEST 1
11289 #include "confdefs.h"
11290 #include "${srcdir-.}/lib/interfaces.c"
11291 EOF
11292 if { (eval echo configure:11293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11293 then
11294   samba_cv_HAVE_IFACE_AIX=yes
11295 else
11296   echo "configure: failed program was:" >&5
11297   cat conftest.$ac_ext >&5
11298   rm -fr conftest*
11299   samba_cv_HAVE_IFACE_AIX=no
11300 fi
11301 rm -fr conftest*
11302 fi
11303
11304 fi
11305
11306 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
11307 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
11308     iface=yes;cat >> confdefs.h <<\EOF
11309 #define HAVE_IFACE_AIX 1
11310 EOF
11311
11312 fi
11313
11314 if test $iface = no; then
11315 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
11316 echo "configure:11317: checking for iface ifconf" >&5
11317 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
11318   echo $ac_n "(cached) $ac_c" 1>&6
11319 else
11320   
11321 if test "$cross_compiling" = yes; then
11322   samba_cv_HAVE_IFACE_IFCONF=cross
11323 else
11324   cat > conftest.$ac_ext <<EOF
11325 #line 11326 "configure"
11326 #include "confdefs.h"
11327
11328 #define HAVE_IFACE_IFCONF 1
11329 #define AUTOCONF_TEST 1
11330 #include "confdefs.h"
11331 #include "${srcdir-.}/lib/interfaces.c"
11332 EOF
11333 if { (eval echo configure:11334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11334 then
11335   samba_cv_HAVE_IFACE_IFCONF=yes
11336 else
11337   echo "configure: failed program was:" >&5
11338   cat conftest.$ac_ext >&5
11339   rm -fr conftest*
11340   samba_cv_HAVE_IFACE_IFCONF=no
11341 fi
11342 rm -fr conftest*
11343 fi
11344
11345 fi
11346
11347 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
11348 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
11349     iface=yes;cat >> confdefs.h <<\EOF
11350 #define HAVE_IFACE_IFCONF 1
11351 EOF
11352
11353 fi
11354 fi
11355
11356 if test $iface = no; then
11357 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
11358 echo "configure:11359: checking for iface ifreq" >&5
11359 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
11360   echo $ac_n "(cached) $ac_c" 1>&6
11361 else
11362   
11363 if test "$cross_compiling" = yes; then
11364   samba_cv_HAVE_IFACE_IFREQ=cross
11365 else
11366   cat > conftest.$ac_ext <<EOF
11367 #line 11368 "configure"
11368 #include "confdefs.h"
11369
11370 #define HAVE_IFACE_IFREQ 1
11371 #define AUTOCONF_TEST 1
11372 #include "confdefs.h"
11373 #include "${srcdir-.}/lib/interfaces.c"
11374 EOF
11375 if { (eval echo configure:11376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11376 then
11377   samba_cv_HAVE_IFACE_IFREQ=yes
11378 else
11379   echo "configure: failed program was:" >&5
11380   cat conftest.$ac_ext >&5
11381   rm -fr conftest*
11382   samba_cv_HAVE_IFACE_IFREQ=no
11383 fi
11384 rm -fr conftest*
11385 fi
11386
11387 fi
11388
11389 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
11390 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
11391     iface=yes;cat >> confdefs.h <<\EOF
11392 #define HAVE_IFACE_IFREQ 1
11393 EOF
11394
11395 fi
11396 fi
11397
11398
11399 ################################################
11400 # look for a method of setting the effective uid
11401 seteuid=no;
11402 if test $seteuid = no; then
11403 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
11404 echo "configure:11405: checking for setresuid" >&5
11405 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
11406   echo $ac_n "(cached) $ac_c" 1>&6
11407 else
11408   
11409 if test "$cross_compiling" = yes; then
11410   samba_cv_USE_SETRESUID=cross
11411 else
11412   cat > conftest.$ac_ext <<EOF
11413 #line 11414 "configure"
11414 #include "confdefs.h"
11415
11416 #define AUTOCONF_TEST 1
11417 #define USE_SETRESUID 1
11418 #include "confdefs.h"
11419 #include "${srcdir-.}/lib/util_sec.c"
11420 EOF
11421 if { (eval echo configure:11422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11422 then
11423   samba_cv_USE_SETRESUID=yes
11424 else
11425   echo "configure: failed program was:" >&5
11426   cat conftest.$ac_ext >&5
11427   rm -fr conftest*
11428   samba_cv_USE_SETRESUID=no
11429 fi
11430 rm -fr conftest*
11431 fi
11432
11433 fi
11434
11435 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
11436 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
11437     seteuid=yes;cat >> confdefs.h <<\EOF
11438 #define USE_SETRESUID 1
11439 EOF
11440
11441 fi
11442 fi
11443
11444
11445 if test $seteuid = no; then
11446 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
11447 echo "configure:11448: checking for setreuid" >&5
11448 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
11449   echo $ac_n "(cached) $ac_c" 1>&6
11450 else
11451   
11452 if test "$cross_compiling" = yes; then
11453   samba_cv_USE_SETREUID=cross
11454 else
11455   cat > conftest.$ac_ext <<EOF
11456 #line 11457 "configure"
11457 #include "confdefs.h"
11458
11459 #define AUTOCONF_TEST 1
11460 #define USE_SETREUID 1
11461 #include "confdefs.h"
11462 #include "${srcdir-.}/lib/util_sec.c"
11463 EOF
11464 if { (eval echo configure:11465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11465 then
11466   samba_cv_USE_SETREUID=yes
11467 else
11468   echo "configure: failed program was:" >&5
11469   cat conftest.$ac_ext >&5
11470   rm -fr conftest*
11471   samba_cv_USE_SETREUID=no
11472 fi
11473 rm -fr conftest*
11474 fi
11475
11476 fi
11477
11478 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
11479 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
11480     seteuid=yes;cat >> confdefs.h <<\EOF
11481 #define USE_SETREUID 1
11482 EOF
11483
11484 fi
11485 fi
11486
11487 if test $seteuid = no; then
11488 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
11489 echo "configure:11490: checking for seteuid" >&5
11490 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
11491   echo $ac_n "(cached) $ac_c" 1>&6
11492 else
11493   
11494 if test "$cross_compiling" = yes; then
11495   samba_cv_USE_SETEUID=cross
11496 else
11497   cat > conftest.$ac_ext <<EOF
11498 #line 11499 "configure"
11499 #include "confdefs.h"
11500
11501 #define AUTOCONF_TEST 1
11502 #define USE_SETEUID 1
11503 #include "confdefs.h"
11504 #include "${srcdir-.}/lib/util_sec.c"
11505 EOF
11506 if { (eval echo configure:11507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11507 then
11508   samba_cv_USE_SETEUID=yes
11509 else
11510   echo "configure: failed program was:" >&5
11511   cat conftest.$ac_ext >&5
11512   rm -fr conftest*
11513   samba_cv_USE_SETEUID=no
11514 fi
11515 rm -fr conftest*
11516 fi
11517
11518 fi
11519
11520 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
11521 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
11522     seteuid=yes;cat >> confdefs.h <<\EOF
11523 #define USE_SETEUID 1
11524 EOF
11525
11526 fi
11527 fi
11528
11529 if test $seteuid = no; then
11530 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11531 echo "configure:11532: checking for setuidx" >&5
11532 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
11533   echo $ac_n "(cached) $ac_c" 1>&6
11534 else
11535   
11536 if test "$cross_compiling" = yes; then
11537   samba_cv_USE_SETUIDX=cross
11538 else
11539   cat > conftest.$ac_ext <<EOF
11540 #line 11541 "configure"
11541 #include "confdefs.h"
11542
11543 #define AUTOCONF_TEST 1
11544 #define USE_SETUIDX 1
11545 #include "confdefs.h"
11546 #include "${srcdir-.}/lib/util_sec.c"
11547 EOF
11548 if { (eval echo configure:11549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11549 then
11550   samba_cv_USE_SETUIDX=yes
11551 else
11552   echo "configure: failed program was:" >&5
11553   cat conftest.$ac_ext >&5
11554   rm -fr conftest*
11555   samba_cv_USE_SETUIDX=no
11556 fi
11557 rm -fr conftest*
11558 fi
11559
11560 fi
11561
11562 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11563 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11564     seteuid=yes;cat >> confdefs.h <<\EOF
11565 #define USE_SETUIDX 1
11566 EOF
11567
11568 fi
11569 fi
11570
11571
11572 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11573 echo "configure:11574: checking for working mmap" >&5
11574 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11575   echo $ac_n "(cached) $ac_c" 1>&6
11576 else
11577   
11578 if test "$cross_compiling" = yes; then
11579   samba_cv_HAVE_MMAP=cross
11580 else
11581   cat > conftest.$ac_ext <<EOF
11582 #line 11583 "configure"
11583 #include "confdefs.h"
11584 #include "${srcdir-.}/tests/shared_mmap.c"
11585 EOF
11586 if { (eval echo configure:11587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11587 then
11588   samba_cv_HAVE_MMAP=yes
11589 else
11590   echo "configure: failed program was:" >&5
11591   cat conftest.$ac_ext >&5
11592   rm -fr conftest*
11593   samba_cv_HAVE_MMAP=no
11594 fi
11595 rm -fr conftest*
11596 fi
11597
11598 fi
11599
11600 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11601 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11602     cat >> confdefs.h <<\EOF
11603 #define HAVE_MMAP 1
11604 EOF
11605
11606 fi
11607
11608 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11609 echo "configure:11610: checking for ftruncate needs root" >&5
11610 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11611   echo $ac_n "(cached) $ac_c" 1>&6
11612 else
11613   
11614 if test "$cross_compiling" = yes; then
11615   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11616 else
11617   cat > conftest.$ac_ext <<EOF
11618 #line 11619 "configure"
11619 #include "confdefs.h"
11620 #include "${srcdir-.}/tests/ftruncroot.c"
11621 EOF
11622 if { (eval echo configure:11623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11623 then
11624   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11625 else
11626   echo "configure: failed program was:" >&5
11627   cat conftest.$ac_ext >&5
11628   rm -fr conftest*
11629   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11630 fi
11631 rm -fr conftest*
11632 fi
11633
11634 fi
11635
11636 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11637 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11638     cat >> confdefs.h <<\EOF
11639 #define FTRUNCATE_NEEDS_ROOT 1
11640 EOF
11641
11642 fi
11643
11644 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11645 echo "configure:11646: checking for fcntl locking" >&5
11646 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11647   echo $ac_n "(cached) $ac_c" 1>&6
11648 else
11649   
11650 if test "$cross_compiling" = yes; then
11651   samba_cv_HAVE_FCNTL_LOCK=cross
11652 else
11653   cat > conftest.$ac_ext <<EOF
11654 #line 11655 "configure"
11655 #include "confdefs.h"
11656 #include "${srcdir-.}/tests/fcntl_lock.c"
11657 EOF
11658 if { (eval echo configure:11659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11659 then
11660   samba_cv_HAVE_FCNTL_LOCK=yes
11661 else
11662   echo "configure: failed program was:" >&5
11663   cat conftest.$ac_ext >&5
11664   rm -fr conftest*
11665   samba_cv_HAVE_FCNTL_LOCK=no
11666 fi
11667 rm -fr conftest*
11668 fi
11669
11670 fi
11671
11672 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11673 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11674     cat >> confdefs.h <<\EOF
11675 #define HAVE_FCNTL_LOCK 1
11676 EOF
11677
11678 fi
11679
11680 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11681 echo "configure:11682: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11682 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11683   echo $ac_n "(cached) $ac_c" 1>&6
11684 else
11685   
11686 if test "$cross_compiling" = yes; then
11687   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11688 else
11689   cat > conftest.$ac_ext <<EOF
11690 #line 11691 "configure"
11691 #include "confdefs.h"
11692 #include "${srcdir-.}/tests/fcntl_lock64.c"
11693 EOF
11694 if { (eval echo configure:11695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11695 then
11696   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11697 else
11698   echo "configure: failed program was:" >&5
11699   cat conftest.$ac_ext >&5
11700   rm -fr conftest*
11701   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11702 fi
11703 rm -fr conftest*
11704 fi
11705
11706 fi
11707
11708 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11709 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11710     cat >> confdefs.h <<\EOF
11711 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11712 EOF
11713
11714
11715 else
11716
11717
11718   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11719 echo "configure:11720: checking for 64 bit fcntl locking" >&5
11720 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11721   echo $ac_n "(cached) $ac_c" 1>&6
11722 else
11723   
11724   if test "$cross_compiling" = yes; then
11725   samba_cv_HAVE_STRUCT_FLOCK64=cross
11726 else
11727   cat > conftest.$ac_ext <<EOF
11728 #line 11729 "configure"
11729 #include "confdefs.h"
11730
11731 #if defined(HAVE_UNISTD_H)
11732 #include <unistd.h>
11733 #endif
11734 #include <stdio.h>
11735 #include <stdlib.h>
11736
11737 #ifdef HAVE_FCNTL_H
11738 #include <fcntl.h>
11739 #endif
11740
11741 #ifdef HAVE_SYS_FCNTL_H
11742 #include <sys/fcntl.h>
11743 #endif
11744 main() { struct flock64 fl64;
11745 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11746 exit(0);
11747 #else
11748 exit(1);
11749 #endif
11750 }
11751 EOF
11752 if { (eval echo configure:11753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11753 then
11754   samba_cv_HAVE_STRUCT_FLOCK64=yes
11755 else
11756   echo "configure: failed program was:" >&5
11757   cat conftest.$ac_ext >&5
11758   rm -fr conftest*
11759   samba_cv_HAVE_STRUCT_FLOCK64=no
11760 fi
11761 rm -fr conftest*
11762 fi
11763
11764 fi
11765
11766 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11767
11768   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11769       cat >> confdefs.h <<\EOF
11770 #define HAVE_STRUCT_FLOCK64 1
11771 EOF
11772
11773   fi
11774 fi
11775
11776 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
11777 echo "configure:11778: checking for st_blocks in struct stat" >&5
11778 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then
11779   echo $ac_n "(cached) $ac_c" 1>&6
11780 else
11781   
11782 cat > conftest.$ac_ext <<EOF
11783 #line 11784 "configure"
11784 #include "confdefs.h"
11785 #include <sys/types.h>
11786 #include <sys/stat.h>
11787 #include <unistd.h>
11788 int main() {
11789 struct stat st;  st.st_blocks = 0;
11790 ; return 0; }
11791 EOF
11792 if { (eval echo configure:11793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11793   rm -rf conftest*
11794   samba_cv_HAVE_STAT_ST_BLOCKS=yes
11795 else
11796   echo "configure: failed program was:" >&5
11797   cat conftest.$ac_ext >&5
11798   rm -rf conftest*
11799   samba_cv_HAVE_STAT_ST_BLOCKS=no
11800 fi
11801 rm -f conftest*
11802 fi
11803
11804 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6
11805 if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
11806     cat >> confdefs.h <<\EOF
11807 #define HAVE_STAT_ST_BLOCKS 1
11808 EOF
11809
11810 fi 
11811
11812 case "$host_os" in
11813 *linux*)
11814 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11815 echo "configure:11816: checking for broken RedHat 7.2 system header files" >&5
11816 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11817   echo $ac_n "(cached) $ac_c" 1>&6
11818 else
11819   
11820 cat > conftest.$ac_ext <<EOF
11821 #line 11822 "configure"
11822 #include "confdefs.h"
11823
11824 #ifdef HAVE_SYS_VFS_H
11825 #include <sys/vfs.h>
11826 #endif
11827 #ifdef HAVE_SYS_CAPABILITY_H
11828 #include <sys/capability.h>
11829 #endif
11830
11831 int main() {
11832 int i;
11833 ; return 0; }
11834 EOF
11835 if { (eval echo configure:11836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11836   rm -rf conftest*
11837   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11838 else
11839   echo "configure: failed program was:" >&5
11840   cat conftest.$ac_ext >&5
11841   rm -rf conftest*
11842   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11843 fi
11844 rm -f conftest*
11845 fi
11846
11847 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11848 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11849    cat >> confdefs.h <<\EOF
11850 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11851 EOF
11852
11853 fi
11854 ;;
11855 esac
11856
11857 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11858 echo "configure:11859: checking for broken nisplus include files" >&5
11859 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11860   echo $ac_n "(cached) $ac_c" 1>&6
11861 else
11862   
11863 cat > conftest.$ac_ext <<EOF
11864 #line 11865 "configure"
11865 #include "confdefs.h"
11866 #include <sys/acl.h>
11867 #if defined(HAVE_RPCSVC_NIS_H)
11868 #include <rpcsvc/nis.h>
11869 #endif
11870 int main() {
11871 int i;
11872 ; return 0; }
11873 EOF
11874 if { (eval echo configure:11875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11875   rm -rf conftest*
11876   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11877 else
11878   echo "configure: failed program was:" >&5
11879   cat conftest.$ac_ext >&5
11880   rm -rf conftest*
11881   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11882 fi
11883 rm -f conftest*
11884 fi
11885
11886 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11887 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11888     cat >> confdefs.h <<\EOF
11889 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11890 EOF
11891
11892 fi
11893
11894
11895 #################################################
11896 # check for smbwrapper support
11897 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11898 echo "configure:11899: checking whether to use smbwrapper" >&5
11899 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11900 if test "${with_smbwrapper+set}" = set; then
11901   withval="$with_smbwrapper"
11902    case "$withval" in
11903   yes)
11904     echo "$ac_t""yes" 1>&6
11905     cat >> confdefs.h <<\EOF
11906 #define WITH_SMBWRAPPER 1
11907 EOF
11908
11909         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11910
11911         if test x$ATTEMPT_WRAP32_BUILD = x; then
11912                 WRAP32=""
11913         else
11914                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11915         fi
11916
11917 # Conditions under which smbwrapper should not be built.
11918
11919         if test x$PICFLAG = x; then
11920            echo No support for PIC code - disabling smbwrapper and smbsh
11921            WRAP=""
11922            WRAP32=""
11923         elif test x$ac_cv_func_syscall = xno; then
11924            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11925            WRAP=""
11926            WRAP32=""
11927         fi
11928     ;;
11929   *)
11930     echo "$ac_t""no" 1>&6
11931     ;;
11932   esac 
11933 else
11934   echo "$ac_t""no" 1>&6
11935
11936 fi
11937
11938
11939 #################################################
11940 # check for AFS clear-text auth support
11941 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11942 echo "configure:11943: checking whether to use AFS clear-text auth" >&5
11943 # Check whether --with-afs or --without-afs was given.
11944 if test "${with_afs+set}" = set; then
11945   withval="$with_afs"
11946    case "$withval" in
11947   yes)
11948     echo "$ac_t""yes" 1>&6
11949     cat >> confdefs.h <<\EOF
11950 #define WITH_AFS 1
11951 EOF
11952
11953     ;;
11954   *)
11955     echo "$ac_t""no" 1>&6
11956     ;;
11957   esac 
11958 else
11959   echo "$ac_t""no" 1>&6
11960
11961 fi
11962
11963
11964
11965 #################################################
11966 # check for the DFS clear-text auth system
11967 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
11968 echo "configure:11969: checking whether to use DFS clear-text auth" >&5
11969 # Check whether --with-dfs or --without-dfs was given.
11970 if test "${with_dfs+set}" = set; then
11971   withval="$with_dfs"
11972    case "$withval" in
11973   yes)
11974     echo "$ac_t""yes" 1>&6
11975     cat >> confdefs.h <<\EOF
11976 #define WITH_DFS 1
11977 EOF
11978
11979     ;;
11980   *)
11981     echo "$ac_t""no" 1>&6
11982     ;;
11983   esac 
11984 else
11985   echo "$ac_t""no" 1>&6
11986
11987 fi
11988
11989
11990
11991 #################################################
11992 # see if this box has the RedHat location for kerberos
11993 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
11994 echo "configure:11995: checking for /usr/kerberos" >&5
11995 if test -d /usr/kerberos; then
11996     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
11997     CFLAGS="$CFLAGS -I/usr/kerberos/include"
11998     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
11999     echo "$ac_t""yes" 1>&6
12000 else
12001     echo "$ac_t""no" 1>&6
12002 fi
12003
12004 #################################################
12005 # check for location of Kerberos 5 install
12006 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
12007 echo "configure:12008: checking for kerberos 5 install path" >&5
12008 # Check whether --with-krb5 or --without-krb5 was given.
12009 if test "${with_krb5+set}" = set; then
12010   withval="$with_krb5"
12011    case "$withval" in
12012   no)
12013     echo "$ac_t""no" 1>&6
12014     ;;
12015   *)
12016     echo "$ac_t""yes" 1>&6
12017     LIBS="$LIBS -lkrb5"
12018     CFLAGS="$CFLAGS -I$withval/include"
12019     CPPFLAGS="$CPPFLAGS -I$withval/include"
12020     LDFLAGS="$LDFLAGS -L$withval/lib"
12021     ;;
12022   esac 
12023 else
12024   echo "$ac_t""no" 1>&6
12025
12026 fi
12027
12028
12029 # now check for krb5.h. Some systems have the libraries without the headers!
12030 # note that this check is done here to allow for different kerberos
12031 # include paths
12032 for ac_hdr in krb5.h
12033 do
12034 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12035 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12036 echo "configure:12037: checking for $ac_hdr" >&5
12037 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12038   echo $ac_n "(cached) $ac_c" 1>&6
12039 else
12040   cat > conftest.$ac_ext <<EOF
12041 #line 12042 "configure"
12042 #include "confdefs.h"
12043 #include <$ac_hdr>
12044 EOF
12045 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12046 { (eval echo configure:12047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12047 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12048 if test -z "$ac_err"; then
12049   rm -rf conftest*
12050   eval "ac_cv_header_$ac_safe=yes"
12051 else
12052   echo "$ac_err" >&5
12053   echo "configure: failed program was:" >&5
12054   cat conftest.$ac_ext >&5
12055   rm -rf conftest*
12056   eval "ac_cv_header_$ac_safe=no"
12057 fi
12058 rm -f conftest*
12059 fi
12060 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12061   echo "$ac_t""yes" 1>&6
12062     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12063   cat >> confdefs.h <<EOF
12064 #define $ac_tr_hdr 1
12065 EOF
12066  
12067 else
12068   echo "$ac_t""no" 1>&6
12069 fi
12070 done
12071
12072
12073 # now check for gssapi headers.  This is also done here to allow for
12074 # different kerberos include paths
12075 for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
12076 do
12077 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12078 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12079 echo "configure:12080: checking for $ac_hdr" >&5
12080 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12081   echo $ac_n "(cached) $ac_c" 1>&6
12082 else
12083   cat > conftest.$ac_ext <<EOF
12084 #line 12085 "configure"
12085 #include "confdefs.h"
12086 #include <$ac_hdr>
12087 EOF
12088 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12089 { (eval echo configure:12090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12090 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12091 if test -z "$ac_err"; then
12092   rm -rf conftest*
12093   eval "ac_cv_header_$ac_safe=yes"
12094 else
12095   echo "$ac_err" >&5
12096   echo "configure: failed program was:" >&5
12097   cat conftest.$ac_ext >&5
12098   rm -rf conftest*
12099   eval "ac_cv_header_$ac_safe=no"
12100 fi
12101 rm -f conftest*
12102 fi
12103 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12104   echo "$ac_t""yes" 1>&6
12105     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12106   cat >> confdefs.h <<EOF
12107 #define $ac_tr_hdr 1
12108 EOF
12109  
12110 else
12111   echo "$ac_t""no" 1>&6
12112 fi
12113 done
12114
12115
12116 ##################################################################
12117 # we might need the k5crypto and com_err libraries on some systems
12118 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
12119 echo "configure:12120: checking for _et_list in -lcom_err" >&5
12120 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
12121 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12122   echo $ac_n "(cached) $ac_c" 1>&6
12123 else
12124   ac_save_LIBS="$LIBS"
12125 LIBS="-lcom_err  $LIBS"
12126 cat > conftest.$ac_ext <<EOF
12127 #line 12128 "configure"
12128 #include "confdefs.h"
12129 /* Override any gcc2 internal prototype to avoid an error.  */
12130 /* We use char because int might match the return type of a gcc2
12131     builtin and then its argument prototype would still apply.  */
12132 char _et_list();
12133
12134 int main() {
12135 _et_list()
12136 ; return 0; }
12137 EOF
12138 if { (eval echo configure:12139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12139   rm -rf conftest*
12140   eval "ac_cv_lib_$ac_lib_var=yes"
12141 else
12142   echo "configure: failed program was:" >&5
12143   cat conftest.$ac_ext >&5
12144   rm -rf conftest*
12145   eval "ac_cv_lib_$ac_lib_var=no"
12146 fi
12147 rm -f conftest*
12148 LIBS="$ac_save_LIBS"
12149
12150 fi
12151 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12152   echo "$ac_t""yes" 1>&6
12153   LIBS="$LIBS -lcom_err"
12154 else
12155   echo "$ac_t""no" 1>&6
12156 fi
12157
12158 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
12159 echo "configure:12160: checking for krb5_encrypt_data in -lk5crypto" >&5
12160 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
12161 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12162   echo $ac_n "(cached) $ac_c" 1>&6
12163 else
12164   ac_save_LIBS="$LIBS"
12165 LIBS="-lk5crypto  $LIBS"
12166 cat > conftest.$ac_ext <<EOF
12167 #line 12168 "configure"
12168 #include "confdefs.h"
12169 /* Override any gcc2 internal prototype to avoid an error.  */
12170 /* We use char because int might match the return type of a gcc2
12171     builtin and then its argument prototype would still apply.  */
12172 char krb5_encrypt_data();
12173
12174 int main() {
12175 krb5_encrypt_data()
12176 ; return 0; }
12177 EOF
12178 if { (eval echo configure:12179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12179   rm -rf conftest*
12180   eval "ac_cv_lib_$ac_lib_var=yes"
12181 else
12182   echo "configure: failed program was:" >&5
12183   cat conftest.$ac_ext >&5
12184   rm -rf conftest*
12185   eval "ac_cv_lib_$ac_lib_var=no"
12186 fi
12187 rm -f conftest*
12188 LIBS="$ac_save_LIBS"
12189
12190 fi
12191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12192   echo "$ac_t""yes" 1>&6
12193   LIBS="$LIBS -lk5crypto"
12194 else
12195   echo "$ac_t""no" 1>&6
12196 fi
12197
12198
12199 ########################################################
12200 # now see if we can find the krb5 libs in standard paths
12201 # or as specified above
12202 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
12203 echo "configure:12204: checking for krb5_mk_req_extended in -lkrb5" >&5
12204 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
12205 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12206   echo $ac_n "(cached) $ac_c" 1>&6
12207 else
12208   ac_save_LIBS="$LIBS"
12209 LIBS="-lkrb5  $LIBS"
12210 cat > conftest.$ac_ext <<EOF
12211 #line 12212 "configure"
12212 #include "confdefs.h"
12213 /* Override any gcc2 internal prototype to avoid an error.  */
12214 /* We use char because int might match the return type of a gcc2
12215     builtin and then its argument prototype would still apply.  */
12216 char krb5_mk_req_extended();
12217
12218 int main() {
12219 krb5_mk_req_extended()
12220 ; return 0; }
12221 EOF
12222 if { (eval echo configure:12223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12223   rm -rf conftest*
12224   eval "ac_cv_lib_$ac_lib_var=yes"
12225 else
12226   echo "configure: failed program was:" >&5
12227   cat conftest.$ac_ext >&5
12228   rm -rf conftest*
12229   eval "ac_cv_lib_$ac_lib_var=no"
12230 fi
12231 rm -f conftest*
12232 LIBS="$ac_save_LIBS"
12233
12234 fi
12235 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12236   echo "$ac_t""yes" 1>&6
12237   LIBS="$LIBS -lkrb5";
12238         cat >> confdefs.h <<\EOF
12239 #define HAVE_KRB5 1
12240 EOF
12241
12242 else
12243   echo "$ac_t""no" 1>&6
12244 fi
12245
12246
12247 ########################################################
12248 # now see if we can find the gssapi libs in standard paths
12249 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
12250 echo "configure:12251: checking for gss_display_status in -lgssapi_krb5" >&5
12251 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
12252 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12253   echo $ac_n "(cached) $ac_c" 1>&6
12254 else
12255   ac_save_LIBS="$LIBS"
12256 LIBS="-lgssapi_krb5  $LIBS"
12257 cat > conftest.$ac_ext <<EOF
12258 #line 12259 "configure"
12259 #include "confdefs.h"
12260 /* Override any gcc2 internal prototype to avoid an error.  */
12261 /* We use char because int might match the return type of a gcc2
12262     builtin and then its argument prototype would still apply.  */
12263 char gss_display_status();
12264
12265 int main() {
12266 gss_display_status()
12267 ; return 0; }
12268 EOF
12269 if { (eval echo configure:12270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12270   rm -rf conftest*
12271   eval "ac_cv_lib_$ac_lib_var=yes"
12272 else
12273   echo "configure: failed program was:" >&5
12274   cat conftest.$ac_ext >&5
12275   rm -rf conftest*
12276   eval "ac_cv_lib_$ac_lib_var=no"
12277 fi
12278 rm -f conftest*
12279 LIBS="$ac_save_LIBS"
12280
12281 fi
12282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12283   echo "$ac_t""yes" 1>&6
12284   LIBS="$LIBS -lgssapi_krb5";
12285         cat >> confdefs.h <<\EOF
12286 #define HAVE_GSSAPI 1
12287 EOF
12288
12289 else
12290   echo "$ac_t""no" 1>&6
12291 fi
12292
12293
12294 ##################################################################
12295 # we might need the lber lib on some systems. To avoid link errors
12296 # this test must be before the libldap test
12297 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
12298 echo "configure:12299: checking for ber_scanf in -llber" >&5
12299 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
12300 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12301   echo $ac_n "(cached) $ac_c" 1>&6
12302 else
12303   ac_save_LIBS="$LIBS"
12304 LIBS="-llber  $LIBS"
12305 cat > conftest.$ac_ext <<EOF
12306 #line 12307 "configure"
12307 #include "confdefs.h"
12308 /* Override any gcc2 internal prototype to avoid an error.  */
12309 /* We use char because int might match the return type of a gcc2
12310     builtin and then its argument prototype would still apply.  */
12311 char ber_scanf();
12312
12313 int main() {
12314 ber_scanf()
12315 ; return 0; }
12316 EOF
12317 if { (eval echo configure:12318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12318   rm -rf conftest*
12319   eval "ac_cv_lib_$ac_lib_var=yes"
12320 else
12321   echo "configure: failed program was:" >&5
12322   cat conftest.$ac_ext >&5
12323   rm -rf conftest*
12324   eval "ac_cv_lib_$ac_lib_var=no"
12325 fi
12326 rm -f conftest*
12327 LIBS="$ac_save_LIBS"
12328
12329 fi
12330 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12331   echo "$ac_t""yes" 1>&6
12332   LIBS="$LIBS -llber"
12333 else
12334   echo "$ac_t""no" 1>&6
12335 fi
12336
12337
12338 ########################################################
12339 # now see if we can find the ldap libs in standard paths
12340 if test x$have_ldap != xyes; then
12341 echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
12342 echo "configure:12343: checking for ldap_domain2hostlist in -lldap" >&5
12343 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
12344 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12345   echo $ac_n "(cached) $ac_c" 1>&6
12346 else
12347   ac_save_LIBS="$LIBS"
12348 LIBS="-lldap  $LIBS"
12349 cat > conftest.$ac_ext <<EOF
12350 #line 12351 "configure"
12351 #include "confdefs.h"
12352 /* Override any gcc2 internal prototype to avoid an error.  */
12353 /* We use char because int might match the return type of a gcc2
12354     builtin and then its argument prototype would still apply.  */
12355 char ldap_domain2hostlist();
12356
12357 int main() {
12358 ldap_domain2hostlist()
12359 ; return 0; }
12360 EOF
12361 if { (eval echo configure:12362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12362   rm -rf conftest*
12363   eval "ac_cv_lib_$ac_lib_var=yes"
12364 else
12365   echo "configure: failed program was:" >&5
12366   cat conftest.$ac_ext >&5
12367   rm -rf conftest*
12368   eval "ac_cv_lib_$ac_lib_var=no"
12369 fi
12370 rm -f conftest*
12371 LIBS="$ac_save_LIBS"
12372
12373 fi
12374 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12375   echo "$ac_t""yes" 1>&6
12376   LIBS="$LIBS -lldap";
12377         cat >> confdefs.h <<\EOF
12378 #define HAVE_LDAP 1
12379 EOF
12380
12381 else
12382   echo "$ac_t""no" 1>&6
12383 fi
12384
12385 fi
12386
12387 #################################################
12388 # check for automount support
12389 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
12390 echo "configure:12391: checking whether to use AUTOMOUNT" >&5
12391 # Check whether --with-automount or --without-automount was given.
12392 if test "${with_automount+set}" = set; then
12393   withval="$with_automount"
12394    case "$withval" in
12395   yes)
12396     echo "$ac_t""yes" 1>&6
12397     cat >> confdefs.h <<\EOF
12398 #define WITH_AUTOMOUNT 1
12399 EOF
12400
12401     ;;
12402   *)
12403     echo "$ac_t""no" 1>&6
12404     ;;
12405   esac 
12406 else
12407   echo "$ac_t""no" 1>&6
12408
12409 fi
12410
12411
12412 #################################################
12413 # check for smbmount support
12414 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
12415 echo "configure:12416: checking whether to use SMBMOUNT" >&5
12416 # Check whether --with-smbmount or --without-smbmount was given.
12417 if test "${with_smbmount+set}" = set; then
12418   withval="$with_smbmount"
12419    case "$withval" in
12420   yes)
12421         case "$host_os" in
12422         *linux*)
12423                 echo "$ac_t""yes" 1>&6
12424                 cat >> confdefs.h <<\EOF
12425 #define WITH_SMBMOUNT 1
12426 EOF
12427
12428                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
12429                 ;;
12430         *)
12431                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
12432                 ;;
12433         esac
12434     ;;
12435   *)
12436     echo "$ac_t""no" 1>&6
12437     MPROGS=
12438     ;;
12439   esac 
12440 else
12441   echo "$ac_t""no" 1>&6
12442   MPROGS=
12443
12444 fi
12445
12446
12447
12448 #################################################
12449 # check for a PAM clear-text auth, accounts, password and session support
12450 with_pam_for_crypt=no
12451 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
12452 echo "configure:12453: checking whether to use PAM" >&5
12453 # Check whether --with-pam or --without-pam was given.
12454 if test "${with_pam+set}" = set; then
12455   withval="$with_pam"
12456    case "$withval" in
12457   yes)
12458     echo "$ac_t""yes" 1>&6
12459     cat >> confdefs.h <<\EOF
12460 #define WITH_PAM 1
12461 EOF
12462
12463     LIBS="$LIBS -lpam"
12464     with_pam_for_crypt=yes
12465     ;;
12466   *)
12467     echo "$ac_t""no" 1>&6
12468     ;;
12469   esac 
12470 else
12471   echo "$ac_t""no" 1>&6
12472
12473 fi
12474
12475
12476 # we can't build a pam module if we don't have pam.
12477 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
12478 echo "configure:12479: checking for pam_get_data in -lpam" >&5
12479 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
12480 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12481   echo $ac_n "(cached) $ac_c" 1>&6
12482 else
12483   ac_save_LIBS="$LIBS"
12484 LIBS="-lpam  $LIBS"
12485 cat > conftest.$ac_ext <<EOF
12486 #line 12487 "configure"
12487 #include "confdefs.h"
12488 /* Override any gcc2 internal prototype to avoid an error.  */
12489 /* We use char because int might match the return type of a gcc2
12490     builtin and then its argument prototype would still apply.  */
12491 char pam_get_data();
12492
12493 int main() {
12494 pam_get_data()
12495 ; return 0; }
12496 EOF
12497 if { (eval echo configure:12498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12498   rm -rf conftest*
12499   eval "ac_cv_lib_$ac_lib_var=yes"
12500 else
12501   echo "configure: failed program was:" >&5
12502   cat conftest.$ac_ext >&5
12503   rm -rf conftest*
12504   eval "ac_cv_lib_$ac_lib_var=no"
12505 fi
12506 rm -f conftest*
12507 LIBS="$ac_save_LIBS"
12508
12509 fi
12510 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12511   echo "$ac_t""yes" 1>&6
12512   cat >> confdefs.h <<\EOF
12513 #define HAVE_LIBPAM 1
12514 EOF
12515
12516 else
12517   echo "$ac_t""no" 1>&6
12518 fi
12519
12520
12521 #################################################
12522 # check for pam_smbpass support
12523 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
12524 echo "configure:12525: checking whether to use pam_smbpass" >&5
12525 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
12526 if test "${with_pam_smbpass+set}" = set; then
12527   withval="$with_pam_smbpass"
12528    case "$withval" in
12529   yes)
12530     echo "$ac_t""yes" 1>&6
12531
12532 # Conditions under which pam_smbpass should not be built.
12533
12534        if test x$PICFLAG = x; then
12535           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
12536           PAM_MOD=""
12537        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
12538           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
12539           PAM_MOD=""
12540        else
12541           PAM_MOD="bin/pam_smbpass.so"
12542        fi
12543     ;;
12544   *)
12545     echo "$ac_t""no" 1>&6
12546     ;;
12547   esac 
12548 else
12549   echo "$ac_t""no" 1>&6
12550
12551 fi
12552
12553
12554
12555 ###############################################
12556 # test for where we get crypt() from, but only
12557 # if not using PAM
12558 if test $with_pam_for_crypt = no; then
12559 for ac_func in crypt
12560 do
12561 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12562 echo "configure:12563: checking for $ac_func" >&5
12563 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12564   echo $ac_n "(cached) $ac_c" 1>&6
12565 else
12566   cat > conftest.$ac_ext <<EOF
12567 #line 12568 "configure"
12568 #include "confdefs.h"
12569 /* System header to define __stub macros and hopefully few prototypes,
12570     which can conflict with char $ac_func(); below.  */
12571 #include <assert.h>
12572 /* Override any gcc2 internal prototype to avoid an error.  */
12573 /* We use char because int might match the return type of a gcc2
12574     builtin and then its argument prototype would still apply.  */
12575 char $ac_func();
12576
12577 int main() {
12578
12579 /* The GNU C library defines this for functions which it implements
12580     to always fail with ENOSYS.  Some functions are actually named
12581     something starting with __ and the normal name is an alias.  */
12582 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12583 choke me
12584 #else
12585 $ac_func();
12586 #endif
12587
12588 ; return 0; }
12589 EOF
12590 if { (eval echo configure:12591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12591   rm -rf conftest*
12592   eval "ac_cv_func_$ac_func=yes"
12593 else
12594   echo "configure: failed program was:" >&5
12595   cat conftest.$ac_ext >&5
12596   rm -rf conftest*
12597   eval "ac_cv_func_$ac_func=no"
12598 fi
12599 rm -f conftest*
12600 fi
12601
12602 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12603   echo "$ac_t""yes" 1>&6
12604     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12605   cat >> confdefs.h <<EOF
12606 #define $ac_tr_func 1
12607 EOF
12608  
12609 else
12610   echo "$ac_t""no" 1>&6
12611 fi
12612 done
12613
12614 if test x"$ac_cv_func_crypt" = x"no"; then
12615     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12616 echo "configure:12617: checking for crypt in -lcrypt" >&5
12617 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
12618 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12619   echo $ac_n "(cached) $ac_c" 1>&6
12620 else
12621   ac_save_LIBS="$LIBS"
12622 LIBS="-lcrypt  $LIBS"
12623 cat > conftest.$ac_ext <<EOF
12624 #line 12625 "configure"
12625 #include "confdefs.h"
12626 /* Override any gcc2 internal prototype to avoid an error.  */
12627 /* We use char because int might match the return type of a gcc2
12628     builtin and then its argument prototype would still apply.  */
12629 char crypt();
12630
12631 int main() {
12632 crypt()
12633 ; return 0; }
12634 EOF
12635 if { (eval echo configure:12636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12636   rm -rf conftest*
12637   eval "ac_cv_lib_$ac_lib_var=yes"
12638 else
12639   echo "configure: failed program was:" >&5
12640   cat conftest.$ac_ext >&5
12641   rm -rf conftest*
12642   eval "ac_cv_lib_$ac_lib_var=no"
12643 fi
12644 rm -f conftest*
12645 LIBS="$ac_save_LIBS"
12646
12647 fi
12648 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12649   echo "$ac_t""yes" 1>&6
12650   LIBS="$LIBS -lcrypt";
12651         cat >> confdefs.h <<\EOF
12652 #define HAVE_CRYPT 1
12653 EOF
12654
12655 else
12656   echo "$ac_t""no" 1>&6
12657 fi
12658
12659 fi
12660 fi
12661
12662 ##
12663 ## moved after the check for -lcrypt in order to
12664 ## ensure that the necessary libraries are included
12665 ## check checking for truncated salt.  Wrapped by the
12666 ## $with_pam_for_crypt variable as above   --jerry
12667 ##
12668 if test $with_pam_for_crypt = no; then
12669 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
12670 echo "configure:12671: checking for a crypt that needs truncated salt" >&5
12671 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
12672   echo $ac_n "(cached) $ac_c" 1>&6
12673 else
12674   
12675 if test "$cross_compiling" = yes; then
12676   samba_cv_HAVE_TRUNCATED_SALT=cross
12677 else
12678   cat > conftest.$ac_ext <<EOF
12679 #line 12680 "configure"
12680 #include "confdefs.h"
12681 #include "${srcdir-.}/tests/crypttest.c"
12682 EOF
12683 if { (eval echo configure:12684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12684 then
12685   samba_cv_HAVE_TRUNCATED_SALT=no
12686 else
12687   echo "configure: failed program was:" >&5
12688   cat conftest.$ac_ext >&5
12689   rm -fr conftest*
12690   samba_cv_HAVE_TRUNCATED_SALT=yes
12691 fi
12692 rm -fr conftest*
12693 fi
12694
12695 fi
12696
12697 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12698 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12699         cat >> confdefs.h <<\EOF
12700 #define HAVE_TRUNCATED_SALT 1
12701 EOF
12702
12703 fi
12704 fi
12705
12706
12707
12708 ########################################################################################
12709 ##
12710 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12711 ##
12712 ########################################################################################
12713
12714 #################################################
12715 # check for a TDB password database
12716 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12717 echo "configure:12718: checking whether to use TDB SAM database" >&5
12718 # Check whether --with-tdbsam or --without-tdbsam was given.
12719 if test "${with_tdbsam+set}" = set; then
12720   withval="$with_tdbsam"
12721    case "$withval" in
12722   yes)
12723     echo "$ac_t""yes" 1>&6
12724     cat >> confdefs.h <<\EOF
12725 #define WITH_TDB_SAM 1
12726 EOF
12727
12728     ;;
12729   *)
12730     echo "$ac_t""no" 1>&6
12731     ;;
12732   esac 
12733 else
12734   echo "$ac_t""no" 1>&6
12735
12736 fi
12737
12738
12739 #################################################
12740 # check for a NISPLUS password database
12741 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
12742 echo "configure:12743: checking whether to use NISPLUS SAM database" >&5
12743 # Check whether --with-nisplussam or --without-nisplussam was given.
12744 if test "${with_nisplussam+set}" = set; then
12745   withval="$with_nisplussam"
12746    case "$withval" in
12747   yes)
12748     echo "$ac_t""yes" 1>&6
12749     cat >> confdefs.h <<\EOF
12750 #define WITH_NISPLUS_SAM 1
12751 EOF
12752
12753     ;;
12754   *)
12755     echo "$ac_t""no" 1>&6
12756     ;;
12757   esac 
12758 else
12759   echo "$ac_t""no" 1>&6
12760
12761 fi
12762
12763
12764 ########################################################################################
12765 ##
12766 ## END OF TESTS FOR SAM BACKENDS.  
12767 ##
12768 ########################################################################################
12769
12770 #################################################
12771 # check for a NISPLUS_HOME support 
12772 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
12773 echo "configure:12774: checking whether to use NISPLUS_HOME" >&5
12774 # Check whether --with-nisplus-home or --without-nisplus-home was given.
12775 if test "${with_nisplus_home+set}" = set; then
12776   withval="$with_nisplus_home"
12777    case "$withval" in
12778   yes)
12779     echo "$ac_t""yes" 1>&6
12780     cat >> confdefs.h <<\EOF
12781 #define WITH_NISPLUS_HOME 1
12782 EOF
12783
12784     ;;
12785   *)
12786     echo "$ac_t""no" 1>&6
12787     ;;
12788   esac 
12789 else
12790   echo "$ac_t""no" 1>&6
12791
12792 fi
12793
12794
12795 #################################################
12796 # check for syslog logging
12797 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12798 echo "configure:12799: checking whether to use syslog logging" >&5
12799 # Check whether --with-syslog or --without-syslog was given.
12800 if test "${with_syslog+set}" = set; then
12801   withval="$with_syslog"
12802    case "$withval" in
12803   yes)
12804     echo "$ac_t""yes" 1>&6
12805     cat >> confdefs.h <<\EOF
12806 #define WITH_SYSLOG 1
12807 EOF
12808
12809     ;;
12810   *)
12811     echo "$ac_t""no" 1>&6
12812     ;;
12813   esac 
12814 else
12815   echo "$ac_t""no" 1>&6
12816
12817 fi
12818
12819
12820 #################################################
12821 # check for a shared memory profiling support
12822 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12823 echo "configure:12824: checking whether to use profiling" >&5
12824 # Check whether --with-profiling-data or --without-profiling-data was given.
12825 if test "${with_profiling_data+set}" = set; then
12826   withval="$with_profiling_data"
12827    case "$withval" in
12828   yes)
12829     echo "$ac_t""yes" 1>&6
12830     cat >> confdefs.h <<\EOF
12831 #define WITH_PROFILE 1
12832 EOF
12833
12834     ;;
12835   *)
12836     echo "$ac_t""no" 1>&6
12837     ;;
12838   esac 
12839 else
12840   echo "$ac_t""no" 1>&6
12841
12842 fi
12843
12844
12845
12846 #################################################
12847 # check for experimental disk-quotas support
12848 QUOTAOBJS=smbd/noquotas.o
12849
12850 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12851 echo "configure:12852: checking whether to support disk-quotas" >&5
12852 # Check whether --with-quotas or --without-quotas was given.
12853 if test "${with_quotas+set}" = set; then
12854   withval="$with_quotas"
12855    case "$withval" in
12856   yes)
12857     echo "$ac_t""yes" 1>&6
12858     case "$host_os" in
12859       *linux*)
12860         # Check for kernel 2.4.x quota braindamage...
12861         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
12862 echo "configure:12863: checking for linux 2.4.x quota braindamage.." >&5
12863 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
12864   echo $ac_n "(cached) $ac_c" 1>&6
12865 else
12866   
12867         cat > conftest.$ac_ext <<EOF
12868 #line 12869 "configure"
12869 #include "confdefs.h"
12870 #include <stdio.h>
12871 #include <sys/types.h>
12872 #include <asm/types.h>
12873 #include <linux/quota.h>
12874 #include <mntent.h>
12875 #include <linux/unistd.h>
12876 int main() {
12877 struct mem_dqblk D;
12878 ; return 0; }
12879 EOF
12880 if { (eval echo configure:12881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12881   rm -rf conftest*
12882   samba_cv_linux_2_4_quota_braindamage=yes
12883 else
12884   echo "configure: failed program was:" >&5
12885   cat conftest.$ac_ext >&5
12886   rm -rf conftest*
12887   samba_cv_linux_2_4_quota_braindamage=no
12888 fi
12889 rm -f conftest*
12890 fi
12891
12892 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
12893 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
12894         cat >> confdefs.h <<\EOF
12895 #define LINUX_QUOTAS_2 1
12896 EOF
12897
12898 else
12899         cat >> confdefs.h <<\EOF
12900 #define LINUX_QUOTAS_1 1
12901 EOF
12902
12903 fi
12904         ;;
12905       *)
12906         ;;
12907     esac
12908     QUOTAOBJS=smbd/quotas.o
12909     cat >> confdefs.h <<\EOF
12910 #define WITH_QUOTAS 1
12911 EOF
12912
12913     ;;
12914   *)
12915     echo "$ac_t""no" 1>&6
12916     ;;
12917   esac 
12918 else
12919   echo "$ac_t""no" 1>&6
12920
12921 fi
12922
12923
12924
12925 #################################################
12926 # check for experimental utmp accounting
12927
12928 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
12929 echo "configure:12930: checking whether to support utmp accounting" >&5
12930 # Check whether --with-utmp or --without-utmp was given.
12931 if test "${with_utmp+set}" = set; then
12932   withval="$with_utmp"
12933    case "$withval" in
12934   yes)
12935     echo "$ac_t""yes" 1>&6
12936     cat >> confdefs.h <<\EOF
12937 #define WITH_UTMP 1
12938 EOF
12939
12940     ;;
12941   *)
12942     echo "$ac_t""no" 1>&6
12943     ;;
12944   esac 
12945 else
12946   echo "$ac_t""no" 1>&6
12947
12948 fi
12949
12950
12951 #################################################
12952 # set private directory location
12953 # Check whether --with-privatedir or --without-privatedir was given.
12954 if test "${with_privatedir+set}" = set; then
12955   withval="$with_privatedir"
12956    case "$withval" in
12957   yes|no)
12958   #
12959   # Just in case anybody calls it without argument
12960   #
12961     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
12962     privatedir='${prefix}/private'
12963   ;;
12964   * )
12965     privatedir="$withval"
12966     ;;
12967   esac
12968   
12969 else
12970   privatedir='${prefix}/private'
12971    
12972
12973 fi
12974
12975
12976 #################################################
12977 # set lock directory location
12978 # Check whether --with-lockdir or --without-lockdir was given.
12979 if test "${with_lockdir+set}" = set; then
12980   withval="$with_lockdir"
12981    case "$withval" in
12982   yes|no)
12983   #
12984   # Just in case anybody calls it without argument
12985   #
12986     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
12987     lockdir='$(VARDIR)/locks'
12988   ;;
12989   * )
12990     lockdir="$withval"
12991     ;;
12992   esac
12993   
12994 else
12995   lockdir='$(VARDIR)/locks'
12996    
12997
12998 fi
12999
13000
13001 #################################################
13002 # set SWAT directory location
13003 # Check whether --with-swatdir or --without-swatdir was given.
13004 if test "${with_swatdir+set}" = set; then
13005   withval="$with_swatdir"
13006    case "$withval" in
13007   yes|no)
13008   #
13009   # Just in case anybody does it
13010   #
13011     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
13012     swatdir='${prefix}/swat'
13013   ;;
13014   * )
13015     swatdir="$withval"
13016     ;;
13017   esac
13018   
13019 else
13020   swatdir='${prefix}/swat'
13021    
13022
13023 fi
13024
13025
13026 #################################################
13027 # choose native language(s) of man pages
13028 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
13029 echo "configure:13030: checking chosen man pages' language(s)" >&5
13030 # Check whether --with-manpages-langs or --without-manpages-langs was given.
13031 if test "${with_manpages_langs+set}" = set; then
13032   withval="$with_manpages_langs"
13033    case "$withval" in
13034   yes|no)
13035     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
13036     manlangs="en"
13037   ;;
13038   *)
13039     manlangs="$withval"
13040   ;;
13041   esac
13042
13043   echo "$ac_t""$manlangs" 1>&6
13044   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
13045   
13046 else
13047   manlangs="en"
13048   echo "$ac_t""$manlangs" 1>&6
13049   
13050
13051 fi
13052
13053
13054 #################################################
13055 # these tests are taken from the GNU fileutils package
13056 echo "checking how to get filesystem space usage" 1>&6
13057 echo "configure:13058: checking how to get filesystem space usage" >&5
13058 space=no
13059
13060 # Test for statvfs64.
13061 if test $space = no; then
13062   # SVR4
13063   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
13064 echo "configure:13065: checking statvfs64 function (SVR4)" >&5
13065 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
13066   echo $ac_n "(cached) $ac_c" 1>&6
13067 else
13068   if test "$cross_compiling" = yes; then
13069   fu_cv_sys_stat_statvfs64=cross
13070 else
13071   cat > conftest.$ac_ext <<EOF
13072 #line 13073 "configure"
13073 #include "confdefs.h"
13074
13075 #if defined(HAVE_UNISTD_H)
13076 #include <unistd.h>
13077 #endif
13078 #include <sys/types.h>
13079 #include <sys/statvfs.h>
13080   main ()
13081   {
13082     struct statvfs64 fsd;
13083     exit (statvfs64 (".", &fsd));
13084   }
13085 EOF
13086 if { (eval echo configure:13087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13087 then
13088   fu_cv_sys_stat_statvfs64=yes
13089 else
13090   echo "configure: failed program was:" >&5
13091   cat conftest.$ac_ext >&5
13092   rm -fr conftest*
13093   fu_cv_sys_stat_statvfs64=no
13094 fi
13095 rm -fr conftest*
13096 fi
13097
13098 fi
13099
13100 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
13101   if test $fu_cv_sys_stat_statvfs64 = yes; then
13102     space=yes
13103     cat >> confdefs.h <<\EOF
13104 #define STAT_STATVFS64 1
13105 EOF
13106
13107   fi
13108 fi
13109
13110 # Perform only the link test since it seems there are no variants of the
13111 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
13112 # because that got a false positive on SCO OSR5.  Adding the declaration
13113 # of a `struct statvfs' causes this test to fail (as it should) on such
13114 # systems.  That system is reported to work fine with STAT_STATFS4 which
13115 # is what it gets when this test fails.
13116 if test $space = no; then
13117   # SVR4
13118   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
13119 echo "configure:13120: checking statvfs function (SVR4)" >&5
13120 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
13121   echo $ac_n "(cached) $ac_c" 1>&6
13122 else
13123   cat > conftest.$ac_ext <<EOF
13124 #line 13125 "configure"
13125 #include "confdefs.h"
13126 #include <sys/types.h>
13127 #include <sys/statvfs.h>
13128 int main() {
13129 struct statvfs fsd; statvfs (0, &fsd);
13130 ; return 0; }
13131 EOF
13132 if { (eval echo configure:13133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13133   rm -rf conftest*
13134   fu_cv_sys_stat_statvfs=yes
13135 else
13136   echo "configure: failed program was:" >&5
13137   cat conftest.$ac_ext >&5
13138   rm -rf conftest*
13139   fu_cv_sys_stat_statvfs=no
13140 fi
13141 rm -f conftest*
13142 fi
13143
13144 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
13145   if test $fu_cv_sys_stat_statvfs = yes; then
13146     space=yes
13147     cat >> confdefs.h <<\EOF
13148 #define STAT_STATVFS 1
13149 EOF
13150
13151   fi
13152 fi
13153
13154 if test $space = no; then
13155   # DEC Alpha running OSF/1
13156   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
13157 echo "configure:13158: checking for 3-argument statfs function (DEC OSF/1)" >&5
13158   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
13159   echo $ac_n "(cached) $ac_c" 1>&6
13160 else
13161   if test "$cross_compiling" = yes; then
13162   fu_cv_sys_stat_statfs3_osf1=no
13163 else
13164   cat > conftest.$ac_ext <<EOF
13165 #line 13166 "configure"
13166 #include "confdefs.h"
13167
13168 #include <sys/param.h>
13169 #include <sys/types.h>
13170 #include <sys/mount.h>
13171   main ()
13172   {
13173     struct statfs fsd;
13174     fsd.f_fsize = 0;
13175     exit (statfs (".", &fsd, sizeof (struct statfs)));
13176   }
13177 EOF
13178 if { (eval echo configure:13179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13179 then
13180   fu_cv_sys_stat_statfs3_osf1=yes
13181 else
13182   echo "configure: failed program was:" >&5
13183   cat conftest.$ac_ext >&5
13184   rm -fr conftest*
13185   fu_cv_sys_stat_statfs3_osf1=no
13186 fi
13187 rm -fr conftest*
13188 fi
13189
13190 fi
13191
13192   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
13193   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
13194     space=yes
13195     cat >> confdefs.h <<\EOF
13196 #define STAT_STATFS3_OSF1 1
13197 EOF
13198
13199   fi
13200 fi
13201
13202 if test $space = no; then
13203 # AIX
13204   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
13205 echo "configure:13206: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
13206   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
13207   echo $ac_n "(cached) $ac_c" 1>&6
13208 else
13209   if test "$cross_compiling" = yes; then
13210   fu_cv_sys_stat_statfs2_bsize=no
13211 else
13212   cat > conftest.$ac_ext <<EOF
13213 #line 13214 "configure"
13214 #include "confdefs.h"
13215
13216 #ifdef HAVE_SYS_PARAM_H
13217 #include <sys/param.h>
13218 #endif
13219 #ifdef HAVE_SYS_MOUNT_H
13220 #include <sys/mount.h>
13221 #endif
13222 #ifdef HAVE_SYS_VFS_H
13223 #include <sys/vfs.h>
13224 #endif
13225   main ()
13226   {
13227   struct statfs fsd;
13228   fsd.f_bsize = 0;
13229   exit (statfs (".", &fsd));
13230   }
13231 EOF
13232 if { (eval echo configure:13233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13233 then
13234   fu_cv_sys_stat_statfs2_bsize=yes
13235 else
13236   echo "configure: failed program was:" >&5
13237   cat conftest.$ac_ext >&5
13238   rm -fr conftest*
13239   fu_cv_sys_stat_statfs2_bsize=no
13240 fi
13241 rm -fr conftest*
13242 fi
13243
13244 fi
13245
13246   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
13247   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
13248     space=yes
13249     cat >> confdefs.h <<\EOF
13250 #define STAT_STATFS2_BSIZE 1
13251 EOF
13252
13253   fi
13254 fi
13255
13256 if test $space = no; then
13257 # SVR3
13258   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
13259 echo "configure:13260: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
13260   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
13261   echo $ac_n "(cached) $ac_c" 1>&6
13262 else
13263   if test "$cross_compiling" = yes; then
13264   fu_cv_sys_stat_statfs4=no
13265 else
13266   cat > conftest.$ac_ext <<EOF
13267 #line 13268 "configure"
13268 #include "confdefs.h"
13269 #include <sys/types.h>
13270 #include <sys/statfs.h>
13271   main ()
13272   {
13273   struct statfs fsd;
13274   exit (statfs (".", &fsd, sizeof fsd, 0));
13275   }
13276 EOF
13277 if { (eval echo configure:13278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13278 then
13279   fu_cv_sys_stat_statfs4=yes
13280 else
13281   echo "configure: failed program was:" >&5
13282   cat conftest.$ac_ext >&5
13283   rm -fr conftest*
13284   fu_cv_sys_stat_statfs4=no
13285 fi
13286 rm -fr conftest*
13287 fi
13288
13289 fi
13290
13291   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
13292   if test $fu_cv_sys_stat_statfs4 = yes; then
13293     space=yes
13294     cat >> confdefs.h <<\EOF
13295 #define STAT_STATFS4 1
13296 EOF
13297
13298   fi
13299 fi
13300
13301 if test $space = no; then
13302 # 4.4BSD and NetBSD
13303   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
13304 echo "configure:13305: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
13305   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
13306   echo $ac_n "(cached) $ac_c" 1>&6
13307 else
13308   if test "$cross_compiling" = yes; then
13309   fu_cv_sys_stat_statfs2_fsize=no
13310 else
13311   cat > conftest.$ac_ext <<EOF
13312 #line 13313 "configure"
13313 #include "confdefs.h"
13314 #include <sys/types.h>
13315 #ifdef HAVE_SYS_PARAM_H
13316 #include <sys/param.h>
13317 #endif
13318 #ifdef HAVE_SYS_MOUNT_H
13319 #include <sys/mount.h>
13320 #endif
13321   main ()
13322   {
13323   struct statfs fsd;
13324   fsd.f_fsize = 0;
13325   exit (statfs (".", &fsd));
13326   }
13327 EOF
13328 if { (eval echo configure:13329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13329 then
13330   fu_cv_sys_stat_statfs2_fsize=yes
13331 else
13332   echo "configure: failed program was:" >&5
13333   cat conftest.$ac_ext >&5
13334   rm -fr conftest*
13335   fu_cv_sys_stat_statfs2_fsize=no
13336 fi
13337 rm -fr conftest*
13338 fi
13339
13340 fi
13341
13342   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
13343   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
13344     space=yes
13345     cat >> confdefs.h <<\EOF
13346 #define STAT_STATFS2_FSIZE 1
13347 EOF
13348
13349   fi
13350 fi
13351
13352 if test $space = no; then
13353   # Ultrix
13354   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
13355 echo "configure:13356: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
13356   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
13357   echo $ac_n "(cached) $ac_c" 1>&6
13358 else
13359   if test "$cross_compiling" = yes; then
13360   fu_cv_sys_stat_fs_data=no
13361 else
13362   cat > conftest.$ac_ext <<EOF
13363 #line 13364 "configure"
13364 #include "confdefs.h"
13365 #include <sys/types.h>
13366 #ifdef HAVE_SYS_PARAM_H
13367 #include <sys/param.h>
13368 #endif
13369 #ifdef HAVE_SYS_MOUNT_H
13370 #include <sys/mount.h>
13371 #endif
13372 #ifdef HAVE_SYS_FS_TYPES_H
13373 #include <sys/fs_types.h>
13374 #endif
13375   main ()
13376   {
13377   struct fs_data fsd;
13378   /* Ultrix's statfs returns 1 for success,
13379      0 for not mounted, -1 for failure.  */
13380   exit (statfs (".", &fsd) != 1);
13381   }
13382 EOF
13383 if { (eval echo configure:13384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13384 then
13385   fu_cv_sys_stat_fs_data=yes
13386 else
13387   echo "configure: failed program was:" >&5
13388   cat conftest.$ac_ext >&5
13389   rm -fr conftest*
13390   fu_cv_sys_stat_fs_data=no
13391 fi
13392 rm -fr conftest*
13393 fi
13394
13395 fi
13396
13397   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
13398   if test $fu_cv_sys_stat_fs_data = yes; then
13399     space=yes
13400     cat >> confdefs.h <<\EOF
13401 #define STAT_STATFS2_FS_DATA 1
13402 EOF
13403
13404   fi
13405 fi
13406
13407 #
13408 # As a gating factor for large file support, in order to
13409 # use <4GB files we must have the following minimal support
13410 # available.
13411 # long long, and a 64 bit off_t or off64_t.
13412 # If we don't have all of these then disable large
13413 # file support.
13414 #
13415 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
13416 echo "configure:13417: checking if large file support can be enabled" >&5
13417 cat > conftest.$ac_ext <<EOF
13418 #line 13419 "configure"
13419 #include "confdefs.h"
13420
13421 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
13422 #include <sys/types.h>
13423 #else
13424 __COMPILE_ERROR_
13425 #endif
13426
13427 int main() {
13428 int i
13429 ; return 0; }
13430 EOF
13431 if { (eval echo configure:13432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13432   rm -rf conftest*
13433   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
13434 else
13435   echo "configure: failed program was:" >&5
13436   cat conftest.$ac_ext >&5
13437   rm -rf conftest*
13438   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
13439 fi
13440 rm -f conftest*
13441 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
13442     cat >> confdefs.h <<\EOF
13443 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
13444 EOF
13445
13446 fi
13447 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
13448
13449 # Check whether --with-spinlocks or --without-spinlocks was given.
13450 if test "${with_spinlocks+set}" = set; then
13451   withval="$with_spinlocks"
13452   :
13453 fi
13454
13455 if test "x$with_spinlocks" = "xyes"; then
13456     cat >> confdefs.h <<\EOF
13457 #define USE_SPINLOCKS 1
13458 EOF
13459
13460
13461     case "$host_cpu" in
13462         sparc)
13463             cat >> confdefs.h <<\EOF
13464 #define SPARC_SPINLOCKS 1
13465 EOF
13466
13467             ;;
13468
13469         i386|i486|i586|i686)
13470             cat >> confdefs.h <<\EOF
13471 #define INTEL_SPINLOCKS 1
13472 EOF
13473
13474             ;;
13475
13476         mips)
13477             cat >> confdefs.h <<\EOF
13478 #define MIPS_SPINLOCKS 1
13479 EOF
13480
13481             ;;
13482
13483         powerpc)
13484             cat >> confdefs.h <<\EOF
13485 #define POWERPC_SPINLOCKS 1
13486 EOF
13487
13488             ;;
13489     esac
13490 fi
13491
13492 #################################################
13493 # check for ACL support
13494
13495 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
13496 echo "configure:13497: checking whether to support ACLs" >&5
13497 # Check whether --with-acl-support or --without-acl-support was given.
13498 if test "${with_acl_support+set}" = set; then
13499   withval="$with_acl_support"
13500    case "$withval" in
13501   yes)
13502
13503         case "$host_os" in
13504         *sysv5*)
13505                 echo "$ac_t""Using UnixWare ACLs" 1>&6
13506                 cat >> confdefs.h <<\EOF
13507 #define HAVE_UNIXWARE_ACLS 1
13508 EOF
13509
13510                 ;;
13511         *solaris*)
13512                 echo "$ac_t""Using solaris ACLs" 1>&6
13513                 cat >> confdefs.h <<\EOF
13514 #define HAVE_SOLARIS_ACLS 1
13515 EOF
13516
13517                 ;;
13518         *hpux*)
13519                 echo "$ac_t""Using HPUX ACLs" 1>&6
13520                 cat >> confdefs.h <<\EOF
13521 #define HAVE_HPUX_ACLS 1
13522 EOF
13523
13524                 ;;
13525         *irix*)
13526                 echo "$ac_t""Using IRIX ACLs" 1>&6
13527                 cat >> confdefs.h <<\EOF
13528 #define HAVE_IRIX_ACLS 1
13529 EOF
13530
13531                 ;;
13532         *aix*)
13533                 echo "$ac_t""Using AIX ACLs" 1>&6
13534                 cat >> confdefs.h <<\EOF
13535 #define HAVE_AIX_ACLS 1
13536 EOF
13537
13538                 ;;
13539         *osf*)
13540                 echo "$ac_t""Using Tru64 ACLs" 1>&6
13541                 cat >> confdefs.h <<\EOF
13542 #define HAVE_TRU64_ACLS 1
13543 EOF
13544
13545                 LIBS="$LIBS -lpacl"
13546                 ;;
13547         *)
13548                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
13549 echo "configure:13550: checking for acl_get_file in -lacl" >&5
13550 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
13551 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13552   echo $ac_n "(cached) $ac_c" 1>&6
13553 else
13554   ac_save_LIBS="$LIBS"
13555 LIBS="-lacl  $LIBS"
13556 cat > conftest.$ac_ext <<EOF
13557 #line 13558 "configure"
13558 #include "confdefs.h"
13559 /* Override any gcc2 internal prototype to avoid an error.  */
13560 /* We use char because int might match the return type of a gcc2
13561     builtin and then its argument prototype would still apply.  */
13562 char acl_get_file();
13563
13564 int main() {
13565 acl_get_file()
13566 ; return 0; }
13567 EOF
13568 if { (eval echo configure:13569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13569   rm -rf conftest*
13570   eval "ac_cv_lib_$ac_lib_var=yes"
13571 else
13572   echo "configure: failed program was:" >&5
13573   cat conftest.$ac_ext >&5
13574   rm -rf conftest*
13575   eval "ac_cv_lib_$ac_lib_var=no"
13576 fi
13577 rm -f conftest*
13578 LIBS="$ac_save_LIBS"
13579
13580 fi
13581 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13582   echo "$ac_t""yes" 1>&6
13583     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13584     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13585   cat >> confdefs.h <<EOF
13586 #define $ac_tr_lib 1
13587 EOF
13588
13589   LIBS="-lacl $LIBS"
13590
13591 else
13592   echo "$ac_t""no" 1>&6
13593 fi
13594
13595                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13596 echo "configure:13597: checking for ACL support" >&5
13597 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
13598   echo $ac_n "(cached) $ac_c" 1>&6
13599 else
13600   
13601                 cat > conftest.$ac_ext <<EOF
13602 #line 13603 "configure"
13603 #include "confdefs.h"
13604 #include <sys/types.h>
13605 #include <sys/acl.h>
13606 int main() {
13607  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
13608 ; return 0; }
13609 EOF
13610 if { (eval echo configure:13611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13611   rm -rf conftest*
13612   samba_cv_HAVE_POSIX_ACLS=yes
13613 else
13614   echo "configure: failed program was:" >&5
13615   cat conftest.$ac_ext >&5
13616   rm -rf conftest*
13617   samba_cv_HAVE_POSIX_ACLS=no
13618 fi
13619 rm -f conftest*
13620 fi
13621
13622 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13623                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13624                                 echo "$ac_t""Using posix ACLs" 1>&6
13625                                 cat >> confdefs.h <<\EOF
13626 #define HAVE_POSIX_ACLS 1
13627 EOF
13628
13629                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13630 echo "configure:13631: checking for acl_get_perm_np" >&5
13631 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13632   echo $ac_n "(cached) $ac_c" 1>&6
13633 else
13634   
13635                                 cat > conftest.$ac_ext <<EOF
13636 #line 13637 "configure"
13637 #include "confdefs.h"
13638 #include <sys/types.h>
13639 #include <sys/acl.h>
13640 int main() {
13641  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13642 ; return 0; }
13643 EOF
13644 if { (eval echo configure:13645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13645   rm -rf conftest*
13646   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13647 else
13648   echo "configure: failed program was:" >&5
13649   cat conftest.$ac_ext >&5
13650   rm -rf conftest*
13651   samba_cv_HAVE_ACL_GET_PERM_NP=no
13652 fi
13653 rm -f conftest*
13654 fi
13655
13656 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13657                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13658                                         cat >> confdefs.h <<\EOF
13659 #define HAVE_ACL_GET_PERM_NP 1
13660 EOF
13661
13662                                 fi
13663                         fi
13664             ;;
13665         esac
13666         ;;
13667   *)
13668     echo "$ac_t""no" 1>&6
13669     cat >> confdefs.h <<\EOF
13670 #define HAVE_NO_ACLS 1
13671 EOF
13672
13673     ;;
13674   esac 
13675 else
13676   cat >> confdefs.h <<\EOF
13677 #define HAVE_NO_ACLS 1
13678 EOF
13679
13680   echo "$ac_t""no" 1>&6
13681
13682 fi
13683
13684
13685 #################################################
13686 # Check whether winbind is supported on this platform.  If so we need to
13687 # build and install client programs (WINBIND_TARGETS), sbin programs
13688 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
13689
13690 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
13691 echo "configure:13692: checking whether to build winbind" >&5
13692
13693 # Initially, the value of $host_os decides whether winbind is supported
13694
13695 case "$host_os" in
13696         *linux*|*irix*)
13697                 HAVE_WINBIND=yes
13698                 ;;
13699         *solaris*)
13700                 HAVE_WINBIND=yes
13701                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
13702                 WINBIND_NSS_EXTRA_LIBS="-lsocket"
13703                 ;;
13704         *hpux11*)
13705                 HAVE_WINBIND=yes
13706                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
13707                 ;;
13708         *)
13709                 HAVE_WINBIND=no
13710                 winbind_no_reason=", unsupported on $host_os"
13711                 ;;
13712 esac
13713
13714 # Check the setting of --with-winbindd
13715
13716 # Check whether --with-winbind or --without-winbind was given.
13717 if test "${with_winbind+set}" = set; then
13718   withval="$with_winbind"
13719    
13720   case "$withval" in
13721         yes)
13722                 HAVE_WINBIND=yes
13723                 ;;
13724         no)
13725                 HAVE_WINBIND=no
13726                 winbind_reason=""
13727                 ;;
13728   esac 
13729 fi
13730
13731
13732 # We need unix domain sockets for winbind
13733
13734 if test x"$HAVE_WINBIND" = x"yes"; then
13735         if test x"$samba_cv_unixsocket" = x"no"; then
13736                 winbind_no_reason=", no unix domain socket support on $host_os"
13737                 HAVE_WINBIND=no
13738         fi
13739 fi
13740
13741 # Display test results
13742
13743 WINBIND_TARGETS=""
13744 WINBIND_STARGETS=""
13745 WINBIND_LTARGETS=""
13746 WINBIND_PAM_PROGS=""
13747
13748 if test x"$HAVE_WINBIND" = x"yes"; then
13749         echo "$ac_t""yes" 1>&6
13750
13751         WINBIND_TARGETS="bin/wbinfo"
13752         WINBIND_STARGETS="bin/winbindd"
13753         if test x"$BLDSHARED" = x"true"; then
13754                 WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
13755                 if test x"$with_pam" = x"yes"; then
13756                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
13757                 fi
13758         fi
13759 else
13760         echo "$ac_t""no$winbind_no_reason" 1>&6
13761 fi
13762
13763 # Substitution time!
13764
13765
13766
13767
13768
13769
13770
13771
13772 # Solaris has some extra fields in struct passwd that need to be
13773 # initialised otherwise nscd crashes.  Unfortunately autoconf < 2.50
13774 # doesn't have the AC_CHECK_MEMBER macro which would be handy for checking
13775 # this. 
13776
13777 #AC_CHECK_MEMBER(struct passwd.pw_comment,
13778 #               AC_DEFINE(HAVE_PASSWD_PW_COMMENT, 1, [Defined if struct passwd has pw_comment field]),
13779 #               [#include <pwd.h>])
13780
13781 echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6
13782 echo "configure:13783: checking whether struct passwd has pw_comment" >&5
13783 if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then
13784   echo $ac_n "(cached) $ac_c" 1>&6
13785 else
13786   
13787     cat > conftest.$ac_ext <<EOF
13788 #line 13789 "configure"
13789 #include "confdefs.h"
13790 #include <pwd.h>
13791 int main() {
13792 struct passwd p; p.pw_comment;
13793 ; return 0; }
13794 EOF
13795 if { (eval echo configure:13796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13796   rm -rf conftest*
13797   samba_cv_passwd_pw_comment=yes
13798 else
13799   echo "configure: failed program was:" >&5
13800   cat conftest.$ac_ext >&5
13801   rm -rf conftest*
13802   samba_cv_passwd_pw_comment=no
13803 fi
13804 rm -f conftest*
13805 fi
13806
13807 echo "$ac_t""$samba_cv_passwd_pw_comment" 1>&6
13808 if test x"$samba_cv_passwd_pw_comment" = x"yes"; then
13809    cat >> confdefs.h <<\EOF
13810 #define HAVE_PASSWD_PW_COMMENT 1
13811 EOF
13812
13813 fi
13814
13815 #AC_CHECK_MEMBER(struct passwd.pw_age,
13816 #               AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]),
13817 #               [#include <pwd.h>])
13818
13819 echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6
13820 echo "configure:13821: checking whether struct passwd has pw_age" >&5
13821 if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then
13822   echo $ac_n "(cached) $ac_c" 1>&6
13823 else
13824   
13825     cat > conftest.$ac_ext <<EOF
13826 #line 13827 "configure"
13827 #include "confdefs.h"
13828 #include <pwd.h>
13829 int main() {
13830 struct passwd p; p.pw_age;
13831 ; return 0; }
13832 EOF
13833 if { (eval echo configure:13834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13834   rm -rf conftest*
13835   samba_cv_passwd_pw_age=yes
13836 else
13837   echo "configure: failed program was:" >&5
13838   cat conftest.$ac_ext >&5
13839   rm -rf conftest*
13840   samba_cv_passwd_pw_age=no
13841 fi
13842 rm -f conftest*
13843 fi
13844
13845 echo "$ac_t""$samba_cv_passwd_pw_age" 1>&6
13846 if test x"$samba_cv_passwd_pw_age" = x"yes"; then
13847    cat >> confdefs.h <<\EOF
13848 #define HAVE_PASSWD_PW_AGE 1
13849 EOF
13850
13851 fi
13852
13853 #################################################
13854 # Check to see if we should use the included popt 
13855
13856 # Check whether --with-included-popt or --without-included-popt was given.
13857 if test "${with_included_popt+set}" = set; then
13858   withval="$with_included_popt"
13859    
13860   case "$withval" in
13861         yes)
13862                 INCLUDED_POPT=yes
13863                 ;;
13864         no)
13865                 INCLUDED_POPT=no
13866                 ;;
13867   esac 
13868 fi
13869
13870 if test x"$INCLUDED_POPT" != x"yes"; then
13871     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
13872 echo "configure:13873: checking for poptGetContext in -lpopt" >&5
13873 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
13874 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13875   echo $ac_n "(cached) $ac_c" 1>&6
13876 else
13877   ac_save_LIBS="$LIBS"
13878 LIBS="-lpopt  $LIBS"
13879 cat > conftest.$ac_ext <<EOF
13880 #line 13881 "configure"
13881 #include "confdefs.h"
13882 /* Override any gcc2 internal prototype to avoid an error.  */
13883 /* We use char because int might match the return type of a gcc2
13884     builtin and then its argument prototype would still apply.  */
13885 char poptGetContext();
13886
13887 int main() {
13888 poptGetContext()
13889 ; return 0; }
13890 EOF
13891 if { (eval echo configure:13892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13892   rm -rf conftest*
13893   eval "ac_cv_lib_$ac_lib_var=yes"
13894 else
13895   echo "configure: failed program was:" >&5
13896   cat conftest.$ac_ext >&5
13897   rm -rf conftest*
13898   eval "ac_cv_lib_$ac_lib_var=no"
13899 fi
13900 rm -f conftest*
13901 LIBS="$ac_save_LIBS"
13902
13903 fi
13904 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13905   echo "$ac_t""yes" 1>&6
13906   INCLUDED_POPT=no
13907 else
13908   echo "$ac_t""no" 1>&6
13909 INCLUDED_POPT=yes
13910 fi
13911
13912 fi
13913
13914 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
13915 echo "configure:13916: checking whether to use included popt" >&5
13916 if test x"$INCLUDED_POPT" = x"yes"; then
13917     echo "$ac_t""$srcdir/popt" 1>&6
13918     BUILD_POPT='$(POPT_OBJS)'
13919     FLAGS1="-I$srcdir/popt"
13920 else
13921     echo "$ac_t""no" 1>&6
13922     LIBS="$LIBS -lpopt"
13923 fi
13924
13925
13926
13927 #################################################
13928 # do extra things if we are running insure
13929
13930 if test "${ac_cv_prog_CC}" = "insure"; then
13931         CPPFLAGS="$CPPFLAGS -D__INSURE__"
13932 fi
13933
13934 #################################################
13935 # final configure stuff
13936
13937 echo $ac_n "checking configure summary""... $ac_c" 1>&6
13938 echo "configure:13939: checking configure summary" >&5
13939 if test "$cross_compiling" = yes; then
13940   echo "configure: warning: cannot run when cross-compiling" 1>&2
13941 else
13942   cat > conftest.$ac_ext <<EOF
13943 #line 13944 "configure"
13944 #include "confdefs.h"
13945 #include "${srcdir-.}/tests/summary.c"
13946 EOF
13947 if { (eval echo configure:13948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13948 then
13949   echo "$ac_t""yes" 1>&6
13950 else
13951   echo "configure: failed program was:" >&5
13952   cat conftest.$ac_ext >&5
13953   rm -fr conftest*
13954   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }; exit 1;
13955 fi
13956 rm -fr conftest*
13957 fi
13958
13959
13960 builddir=`pwd`
13961
13962
13963 trap '' 1 2 15
13964 cat > confcache <<\EOF
13965 # This file is a shell script that caches the results of configure
13966 # tests run on this system so they can be shared between configure
13967 # scripts and configure runs.  It is not useful on other systems.
13968 # If it contains results you don't want to keep, you may remove or edit it.
13969 #
13970 # By default, configure uses ./config.cache as the cache file,
13971 # creating it if it does not exist already.  You can give configure
13972 # the --cache-file=FILE option to use a different cache file; that is
13973 # what configure does when it calls configure scripts in
13974 # subdirectories, so they share the cache.
13975 # Giving --cache-file=/dev/null disables caching, for debugging configure.
13976 # config.status only pays attention to the cache file if you give it the
13977 # --recheck option to rerun configure.
13978 #
13979 EOF
13980 # The following way of writing the cache mishandles newlines in values,
13981 # but we know of no workaround that is simple, portable, and efficient.
13982 # So, don't put newlines in cache variables' values.
13983 # Ultrix sh set writes to stderr and can't be redirected directly,
13984 # and sets the high bit in the cache file unless we assign to the vars.
13985 (set) 2>&1 |
13986   case `(ac_space=' '; set | grep ac_space) 2>&1` in
13987   *ac_space=\ *)
13988     # `set' does not quote correctly, so add quotes (double-quote substitution
13989     # turns \\\\ into \\, and sed turns \\ into \).
13990     sed -n \
13991       -e "s/'/'\\\\''/g" \
13992       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
13993     ;;
13994   *)
13995     # `set' quotes correctly as required by POSIX, so do not add quotes.
13996     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
13997     ;;
13998   esac >> confcache
13999 if cmp -s $cache_file confcache; then
14000   :
14001 else
14002   if test -w $cache_file; then
14003     echo "updating cache $cache_file"
14004     cat confcache > $cache_file
14005   else
14006     echo "not updating unwritable cache $cache_file"
14007   fi
14008 fi
14009 rm -f confcache
14010
14011 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14012
14013 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14014 # Let make expand exec_prefix.
14015 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14016
14017 # Any assignment to VPATH causes Sun make to only execute
14018 # the first set of double-colon rules, so remove it if not needed.
14019 # If there is a colon in the path, we need to keep it.
14020 if test "x$srcdir" = x.; then
14021   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14022 fi
14023
14024 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14025
14026 DEFS=-DHAVE_CONFIG_H
14027
14028 # Without the "./", some shells look in PATH for config.status.
14029 : ${CONFIG_STATUS=./config.status}
14030
14031 echo creating $CONFIG_STATUS
14032 rm -f $CONFIG_STATUS
14033 cat > $CONFIG_STATUS <<EOF
14034 #! /bin/sh
14035 # Generated automatically by configure.
14036 # Run this file to recreate the current configuration.
14037 # This directory was configured as follows,
14038 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14039 #
14040 # $0 $ac_configure_args
14041 #
14042 # Compiler output produced by configure, useful for debugging
14043 # configure, is in ./config.log if it exists.
14044
14045 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14046 for ac_option
14047 do
14048   case "\$ac_option" in
14049   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14050     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14051     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14052   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14053     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14054     exit 0 ;;
14055   -help | --help | --hel | --he | --h)
14056     echo "\$ac_cs_usage"; exit 0 ;;
14057   *) echo "\$ac_cs_usage"; exit 1 ;;
14058   esac
14059 done
14060
14061 ac_given_srcdir=$srcdir
14062 ac_given_INSTALL="$INSTALL"
14063
14064 trap 'rm -fr `echo "include/stamp-h Makefile script/findsmb include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14065 EOF
14066 cat >> $CONFIG_STATUS <<EOF
14067
14068 # Protect against being on the right side of a sed subst in config.status.
14069 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14070  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14071 $ac_vpsub
14072 $extrasub
14073 s%@SHELL@%$SHELL%g
14074 s%@CFLAGS@%$CFLAGS%g
14075 s%@CPPFLAGS@%$CPPFLAGS%g
14076 s%@CXXFLAGS@%$CXXFLAGS%g
14077 s%@FFLAGS@%$FFLAGS%g
14078 s%@DEFS@%$DEFS%g
14079 s%@LDFLAGS@%$LDFLAGS%g
14080 s%@LIBS@%$LIBS%g
14081 s%@exec_prefix@%$exec_prefix%g
14082 s%@prefix@%$prefix%g
14083 s%@program_transform_name@%$program_transform_name%g
14084 s%@bindir@%$bindir%g
14085 s%@sbindir@%$sbindir%g
14086 s%@libexecdir@%$libexecdir%g
14087 s%@datadir@%$datadir%g
14088 s%@sysconfdir@%$sysconfdir%g
14089 s%@sharedstatedir@%$sharedstatedir%g
14090 s%@localstatedir@%$localstatedir%g
14091 s%@libdir@%$libdir%g
14092 s%@includedir@%$includedir%g
14093 s%@oldincludedir@%$oldincludedir%g
14094 s%@infodir@%$infodir%g
14095 s%@mandir@%$mandir%g
14096 s%@codepagedir@%$codepagedir%g
14097 s%@configdir@%$configdir%g
14098 s%@lockdir@%$lockdir%g
14099 s%@piddir@%$piddir%g
14100 s%@logfilebase@%$logfilebase%g
14101 s%@privatedir@%$privatedir%g
14102 s%@swatdir@%$swatdir%g
14103 s%@RUNPROG@%$RUNPROG%g
14104 s%@MPROGS@%$MPROGS%g
14105 s%@LDSHFLAGS@%$LDSHFLAGS%g
14106 s%@SHLD@%$SHLD%g
14107 s%@HOST_OS@%$HOST_OS%g
14108 s%@PAM_MOD@%$PAM_MOD%g
14109 s%@WRAP@%$WRAP%g
14110 s%@WRAP32@%$WRAP32%g
14111 s%@PICFLAG@%$PICFLAG%g
14112 s%@PICSUFFIX@%$PICSUFFIX%g
14113 s%@POBAD_CC@%$POBAD_CC%g
14114 s%@SHLIBEXT@%$SHLIBEXT%g
14115 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
14116 s%@CC@%$CC%g
14117 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14118 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14119 s%@INSTALL_DATA@%$INSTALL_DATA%g
14120 s%@AWK@%$AWK%g
14121 s%@BROKEN_CC@%$BROKEN_CC%g
14122 s%@host@%$host%g
14123 s%@host_alias@%$host_alias%g
14124 s%@host_cpu@%$host_cpu%g
14125 s%@host_vendor@%$host_vendor%g
14126 s%@host_os@%$host_os%g
14127 s%@target@%$target%g
14128 s%@target_alias@%$target_alias%g
14129 s%@target_cpu@%$target_cpu%g
14130 s%@target_vendor@%$target_vendor%g
14131 s%@target_os@%$target_os%g
14132 s%@build@%$build%g
14133 s%@build_alias@%$build_alias%g
14134 s%@build_cpu@%$build_cpu%g
14135 s%@build_vendor@%$build_vendor%g
14136 s%@build_os@%$build_os%g
14137 s%@CPP@%$CPP%g
14138 s%@LIBOBJS@%$LIBOBJS%g
14139 s%@TERMLIBS@%$TERMLIBS%g
14140 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
14141 s%@ROFF@%$ROFF%g
14142 s%@DYNEXP@%$DYNEXP%g
14143 s%@QUOTAOBJS@%$QUOTAOBJS%g
14144 s%@manlangs@%$manlangs%g
14145 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
14146 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
14147 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
14148 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
14149 s%@WINBIND_NSS_EXTRA_OBJS@%$WINBIND_NSS_EXTRA_OBJS%g
14150 s%@WINBIND_NSS_EXTRA_LIBS@%$WINBIND_NSS_EXTRA_LIBS%g
14151 s%@BUILD_POPT@%$BUILD_POPT%g
14152 s%@FLAGS1@%$FLAGS1%g
14153 s%@builddir@%$builddir%g
14154
14155 CEOF
14156 EOF
14157
14158 cat >> $CONFIG_STATUS <<\EOF
14159
14160 # Split the substitutions into bite-sized pieces for seds with
14161 # small command number limits, like on Digital OSF/1 and HP-UX.
14162 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14163 ac_file=1 # Number of current file.
14164 ac_beg=1 # First line for current file.
14165 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14166 ac_more_lines=:
14167 ac_sed_cmds=""
14168 while $ac_more_lines; do
14169   if test $ac_beg -gt 1; then
14170     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14171   else
14172     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14173   fi
14174   if test ! -s conftest.s$ac_file; then
14175     ac_more_lines=false
14176     rm -f conftest.s$ac_file
14177   else
14178     if test -z "$ac_sed_cmds"; then
14179       ac_sed_cmds="sed -f conftest.s$ac_file"
14180     else
14181       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14182     fi
14183     ac_file=`expr $ac_file + 1`
14184     ac_beg=$ac_end
14185     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14186   fi
14187 done
14188 if test -z "$ac_sed_cmds"; then
14189   ac_sed_cmds=cat
14190 fi
14191 EOF
14192
14193 cat >> $CONFIG_STATUS <<EOF
14194
14195 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile script/findsmb"}
14196 EOF
14197 cat >> $CONFIG_STATUS <<\EOF
14198 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14199   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14200   case "$ac_file" in
14201   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14202        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14203   *) ac_file_in="${ac_file}.in" ;;
14204   esac
14205
14206   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14207
14208   # Remove last slash and all that follows it.  Not all systems have dirname.
14209   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14210   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14211     # The file is in a subdirectory.
14212     test ! -d "$ac_dir" && mkdir "$ac_dir"
14213     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14214     # A "../" for each directory in $ac_dir_suffix.
14215     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14216   else
14217     ac_dir_suffix= ac_dots=
14218   fi
14219
14220   case "$ac_given_srcdir" in
14221   .)  srcdir=.
14222       if test -z "$ac_dots"; then top_srcdir=.
14223       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14224   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14225   *) # Relative path.
14226     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14227     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14228   esac
14229
14230   case "$ac_given_INSTALL" in
14231   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14232   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14233   esac
14234
14235   echo creating "$ac_file"
14236   rm -f "$ac_file"
14237   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14238   case "$ac_file" in
14239   *Makefile*) ac_comsub="1i\\
14240 # $configure_input" ;;
14241   *) ac_comsub= ;;
14242   esac
14243
14244   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14245   sed -e "$ac_comsub
14246 s%@configure_input@%$configure_input%g
14247 s%@srcdir@%$srcdir%g
14248 s%@top_srcdir@%$top_srcdir%g
14249 s%@INSTALL@%$INSTALL%g
14250 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14251 fi; done
14252 rm -f conftest.s*
14253
14254 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14255 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14256 #
14257 # ac_d sets the value in "#define NAME VALUE" lines.
14258 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14259 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14260 ac_dC='\3'
14261 ac_dD='%g'
14262 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14263 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14264 ac_uB='\([      ]\)%\1#\2define\3'
14265 ac_uC=' '
14266 ac_uD='\4%g'
14267 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14268 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14269 ac_eB='$%\1#\2define\3'
14270 ac_eC=' '
14271 ac_eD='%g'
14272
14273 if test "${CONFIG_HEADERS+set}" != set; then
14274 EOF
14275 cat >> $CONFIG_STATUS <<EOF
14276   CONFIG_HEADERS="include/config.h"
14277 EOF
14278 cat >> $CONFIG_STATUS <<\EOF
14279 fi
14280 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14281   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14282   case "$ac_file" in
14283   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14284        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14285   *) ac_file_in="${ac_file}.in" ;;
14286   esac
14287
14288   echo creating $ac_file
14289
14290   rm -f conftest.frag conftest.in conftest.out
14291   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14292   cat $ac_file_inputs > conftest.in
14293
14294 EOF
14295
14296 # Transform confdefs.h into a sed script conftest.vals that substitutes
14297 # the proper values into config.h.in to produce config.h.  And first:
14298 # Protect against being on the right side of a sed subst in config.status.
14299 # Protect against being in an unquoted here document in config.status.
14300 rm -f conftest.vals
14301 cat > conftest.hdr <<\EOF
14302 s/[\\&%]/\\&/g
14303 s%[\\$`]%\\&%g
14304 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14305 s%ac_d%ac_u%gp
14306 s%ac_u%ac_e%gp
14307 EOF
14308 sed -n -f conftest.hdr confdefs.h > conftest.vals
14309 rm -f conftest.hdr
14310
14311 # This sed command replaces #undef with comments.  This is necessary, for
14312 # example, in the case of _POSIX_SOURCE, which is predefined and required
14313 # on some systems where configure will not decide to define it.
14314 cat >> conftest.vals <<\EOF
14315 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14316 EOF
14317
14318 # Break up conftest.vals because some shells have a limit on
14319 # the size of here documents, and old seds have small limits too.
14320
14321 rm -f conftest.tail
14322 while :
14323 do
14324   ac_lines=`grep -c . conftest.vals`
14325   # grep -c gives empty output for an empty file on some AIX systems.
14326   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14327   # Write a limited-size here document to conftest.frag.
14328   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14329   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14330   echo 'CEOF
14331   sed -f conftest.frag conftest.in > conftest.out
14332   rm -f conftest.in
14333   mv conftest.out conftest.in
14334 ' >> $CONFIG_STATUS
14335   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14336   rm -f conftest.vals
14337   mv conftest.tail conftest.vals
14338 done
14339 rm -f conftest.vals
14340
14341 cat >> $CONFIG_STATUS <<\EOF
14342   rm -f conftest.frag conftest.h
14343   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14344   cat conftest.in >> conftest.h
14345   rm -f conftest.in
14346   if cmp -s $ac_file conftest.h 2>/dev/null; then
14347     echo "$ac_file is unchanged"
14348     rm -f conftest.h
14349   else
14350     # Remove last slash and all that follows it.  Not all systems have dirname.
14351       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14352       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14353       # The file is in a subdirectory.
14354       test ! -d "$ac_dir" && mkdir "$ac_dir"
14355     fi
14356     rm -f $ac_file
14357     mv conftest.h $ac_file
14358   fi
14359 fi; done
14360
14361 EOF
14362 cat >> $CONFIG_STATUS <<EOF
14363
14364 EOF
14365 cat >> $CONFIG_STATUS <<\EOF
14366
14367 exit 0
14368 EOF
14369 chmod +x $CONFIG_STATUS
14370 rm -fr confdefs* $ac_clean_files
14371 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
14372
14373
14374 #################################################
14375 # Print very concise instructions on building/use
14376 if test "x$enable_dmalloc" = xyes
14377 then
14378         echo "$ac_t""Note: The dmalloc debug library will be included.  To turn it on use" 1>&6
14379         echo "$ac_t""      \$ eval \`dmalloc samba\`." 1>&6
14380 fi